@dittolive/ditto 4.5.3 → 4.5.4
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.
- package/DittoReactNative.podspec +6 -4
- package/README.md +2 -2
- package/node/ditto.cjs.js +1 -1
- package/node/ditto.darwin-arm64.node +0 -0
- package/node/ditto.darwin-x64.node +0 -0
- package/node/ditto.linux-arm.node +0 -0
- package/node/ditto.linux-x64.node +0 -0
- package/node/ditto.win32-x64.node +0 -0
- package/node/transports.darwin-arm64.node +0 -0
- package/node/transports.darwin-x64.node +0 -0
- package/package.json +1 -46
- package/react-native/.yarn/install-state.gz +0 -0
- package/react-native/.yarnrc.yml +1 -0
- package/react-native/android/CMakeLists.txt +0 -1
- package/react-native/android/build.gradle +7 -3
- package/react-native/cpp/src/LiveQuery.cpp +2 -0
- package/web/ditto.es6.js +1 -1
- package/web/ditto.umd.js +1 -1
- package/web/ditto.wasm +0 -0
- package/node/ditto.cjs.js.map +0 -1
- package/node/ditto.cjs.pretty.js +0 -9657
- package/node/ditto.cjs.pretty.js.map +0 -1
- package/types/ditto.d.ts.map +0 -1
- package/web/ditto.es6.js.map +0 -1
- package/web/ditto.es6.pretty.js +0 -12600
- package/web/ditto.es6.pretty.js.map +0 -1
- package/web/ditto.umd.js.map +0 -1
- package/web/ditto.umd.pretty.js +0 -12669
- package/web/ditto.umd.pretty.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ditto.cjs.pretty.js","sources":["../../sources/keep-alive.js","../../sources/observer.js","../../sources/counter.js","../../sources/register.js","../../node/ditto.node.js","../../environment/environment.node.js","../../sources/ffi-error.js","../../sources/ffi.js","../../sources/attachment-token.js","../../sources/build-time-constants.js","../../sources/init.js","../../sources/logger.js","../../cbor-redux/constants.js","../../cbor-redux/helpers.js","../../cbor-redux/Sequence.js","../../cbor-redux/SimpleValue.js","../../cbor-redux/TaggedValue.js","../../cbor-redux/decode.js","../../cbor-redux/encode.js","../../cbor-redux/CBOR.js","../../sources/cbor.js","../../sources/document-id.js","../../sources/bridge.js","../../sources/update-result.js","../../sources/attachment.js","../../sources/augment.js","../../sources/internal.js","../../sources/key-path.js","../../sources/document-path.js","../../sources/document.js","../../sources/update-results-map.js","../../sources/base-pending-cursor-operation.js","../../sources/base-pending-id-specific-operation.js","../../sources/observer-manager.js","../../sources/authenticator.js","../../sources/identity.js","../../sources/transport-config.js","../../sources/subscription.js","../../sources/live-query-event.js","../../sources/live-query.js","../../sources/pending-cursor-operation.js","../../sources/pending-id-specific-operation.js","../../sources/collection.js","../../sources/error-codes.js","../../sources/error.js","../../sources/query-result.js","../../sources/store-observer.js","../../sources/collections-event.js","../../sources/pending-collections-operation.js","../../sources/write-transaction-pending-cursor-operation.js","../../sources/write-transaction-pending-id-specific-operation.js","../../sources/write-transaction-collection.js","../../sources/write-transaction.js","../../sources/store.js","../../sources/presence.js","../../sources/live-query-manager.js","../../sources/presence-manager.js","../../sources/transport-conditions-manager.js","../../sources/sync-subscription.js","../../sources/sync.js","../../sources/subscription-manager.js","../../sources/attachment-fetcher.js","../../sources/attachment-fetcher-manager.js","../../sources/small-peer-info.js","../../sources/ditto.js","../../sources/query-result-item.js","../../sources/test-helpers.js","../../sources/static-tcp-client.js","../../sources/websocket-client.js","../../sources/epilogue.js"],"sourcesContent":["//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\n/** @internal */\nexport class KeepAlive {\n /** @internal */\n get isActive() {\n return this.intervalID !== null;\n }\n /** @internal */\n constructor() {\n this.countsByID = {};\n this.intervalID = null;\n }\n /** @internal */\n retain(id) {\n if (typeof this.countsByID[id] === 'undefined') {\n this.countsByID[id] = 0;\n }\n this.countsByID[id] += 1;\n if (this.intervalID === null) {\n // Keep the process alive as long as there is at least one ID being\n // tracked by setting a time interval with the maximum delay. This will\n // prevent the process from exiting.\n const maxDelay = 2147483647; // Signed 32 bit integer, see docs: https://developer.mozilla.org/en-US/docs/Web/API/setInterval\n this.intervalID = setInterval(() => {\n /* no-op */\n }, maxDelay);\n KeepAlive.finalizationRegistry.register(this, this.intervalID, this);\n }\n }\n /** @internal */\n release(id) {\n if (typeof this.countsByID[id] === 'undefined') {\n throw new Error(`Internal inconsistency, trying to release a keep-alive ID that hasn't been retained before or isn't tracked anymore: ${id}`);\n }\n this.countsByID[id] -= 1;\n if (this.countsByID[id] === 0) {\n delete this.countsByID[id];\n }\n if (Object.keys(this.countsByID).length === 0) {\n // Nothing is tracked anymore, it's safe to clear the interval\n // and let the process do what it wants.\n KeepAlive.finalizationRegistry.unregister(this);\n clearInterval(this.intervalID);\n this.intervalID = null;\n }\n }\n /** @internal */\n currentIDs() {\n return Object.keys(this.countsByID);\n }\n /** @internal */\n countForID(id) {\n var _a;\n return (_a = this.countsByID[id]) !== null && _a !== void 0 ? _a : null;\n }\n}\nKeepAlive.finalizationRegistry = new FinalizationRegistry(clearInterval);\n//# sourceMappingURL=keep-alive.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\n/**\n * Generic observer handle returned by various observation APIs. The observation\n * remains active until the {@link stop | stop()} method is called explicitly or\n * the observer instance is garbage collected. Therefore, to keep the observation\n * alive, you have to keep a reference to the corresponding observer.\n */\nexport class Observer {\n /** @internal */\n get token() {\n return this._token;\n }\n /** @internal */\n constructor(observerManager, token, options = {}) {\n this.observerManager = observerManager;\n this._token = token;\n this.options = options;\n if (options.stopsWhenFinalized) {\n Observer.finalizationRegistry.register(this, { observerManager, token }, this);\n }\n }\n /**\n * Returns `true` if the observer has been explicitly stopped via the `stop()`\n * method. Otherwise returns `false`.\n */\n get isStopped() {\n return this.token !== undefined && this.observerManager.hasObserver(this.token);\n }\n /**\n * Stops the observation. Calling this method multiple times has no effect.\n */\n stop() {\n const token = this.token;\n if (token) {\n delete this._token;\n Observer.finalizationRegistry.unregister(this);\n this.observerManager.removeObserver(token);\n }\n }\n static finalize(observerManagerAndToken) {\n const { observerManager, token } = observerManagerAndToken;\n observerManager.removeObserver(token);\n }\n}\nObserver.finalizationRegistry = new FinalizationRegistry(Observer.finalize);\n//# sourceMappingURL=observer.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\n// NOTE: we use a token to detect private invocation of the constructor. This is\n// not secure and just to prevent accidental private invocation on the client\n// side.\nconst privateToken = Symbol('privateConstructorToken');\n/**\n * Represents a CRDT counter that can be upserted as part of a document or\n * assigned to a property during an update of a document.\n */\nexport class Counter {\n /** The value of the counter. */\n get value() {\n return this._value;\n }\n /**\n * Creates a new counter that can be used as part of a document's content.\n */\n constructor() {\n this._value = 0.0;\n }\n /** @internal */\n static '@ditto.create'(mutDoc, path, value) {\n // @ts-expect-error - using hidden argument\n const counter = mutDoc ? new MutableCounter(privateToken) : new Counter();\n counter.mutDoc = mutDoc;\n counter.path = path;\n counter._value = value;\n return counter;\n }\n}\n// -----------------------------------------------------------------------------\n/**\n * Represents a mutable CRDT counter that can be incremented by a specific\n * amount while updating a document.\n *\n * This class can't be instantiated directly, it's returned automatically for\n * any counter property within an update block via {@link MutableDocumentPath.counter}.\n */\nexport class MutableCounter extends Counter {\n /**\n * Increments the counter by `amount`, which can be any valid number.\n *\n * Only valid within the `update` closure of\n * {@link PendingCursorOperation.update | PendingCursorOperation.update()} and\n * {@link PendingIDSpecificOperation.update | PendingIDSpecificOperation.update()},\n * otherwise an exception is thrown.\n */\n increment(amount) {\n const mutDoc = this.mutDoc;\n const path = this.path;\n if (!mutDoc) {\n throw new Error(`Can't increment counter, only possible within the closure of a collection's update() method.`);\n }\n mutDoc.at(path)['@ditto.increment'](amount);\n // We also increment the local value to make sure that the change is\n // reflected locally as well as in the underlying document\n this._value += amount;\n }\n /** @internal */\n constructor() {\n if (arguments[0] === privateToken) {\n super();\n }\n else {\n throw new Error(`MutableCounter constructor is for internal use only.`);\n }\n }\n}\n//# sourceMappingURL=counter.js.map","//\n// Copyright © 2022 DittoLive Incorporated. All rights reserved.\n//\n// NOTE: we use a token to detect private invocation of the constructor. This is\n// not secure and just to prevent accidental private invocation on the client\n// side.\nconst privateToken = '@ditto.ff82dae89821c5ab822a8b539056bce4';\n/**\n * Represents a CRDT register that can be upserted as part of a document or\n * assigned to a property during an update of a document.\n */\nexport class Register {\n /** Returns the value of the register. */\n get value() {\n return this['@ditto.value'];\n }\n /**\n * Creates a new Register that can be used as part of a document's content.\n */\n constructor(value) {\n this['@ditto.value'] = value;\n }\n /** @internal */\n static '@ditto.create'(mutableDocument, path, value) {\n const register = mutableDocument ? new MutableRegister(value, privateToken) : new Register(value);\n register['@ditto.mutableDocument'] = mutableDocument;\n register['@ditto.path'] = path;\n register['@ditto.value'] = value;\n return register;\n }\n}\n// -----------------------------------------------------------------------------\n/**\n * Represents a mutable CRDT register that can be set to a specific value when\n * updating a document.\n *\n * This class can't be instantiated directly, it's returned automatically for\n * any register property of a document within an update block via {@link MutableDocumentPath.register}.\n */\nexport class MutableRegister extends Register {\n /** Returns the value of the register. */\n get value() {\n return super.value;\n }\n /**\n * Convenience setter, equivalent to {@link set | set()}.\n */\n set value(value) {\n this.set(value);\n }\n /**\n * Sets the register to the provided value.\n *\n * Only valid within the `update` closure of\n * {@link PendingCursorOperation.update | PendingCursorOperation.update()} and\n * {@link PendingIDSpecificOperation.update | PendingIDSpecificOperation.update()},\n * otherwise an exception is thrown.\n */\n set(value) {\n const mutableDocument = this['@ditto.mutableDocument'];\n const path = this['@ditto.path'];\n mutableDocument.at(path)['@ditto.set'](value);\n // We also set the local value to make sure that the change is\n // reflected locally as well as in the underlying document.\n this['@ditto.value'] = value;\n }\n /** @internal */\n constructor(value) {\n if (arguments[1] === privateToken) {\n super(value);\n }\n else {\n throw new Error(`MutableRegister constructor is for internal use only.`);\n }\n }\n}\n//# sourceMappingURL=register.js.map","const ditto = (function () {\n // IMPORTANT: most packagers perform _static_ analysis to identity native\n // Node modules to copy them into the right directory within the\n // final package. This only works if we use constant strings with\n // require(). Therefore, we use an if for all supported targets and\n // explicitly require each instead of dynamically building the require\n // path.\n\n const target = process.platform + '-' + process.arch\n try {\n if (target === 'darwin-x64') return require('./ditto.darwin-x64.node')\n if (target === 'darwin-arm64') return require('./ditto.darwin-arm64.node')\n if (target === 'linux-x64') return require('./ditto.linux-x64.node')\n if (target === 'linux-arm') return require('./ditto.linux-arm.node')\n if (target === 'win32-x64') return require('./ditto.win32-x64.node')\n } catch (error) {\n throw new Error(\"Couldn't load native module 'ditto.\" + target + \".node' due to error:\" + error.toString())\n }\n\n throw new Error(\"No native module 'ditto.\" + target + \".node' found. Please check the Ditto documentation for supported platforms.\")\n})()\n\n// Kept in a block scope to avoid leaking the target variable. The native\n// module registers its functions in global scope.\n{\n const target = process.platform + '-' + process.arch\n try {\n if (target === 'darwin-x64') require('./transports.darwin-x64.node')\n if (target === 'darwin-arm64') require('./transports.darwin-arm64.node')\n } catch (error) {\n console.warn(\"Couldn't load native module 'transports.\" + target + \".node' due to error:\" + error.toString())\n }\n}\n\nexport function auth_server_auth_submit_with_error(...args) { return ditto.auth_server_auth_submit_with_error(...args) }\nexport function auth_server_auth_submit_with_success(...args) { return ditto.auth_server_auth_submit_with_success(...args) }\nexport function auth_server_refresh_submit_with_error(...args) { return ditto.auth_server_refresh_submit_with_error(...args) }\nexport function auth_server_refresh_submit_with_success(...args) { return ditto.auth_server_refresh_submit_with_success(...args) }\nexport function ble_client_free_handle(...args) { return ditto.ble_client_free_handle(...args) }\nexport function ble_server_free_handle(...args) { return ditto.ble_server_free_handle(...args) }\nexport function boxCBytesIntoBuffer(...args) { return ditto.boxCBytesIntoBuffer(...args) }\nexport function boxCStringIntoString(...args) { return ditto.boxCStringIntoString(...args) }\nexport function cDocsToJsDocs(...args) { return ditto.cDocsToJsDocs(...args) }\nexport function cStringVecToStringArray(...args) { return ditto.cStringVecToStringArray(...args) }\nexport function ditto_add_internal_ble_client_transport(...args) { return ditto.ditto_add_internal_ble_client_transport(...args) }\nexport function ditto_add_internal_ble_server_transport(...args) { return ditto.ditto_add_internal_ble_server_transport(...args) }\nexport function ditto_add_internal_mdns_client_transport(...args) { return ditto.ditto_add_internal_mdns_client_transport(...args) }\nexport function ditto_add_internal_mdns_server_transport(...args) { return ditto.ditto_add_internal_mdns_server_transport(...args) }\nexport function ditto_add_multicast_transport(...args) { return ditto.ditto_add_multicast_transport(...args) }\nexport function ditto_add_static_tcp_client(...args) { return ditto.ditto_add_static_tcp_client(...args) }\nexport function ditto_add_subscription(...args) { return ditto.ditto_add_subscription(...args) }\nexport function ditto_add_websocket_client(...args) { return ditto.ditto_add_websocket_client(...args) }\nexport function ditto_auth_client_get_app_id(...args) { return ditto.ditto_auth_client_get_app_id(...args) }\nexport function ditto_auth_client_get_site_id(...args) { return ditto.ditto_auth_client_get_site_id(...args) }\nexport function ditto_auth_client_is_web_valid(...args) { return ditto.ditto_auth_client_is_web_valid(...args) }\nexport function ditto_auth_client_is_x509_valid(...args) { return ditto.ditto_auth_client_is_x509_valid(...args) }\nexport function ditto_auth_client_login_with_credentials(...args) { return ditto.ditto_auth_client_login_with_credentials(...args) }\nexport function ditto_auth_client_login_with_token(...args) { return ditto.ditto_auth_client_login_with_token(...args) }\nexport function ditto_auth_client_login_with_token_and_feedback(...args) { return ditto.ditto_auth_client_login_with_token_and_feedback(...args) }\nexport function ditto_auth_client_logout(...args) { return ditto.ditto_auth_client_logout(...args) }\nexport function ditto_auth_client_make_login_provider(...args) { return ditto.ditto_auth_client_make_login_provider(...args) }\nexport function ditto_auth_client_set_peer_signed_info(...args) { return ditto.ditto_auth_client_set_peer_signed_info(...args) }\nexport function ditto_auth_client_set_validity_listener(...args) { return ditto.ditto_auth_client_set_validity_listener(...args) }\nexport function ditto_auth_client_unset_validity_listener(...args) { return ditto.ditto_auth_client_unset_validity_listener(...args) }\nexport function ditto_auth_client_user_id(...args) { return ditto.ditto_auth_client_user_id(...args) }\nexport function ditto_auth_login_provider_free(...args) { return ditto.ditto_auth_login_provider_free(...args) }\nexport function ditto_auth_set_login_provider(...args) { return ditto.ditto_auth_set_login_provider(...args) }\nexport function ditto_c_bytes_free(...args) { return ditto.ditto_c_bytes_free(...args) }\nexport function ditto_c_string_free(...args) { return ditto.ditto_c_string_free(...args) }\nexport function ditto_callback_err_nop(...args) { return ditto.ditto_callback_err_nop(...args) }\nexport function ditto_callback_nop(...args) { return ditto.ditto_callback_nop(...args) }\nexport function ditto_cancel_resolve_attachment(...args) { return ditto.ditto_cancel_resolve_attachment(...args) }\nexport function ditto_cbor_get_cbor_with_path_type(...args) { return ditto.ditto_cbor_get_cbor_with_path_type(...args) }\nexport function ditto_clear_presence_callback(...args) { return ditto.ditto_clear_presence_callback(...args) }\nexport function ditto_clear_presence_v1_callback(...args) { return ditto.ditto_clear_presence_v1_callback(...args) }\nexport function ditto_clear_presence_v2_callback(...args) { return ditto.ditto_clear_presence_v2_callback(...args) }\nexport function ditto_clear_presence_v3_callback(...args) { return ditto.ditto_clear_presence_v3_callback(...args) }\nexport function ditto_collection(...args) { return ditto.ditto_collection(...args) }\nexport function ditto_collection_evict(...args) { return ditto.ditto_collection_evict(...args) }\nexport function ditto_collection_evict_by_ids(...args) { return ditto.ditto_collection_evict_by_ids(...args) }\nexport function ditto_collection_evict_query_str(...args) { return ditto.ditto_collection_evict_query_str(...args) }\nexport function ditto_collection_exec_query_str(...args) { return ditto.ditto_collection_exec_query_str(...args) }\nexport function ditto_collection_find_by_ids(...args) { return ditto.ditto_collection_find_by_ids(...args) }\nexport function ditto_collection_get(...args) { return ditto.ditto_collection_get(...args) }\nexport function ditto_collection_insert_value(...args) { return ditto.ditto_collection_insert_value(...args) }\nexport function ditto_collection_remove(...args) { return ditto.ditto_collection_remove(...args) }\nexport function ditto_collection_remove_by_ids(...args) { return ditto.ditto_collection_remove_by_ids(...args) }\nexport function ditto_collection_remove_query_str(...args) { return ditto.ditto_collection_remove_query_str(...args) }\nexport function ditto_collection_update(...args) { return ditto.ditto_collection_update(...args) }\nexport function ditto_collection_update_multiple(...args) { return ditto.ditto_collection_update_multiple(...args) }\nexport function ditto_disable_sync_with_v3(...args) { return ditto.ditto_disable_sync_with_v3(...args) }\nexport function ditto_disk_usage(...args) { return ditto.ditto_disk_usage(...args) }\nexport function ditto_document_cbor(...args) { return ditto.ditto_document_cbor(...args) }\nexport function ditto_document_free(...args) { return ditto.ditto_document_free(...args) }\nexport function ditto_document_get_cbor_with_path_type(...args) { return ditto.ditto_document_get_cbor_with_path_type(...args) }\nexport function ditto_document_id(...args) { return ditto.ditto_document_id(...args) }\nexport function ditto_document_id_query_compatible(...args) { return ditto.ditto_document_id_query_compatible(...args) }\nexport function ditto_document_increment_counter(...args) { return ditto.ditto_document_increment_counter(...args) }\nexport function ditto_document_remove(...args) { return ditto.ditto_document_remove(...args) }\nexport function ditto_document_set_cbor(...args) { return ditto.ditto_document_set_cbor(...args) }\nexport function ditto_document_set_cbor_with_timestamp(...args) { return ditto.ditto_document_set_cbor_with_timestamp(...args) }\nexport function ditto_document_update(...args) { return ditto.ditto_document_update(...args) }\nexport function ditto_documents_hash(...args) { return ditto.ditto_documents_hash(...args) }\nexport function ditto_documents_hash_mnemonic(...args) { return ditto.ditto_documents_hash_mnemonic(...args) }\nexport function ditto_dql_response_affected_document_id_at(...args) { return ditto.ditto_dql_response_affected_document_id_at(...args) }\nexport function ditto_dql_response_affected_document_id_count(...args) { return ditto.ditto_dql_response_affected_document_id_count(...args) }\nexport function ditto_dql_response_free(...args) { return ditto.ditto_dql_response_free(...args) }\nexport function ditto_dql_response_result_at(...args) { return ditto.ditto_dql_response_result_at(...args) }\nexport function ditto_dql_response_result_count(...args) { return ditto.ditto_dql_response_result_count(...args) }\nexport function ditto_dql_result_free(...args) { return ditto.ditto_dql_result_free(...args) }\nexport function ditto_error_message(...args) { return ditto.ditto_error_message(...args) }\nexport function ditto_error_message_peek(...args) { return ditto.ditto_error_message_peek(...args) }\nexport function ditto_experimental_make_with_passphrase(...args) { return ditto.ditto_experimental_make_with_passphrase(...args) }\nexport function ditto_free(...args) { return ditto.ditto_free(...args) }\nexport function ditto_free_attachment_handle(...args) { return ditto.ditto_free_attachment_handle(...args) }\nexport function ditto_free_documents(...args) { return ditto.ditto_free_documents(...args) }\nexport function ditto_free_indices(...args) { return ditto.ditto_free_indices(...args) }\nexport function ditto_get_attachment_status(...args) { return ditto.ditto_get_attachment_status(...args) }\nexport function ditto_get_collection_names(...args) { return ditto.ditto_get_collection_names(...args) }\nexport function ditto_get_complete_attachment_data(...args) { return ditto.ditto_get_complete_attachment_data(...args) }\nexport function ditto_get_complete_attachment_path(...args) { return ditto.ditto_get_complete_attachment_path(...args) }\nexport function ditto_get_sdk_version(...args) { return ditto.ditto_get_sdk_version(...args) }\nexport function ditto_identity_config_make_manual(...args) { return ditto.ditto_identity_config_make_manual(...args) }\nexport function ditto_identity_config_make_manual_v0(...args) { return ditto.ditto_identity_config_make_manual_v0(...args) }\nexport function ditto_identity_config_make_offline_playground(...args) { return ditto.ditto_identity_config_make_offline_playground(...args) }\nexport function ditto_identity_config_make_online_playground(...args) { return ditto.ditto_identity_config_make_online_playground(...args) }\nexport function ditto_identity_config_make_online_with_authentication(...args) { return ditto.ditto_identity_config_make_online_with_authentication(...args) }\nexport function ditto_identity_config_make_shared_key(...args) { return ditto.ditto_identity_config_make_shared_key(...args) }\nexport function ditto_init_sdk_version(...args) { return ditto.ditto_init_sdk_version(...args) }\nexport function ditto_insert_timeseries_event(...args) { return ditto.ditto_insert_timeseries_event(...args) }\nexport function ditto_invalidate_tcp_listeners(...args) { return ditto.ditto_invalidate_tcp_listeners(...args) }\nexport function ditto_is_encrypted(...args) { return ditto.ditto_is_encrypted(...args) }\nexport function ditto_live_query_register_str_detached(...args) { return ditto.ditto_live_query_register_str_detached(...args) }\nexport function ditto_live_query_signal_available_next(...args) { return ditto.ditto_live_query_signal_available_next(...args) }\nexport function ditto_live_query_start(...args) { return ditto.ditto_live_query_start(...args) }\nexport function ditto_live_query_stop(...args) { return ditto.ditto_live_query_stop(...args) }\nexport function ditto_live_query_webhook_generate_new_api_secret(...args) { return ditto.ditto_live_query_webhook_generate_new_api_secret(...args) }\nexport function ditto_live_query_webhook_register_str(...args) { return ditto.ditto_live_query_webhook_register_str(...args) }\nexport function ditto_live_query_webhook_start_all(...args) { return ditto.ditto_live_query_webhook_start_all(...args) }\nexport function ditto_live_query_webhook_start_by_id(...args) { return ditto.ditto_live_query_webhook_start_by_id(...args) }\nexport function ditto_log(...args) { return ditto.ditto_log(...args) }\nexport function ditto_logger_collect_on_disk_logs(...args) { return ditto.ditto_logger_collect_on_disk_logs(...args) }\nexport function ditto_logger_emoji_headings_enabled(...args) { return ditto.ditto_logger_emoji_headings_enabled(...args) }\nexport function ditto_logger_emoji_headings_enabled_get(...args) { return ditto.ditto_logger_emoji_headings_enabled_get(...args) }\nexport function ditto_logger_enabled(...args) { return ditto.ditto_logger_enabled(...args) }\nexport function ditto_logger_enabled_get(...args) { return ditto.ditto_logger_enabled_get(...args) }\nexport function ditto_logger_init(...args) { return ditto.ditto_logger_init(...args) }\nexport function ditto_logger_minimum_log_level(...args) { return ditto.ditto_logger_minimum_log_level(...args) }\nexport function ditto_logger_minimum_log_level_get(...args) { return ditto.ditto_logger_minimum_log_level_get(...args) }\nexport function ditto_logger_set_custom_log_cb(...args) { return ditto.ditto_logger_set_custom_log_cb(...args) }\nexport function ditto_logger_set_log_file(...args) { return ditto.ditto_logger_set_log_file(...args) }\nexport function ditto_make(...args) { return ditto.ditto_make(...args) }\nexport function ditto_new_attachment_from_bytes(...args) { return ditto.ditto_new_attachment_from_bytes(...args) }\nexport function ditto_new_attachment_from_file(...args) { return ditto.ditto_new_attachment_from_file(...args) }\nexport function ditto_only_vec_documents_free(...args) { return ditto.ditto_only_vec_documents_free(...args) }\nexport function ditto_presence_v1(...args) { return ditto.ditto_presence_v1(...args) }\nexport function ditto_presence_v2(...args) { return ditto.ditto_presence_v2(...args) }\nexport function ditto_presence_v3(...args) { return ditto.ditto_presence_v3(...args) }\nexport function ditto_read_transaction(...args) { return ditto.ditto_read_transaction(...args) }\nexport function ditto_read_transaction_free(...args) { return ditto.ditto_read_transaction_free(...args) }\nexport function ditto_register_disk_usage_callback(...args) { return ditto.ditto_register_disk_usage_callback(...args) }\nexport function ditto_register_local_auth_server(...args) { return ditto.ditto_register_local_auth_server(...args) }\nexport function ditto_register_presence_v1_callback(...args) { return ditto.ditto_register_presence_v1_callback(...args) }\nexport function ditto_register_presence_v2_callback(...args) { return ditto.ditto_register_presence_v2_callback(...args) }\nexport function ditto_register_presence_v3_callback(...args) { return ditto.ditto_register_presence_v3_callback(...args) }\nexport function ditto_register_transport_condition_changed_callback(...args) { return ditto.ditto_register_transport_condition_changed_callback(...args) }\nexport function ditto_release_disk_usage_callback(...args) { return ditto.ditto_release_disk_usage_callback(...args) }\nexport function ditto_remove_multicast_transport(...args) { return ditto.ditto_remove_multicast_transport(...args) }\nexport function ditto_remove_subscription(...args) { return ditto.ditto_remove_subscription(...args) }\nexport function ditto_resolve_attachment(...args) { return ditto.ditto_resolve_attachment(...args) }\nexport function ditto_result_cbor(...args) { return ditto.ditto_result_cbor(...args) }\nexport function ditto_result_json(...args) { return ditto.ditto_result_json(...args) }\nexport function ditto_run_garbage_collection(...args) { return ditto.ditto_run_garbage_collection(...args) }\nexport function ditto_sdk_transports_awdl_create(...args) { return ditto.ditto_sdk_transports_awdl_create(...args) }\nexport function ditto_sdk_transports_awdl_destroy(...args) { return ditto.ditto_sdk_transports_awdl_destroy(...args) }\nexport function ditto_sdk_transports_awdl_is_available(...args) { return ditto.ditto_sdk_transports_awdl_is_available(...args) }\nexport function ditto_sdk_transports_ble_create(...args) { return ditto.ditto_sdk_transports_ble_create(...args) }\nexport function ditto_sdk_transports_ble_destroy(...args) { return ditto.ditto_sdk_transports_ble_destroy(...args) }\nexport function ditto_sdk_transports_ble_is_available(...args) { return ditto.ditto_sdk_transports_ble_is_available(...args) }\nexport function ditto_sdk_transports_error_free(...args) { return ditto.ditto_sdk_transports_error_free(...args) }\nexport function ditto_sdk_transports_error_new(...args) { return ditto.ditto_sdk_transports_error_new(...args) }\nexport function ditto_sdk_transports_error_value(...args) { return ditto.ditto_sdk_transports_error_value(...args) }\nexport function ditto_sdk_transports_init(...args) { return ditto.ditto_sdk_transports_init(...args) }\nexport function ditto_sdk_transports_lan_create(...args) { return ditto.ditto_sdk_transports_lan_create(...args) }\nexport function ditto_sdk_transports_lan_destroy(...args) { return ditto.ditto_sdk_transports_lan_destroy(...args) }\nexport function ditto_sdk_transports_lan_is_available(...args) { return ditto.ditto_sdk_transports_lan_is_available(...args) }\nexport function ditto_set_connect_retry_interval(...args) { return ditto.ditto_set_connect_retry_interval(...args) }\nexport function ditto_set_device_name(...args) { return ditto.ditto_set_device_name(...args) }\nexport function ditto_set_max_outgoing_ble_peers(...args) { return ditto.ditto_set_max_outgoing_ble_peers(...args) }\nexport function ditto_set_priority_for_query_overlap_group(...args) { return ditto.ditto_set_priority_for_query_overlap_group(...args) }\nexport function ditto_set_query_overlap_group(...args) { return ditto.ditto_set_query_overlap_group(...args) }\nexport function ditto_set_static_tcp_clients(...args) { return ditto.ditto_set_static_tcp_clients(...args) }\nexport function ditto_set_static_websocket_clients(...args) { return ditto.ditto_set_static_websocket_clients(...args) }\nexport function ditto_set_sync_group(...args) { return ditto.ditto_set_sync_group(...args) }\nexport function ditto_shutdown(...args) { return ditto.ditto_shutdown(...args) }\nexport function ditto_small_peer_info_get_is_enabled(...args) { return ditto.ditto_small_peer_info_get_is_enabled(...args) }\nexport function ditto_small_peer_info_get_metadata(...args) { return ditto.ditto_small_peer_info_get_metadata(...args) }\nexport function ditto_small_peer_info_get_sync_scope(...args) { return ditto.ditto_small_peer_info_get_sync_scope(...args) }\nexport function ditto_small_peer_info_set_enabled(...args) { return ditto.ditto_small_peer_info_set_enabled(...args) }\nexport function ditto_small_peer_info_set_metadata(...args) { return ditto.ditto_small_peer_info_set_metadata(...args) }\nexport function ditto_small_peer_info_set_sync_scope(...args) { return ditto.ditto_small_peer_info_set_sync_scope(...args) }\nexport function ditto_small_peer_info_set_transport_config_data(...args) { return ditto.ditto_small_peer_info_set_transport_config_data(...args) }\nexport function ditto_start_http_server(...args) { return ditto.ditto_start_http_server(...args) }\nexport function ditto_start_tcp_server(...args) { return ditto.ditto_start_tcp_server(...args) }\nexport function ditto_stop_http_server(...args) { return ditto.ditto_stop_http_server(...args) }\nexport function ditto_stop_tcp_server(...args) { return ditto.ditto_stop_tcp_server(...args) }\nexport function ditto_tcp_server_listen_addr(...args) { return ditto.ditto_tcp_server_listen_addr(...args) }\nexport function ditto_transports_diagnostics(...args) { return ditto.ditto_transports_diagnostics(...args) }\nexport function ditto_uninitialized_ditto_make(...args) { return ditto.ditto_uninitialized_ditto_make(...args) }\nexport function ditto_unregister_local_auth_server(...args) { return ditto.ditto_unregister_local_auth_server(...args) }\nexport function ditto_validate_document_id(...args) { return ditto.ditto_validate_document_id(...args) }\nexport function ditto_vec_usizes_free(...args) { return ditto.ditto_vec_usizes_free(...args) }\nexport function ditto_verify_license(...args) { return ditto.ditto_verify_license(...args) }\nexport function ditto_wifi_aware_client_peer_appeared(...args) { return ditto.ditto_wifi_aware_client_peer_appeared(...args) }\nexport function ditto_wifi_aware_server_free_handle(...args) { return ditto.ditto_wifi_aware_server_free_handle(...args) }\nexport function ditto_write_transaction(...args) { return ditto.ditto_write_transaction(...args) }\nexport function ditto_write_transaction_add_metadata(...args) { return ditto.ditto_write_transaction_add_metadata(...args) }\nexport function ditto_write_transaction_commit(...args) { return ditto.ditto_write_transaction_commit(...args) }\nexport function ditto_write_transaction_free(...args) { return ditto.ditto_write_transaction_free(...args) }\nexport function ditto_write_transaction_rollback(...args) { return ditto.ditto_write_transaction_rollback(...args) }\nexport function dittoffi_error_code(...args) { return ditto.dittoffi_error_code(...args) }\nexport function dittoffi_error_description(...args) { return ditto.dittoffi_error_description(...args) }\nexport function dittoffi_error_free(...args) { return ditto.dittoffi_error_free(...args) }\nexport function dittoffi_get_sdk_semver(...args) { return ditto.dittoffi_get_sdk_semver(...args) }\nexport function dittoffi_try_collection(...args) { return ditto.dittoffi_try_collection(...args) }\nexport function dittoffi_try_collection_evict(...args) { return ditto.dittoffi_try_collection_evict(...args) }\nexport function dittoffi_try_collection_evict_by_ids(...args) { return ditto.dittoffi_try_collection_evict_by_ids(...args) }\nexport function dittoffi_try_collection_find_by_ids(...args) { return ditto.dittoffi_try_collection_find_by_ids(...args) }\nexport function dittoffi_try_collection_get(...args) { return ditto.dittoffi_try_collection_get(...args) }\nexport function dittoffi_try_collection_insert_value(...args) { return ditto.dittoffi_try_collection_insert_value(...args) }\nexport function dittoffi_try_collection_remove(...args) { return ditto.dittoffi_try_collection_remove(...args) }\nexport function dittoffi_try_collection_remove_by_ids(...args) { return ditto.dittoffi_try_collection_remove_by_ids(...args) }\nexport function dittoffi_try_collection_update(...args) { return ditto.dittoffi_try_collection_update(...args) }\nexport function dittoffi_try_collection_update_multiple(...args) { return ditto.dittoffi_try_collection_update_multiple(...args) }\nexport function dittoffi_try_document_get_cbor_with_path_type(...args) { return ditto.dittoffi_try_document_get_cbor_with_path_type(...args) }\nexport function dittoffi_try_experimental_add_dql_subscription(...args) { return ditto.dittoffi_try_experimental_add_dql_subscription(...args) }\nexport function dittoffi_try_experimental_exec_statement_str(...args) { return ditto.dittoffi_try_experimental_exec_statement_str(...args) }\nexport function dittoffi_try_experimental_register_change_observer_str_detached(...args) { return ditto.dittoffi_try_experimental_register_change_observer_str_detached(...args) }\nexport function dittoffi_try_experimental_register_dql_live_query_str_detached(...args) { return ditto.dittoffi_try_experimental_register_dql_live_query_str_detached(...args) }\nexport function dittoffi_try_experimental_remove_dql_subscription(...args) { return ditto.dittoffi_try_experimental_remove_dql_subscription(...args) }\nexport function dittoffi_try_experimental_webhook_register_dql_live_query_str(...args) { return ditto.dittoffi_try_experimental_webhook_register_dql_live_query_str(...args) }\nexport function dittoffi_try_get_collection_names(...args) { return ditto.dittoffi_try_get_collection_names(...args) }\nexport function dittoffi_try_live_query_register_str_detached(...args) { return ditto.dittoffi_try_live_query_register_str_detached(...args) }\nexport function dittoffi_try_live_query_start(...args) { return ditto.dittoffi_try_live_query_start(...args) }\nexport function dittoffi_try_live_query_webhook_generate_new_api_secret(...args) { return ditto.dittoffi_try_live_query_webhook_generate_new_api_secret(...args) }\nexport function dittoffi_try_live_query_webhook_register_str(...args) { return ditto.dittoffi_try_live_query_webhook_register_str(...args) }\nexport function dittoffi_try_live_query_webhook_start_all(...args) { return ditto.dittoffi_try_live_query_webhook_start_all(...args) }\nexport function dittoffi_try_live_query_webhook_start_by_id(...args) { return ditto.dittoffi_try_live_query_webhook_start_by_id(...args) }\nexport function free_c_string_vec(...args) { return ditto.free_c_string_vec(...args) }\nexport function getDeadlockTimeout(...args) { return ditto.getDeadlockTimeout(...args) }\nexport function jsDocsToCDocs(...args) { return ditto.jsDocsToCDocs(...args) }\nexport function mdns_client_free_handle(...args) { return ditto.mdns_client_free_handle(...args) }\nexport function mdns_platform_peer_appeared(...args) { return ditto.mdns_platform_peer_appeared(...args) }\nexport function mdns_server_free_handle(...args) { return ditto.mdns_server_free_handle(...args) }\nexport function new_c_string_vec(...args) { return ditto.new_c_string_vec(...args) }\nexport function refCStringToString(...args) { return ditto.refCStringToString(...args) }\nexport function setDeadlockTimeout(...args) { return ditto.setDeadlockTimeout(...args) }\nexport function static_tcp_client_free_handle(...args) { return ditto.static_tcp_client_free_handle(...args) }\nexport function websocket_client_free_handle(...args) { return ditto.websocket_client_free_handle(...args) }\nexport function withCBytes(...args) { return ditto.withCBytes(...args) }\nexport function withCString(...args) { return ditto.withCString(...args) }\nexport function withOutBoolean(...args) { return ditto.withOutBoolean(...args) }\nexport function withOutBoxCBytes(...args) { return ditto.withOutBoxCBytes(...args) }\nexport function withOutPtr(...args) { return ditto.withOutPtr(...args) }\nexport function withOutU64(...args) { return ditto.withOutU64(...args) }\nexport function withOutVecOfPtrs(...args) { return ditto.withOutVecOfPtrs(...args) }\n\nexport async function init(info) {\n // IDEA: allow passing in the module path (similar to Wasm)?\n // Nothing to do so far, no-op for the time being.\n}\n","export const isNodeBuild = true;\nexport const isWebBuild = false;\nexport const isReactNativeBuild = false;\n//# sourceMappingURL=environment.node.js.map","//\n// Copyright © 2023 DittoLive Incorporated. All rights reserved.\n//\n// This internal module contains the Ditto FFI error type and helper functions\n// for working with it. Except for the feature flag helper, this module should\n// not depend on any other parts of the Ditto Javascript SDK.\nimport * as dittoCore from './@ditto.core';\n/** Matches a `<...>` prefix in an FFI result error message, e.g. `<dql> ...`. **/\nconst PREFIX_REGEX = new RegExp(/^<.*?>\\s*/);\n/**\n * Represents an exception that occurred during a call into the Ditto FFI.\n *\n * Use the {@link throwOnErrorStatus | throwOnErrorStatus()} helper to\n * automatically throw this error when an FFI call returns with a non-zero\n * return value.\n *\n * @internal\n */\nexport class DittoFFIError extends Error {\n /**\n * Only call this constructor after having called `FFI.ensureInitialized()`\n * and `FFI.trace()`.\n *\n * @param code numerical status code returned by an FFI call or an\n * {@link FFIResultErrorCode} for errors returned on FFI result objects\n * @param messageOverride overrides the thread-local error message set in\n * Ditto core\n * @param messageFallback fallback message to use if the thread-local error\n * message is empty\n */\n constructor(code, messageOverride, messageFallback) {\n // Call `ffiErrorMessage()` even when an override is provided to ensure that\n // the thread-local error message is cleared.\n const threadLocalErrorMessage = ffiErrorMessage();\n super(messageOverride || threadLocalErrorMessage || messageFallback);\n this.code = code;\n }\n}\n/**\n * Throws a {@link DittoFFIError} if the given `ffiError` is not `null`.\n *\n * Removes the thread-local error message from Ditto core. If an error description\n * is available on the given `ffiError`, it is used as the error message of the\n * thrown {@link DittoFFIError}. A prefix in the error message is removed, e.g.\n * `<dql> ...`.\n *\n * If no error description is available, the given `ffiFunctionName` is used to\n * produce a fallback error message.\n *\n * @internal\n */\nexport function throwOnErrorResult(ffiError, ffiFunctionName) {\n if (ffiError !== null) {\n let errorCode;\n let errorMsg;\n try {\n errorCode = dittoCore.dittoffi_error_code(ffiError);\n errorMsg = dittoCore.boxCStringIntoString(dittoCore.dittoffi_error_description(ffiError));\n dittoCore.dittoffi_error_free(ffiError);\n }\n catch (err) {\n throw new DittoFFIError(-1, `Failed to retrieve Ditto core error message: ${err.message}`);\n }\n if (errorMsg == null) {\n errorMsg = `${ffiFunctionName}() failed with error code: ${errorCode}`;\n }\n else {\n // Remove prefix from error message, e.g. `<dql> ...`.\n errorMsg = errorMsg.replace(PREFIX_REGEX, '');\n }\n throw new DittoFFIError(errorCode, errorMsg);\n }\n}\n/**\n * Retrieves last thread-local error message and removes it.\n *\n * Subsequent call to this function (if no new error message has been set) will\n * always return `null`.\n *\n * This function is not calling `FFI.ensureInitialized()` to avoid a circular\n * dependency. This is okay as long as this function is only called from a\n * context where `FFI.ensureInitialized()` has already been called.\n *\n * @internal\n */\nfunction ffiErrorMessage() {\n const errorMessageCString = dittoCore.ditto_error_message();\n return dittoCore.boxCStringIntoString(errorMessageCString);\n}\n//# sourceMappingURL=ffi-error.js.map","//\n// Copyright © 2023 DittoLive Incorporated. All rights reserved.\n//\n// NOTE: This is a temporary *hand-written* shim file for glue code for the\n// Ditto native Node module. Mid to long term, we'll either move all of this\n// code to the native side or generate this file via a companion CLI tool or\n// something equivalent.\n//\n// IMPORTANT: please leave this file self-contained and do not import any\n// sources from the JS SDK.\nimport * as dittoCore from './@ditto.core';\nimport * as Environment from './@environment';\nimport { throwOnErrorResult } from './ffi-error';\n/** @internal */\nexport var isTracingEnabled = false;\n/** @internal */\nexport const DittoCRDTTypeKey = '_ditto_internal_type_jkb12973t4b';\n/** @internal */\nexport const DittoCRDTValueKey = '_value';\n/** @internal */\nexport var DittoCRDTType;\n(function (DittoCRDTType) {\n DittoCRDTType[DittoCRDTType[\"counter\"] = 0] = \"counter\";\n DittoCRDTType[DittoCRDTType[\"register\"] = 1] = \"register\";\n DittoCRDTType[DittoCRDTType[\"attachment\"] = 2] = \"attachment\";\n DittoCRDTType[DittoCRDTType[\"rga\"] = 3] = \"rga\";\n DittoCRDTType[DittoCRDTType[\"rwMap\"] = 4] = \"rwMap\";\n})(DittoCRDTType || (DittoCRDTType = {}));\n// -------------------------------------- Linux & Windows Transports Hack ------\n// HACK: quick and dirty, wrap the internal BLE functions which\n// are currently only used by the Node Linux & Windows build. See comment\n// in `sync.ts` -> `Ditto.applyPeerToPeerBluetoothLE()` for details.\nexport function dittoAddInternalBLEClientTransport(ditto) {\n if (Environment.isNodeBuild) {\n return dittoCore.ditto_add_internal_ble_client_transport(ditto);\n }\n if (Environment.isWebBuild) {\n throw new Error(`Internal inconsistency, can't add internal BLE client, only available for non-apple Ditto Node builds.`);\n }\n}\nexport function dittoAddInternalBLEServerTransport(ditto) {\n if (Environment.isNodeBuild) {\n return dittoCore.ditto_add_internal_ble_server_transport(ditto);\n }\n if (Environment.isWebBuild) {\n throw new Error(`Internal inconsistency, can't add internal BLE server, only available for non-apple Ditto Node builds.`);\n }\n}\nexport function bleClientFreeHandle(handle) {\n if (Environment.isNodeBuild) {\n return dittoCore.ble_client_free_handle(handle);\n }\n if (Environment.isWebBuild) {\n throw new Error(`Internal inconsistency, can't free BLE client handle, only available for non-apple Ditto Node builds.`);\n }\n}\nexport function bleServerFreeHandle(handle) {\n if (Environment.isNodeBuild) {\n return dittoCore.ble_server_free_handle(handle);\n }\n if (Environment.isWebBuild) {\n throw new Error(`Internal inconsistency, can't free BLE server handle, only available for non-apple Ditto Node builds.`);\n }\n}\nexport function dittoAddInternalMdnsTransport(ditto) {\n if (Environment.isNodeBuild) {\n return dittoCore.ditto_add_internal_mdns_client_transport(ditto);\n }\n if (Environment.isWebBuild) {\n throw new Error(`Internal inconsistency, can't add internal MDNS transport/client, only available for non-apple Ditto Node builds.`);\n }\n}\nexport function mdnsClientFreeHandle(handle) {\n if (Environment.isNodeBuild) {\n return dittoCore.mdns_client_free_handle(handle);\n }\n if (Environment.isWebBuild) {\n throw new Error(`Internal inconsistency, can't free MDNS transport/client handle, only available for non-apple Ditto Node builds.`);\n }\n}\nexport function dittoAddInternalMdnsAdvertiser(ditto) {\n if (Environment.isNodeBuild) {\n return dittoCore.ditto_add_internal_mdns_server_transport(ditto);\n }\n if (Environment.isWebBuild) {\n throw new Error(`Internal inconsistency, can't add internal MDNS advertiser/server, only available for non-apple Ditto Node builds.`);\n }\n}\nexport function mdnsServerFreeHandle(handle) {\n if (Environment.isNodeBuild) {\n return dittoCore.mdns_server_free_handle(handle);\n }\n if (Environment.isWebBuild) {\n throw new Error(`Internal inconsistency, can't free MDNS advertiser/server handle, only available for non-apple Ditto Node builds.`);\n }\n}\n// ------------------------------------------------------------- Document ------\n/** @internal */\nexport function documentSetCBORWithTimestamp(document, path, cbor, timestamp) {\n trace();\n ensureInitialized();\n const pathX = bytesFromString(path);\n const errorCode = dittoCore.ditto_document_set_cbor_with_timestamp(document, pathX, cbor, timestamp);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_document_set_cbor_with_timestamp() failed with error code: ${errorCode}`);\n}\n/** @internal */\nexport function documentSetCBOR(document, path, cbor) {\n trace();\n ensureInitialized();\n // NOTE: not sure if this should be async or not.\n const pathX = bytesFromString(path);\n const errorCode = dittoCore.ditto_document_set_cbor(document, pathX, cbor);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_document_set_cbor() failed with error code: ${errorCode}`);\n}\n/** @internal */\nexport function documentID(self) {\n trace();\n ensureInitialized();\n // REFACTOR: add proper error handling.\n const documentIDX = dittoCore.ditto_document_id(self);\n return dittoCore.boxCBytesIntoBuffer(documentIDX);\n}\n/** @internal */\nexport function documentCBOR(self) {\n trace();\n ensureInitialized();\n const cborBytes = dittoCore.ditto_document_cbor(self);\n return dittoCore.boxCBytesIntoBuffer(cborBytes);\n}\n/** @internal */\nexport function documentGetCBORWithPathType(document, path, pathType) {\n trace();\n ensureInitialized();\n const pathBytes = bytesFromString(path);\n const cborPathResultRaw = dittoCore.ditto_document_get_cbor_with_path_type(document, pathBytes, pathType);\n const cborPathResult = {\n statusCode: cborPathResultRaw.status_code,\n cbor: dittoCore.boxCBytesIntoBuffer(cborPathResultRaw.cbor),\n };\n return cborPathResult;\n}\n/** @internal */\nexport function documentRemove(document, path) {\n trace();\n ensureInitialized();\n const pathBytes = bytesFromString(path);\n const errorCode = dittoCore.ditto_document_remove(document, pathBytes);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_document_remove() failed with error code: ${errorCode}`);\n}\n/** @internal */\nexport function documentIncrementCounter(document, path, amount) {\n trace();\n ensureInitialized();\n const pathBytes = bytesFromString(path);\n const errorCode = dittoCore.ditto_document_increment_counter(document, pathBytes, amount);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_document_increment_counter() failed with error code: ${errorCode}`);\n}\n/** @internal */\nexport function documentFree(self) {\n trace();\n ensureInitialized();\n // REFACTOR: add proper error handling.\n dittoCore.ditto_document_free(self);\n}\n// ----------------------------------------------------------- DocumentID ------\n/** @internal */\nexport function documentIDQueryCompatible(docID, stringPrimitiveFormat) {\n trace();\n ensureInitialized();\n const docIDString = dittoCore.ditto_document_id_query_compatible(docID, stringPrimitiveFormat);\n return dittoCore.boxCStringIntoString(docIDString);\n}\n/** @internal */\nexport function validateDocumentID(docID) {\n trace();\n ensureInitialized();\n const cborCBytes = dittoCore.withOutBoxCBytes((outCBOR) => {\n const errorCode = dittoCore.ditto_validate_document_id(docID, outCBOR);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_validate_document_id() failed with error code: ${errorCode}`);\n return outCBOR;\n });\n return dittoCore.boxCBytesIntoBuffer(cborCBytes);\n}\n// ----------------------------------------------------------- Collection ------\n/** @internal */\nexport async function collectionGet(ditto, collectionName, documentID, readTransaction) {\n trace();\n ensureInitialized();\n // REFACTOR: add proper error handling.\n const collectionNameX = bytesFromString(collectionName);\n const { status_code: errorCode, document } = await dittoCore.ditto_collection_get(ditto, collectionNameX, documentID, readTransaction);\n if (errorCode === NOT_FOUND_ERROR_CODE)\n return null;\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_collection_get() failed with error code: ${errorCode}`);\n return document;\n}\n/** @internal */\nexport async function collectionInsertValue(ditto, collectionName, doc_cbor, writeStrategy, writeTransaction) {\n trace();\n ensureInitialized();\n // REFACTOR: add proper error handling.\n const collectionNameX = bytesFromString(collectionName);\n let strategy;\n switch (writeStrategy) {\n case 'merge':\n strategy = 'Merge';\n break;\n case 'insertIfAbsent':\n strategy = 'InsertIfAbsent';\n break;\n case 'insertDefaultIfAbsent':\n strategy = 'InsertDefaultIfAbsent';\n break;\n default:\n throw new Error('Invalid write strategy provided');\n }\n const { status_code: errorCode, id } = await dittoCore.ditto_collection_insert_value(ditto, collectionNameX, doc_cbor, strategy, null, writeTransaction !== null && writeTransaction !== void 0 ? writeTransaction : null);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_collection_insert_value() failed with error code: ${errorCode}`);\n return dittoCore.boxCBytesIntoBuffer(id);\n}\n/** @internal */\nexport async function collectionRemove(ditto, collectionName, writeTransaction, documentID) {\n trace();\n ensureInitialized();\n // REFACTOR: add proper error handling.\n const collectionNameX = bytesFromString(collectionName);\n const { status_code: errorCode, bool_value: didRemove } = await dittoCore.ditto_collection_remove(ditto, collectionNameX, writeTransaction, documentID);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_collection_remove() failed with error code: ${errorCode}`);\n return didRemove;\n}\n/** @internal */\nexport async function collectionEvict(ditto, collectionName, writeTransaction, documentID) {\n trace();\n ensureInitialized();\n // REFACTOR: add proper error handling.\n const collectionNameX = bytesFromString(collectionName);\n const { status_code: errorCode, bool_value: didEvict } = await dittoCore.ditto_collection_evict(ditto, collectionNameX, writeTransaction, documentID);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_collection_evict() failed with error code: ${errorCode}`);\n return didEvict;\n}\n/** @internal */\nexport async function collectionUpdate(ditto, collectionName, writeTransaction, document) {\n trace();\n ensureInitialized();\n const collectionNameX = bytesFromString(collectionName);\n const errorCode = await dittoCore.ditto_collection_update(ditto, collectionNameX, writeTransaction, document);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_collection_update() failed with error code: ${errorCode}`);\n}\n/** @internal */\nexport async function collectionUpdateMultiple(ditto, collectionName, writeTransaction, documents) {\n trace();\n ensureInitialized();\n const collectionNameX = bytesFromString(collectionName);\n const cDocuments = dittoCore.jsDocsToCDocs(documents);\n const errorCode = await dittoCore.ditto_collection_update_multiple(ditto, collectionNameX, writeTransaction, cDocuments);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_collection_update_multiple() failed with error code: ${errorCode}`);\n}\n/** @internal */\nexport async function collectionExecQueryStr(ditto, collectionName, writeTransaction, query, queryArgsCBOR, orderBy, limit, offset) {\n trace();\n ensureInitialized();\n const collectionNameX = bytesFromString(collectionName);\n const queryX = bytesFromString(query);\n return await dittoCore.ditto_collection_exec_query_str(ditto, collectionNameX, writeTransaction, queryX, queryArgsCBOR, orderBy, limit, offset);\n}\n/** @internal */\nexport async function collectionRemoveQueryStr(ditto, collectionName, writeTransaction, query, queryArgsCBOR, orderBy, limit, offset) {\n trace();\n ensureInitialized();\n const collectionNameX = bytesFromString(collectionName);\n const queryX = bytesFromString(query);\n return await dittoCore.ditto_collection_remove_query_str(ditto, collectionNameX, writeTransaction, queryX, queryArgsCBOR, orderBy, limit, offset);\n}\n/** @internal */\nexport async function collectionEvictQueryStr(ditto, collectionName, writeTransaction, query, queryArgsCBOR, orderBy, limit, offset) {\n trace();\n ensureInitialized();\n const collectionNameX = bytesFromString(collectionName);\n const queryX = bytesFromString(query);\n return await dittoCore.ditto_collection_evict_query_str(ditto, collectionNameX, writeTransaction, queryX, queryArgsCBOR, orderBy, limit, offset);\n}\n/**\n * This FFI can error:\n * - DQL parser error\n * - Incorrect arguments to query parameters\n * - Collection is not found.\n *\n * @internal\n */\nexport async function tryExperimentalExecQueryStr(ditto, writeTransaction, query, queryArgsCBOR) {\n trace();\n ensureInitialized();\n const queryBytesPointer = bytesFromString(query);\n const result = await dittoCore.dittoffi_try_experimental_exec_statement_str(ditto, writeTransaction, queryBytesPointer, queryArgsCBOR);\n throwOnErrorResult(result.error, 'dittoffi_try_experimental_exec_statement_str');\n return result.success;\n}\n/** @internal */\nexport function addSubscription(ditto, collectionName, query, queryArgsCBOR, orderBy, limit, offset) {\n trace();\n ensureInitialized();\n const collectionNameX = bytesFromString(collectionName);\n const queryX = bytesFromString(query);\n return dittoCore.ditto_add_subscription(ditto, collectionNameX, queryX, queryArgsCBOR, orderBy, limit, offset);\n}\n/** @internal */\nexport function removeSubscription(ditto, collectionName, query, queryArgsCBOR, orderBy, limit, offset) {\n trace();\n ensureInitialized();\n const collectionNameX = bytesFromString(collectionName);\n const queryX = bytesFromString(query);\n return dittoCore.ditto_remove_subscription(ditto, collectionNameX, queryX, queryArgsCBOR, orderBy, limit, offset);\n}\n/** @internal */\nexport function tryExperimentalAddDQLSubscription(dittoPointer, query, queryArgsCBOR) {\n trace();\n ensureInitialized();\n const queryBuffer = bytesFromString(query);\n const result = dittoCore.dittoffi_try_experimental_add_dql_subscription(dittoPointer, queryBuffer, queryArgsCBOR);\n throwOnErrorResult(result.error, 'dittoffi_try_experimental_add_dql_subscription');\n return;\n}\n/** @internal */\nexport function tryExperimentalRemoveDQLSubscription(dittoPointer, query, queryArgsCBOR) {\n trace();\n ensureInitialized();\n const queryBuffer = bytesFromString(query);\n const result = dittoCore.dittoffi_try_experimental_remove_dql_subscription(dittoPointer, queryBuffer, queryArgsCBOR);\n throwOnErrorResult(result.error, 'dittoffi_try_experimental_remove_dql_subscription');\n return;\n}\n// ----------------------------------------------------------- DqlResponse ------\n/**\n * Doesn't error\n *\n * @internal\n */\nexport function dqlResponseFree(responsePointer) {\n trace();\n ensureInitialized();\n dittoCore.ditto_dql_response_free(responsePointer);\n}\n/**\n * Doesn't error\n *\n * @internal\n */\nexport function dqlResultFree(resultPointer) {\n trace();\n ensureInitialized();\n dittoCore.ditto_dql_result_free(resultPointer);\n}\n/**\n * Can error only on internal bug.\n *\n * @internal */\nexport function dqlResponseResults(responsePointer) {\n trace();\n ensureInitialized();\n const rv = [];\n const resultCount = dittoCore.ditto_dql_response_result_count(responsePointer);\n for (let i = 0; i < resultCount; i++) {\n rv.push(dittoCore.ditto_dql_response_result_at(responsePointer, i));\n }\n return rv;\n}\n/**\n * Doesn't error\n *\n * @internal\n */\nexport function dqlMutatedDocumentIDs(responsePointer) {\n trace();\n ensureInitialized();\n const rv = [];\n const resultCount = dittoCore.ditto_dql_response_affected_document_id_count(responsePointer);\n for (let i = 0; i < resultCount; i++) {\n const cborBytes = dittoCore.ditto_dql_response_affected_document_id_at(responsePointer, i);\n rv.push(dittoCore.boxCBytesIntoBuffer(cborBytes));\n }\n return rv;\n}\n/**\n * The result CBOR contains a map/object with fields and values.\n * No CRDTs are present there as they are not needed. Currently\n * only values from registers are returned and non-register fields are\n * ignored. Reading values from other CRDTs will be supported with\n * definition support.\n *\n * Doesn't error\n *\n * @internal\n */\nexport function dqlResultCBOR(resultPointer) {\n trace();\n ensureInitialized();\n const cborBytes = dittoCore.ditto_result_cbor(resultPointer);\n return dittoCore.boxCBytesIntoBuffer(cborBytes);\n}\n/**\n * Returns JSON-encoded results given a DQL result pointer.\n *\n * Compare for {@link dqlResultCBOR} above.\n *\n * Doesn't error\n *\n * @internal\n */\nexport function dqlResultJSON(resultPointer) {\n trace();\n ensureInitialized();\n const jsonBytes = dittoCore.ditto_result_json(resultPointer);\n return dittoCore.boxCStringIntoString(jsonBytes);\n}\n// ------------------------------------------------------------ LiveQuery ------\n/** @internal */\nexport function liveQueryRegister(ditto, collectionName, query, queryArgsCBOR, orderBy, limit, offset, eventHandler, \n// Cb may be called in parallel at any point, so let's use\n// an optional error handler (which defaults to the ditto logger at 'Error' level).\nonError) {\n trace();\n ensureInitialized();\n const collectionNameBuffer = bytesFromString(collectionName);\n const queryBuffer = bytesFromString(query);\n // Note(Daniel): the callback is now registered to be called in a detached\n // manner: if the FFI / Rust does `cb()`, then when that call returns, the js\n // callback itself may not have completed. This is fine, since `signalNext()`\n // shall be the proper way to let the Rust core know the FFI call completed.\n const { status_code: errorCode, i64: id } = dittoCore.ditto_live_query_register_str_detached(ditto, collectionNameBuffer, queryBuffer, queryArgsCBOR, orderBy, limit, offset, wrapBackgroundCbForFFI(onError, eventHandler));\n if (errorCode !== 0)\n throw new Error(errorMessage() || `\\`ditto_live_query_register_str()\\` failed with error code: ${errorCode}`);\n return id;\n}\n/** @internal */\nexport function tryExperimentalRegisterChangeObserver(ditto, query, queryArgsCBOR, changeHandler) {\n trace();\n ensureInitialized();\n const errorHandler = (err) => log('Error', `The registered store observer callback failed with ${err}`);\n const wrappedCallback = wrapBackgroundCbForFFI(errorHandler, changeHandler);\n const queryBuffer = bytesFromString(query);\n // Note(Daniel): the callback is registered to be called in a detached manner:\n // if the FFI / Rust does `cb()`, then when that call returns, the js callback\n // itself may not have completed. This is fine, since `signalNext()` shall be\n // the proper way to let the Rust core know the FFI call completed.\n const result = dittoCore.dittoffi_try_experimental_register_change_observer_str_detached(ditto, queryBuffer, queryArgsCBOR, wrappedCallback);\n throwOnErrorResult(result.error, 'dittoffi_try_experimental_register_change_observer_str_detached');\n return result.success;\n}\n/** @internal */\nexport async function liveQueryStart(ditto, liveQueryID) {\n trace();\n ensureInitialized();\n const errorCode = await dittoCore.ditto_live_query_start(ditto, liveQueryID);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `\\`ditto_live_query_start()\\` failed with error code: ${errorCode}`);\n}\n/** @internal */\nexport function liveQueryStop(ditto, liveQueryID) {\n trace();\n ensureInitialized();\n dittoCore.ditto_live_query_stop(ditto, liveQueryID);\n}\n/** @internal */\nexport async function liveQuerySignalAvailableNext(ditto, liveQueryID) {\n trace();\n ensureInitialized();\n await dittoCore.ditto_live_query_signal_available_next(ditto, liveQueryID);\n}\n// ------------------------------------------------------------ Webhook ------\n/** @internal */\nexport async function liveQueryWebhookRegister(ditto, collectionName, query, orderBy, limit, offset, url) {\n trace();\n ensureInitialized();\n const collectionNameBuffer = bytesFromString(collectionName);\n const queryBuffer = bytesFromString(query);\n const urlBuffer = bytesFromString(url);\n const { status_code: errorCode, id } = await dittoCore.ditto_live_query_webhook_register_str(ditto, collectionNameBuffer, queryBuffer, orderBy, limit, offset, urlBuffer);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `\\`ditto_live_query_webhook_register_str()\\` failed with error code: ${errorCode}`);\n return dittoCore.boxCBytesIntoBuffer(id);\n}\n/** @internal */\nexport async function tryExperimentalWebhookRegisterDqlLiveQuery(ditto, query, queryArgsCBOR, url) {\n trace();\n ensureInitialized();\n const queryBuffer = bytesFromString(query);\n const urlBuffer = bytesFromString(url);\n const result = await dittoCore.dittoffi_try_experimental_webhook_register_dql_live_query_str(ditto, queryBuffer, queryArgsCBOR, urlBuffer);\n throwOnErrorResult(result.error, 'dittoffi_try_experimental_webhook_register_dql_live_query_str');\n const documentIdCBOR = result.success;\n return dittoCore.boxCBytesIntoBuffer(documentIdCBOR);\n}\n// ------------------------------------------------------ ReadTransaction ------\n/** @internal */\nexport async function readTransaction(ditto) {\n trace();\n ensureInitialized();\n // REFACTOR: add proper error handling.\n const { status_code: errorCode, txn: readTransaction } = await dittoCore.ditto_read_transaction(ditto);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `\\`ditto_read_transaction()\\` failed with error code: ${errorCode}`);\n return readTransaction;\n}\n/** @internal */\nexport function readTransactionFree(self) {\n trace();\n ensureInitialized();\n // REFACTOR: add proper error handling.\n return dittoCore.ditto_read_transaction_free(self);\n}\n// ----------------------------------------------------- WriteTransaction ------\n/** @internal */\nexport async function writeTransaction(ditto) {\n trace();\n ensureInitialized();\n // REFACTOR: add proper error handling.\n const { status_code: errorCode, txn: writeTransaction } = await dittoCore.ditto_write_transaction(ditto, null);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_write_transaction() failed with error code: ${errorCode}`);\n return writeTransaction;\n}\n/** @internal */\nexport async function writeTransactionCommit(ditto, self) {\n trace();\n ensureInitialized();\n const errorCode = await dittoCore.ditto_write_transaction_commit(ditto, self);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_write_transaction_commit() failed with error code: ${errorCode}`);\n}\n/** @internal */\nexport async function writeTransactionRollback(ditto, transaction) {\n trace();\n ensureInitialized();\n const errorCode = await dittoCore.ditto_write_transaction_rollback(ditto, transaction);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_write_transaction_rollback() failed with error code: ${errorCode}`);\n}\n// ------------------------------------------------------ StaticTCPClient ------\n/** @internal */\nexport function addStaticTCPClient(ditto, address) {\n trace();\n ensureInitialized();\n const addressBuffer = bytesFromString(address);\n return dittoCore.ditto_add_static_tcp_client(ditto, addressBuffer);\n}\n/** @internal */\nexport function staticTCPClientFreeHandle(self) {\n trace();\n dittoCore.static_tcp_client_free_handle(self);\n}\n// ------------------------------------------------------ WebsocketClient ------\n/** @internal */\nexport function addWebsocketClient(ditto, address, routingHint) {\n trace();\n ensureInitialized();\n const addressBuffer = bytesFromString(address);\n return dittoCore.ditto_add_websocket_client(ditto, addressBuffer, routingHint);\n}\n/** @internal */\nexport function websocketClientFreeHandle(self) {\n trace();\n ensureInitialized();\n dittoCore.websocket_client_free_handle(self);\n}\n// --------------------------------------------------------------- Logger ------\n/** @internal */\nexport function loggerInit() {\n trace();\n ensureInitialized();\n dittoCore.ditto_logger_init();\n}\n/** @internal */\nexport async function loggerSetCustomLogCb(cb) {\n trace();\n ensureInitialized();\n if (null === cb) {\n await dittoCore.ditto_logger_set_custom_log_cb(null);\n }\n else {\n // IDEA: pass custom error handler here instead of null?\n const wrappedCallback = wrapBackgroundCbForFFI(null, (loglevel, cMsg) => {\n try {\n const msg = dittoCore.boxCStringIntoString(cMsg);\n cb(loglevel, msg);\n }\n catch (e) {\n log('Error', `The registered cb in \\`ditto_logger_set_custom_log_cb()\\` failed with: ${e}`);\n }\n });\n await dittoCore.ditto_logger_set_custom_log_cb(wrappedCallback);\n }\n}\n/** @internal */\nexport function loggerEnabled(enabled) {\n trace();\n ensureInitialized();\n dittoCore.ditto_logger_enabled(!!enabled);\n}\n/** @internal */\nexport function loggerEnabledGet() {\n trace();\n ensureInitialized();\n return !!dittoCore.ditto_logger_enabled_get();\n}\n/** @internal */\nexport function loggerEmojiHeadingsEnabled(loggerEmojiHeadingsEnabled) {\n trace();\n ensureInitialized();\n dittoCore.ditto_logger_emoji_headings_enabled(loggerEmojiHeadingsEnabled);\n}\n/** @internal */\nexport function loggerEmojiHeadingsEnabledGet() {\n trace();\n ensureInitialized();\n return dittoCore.ditto_logger_emoji_headings_enabled_get();\n}\n/** @internal */\nexport function loggerMinimumLogLevel(logLevel) {\n trace();\n ensureInitialized();\n dittoCore.ditto_logger_minimum_log_level(logLevel);\n}\n/** @internal */\nexport function loggerMinimumLogLevelGet() {\n trace();\n ensureInitialized();\n return dittoCore.ditto_logger_minimum_log_level_get();\n}\n/** @internal */\nexport function loggerSetLogFile(path) {\n trace();\n ensureInitialized();\n const pathBytesOrNull = path ? bytesFromString(path) : null;\n const errorCode = dittoCore.ditto_logger_set_log_file(pathBytesOrNull);\n if (errorCode !== 0) {\n const message = errorMessage();\n throw new Error(`Can't set log file, due to error: ${errorMessage}`);\n }\n}\n/** @internal */\nexport function log(level, message) {\n trace();\n ensureInitialized();\n const messageBuffer = bytesFromString(message);\n dittoCore.ditto_log(level, messageBuffer);\n}\n// ----------------------------------------------------------- AuthClient ------\n/** @internal */\nexport function dittoIdentityConfigMakeOnlinePlayground(appID, sharedToken, baseURL) {\n trace();\n ensureInitialized();\n const appIDX = bytesFromString(appID);\n const sharedTokenX = bytesFromString(sharedToken);\n const baseURLX = bytesFromString(baseURL);\n const { status_code: errorCode, identity_config: identityConfig } = dittoCore.ditto_identity_config_make_online_playground(appIDX, sharedTokenX, baseURLX);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_identity_config_make_online_playground() failed with error code: ${errorCode}`);\n return identityConfig;\n}\n/** @internal */\nexport function dittoIdentityConfigMakeOnlineWithAuthentication(appID, baseURL) {\n trace();\n ensureInitialized();\n const appIDX = bytesFromString(appID);\n const baseURLX = bytesFromString(baseURL);\n const { status_code: errorCode, identity_config: identityConfig } = dittoCore.ditto_identity_config_make_online_with_authentication(appIDX, baseURLX);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_identity_config_make_online_with_authentication() failed with error code: ${errorCode}`);\n return identityConfig;\n}\n/** @internal */\nexport function dittoIdentityConfigMakeOfflinePlayground(appId, siteID) {\n trace();\n ensureInitialized();\n const appIdX = bytesFromString(appId);\n const siteIDX = Number(siteID);\n const { status_code: errorCode, identity_config: identityConfig } = dittoCore.ditto_identity_config_make_offline_playground(appIdX, siteIDX);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_identity_config_make_offline_playground() failed with error code: ${errorCode}`);\n return identityConfig;\n}\n/** @internal */\nexport function dittoIdentityConfigMakeSharedKey(appId, sharedKey, siteID) {\n trace();\n ensureInitialized();\n const appIdX = bytesFromString(appId);\n const sharedKeyX = bytesFromString(sharedKey);\n const siteIDX = Number(siteID);\n const { status_code: errorCode, identity_config: identityConfig } = dittoCore.ditto_identity_config_make_shared_key(appIdX, sharedKeyX, siteIDX);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_identity_config_make_shared_key() failed with error code: ${errorCode}`);\n return identityConfig;\n}\n/** @internal */\nexport function dittoIdentityConfigMakeManual(configCBORBase64) {\n trace();\n ensureInitialized();\n const configCBORBase64X = bytesFromString(configCBORBase64);\n const { status_code: errorCode, identity_config: identityConfig } = dittoCore.ditto_identity_config_make_manual_v0(configCBORBase64X);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_identity_config_make_manual_v0() failed with error code: ${errorCode}`);\n return identityConfig;\n}\n/** @internal */\nexport function dittoAuthClientGetSiteID(ditto) {\n trace();\n ensureInitialized();\n return dittoCore.ditto_auth_client_get_site_id(ditto);\n}\n/** @internal */\nexport function dittoAuthClientGetAppID(ditto) {\n trace();\n ensureInitialized();\n const cString = dittoCore.ditto_auth_client_get_app_id(ditto);\n return dittoCore.boxCStringIntoString(cString);\n}\nexport function dittoAuthClientUserID(ditto) {\n trace();\n ensureInitialized();\n const cStr = dittoCore.ditto_auth_client_user_id(ditto);\n return dittoCore.boxCStringIntoString(cStr);\n}\n/** @internal */\nexport function dittoAuthClientIsWebValid(ditto) {\n trace();\n ensureInitialized();\n return dittoCore.ditto_auth_client_is_web_valid(ditto) !== 0;\n}\nexport function dittoAuthClientIsX509Valid(ditto) {\n trace();\n ensureInitialized();\n return dittoCore.ditto_auth_client_is_x509_valid(ditto) !== 0;\n}\nexport async function dittoAuthClientLoginWithToken(ditto, token, provider) {\n trace();\n ensureInitialized();\n const tokenBytes = bytesFromString(token);\n const providerBytes = bytesFromString(provider);\n const errorCode = await dittoCore.ditto_auth_client_login_with_token(ditto, tokenBytes, providerBytes);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `Ditto failed to authenticate (error code: ${errorCode}).`);\n}\nexport async function dittoAuthClientLoginWithUsernameAndPassword(ditto, username, password, provider) {\n trace();\n ensureInitialized();\n const usernameBytes = bytesFromString(username);\n const passwordBytes = bytesFromString(password);\n const providerBytes = bytesFromString(provider);\n const errorCode = await dittoCore.ditto_auth_client_login_with_credentials(ditto, usernameBytes, passwordBytes, providerBytes);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `Ditto failed to authenticate (error code: ${errorCode}).`);\n}\nexport async function dittoAuthClientLogout(ditto) {\n trace();\n ensureInitialized();\n const errorCode = await dittoCore.ditto_auth_client_logout(ditto);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `Ditto failed to logout (error code: ${errorCode}).`);\n}\n// ---------------------------------------------------------------- Ditto ------\n/** @internal */\nexport function uninitializedDittoMake(path) {\n trace();\n ensureInitialized();\n const pathX = bytesFromString(path);\n return dittoCore.ditto_uninitialized_ditto_make(pathX);\n}\n/** @internal */\nexport function dittoMake(uninitializedDitto, identityConfig) {\n trace();\n ensureInitialized();\n return dittoCore.ditto_make(uninitializedDitto, identityConfig, 'Disabled');\n}\n/** @internal */\nexport async function dittoGetCollectionNames(self) {\n trace();\n ensureInitialized();\n const result = await dittoCore.ditto_get_collection_names(self);\n const errorCode = result.status_code;\n const cStringVec = result.names;\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_get_collection_names() failed with error code: ${errorCode}`);\n // WORKAROUND: cStringVecToStringArray() returns an `object` for the Wasm\n // variant, but it really is an array. We therefore force-cast here. Remove as\n // soon the exported function has proper type.\n const strings = dittoCore.cStringVecToStringArray(cStringVec);\n return strings;\n}\n/** @internal */\nexport function dittoFree(self) {\n trace();\n ensureInitialized();\n // REFACTOR: add proper error handling.\n return dittoCore.ditto_free(self);\n}\n/** @internal */\nexport function getDeadlockTimeout() {\n trace();\n ensureInitialized();\n return dittoCore.getDeadlockTimeout();\n}\n/** @internal */\nexport function setDeadlockTimeout(duration) {\n trace();\n ensureInitialized();\n dittoCore.setDeadlockTimeout(duration);\n}\n/** @internal */\nexport async function dittoRegisterPresenceV1Callback(self, cb) {\n trace();\n ensureInitialized();\n dittoCore.ditto_register_presence_v1_callback(self, wrapBackgroundCbForFFI((err) => log('Error', `The registered presence callback v1 errored with ${err}`), (cJsonStr) => {\n const jsonStr = dittoCore.refCStringToString(cJsonStr);\n cb(jsonStr);\n }));\n}\n/** @internal */\nexport async function dittoClearPresenceCallback(self) {\n trace();\n ensureInitialized();\n await dittoCore.ditto_clear_presence_callback(self);\n}\n/** @internal */\nexport async function dittoRegisterPresenceV3Callback(self, cb) {\n trace();\n ensureInitialized();\n dittoCore.ditto_register_presence_v3_callback(self, wrapBackgroundCbForFFI((err) => log('Error', `The registered presence callback v3 errored with ${err}`), (cJsonStr) => {\n const jsonStr = dittoCore.refCStringToString(cJsonStr);\n cb(jsonStr);\n }));\n}\n/** @internal */\nexport async function dittoClearPresenceV3Callback(self) {\n trace();\n ensureInitialized();\n dittoCore.ditto_clear_presence_v3_callback(self);\n}\n/** @internal */\nexport function dittoSmallPeerInfoGetIsEnabled(dittoPointer) {\n trace();\n ensureInitialized();\n return dittoCore.ditto_small_peer_info_get_is_enabled(dittoPointer);\n}\n/** @internal */\nexport async function dittoSmallPeerInfoSetEnabled(dittoPointer, isEnabled) {\n trace();\n ensureInitialized();\n dittoCore.ditto_small_peer_info_set_enabled(dittoPointer, isEnabled);\n}\n/** @internal */\nexport async function dittoSmallPeerInfoGetSyncScope(dittoPointer) {\n trace();\n ensureInitialized();\n return dittoCore.ditto_small_peer_info_get_sync_scope(dittoPointer);\n}\n/** @internal */\nexport async function dittoSmallPeerInfoSetSyncScope(dittoPointer, syncScope) {\n trace();\n ensureInitialized();\n return dittoCore.ditto_small_peer_info_set_sync_scope(dittoPointer, syncScope);\n}\n/** @internal */\nexport function dittoSmallPeerInfoGetMetadata(dittoPointer) {\n trace();\n ensureInitialized();\n const cString = dittoCore.ditto_small_peer_info_get_metadata(dittoPointer);\n return dittoCore.boxCStringIntoString(cString);\n}\n/** @internal */\nexport function dittoSmallPeerInfoSetMetadata(dittoPointer, metadata) {\n trace();\n ensureInitialized();\n const metadataCString = bytesFromString(metadata);\n const statusCode = dittoCore.ditto_small_peer_info_set_metadata(dittoPointer, metadataCString);\n switch (statusCode) {\n case 0:\n return;\n case -1:\n throw new Error('Internal inconsistency, the observability subsystem is unavailable.');\n case 1:\n throw new Error(`Validation error, size limit exceeded: ${errorMessage() || 'metadata is too big'}`);\n case 2:\n throw new Error(`Validation error, ${errorMessage() || 'depth limit for metadata object exceeded'}`);\n case 3:\n throw new Error(`Validation error, ${errorMessage() || `'${metadata}' is not a valid JSON object`}`);\n default:\n throw new Error(errorMessage() || `Internal inconsistency, ditto_small_peer_info_set_metadata() returned an unknown error code: ${statusCode}`);\n }\n}\n/** @internal */\nexport async function dittoSmallPeerInfoCollectionSetTransportConfigData(self, transportConfigData) {\n trace();\n ensureInitialized();\n dittoCore.ditto_small_peer_info_set_transport_config_data(self, transportConfigData);\n}\n/** @internal */\nexport function dittoRegisterTransportConditionChangedCallback(self, cb) {\n trace();\n ensureInitialized();\n if (!cb) {\n // @Konstantin: do we do this?\n dittoCore.ditto_register_transport_condition_changed_callback(self, null);\n }\n else {\n dittoCore.ditto_register_transport_condition_changed_callback(self, wrapBackgroundCbForFFI((err) => log('Error', `The registered \"transport condition changed\" callback errored with ${err}`), cb));\n }\n}\n/** @internal */\nexport function dittoSetDeviceName(dittoPointer, deviceName) {\n trace();\n ensureInitialized();\n let deviceNameCString = bytesFromString(deviceName);\n if (Environment.isWebBuild) {\n if (deviceNameCString.length > 64) {\n // WORKAROUND: the Wasm build won't sync when passing a device name with\n // more than 64 bytes. As a quick workaround, we strip all non-ASCII\n // characters and cap that at 63 bytes leaving one byte for '\\0'.\n const sanitizedDeviceName = deviceName.replace(/[^ -~]+/g, '');\n deviceNameCString = bytesFromString(sanitizedDeviceName.substr(0, 63));\n // NOTE: to reproduce the issue, comment the following two in. You'll see\n // that an ASCII string of 64 characters and more will make prevent sync\n // from working.\n //\n // const demoDeviceName = \"123456789-10-456789-20-456789-30-456789-40-456789-50-456789-60-4\" //56789-70-456789-80-456789-90-456789\" // 100\n // deviceNameCString = bytesFromString(demoDeviceName)\n }\n }\n return dittoCore.ditto_set_device_name(dittoPointer, deviceNameCString);\n}\n/** @internal */\nexport function dittoSetConnectRetryInterval(dittoPointer, retryInterval) {\n trace();\n ensureInitialized();\n // Unfortunately JS doesn't have a u32::MAX const...\n const UINT32_MAX = 4294967295;\n // Clamp the provided interval to u32 range (0 .. 2^32-1).\n const clampedInterval = Math.min(Math.max(0, retryInterval), UINT32_MAX);\n return dittoCore.ditto_set_connect_retry_interval(dittoPointer, clampedInterval);\n}\n/** @internal */\nexport function dittoSetSyncGroup(dittoPointer, syncGroup) {\n trace();\n ensureInitialized();\n return dittoCore.ditto_set_sync_group(dittoPointer, syncGroup);\n}\n// Not supported on Wasm.\n/** @internal */\nexport function dittoNewAttachmentFromFile(ditto, sourcePath, fileOperation) {\n trace();\n ensureInitialized();\n const sourcePathCString = bytesFromString(sourcePath);\n const outAttachment = {};\n const errorCode = dittoCore.ditto_new_attachment_from_file(ditto, sourcePathCString, fileOperation, outAttachment);\n if (errorCode !== 0) {\n throw new Error(errorMessage() || `ditto_new_attachment_from_file() failed with error code: ${errorCode}`);\n }\n return outAttachment;\n}\n/** @internal */\nexport async function dittoNewAttachmentFromBytes(ditto, bytes) {\n trace();\n ensureInitialized();\n const outAttachment = {};\n const errorCode = await dittoCore.ditto_new_attachment_from_bytes(ditto, bytes, outAttachment);\n if (errorCode !== 0) {\n throw new Error(errorMessage() || `ditto_new_attachment_from_bytes() failed with error code: ${errorCode}`);\n }\n return outAttachment;\n}\n/** @internal */\nexport async function dittoResolveAttachment(ditto, id, namedCallbacks, \n// Cb may be called in parallel at any point, so let's use\n// an optional error handler (which defaults to the ditto logger at 'Error' level).\nonError) {\n trace();\n ensureInitialized();\n const { onComplete, onProgress, onDelete } = namedCallbacks;\n const { status_code: errorCode, cancel_token: cancelToken } = await dittoCore.ditto_resolve_attachment(ditto, id, wrapBackgroundCbForFFI(onError, onComplete), wrapBackgroundCbForFFI(onError, onProgress), wrapBackgroundCbForFFI(onError, onDelete));\n if (errorCode !== 0) {\n throw new Error(errorMessage() || `ditto_resolve_attachment() failed with error code: ${errorCode}`);\n }\n return cancelToken;\n}\n/** @internal */\nexport function dittoCancelResolveAttachment(dittoPointer, id, cancelToken) {\n trace();\n ensureInitialized();\n const errorCode = dittoCore.ditto_cancel_resolve_attachment(dittoPointer, id, cancelToken);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_cancel_resolve_attachment() failed with error code: ${errorCode}`);\n}\n/** @internal */\nexport function freeAttachmentHandle(attachmentHandlePointer) {\n trace();\n ensureInitialized();\n dittoCore.ditto_free_attachment_handle(attachmentHandlePointer);\n}\n/** @internal */\nexport async function dittoGetAttachmentStatus(dittoPointer, id) {\n trace();\n ensureInitialized();\n const { status_code: errorCode, handle: attachmentHandle } = await dittoCore.ditto_get_attachment_status(dittoPointer, id);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_get_attachment_status() failed with error code: ${errorCode}`);\n return attachmentHandle;\n}\n/** @internal */\nexport async function dittoGetCompleteAttachmentData(dittoPointer, attachmentHandlePointer) {\n trace();\n ensureInitialized();\n const { status: errorCode, data } = await dittoCore.ditto_get_complete_attachment_data(dittoPointer, attachmentHandlePointer);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `\\`ditto_get_complete_attachment_data()\\` failed with error code: ${errorCode}`);\n return dittoCore.boxCBytesIntoBuffer(data);\n}\n/** @internal */\nexport function dittoGetCompleteAttachmentPath(dittoPointer, attachmentHandlePointer) {\n trace();\n ensureInitialized();\n const pathCString = dittoCore.ditto_get_complete_attachment_path(dittoPointer, attachmentHandlePointer);\n return dittoCore.refCStringToString(pathCString);\n}\n/** @internal */\nexport function dittoGetSDKVersion(ditto) {\n trace();\n ensureInitialized();\n const cString = dittoCore.ditto_get_sdk_version(ditto);\n return dittoCore.boxCStringIntoString(cString);\n}\n/** @internal */\nexport function dittoGetSDKSemver() {\n trace();\n ensureInitialized();\n const cString = dittoCore.dittoffi_get_sdk_semver();\n return dittoCore.boxCStringIntoString(cString);\n}\n/** @internal */\nexport function dittoPresenceV1(self) {\n trace();\n ensureInitialized();\n const cString = dittoCore.ditto_presence_v1(self);\n return dittoCore.boxCStringIntoString(cString);\n}\n/** @internal */\nexport function dittoPresenceV2(self) {\n trace();\n ensureInitialized();\n const cString = dittoCore.ditto_presence_v2(self);\n return dittoCore.boxCStringIntoString(cString);\n}\n/** @internal */\nexport function dittoPresenceV3(self) {\n trace();\n ensureInitialized();\n const cString = dittoCore.ditto_presence_v3(self);\n return dittoCore.boxCStringIntoString(cString);\n}\n/** @internal */\nexport function dittoStartTCPServer(dittoPointer, bind) {\n trace();\n ensureInitialized();\n const bindBuffer = bytesFromString(bind);\n return dittoCore.ditto_start_tcp_server(dittoPointer, bindBuffer);\n}\n/** @internal */\nexport function dittoStopTCPServer(dittoPointer) {\n trace();\n ensureInitialized();\n return dittoCore.ditto_stop_tcp_server(dittoPointer);\n}\n/** @internal */\nexport async function dittoShutdown(dittoPointer) {\n trace();\n ensureInitialized();\n return await dittoCore.ditto_shutdown(dittoPointer);\n}\n/** @internal */\nexport function dittoAddMulticastTransport(dittoPointer) {\n trace();\n ensureInitialized();\n return dittoCore.ditto_add_multicast_transport(dittoPointer);\n}\n/** @internal */\nexport function dittoRemoveMulticastTransport(dittoPointer) {\n trace();\n ensureInitialized();\n return dittoCore.ditto_remove_multicast_transport(dittoPointer);\n}\n/** @internal */\nexport function dittoStartHTTPServer(dittoPointer, bind, staticPath, websocketMode, tlsCertPath, tlsKeyPath) {\n trace();\n ensureInitialized();\n const bindBuffer = bytesFromString(bind);\n const staticPathBuffer = bytesFromString(staticPath);\n const tlsCertPathBuffer = bytesFromString(tlsCertPath);\n const tlsKeyPathBuffer = bytesFromString(tlsKeyPath);\n return dittoCore.ditto_start_http_server(dittoPointer, bindBuffer, staticPathBuffer, websocketMode, tlsCertPathBuffer, tlsKeyPathBuffer);\n}\n/** @internal */\nexport function dittoStopHTTPServer(dittoPointer) {\n trace();\n ensureInitialized();\n return dittoCore.ditto_stop_http_server(dittoPointer);\n}\n/** @internal */\nexport function dittoRunGarbageCollection(dittoPointer) {\n trace();\n ensureInitialized();\n return dittoCore.ditto_run_garbage_collection(dittoPointer);\n}\n/** @internal */\nexport async function dittoDisableSyncWithV3(dittoPointer) {\n trace();\n ensureInitialized();\n const errorCode = await dittoCore.ditto_disable_sync_with_v3(dittoPointer);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `ditto_disable_sync_with_v3() failed with error code: ${errorCode}`);\n}\nexport function dittoSetStaticTCPClients(ditto, listOfServers) {\n trace();\n ensureInitialized();\n // TODO(Vincent): add error handling.\n if (Environment.isNodeBuild) {\n const listOfServersBytes = listOfServers.map((server) => bytesFromString(server));\n dittoCore.ditto_set_static_tcp_clients(ditto, listOfServersBytes);\n }\n if (Environment.isWebBuild) {\n // WORKAROUND: this function isn't available for WebAssembly at all and\n // is resolved to `undefined` by `rollup`, leading to an obscure exception.\n // To workaround that, we'll explicitly throw a meaningful error here. To\n // fix this properly, implement this function on the Rust side and make\n // it report an appropriate error if the passed in array isn't empty. (Note\n // that it should be perfectly fine to pass in an empty array.).\n //\n // For more details, see issue #8522:\n // https://github.com/getditto/ditto/issues/8522\n if (listOfServers.length > 0) {\n throw new Error(`Web variant of Ditto does not support connecting to TCP servers: ${listOfServers.join(', ')}`);\n }\n }\n}\nexport function dittoSetStaticWebsocketClients(ditto, listOfServers, routingHint) {\n trace();\n ensureInitialized();\n // TODO(Vincent): add error handling.\n const listOfServersBytes = listOfServers.map((server) => bytesFromString(server));\n dittoCore.ditto_set_static_websocket_clients(ditto, listOfServersBytes, routingHint);\n}\n// ------------------------------------------------------ Hash & Mnemonic ------\n/** @internal */\nexport function documentsHash(documents) {\n trace();\n ensureInitialized();\n const { status_code: errorCode, u64: hash } = dittoCore.ditto_documents_hash(documents);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `\\`ditto_documents_hash()\\` failed with error code: ${errorCode}`);\n // `hash` is of type `number | BigInt`, let's unify it to `BigInt` to keep it simple.\n return BigInt(hash);\n}\n/** @internal */\nexport function documentsHashMnemonic(documents) {\n trace();\n ensureInitialized();\n const { status_code: errorCode, c_string } = dittoCore.ditto_documents_hash_mnemonic(documents);\n if (errorCode !== 0)\n throw new Error(errorMessage() || `\\`ditto_documents_hash_mnemonic()\\` failed with error code: ${errorCode}`);\n return dittoCore.boxCStringIntoString(c_string);\n}\n// ------------------------------------------------------------- Auth ----------\n/** @internal */\nexport function authServerAuthSubmitWithSuccess(req, successCbor) {\n trace();\n ensureInitialized();\n return dittoCore.auth_server_auth_submit_with_success(req, successCbor);\n}\n/** @internal */\nexport function authServerAuthSubmitWithError(req, errorCode) {\n trace();\n ensureInitialized();\n return dittoCore.auth_server_auth_submit_with_error(req, errorCode);\n}\n/** @internal */\nexport function authServerRefreshSubmitWithSuccess(req, successCbor) {\n trace();\n ensureInitialized();\n return dittoCore.auth_server_refresh_submit_with_success(req, successCbor);\n}\n/** @internal */\nexport function authServerRefreshSubmitWithError(req, errorCode) {\n trace();\n ensureInitialized();\n return dittoCore.auth_server_refresh_submit_with_error(req, errorCode);\n}\n/** @internal */\nexport function dittoUnregisterLocalAuthServer(ditto) {\n trace();\n ensureInitialized();\n return dittoCore.ditto_unregister_local_auth_server(ditto);\n}\n/** @internal */\nexport function dittoRegisterLocalAuthServer(namedArgs) {\n const { ditto, signingKeyPem, verifyingKeysPem, caKeyPem, authCb, refreshCb, onError } = namedArgs;\n trace();\n ensureInitialized();\n const signingKeyPemFfi = bytesFromString(signingKeyPem);\n const verifyingKeysPemFfi = verifyingKeysPem.map(bytesFromString);\n const caKeyPemFfi = typeof caKeyPem !== 'undefined' ? bytesFromString(caKeyPem) : null;\n const authCbFfi = wrapBackgroundCbForFFI(onError, authCb);\n const refreshCbFfi = wrapBackgroundCbForFFI(onError, refreshCb);\n return dittoCore.ditto_register_local_auth_server(ditto, signingKeyPemFfi, verifyingKeysPemFfi, caKeyPemFfi, authCbFfi, refreshCbFfi);\n}\n/** @internal */\nexport async function dittoAuthSetLoginProvider(ditto, loginProvider) {\n trace();\n ensureInitialized();\n return await dittoCore.ditto_auth_set_login_provider(ditto, loginProvider);\n}\n/** @internal */\nexport function dittoAuthClientMakeLoginProvider(expiringCb, \n// Cb may be called in parallel at any point, so let's use an optional error handler\nonError) {\n trace();\n ensureInitialized();\n return dittoCore.ditto_auth_client_make_login_provider(wrapBackgroundCbForFFI(onError, expiringCb));\n}\n/** @internal */\nexport function dittoAuthClientSetValidityListener(ditto, validityUpdateCb, \n// Cb may be called in parallel at any point, so let's use an optional error handler\nonError) {\n trace();\n ensureInitialized();\n const validityUpdateRawCb = wrapBackgroundCbForFFI(onError, function (isWebValidInt, isX509ValidInt) {\n return validityUpdateCb(isWebValidInt === 1, isX509ValidInt === 1);\n });\n return dittoCore.ditto_auth_client_set_validity_listener(ditto, validityUpdateRawCb);\n}\n// ----------------------------------------------------------- Transports ------\n/**\n * We currently don't initialize transports through this function but rather in\n * the NAPI module registration in `transports.c` due to an issue with importing\n * the functions required by this function.\n * See https://github.com/getditto/ditto/issues/10723\n *\n * @internal\n */\nexport function transportsInit() {\n trace();\n ensureInitialized();\n const transportsErrorPointer = dittoCore.ditto_sdk_transports_error_new();\n const wasInitialized = dittoCore.ditto_sdk_transports_init(transportsErrorPointer);\n const errorType = dittoCore.ditto_sdk_transports_error_value(transportsErrorPointer);\n dittoCore.ditto_sdk_transports_error_free(transportsErrorPointer);\n if (wasInitialized === false) {\n throw new Error(`Failed to initialize transports (${errorType} error)`);\n }\n}\n/** @internal */\nexport function transportsBLEIsAvailable(ditto) {\n trace();\n ensureInitialized();\n return dittoCore.ditto_sdk_transports_ble_is_available(ditto);\n}\n/** @internal */\nexport function transportsBLECreate(ditto) {\n trace();\n ensureInitialized();\n const transportsErrorPointer = dittoCore.ditto_sdk_transports_error_new();\n const blePointer = dittoCore.ditto_sdk_transports_ble_create(ditto, transportsErrorPointer);\n const errorType = dittoCore.ditto_sdk_transports_error_value(transportsErrorPointer);\n dittoCore.ditto_sdk_transports_error_free(transportsErrorPointer);\n if (blePointer != null) {\n log('Info', `Bluetooth transport created.`);\n }\n else {\n log('Error', `Can't create bluetooth transport (${errorType} error).`);\n }\n return blePointer;\n}\n/** @internal */\nexport function transportsBLEDestroy(ble) {\n trace();\n ensureInitialized();\n const ffiError = dittoCore.ditto_sdk_transports_error_new();\n const wasDestroyed = dittoCore.ditto_sdk_transports_ble_destroy(ble, ffiError);\n const errorType = dittoCore.ditto_sdk_transports_error_value(ffiError);\n dittoCore.ditto_sdk_transports_error_free(ffiError);\n if (wasDestroyed === true) {\n log('Info', 'Bluetooth transport disabled.');\n }\n else {\n log('Error', `Bluetooth transport could not be disabled (${errorType} error).`);\n }\n return wasDestroyed;\n}\n/** @internal */\nexport function transportsLANIsAvailable(ditto) {\n trace();\n ensureInitialized();\n return dittoCore.ditto_sdk_transports_lan_is_available(ditto);\n}\n/** @internal */\nexport function transportsLANCreate(ditto) {\n trace();\n ensureInitialized();\n const transportsErrorPointer = dittoCore.ditto_sdk_transports_error_new();\n const lanPointer = dittoCore.ditto_sdk_transports_lan_create(ditto, transportsErrorPointer);\n const errorType = dittoCore.ditto_sdk_transports_error_value(transportsErrorPointer);\n dittoCore.ditto_sdk_transports_error_free(transportsErrorPointer);\n if (lanPointer != null) {\n log('Info', `LAN transport created.`);\n }\n else {\n log('Error', `Can't create LAN transport (${errorType} error).`);\n }\n return lanPointer;\n}\n/** @internal */\nexport function transportsLANDestroy(lan) {\n trace();\n ensureInitialized();\n const ffiError = dittoCore.ditto_sdk_transports_error_new();\n const wasDestroyed = dittoCore.ditto_sdk_transports_lan_destroy(lan, ffiError);\n const error = dittoCore.ditto_sdk_transports_error_value(ffiError);\n dittoCore.ditto_sdk_transports_error_free(ffiError);\n if (wasDestroyed === true) {\n log('Info', 'LAN transport disabled.');\n }\n else {\n log('Error', `LAN transport could not be disabled (${error} error).`);\n }\n return wasDestroyed;\n}\n/** @internal */\nexport function transportsAWDLIsAvailable(ditto) {\n trace();\n ensureInitialized();\n return dittoCore.ditto_sdk_transports_awdl_is_available(ditto);\n}\n/** @internal */\nexport function transportsAWDLCreate(ditto) {\n trace();\n ensureInitialized();\n const transportsErrorPointer = dittoCore.ditto_sdk_transports_error_new();\n const awdlPointer = dittoCore.ditto_sdk_transports_awdl_create(ditto, transportsErrorPointer);\n const errorType = dittoCore.ditto_sdk_transports_error_value(transportsErrorPointer);\n dittoCore.ditto_sdk_transports_error_free(transportsErrorPointer);\n if (awdlPointer != null) {\n log('Info', `AWDL transport created.`);\n }\n else {\n log('Error', `Can't create AWDL transport (${errorType} error).`);\n }\n return awdlPointer;\n}\n/** @internal */\nexport function transportsAWDLDestroy(awdl) {\n trace();\n ensureInitialized();\n const ffiError = dittoCore.ditto_sdk_transports_error_new();\n const wasDestroyed = dittoCore.ditto_sdk_transports_awdl_destroy(awdl, ffiError);\n const errorType = dittoCore.ditto_sdk_transports_error_value(ffiError);\n dittoCore.ditto_sdk_transports_error_free(ffiError);\n if (wasDestroyed === true) {\n log('Info', 'AWDL transport disabled.');\n }\n else {\n log('Error', `AWDL transport could not be disabled (${errorType} error).`);\n }\n return wasDestroyed;\n}\n// ---------------------------------------------------------------- Other ------\n/** @internal */\nlet isInitialized = false;\n/** @internal */\nlet withOutPtr;\nif (Environment.isNodeBuild) {\n isInitialized = true;\n withOutPtr = wrapFFIOutFunction(dittoCore.withOutPtr);\n}\nif (Environment.isReactNativeBuild) {\n isInitialized = true;\n}\n/** @internal */\nexport async function init(webAssemblyModule) {\n if (Environment.isWebBuild) {\n if (webAssemblyModule) {\n await dittoCore.init(webAssemblyModule);\n }\n else {\n await dittoCore.init();\n }\n isInitialized = true;\n withOutPtr = wrapFFIOutFunction(dittoCore.withOutPtr);\n }\n}\n/** @internal */\nexport function initSDKVersion(platform, language, semVer) {\n trace();\n ensureInitialized();\n const platformCString = bytesFromString(platform);\n const languageCString = bytesFromString(language);\n const semVerCString = bytesFromString(semVer);\n const errorCode = dittoCore.ditto_init_sdk_version(platform, language, semVerCString);\n if (typeof errorCode !== 'undefined' && errorCode !== 0)\n throw new Error(errorMessage() || `ditto_init_sdk_version() failed with error code: ${errorCode}`);\n}\n/** @internal */\nexport function verifyLicense(license) {\n trace();\n ensureInitialized();\n const licenseBuffer = bytesFromString(license);\n let result;\n const errorMessageCString = withOutPtr('char *', (outErrorMessage) => {\n result = dittoCore.ditto_verify_license(licenseBuffer, outErrorMessage);\n return outErrorMessage;\n });\n const errorMessage = dittoCore.boxCStringIntoString(errorMessageCString);\n return { result, errorMessage };\n}\n// ---------------------------------------------------- React Native only ------\n/** @internal */\nexport function getDeviceName() {\n if (Environment.isReactNativeBuild) {\n // @ts-expect-error Throws method not-found on non-RN envs.\n return dittoCore.getDeviceName();\n }\n}\n/** @internal */\nexport function getRandomValues(array) {\n if (Environment.isReactNativeBuild) {\n // @ts-expect-error Throws method not-found on non-RN envs.\n return dittoCore.getRandomValues(array);\n }\n}\n/** @internal */\nexport function createDirectory(path) {\n if (Environment.isReactNativeBuild) {\n // @ts-expect-error Throws method not-found on non-RN envs.\n return dittoCore.createDirectory(path);\n }\n}\n// -------------------------------------------------------------- Private ------\n// HACK: this is a left-over error code still in use which will be removed\n// in the near future. Until then, we hard-code it here, just like the\n// ObjC/Swift SDK. See discussion on Slack for details:\n// https://dittolive.slack.com/archives/CRRAWK99A/p1616065662069800\n/** @internal */\nconst NOT_FOUND_ERROR_CODE = -30798;\n/** @internal */\nfunction wrapBackgroundCbForFFI(onError, cb) {\n // There's no need to wrap callbacks through JSI while they are not returning\n // anything.\n if (Environment.isReactNativeBuild) {\n return cb;\n }\n // Basic fallback based off: https://stackoverflow.com/a/3390635\n if (onError === undefined) {\n onError = (err) => log('Error', `The registered callback failed with ${err}`);\n }\n return (ret_sender, ...args) => {\n let ret;\n try {\n ret = cb(...args);\n }\n catch (err) {\n try {\n onError(err);\n }\n catch (nested_error) {\n log('Error', `Internal error: \\`onError()\\` handler oughtn't throw, but it did throw ${nested_error}`);\n }\n }\n return ret_sender(ret);\n };\n}\n/** @internal */\nfunction wrapFFIOutFunction(ffiOutFunction) {\n return function (...args) {\n let occurredError = undefined;\n let callbackResult = undefined;\n let isCallbackResultOutParameter = false;\n const callback = args[args.length - 1];\n const previous_args = args.splice(0, args.length - 1);\n const dittoCoreResult = ffiOutFunction(...previous_args, (outParameter) => {\n try {\n callbackResult = callback(outParameter);\n isCallbackResultOutParameter = callbackResult === outParameter;\n }\n catch (error) {\n occurredError = error;\n }\n });\n if (occurredError) {\n throw occurredError;\n }\n return isCallbackResultOutParameter ? dittoCoreResult : callbackResult;\n };\n}\n/** @internal */\nfunction bytesFromString(jsString) {\n if (typeof jsString === 'undefined')\n return undefined;\n if (jsString === null)\n return null;\n if (typeof jsString !== 'string')\n throw new Error(`Can't convert string to Uint8Array, not a string: ${jsString}`);\n const textEncoder = new TextEncoder();\n return textEncoder.encode(`${jsString}\\0`);\n}\n/**\n * This is the legacy error-message retrieving function, using thread-local\n * storage.\n *\n * @internal\n */\nfunction errorMessage() {\n trace();\n ensureInitialized();\n // eslint-disable-next-line\n const errorMessageCString = dittoCore.ditto_error_message();\n return dittoCore.boxCStringIntoString(errorMessageCString);\n}\n/** @internal */\nfunction trace() {\n if (isTracingEnabled) {\n // Copied and adapted from a Stack Overflow comment:\n // https://stackoverflow.com/a/38435618\n const error = new Error();\n const stack = error.stack;\n let caller = '<unknown>';\n try {\n caller = stack.split('\\n')[2].trim().split(/\\s+/)[1].replace('Module.', '');\n }\n catch (error) {\n // Nothing to do, caller remains unknown.\n }\n // We use use `console.log()` instead of `log()` here to avoid infinite recursion.\n // eslint-disable-next-line no-console\n console.log(`💗 [TRACE] ${caller}()`);\n }\n}\n/** @internal */\nfunction ensureInitialized() {\n if (!isInitialized) {\n throw new Error('Ditto needs to be initialized before using any of its API, please make sure to call `await init()` first.');\n }\n}\n//# sourceMappingURL=ffi.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\n/**\n * Serves as a token for a specific attachment that you can pass to a call to\n * {@link Collection.fetchAttachment | fetchAttachment()} on a\n * {@link Collection}.\n */\nexport class AttachmentToken {\n /** @internal */\n constructor(jsObj) {\n const type = jsObj[FFI.DittoCRDTTypeKey];\n if (type !== FFI.DittoCRDTType.attachment) {\n throw new Error('Invalid attachment token');\n }\n const id = jsObj['_id'];\n if (!(id instanceof Uint8Array)) {\n throw new Error('Invalid attachment token id');\n }\n const len = jsObj['_len'];\n if (typeof len !== 'number' || len < 0) {\n throw new Error('Invalid attachment token length');\n }\n const meta = jsObj['_meta'];\n if (typeof meta !== 'object') {\n throw new Error('Invalid attachment token meta');\n }\n this.id = id;\n this.len = len;\n this.metadata = meta;\n }\n}\n//# sourceMappingURL=attachment-token.js.map","// NOTE: this is patched up with the actual build version by Jake task\n// build:package and has to be a valid semantic version as defined here: https://semver.org.\nexport const fullBuildVersionString = '{full-build-version-string}';\n// NOTE: this is patched up with the default URL for the ditto.wasm by Jake task\n// build:package. Usually it looks something like this:\n// https://software.ditto.live/js/Ditto/1.2.3-alpha.456/ditto.wasm\nexport const defaultDittoWasmFileURL = '{default-ditto-wasm-file-url}';\n//# sourceMappingURL=build-time-constants.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport * as Environment from './@environment';\nimport { fullBuildVersionString, defaultDittoWasmFileURL } from './build-time-constants';\nlet isInitialized = false;\n/**\n * Initializes the whole Ditto module. Needs to be called and complete before\n * any of the Ditto API is used.\n *\n * @param options - Dictionary with global {@link InitOptions | initialization options}.\n */\nexport async function init(options = {}) {\n if (!isInitialized) {\n if (Environment.isWebBuild) {\n // IDEA: throw or log a warning if init() was called a second time with\n // different options (because those wouldn't have any effect).\n const webAssemblyModule = options.webAssemblyModule || defaultDittoWasmFileURL;\n await FFI.init(webAssemblyModule);\n FFI.initSDKVersion('Web', 'JavaScript', fullBuildVersionString);\n FFI.loggerInit();\n }\n isInitialized = true;\n }\n}\nif (Environment.isNodeBuild) {\n switch (process.platform) {\n case 'android':\n FFI.initSDKVersion('Android', 'JavaScript', fullBuildVersionString);\n break;\n case 'darwin':\n FFI.initSDKVersion('Mac', 'JavaScript', fullBuildVersionString);\n break;\n case 'linux':\n FFI.initSDKVersion('Linux', 'JavaScript', fullBuildVersionString);\n break;\n case 'win32':\n FFI.initSDKVersion('Windows', 'JavaScript', fullBuildVersionString);\n break;\n default:\n FFI.initSDKVersion('Unknown', 'JavaScript', fullBuildVersionString);\n break;\n }\n FFI.loggerInit();\n}\n//# sourceMappingURL=init.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport * as Environment from './@environment';\nimport * as FFI from './ffi';\n/**\n * Class with static methods to customize the logging behavior from Ditto and\n * log messages with the Ditto logging infrastructure.\n */\nexport class Logger {\n /**\n * Registers a file path where logs will be written to, whenever Ditto wants\n * to issue a log (on _top_ of emitting the log to the console).\n */\n static get logFile() {\n return this._logFile;\n }\n /**\n * On Node, registers a file path where logs will be written to, whenever\n * Ditto wants to issue a log (on _top_ of emitting the log to the console).\n * In the browser, this method has no effect.\n *\n * @param path can be `null`, in which case the current logging file, if any,\n * is unregistered, otherwise, the file path must be within an already\n * existing directory.\n */\n static setLogFile(path) {\n if (path) {\n FFI.loggerSetLogFile(path);\n this._logFile = path;\n }\n else {\n FFI.loggerSetLogFile(undefined);\n delete this._logFile;\n }\n }\n /**\n * Convenience method, takes the path part of the URL and calls\n * {@link setLogFile | setLogFile()} with it.\n */\n static setLogFileURL(url) {\n var _a;\n this.setLogFile((_a = url === null || url === void 0 ? void 0 : url.pathname) !== null && _a !== void 0 ? _a : null);\n }\n /** Whether the logger is currently enabled. */\n static get enabled() {\n return FFI.loggerEnabledGet();\n }\n /** Enables or disables logging. */\n static set enabled(enabled) {\n FFI.loggerEnabled(enabled);\n }\n /**\n * Represents whether or not emojis should be used as the log level\n * indicator in the logs.\n */\n static get emojiLogLevelHeadingsEnabled() {\n return FFI.loggerEmojiHeadingsEnabledGet();\n }\n /**\n * Represents whether or not emojis should be used as the log level\n * indicator in the logs.\n */\n static set emojiLogLevelHeadingsEnabled(emojiLogLevelHeadingsEnabled) {\n FFI.loggerEmojiHeadingsEnabled(emojiLogLevelHeadingsEnabled);\n }\n /**\n * The minimum log level at which logs will be logged.\n *\n * For example if this is set to `Warning`, then only logs that are logged\n * with the `Warning` or `Error` log levels will be shown.\n */\n static get minimumLogLevel() {\n return FFI.loggerMinimumLogLevelGet();\n }\n /**\n * The minimum log level at which logs will be logged.\n *\n * For example if this is set to `Warning`, then only logs that are logged\n * with the `Warning` or `Error` log levels will be shown.\n */\n static set minimumLogLevel(minimumLogLevel) {\n FFI.loggerMinimumLogLevel(minimumLogLevel);\n }\n /**\n * Returns the current custom log callback, `undefined` by default. See\n * {@link setCustomLogCallback | setCustomLogCallback()} for a detailed\n * description.\n */\n static get customLogCallback() {\n return this._customLogCallback;\n }\n /**\n * Registers a custom callback that will be called to report each log entry.\n *\n * @param callback function called for each log entry. `undefined` will\n * unregister any previous callback and stop reporting log entries through\n * callbacks.\n *\n * @throws {Error} if called in a React Native environment.\n */\n static async setCustomLogCallback(callback) {\n if (Environment.isReactNativeBuild) {\n throw new Error('Logger custom callback is currently not implemented for React Native.');\n }\n if (callback) {\n await FFI.loggerSetCustomLogCb(callback);\n this._customLogCallback = callback;\n }\n else {\n await FFI.loggerSetCustomLogCb(null);\n delete this._customLogCallback;\n }\n }\n /**\n * Logs the message for the given `level`.\n *\n * @see {@link error | error()}\n * @see {@link warning | warning()}\n * @see {@link info | info()}\n * @see {@link debug | debug()}\n * @see {@link verbose | verbose()}\n */\n static log(level, message) {\n FFI.log(level, message);\n }\n /**\n * Convenience method, same as calling {@link log | log()} with\n * {@link LogLevel} `Error`.\n */\n static error(message) {\n this.log('Error', message);\n }\n /**\n * Convenience method, same as calling {@link log | log()} with\n * {@link LogLevel} `Warning`.\n */\n static warning(message) {\n this.log('Warning', message);\n }\n /**\n * Convenience method, same as calling {@link log | log()} with\n * {@link LogLevel} `Info`.\n */\n static info(message) {\n this.log('Info', message);\n }\n /**\n * Convenience method, same as calling {@link log | log()} with\n * {@link LogLevel} `Debug`.\n */\n static debug(message) {\n this.log('Debug', message);\n }\n /**\n * Convenience method, same as calling {@link log | log()} with\n * {@link LogLevel} `Verbose`.\n */\n static verbose(message) {\n this.log('Verbose', message);\n }\n constructor() {\n throw new Error(\"Logger can't be instantiated, use its static properties & methods directly instead.\");\n }\n}\n//# sourceMappingURL=logger.js.map","export const CBOR_OPTIONS = Object.freeze({\n dictionary: \"object\",\n mode: \"strict\",\n});\n/** A symbol which is emitted by the `reviver` and `replacer` functions when a value is not associated with a key or CBOR label.\n * In JSON, a value with no key simply emits an empty string; this would be indistinguishable from a valid CBOR data sequence.\n * Using a symbol acheives emitting a comparable value without the value being a valid CBOR data type.\n *\n * ```typescript\n * const encoded = encode('Plain string', (key, value) => {\n * console.log(key)\n * return value\n * })\n * // Expected: Symbol(EMPTY_KEY)\n * decode(encoded, (key, value) => {\n * console.log(key)\n * return value\n * })\n * // Expected: Symbol(EMPTY_KEY)\n * ```\n */\nexport const EMPTY_KEY = Symbol(\"EMPTY_KEY\");\n/** A symbol which may be returned by the user in the encoder's `replacer` function to omit values. Just like detecting an empty\n * key, using a symbol acheives emitting a comparable value without the value being a valid CBOR data type. Use this in a custom\n * replacer function as the return value to indicate to the encoder that the value is to be skipped from arrays and dictionaries.\n *\n * ```typescript\n * const map = new Map<any, any>([[1, 2], [\"1\", 3000]])\n * const encoded = encode(map, (key, value) => key === \"1\" ? OMIT_VALUE : value)\n * console.log(new Uint8Array(encoded)) // Expect: Uint8Array(8) [ 161, 1, 2 ]\n * ```\n */\nexport const OMIT_VALUE = Symbol(\"OMIT_VALUE\");\nexport const POW_2_24 = 5.960464477539063e-8;\nexport const POW_2_32 = 4294967296;\nexport const POW_2_53 = 9007199254740992;\nexport const MAX_SAFE_INTEGER = 18446744073709551616n;\nexport const DECODE_CHUNK_SIZE = 8192;\n// CBOR defined tag values\nexport const kCborTag = 6;\n// RFC8746 Tag values for typed little endian arrays\nexport const kCborTagUint8 = 64;\nexport const kCborTagUint16 = 69;\nexport const kCborTagUint32 = 70;\nexport const kCborTagInt8 = 72;\nexport const kCborTagInt16 = 77;\nexport const kCborTagInt32 = 78;\nexport const kCborTagFloat32 = 85;\nexport const kCborTagFloat64 = 86;\n","// deno-lint-ignore-file no-explicit-any\nimport { CBOR_OPTIONS } from \"./constants.js\";\nexport function objectIs(x, y) {\n if (typeof Object.is === \"function\")\n return Object.is(x, y);\n // SameValue algorithm\n // Steps 1-5, 7-10\n if (x === y) {\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n }\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n}\nexport function options(options) {\n function isDictionary(value) {\n return typeof value === \"string\" && [\"object\", \"map\"].includes(value);\n }\n function isMode(value) {\n return typeof value === \"string\" &&\n [\"loose\", \"strict\", \"sequence\"].includes(value);\n }\n const bag = { ...CBOR_OPTIONS };\n if (typeof options === \"object\") {\n bag.dictionary = isDictionary(options.dictionary)\n ? options.dictionary\n : CBOR_OPTIONS.dictionary;\n bag.mode = isMode(options.mode) ? options.mode : CBOR_OPTIONS.mode;\n }\n return Object.freeze(bag);\n}\nexport function lexicographicalCompare(left, right) {\n const minLength = Math.min(left.byteLength, right.byteLength);\n for (let i = 0; i < minLength; i++) {\n const result = left[i] - right[i];\n if (result !== 0)\n return result;\n }\n return left.byteLength - right.byteLength;\n}\n","var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _Sequence_instances, _Sequence_toInspectString;\nexport class Sequence {\n static from(iterable) {\n return new Sequence(Array.from(iterable));\n }\n constructor(data) {\n _Sequence_instances.add(this);\n Object.defineProperty(this, \"_data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n if (data)\n this._data = data;\n else\n this._data = [];\n }\n /** Add data to the sequence and return the index of the item. */\n add(item) {\n return this._data.push(item) - 1;\n }\n /** Removes an item from the sequence, returning the value. */\n remove(index) {\n return this._data.splice(index, 1)[0];\n }\n /** Get an item from the sequence by index. */\n get(index) {\n return this._data[index];\n }\n /** Get a shallow clone of this CBOR Sequence. */\n clone() {\n return new Sequence(this.data);\n }\n /** Get a copy of the CBOR sequence data array. */\n get data() {\n return Array.from(this._data);\n }\n get size() {\n return this._data.length;\n }\n [(_Sequence_instances = new WeakSet(), Symbol.toStringTag)]() {\n return \"Sequence\";\n }\n [(_Sequence_toInspectString = function _Sequence_toInspectString(inspect) {\n return `${this[Symbol.toStringTag]()}(${this.size}) ${inspect(this._data)}`;\n }, Symbol.for(\"Deno.customInspect\"))](inspect) {\n return __classPrivateFieldGet(this, _Sequence_instances, \"m\", _Sequence_toInspectString).call(this, inspect);\n }\n [Symbol.for(\"nodejs.util.inspect.custom\")](_depth, _opts, inspect) {\n return __classPrivateFieldGet(this, _Sequence_instances, \"m\", _Sequence_toInspectString).call(this, inspect);\n }\n}\n","// deno-lint-ignore-file no-explicit-any\n/** Class for structuring a simple value. Unassigned or reserved simple values\n * are emitted as an instance of this class during decoding. This allows an\n * application to handle custom decoding in the `reviver` function of the decoder.\n *\n * ```typescript\n * const { buffer } = new Uint8Array([0x81,0xf8,0x64])\n * const decoded = decode(buffer, (key, value) => {\n * // Let's pretend that a simple value of 100 stands for JavaScript NaN\n * if (value instanceof SimpleValue && value.value === 100) return NaN\n * return value\n * })\n * console.log(decoded) // Expect: [ NaN ]\n * ```\n *\n * Simple values can alsoe be encoded.\n *\n * ```typescript\n * const example = [NaN]\n * const encoded = encode(example, (key, value) => {\n * if (Number.isNaN(value)) return new SimpleValue(100)\n * return value\n * })\n * console.log(new Uint8Array(encoded)) // Expect: Uint8Array(3) [ 129, 248, 100 ]\n * ```\n */\nexport class SimpleValue {\n static create(value) {\n if (value === undefined)\n return new SimpleValue(23);\n if (value === null)\n return new SimpleValue(22);\n if (value === true)\n return new SimpleValue(21);\n if (value === false)\n return new SimpleValue(20);\n if (typeof value === \"number\" && value >= 0 && value <= 255) {\n return new SimpleValue(value);\n }\n throw new Error(\"CBORError: Value out of range or not a simple value.\");\n }\n constructor(value) {\n Object.defineProperty(this, \"semantic\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"value\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n switch (true) {\n case value === 20:\n this.semantic = \"false\";\n break;\n case value === 21:\n this.semantic = \"true\";\n break;\n case value === 22:\n this.semantic = \"null\";\n break;\n case value === 23:\n this.semantic = \"undefined\";\n break;\n case value > 23 && value < 32:\n this.semantic = \"reserved\";\n break;\n default:\n this.semantic = \"unassigned\";\n break;\n }\n this.value = value;\n }\n toPrimitive() {\n switch (this.semantic) {\n case \"false\":\n return false;\n case \"true\":\n return true;\n case \"null\":\n return null;\n case \"undefined\":\n default:\n return undefined;\n }\n }\n}\n","// deno-lint-ignore-file no-explicit-any\n/** Class for structuring a tagged value. Tags which are not JavaScript typed\n * arrays are emitted as an instance of this class during decoding. This allows\n * an application to handle tagged values in the `reviver` function of the\n * decoder. Values which are a valid CBOR type will be decoded and assigned to\n * the `TaggedValue.value` property.\n *\n * ```typescript\n * const { buffer } = new Uint8Array([\n * 0xa1,0x63,0x75,0x72,0x6c,0xd8,0x20,0x70,\n * 0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,\n * 0x69,0x74,0x65,0x2e,0x63,0x6f,0x6d,0x2f\n * ])\n * const decoded = decode(buffer, (key, value) => {\n * if (value instanceof TaggedValue && value.tag === 32) return new URL(value.value)\n * return value\n * })\n * console.log(decoded) // Expect: { url: URL { href: \"http://site.com/\" } }\n * ```\n *\n * Use this class when encoding custom tags.\n *\n * ```typescript\n * const tagged = new Map([[\"url\", new URL(\"http://site.com/\")]])\n * const encoded = encode(tagged, (key, value) => {\n * if (value instanceof URL) return new TaggedValue(value.toString(), 32)\n * return value\n * })\n * ```\n */\nexport class TaggedValue {\n constructor(value, tag) {\n Object.defineProperty(this, \"value\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"tag\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.value = value;\n this.tag = tag;\n }\n}\n","// deno-lint-ignore-file no-explicit-any\nimport { DECODE_CHUNK_SIZE, EMPTY_KEY, kCborTagFloat32, kCborTagFloat64, kCborTagInt16, kCborTagInt32, kCborTagInt8, kCborTagUint16, kCborTagUint32, kCborTagUint8, POW_2_24, POW_2_53, } from \"./constants.js\";\nimport { options } from \"./helpers.js\";\nimport { Sequence } from \"./Sequence.js\";\nimport { SimpleValue } from \"./SimpleValue.js\";\nimport { TaggedValue } from \"./TaggedValue.js\";\nexport function decode(data, reviver, cborOptions = {}) {\n const { dictionary, mode } = options(cborOptions);\n const isStrict = mode === \"sequence\" || mode === \"strict\";\n const dataView = new DataView(data);\n const ta = new Uint8Array(data);\n let offset = 0;\n let reviverFunction = function (_key, value) {\n return value;\n };\n if (typeof reviver === \"function\")\n reviverFunction = reviver;\n function commitRead(length, value) {\n offset += length;\n return value;\n }\n function readArrayBuffer(length) {\n return commitRead(length, new Uint8Array(data, offset, length));\n }\n function readFloat16() {\n const tempArrayBuffer = new ArrayBuffer(4);\n const tempDataView = new DataView(tempArrayBuffer);\n const value = readUint16();\n const sign = value & 0x8000;\n let exponent = value & 0x7c00;\n const fraction = value & 0x03ff;\n if (exponent === 0x7c00)\n exponent = 0xff << 10;\n else if (exponent !== 0)\n exponent += (127 - 15) << 10;\n else if (fraction !== 0)\n return (sign ? -1 : 1) * fraction * POW_2_24;\n tempDataView.setUint32(0, (sign << 16) | (exponent << 13) | (fraction << 13));\n return tempDataView.getFloat32(0);\n }\n function readFloat32() {\n return commitRead(4, dataView.getFloat32(offset));\n }\n function readFloat64() {\n return commitRead(8, dataView.getFloat64(offset));\n }\n function readUint8() {\n return commitRead(1, ta[offset]);\n }\n function readUint16() {\n return commitRead(2, dataView.getUint16(offset));\n }\n function readUint32() {\n return commitRead(4, dataView.getUint32(offset));\n }\n function readUint64() {\n return commitRead(8, dataView.getBigUint64(offset));\n }\n function readBreak() {\n if (ta[offset] !== 0xff)\n return false;\n offset += 1;\n return true;\n }\n function readLength(additionalInformation) {\n if (additionalInformation < 24)\n return additionalInformation;\n if (additionalInformation === 24)\n return readUint8();\n if (additionalInformation === 25)\n return readUint16();\n if (additionalInformation === 26)\n return readUint32();\n if (additionalInformation === 27) {\n const integer = readUint64();\n if (integer < POW_2_53)\n return Number(integer);\n return integer;\n }\n if (additionalInformation === 31)\n return -1;\n throw new Error(\"CBORError: Invalid length encoding\");\n }\n function readIndefiniteStringLength(majorType) {\n const initialByte = readUint8();\n if (initialByte === 0xff)\n return -1;\n const length = readLength(initialByte & 0x1f);\n if (length < 0 || initialByte >> 5 !== majorType) {\n throw new Error(\"CBORError: Invalid indefinite length element\");\n }\n return Number(length);\n }\n function appendUtf16Data(utf16data, length) {\n for (let i = 0; i < length; ++i) {\n let value = readUint8();\n if (value & 0x80) {\n if (value < 0xe0) {\n value = ((value & 0x1f) << 6) | (readUint8() & 0x3f);\n length -= 1;\n }\n else if (value < 0xf0) {\n value = ((value & 0x0f) << 12) | ((readUint8() & 0x3f) << 6) |\n (readUint8() & 0x3f);\n length -= 2;\n }\n else {\n value = ((value & 0x0f) << 18) | ((readUint8() & 0x3f) << 12) |\n ((readUint8() & 0x3f) << 6) | (readUint8() & 0x3f);\n length -= 3;\n }\n }\n if (value < 0x10000) {\n utf16data.push(value);\n }\n else {\n value -= 0x10000;\n utf16data.push(0xd800 | (value >> 10));\n utf16data.push(0xdc00 | (value & 0x3ff));\n }\n }\n }\n function decodeItem() {\n const initialByte = readUint8();\n const majorType = initialByte >> 5;\n const additionalInformation = initialByte & 0x1f;\n let i;\n let length;\n if (majorType === 7) {\n switch (additionalInformation) {\n case 25:\n return readFloat16();\n case 26:\n return readFloat32();\n case 27:\n return readFloat64();\n }\n }\n length = readLength(additionalInformation);\n if (length < 0 && (majorType < 2 || 6 < majorType)) {\n throw new Error(\"CBORError: Invalid length\");\n }\n switch (majorType) {\n case 0:\n return reviverFunction(EMPTY_KEY, length);\n case 1:\n if (typeof length === \"number\") {\n return reviverFunction(EMPTY_KEY, -1 - length);\n }\n return reviverFunction(EMPTY_KEY, -1n - length);\n case 2: {\n if (length < 0) {\n const elements = [];\n let fullArrayLength = 0;\n while ((length = readIndefiniteStringLength(majorType)) >= 0) {\n fullArrayLength += length;\n elements.push(readArrayBuffer(length));\n }\n const fullArray = new Uint8Array(fullArrayLength);\n let fullArrayOffset = 0;\n for (i = 0; i < elements.length; ++i) {\n fullArray.set(elements[i], fullArrayOffset);\n fullArrayOffset += elements[i].length;\n }\n return reviverFunction(EMPTY_KEY, fullArray);\n }\n return reviverFunction(EMPTY_KEY, readArrayBuffer(length));\n }\n case 3: {\n const utf16data = [];\n if (length < 0) {\n while ((length = readIndefiniteStringLength(majorType)) >= 0) {\n appendUtf16Data(utf16data, length);\n }\n }\n else {\n appendUtf16Data(utf16data, length);\n }\n let string = \"\";\n for (i = 0; i < utf16data.length; i += DECODE_CHUNK_SIZE) {\n string += String.fromCharCode.apply(null, utf16data.slice(i, i + DECODE_CHUNK_SIZE));\n }\n return reviverFunction(EMPTY_KEY, string);\n }\n case 4: {\n let retArray;\n if (length < 0) {\n retArray = [];\n let index = 0;\n while (!readBreak()) {\n retArray.push(reviverFunction(index++, decodeItem()));\n }\n }\n else {\n retArray = new Array(length);\n for (i = 0; i < length; ++i) {\n retArray[i] = reviverFunction(i, decodeItem());\n }\n }\n return reviverFunction(EMPTY_KEY, retArray);\n }\n case 5: {\n if (dictionary === \"map\") {\n const retMap = new Map();\n for (i = 0; i < length || (length < 0 && !readBreak()); ++i) {\n const key = decodeItem();\n if (isStrict && retMap.has(key)) {\n throw new Error(\"CBORError: Duplicate key encountered\");\n }\n retMap.set(key, reviverFunction(key, decodeItem()));\n }\n return reviverFunction(EMPTY_KEY, retMap);\n }\n const retObject = {};\n for (i = 0; i < length || (length < 0 && !readBreak()); ++i) {\n const key = decodeItem();\n if (isStrict &&\n Object.prototype.hasOwnProperty.call(retObject, key)) {\n throw new Error(\"CBORError: Duplicate key encountered\");\n }\n retObject[key] = reviverFunction(key, decodeItem());\n }\n return reviverFunction(EMPTY_KEY, retObject);\n }\n case 6: {\n const value = decodeItem();\n const tag = length;\n if (value instanceof Uint8Array) {\n // Handles round-trip of typed arrays as they are a built-in JS language feature.\n // Similar decision was made for built-in JS language primitives with SimpleValue.\n const buffer = value.buffer.slice(value.byteOffset, value.byteLength + value.byteOffset);\n switch (tag) {\n case kCborTagUint8:\n return reviverFunction(EMPTY_KEY, new Uint8Array(buffer));\n case kCborTagInt8:\n return reviverFunction(EMPTY_KEY, new Int8Array(buffer));\n case kCborTagUint16:\n return reviverFunction(EMPTY_KEY, new Uint16Array(buffer));\n case kCborTagInt16:\n return reviverFunction(EMPTY_KEY, new Int16Array(buffer));\n case kCborTagUint32:\n return reviverFunction(EMPTY_KEY, new Uint32Array(buffer));\n case kCborTagInt32:\n return reviverFunction(EMPTY_KEY, new Int32Array(buffer));\n case kCborTagFloat32:\n return reviverFunction(EMPTY_KEY, new Float32Array(buffer));\n case kCborTagFloat64:\n return reviverFunction(EMPTY_KEY, new Float64Array(buffer));\n }\n }\n return reviverFunction(EMPTY_KEY, new TaggedValue(value, tag));\n }\n case 7:\n switch (length) {\n case 20:\n return reviverFunction(EMPTY_KEY, false);\n case 21:\n return reviverFunction(EMPTY_KEY, true);\n case 22:\n return reviverFunction(EMPTY_KEY, null);\n case 23:\n return reviverFunction(EMPTY_KEY, undefined);\n default:\n return reviverFunction(EMPTY_KEY, new SimpleValue(length));\n }\n }\n }\n const ret = decodeItem();\n if (offset !== data.byteLength) {\n if (mode !== \"sequence\")\n throw new Error(\"CBORError: Remaining bytes\");\n const seq = new Sequence([ret]);\n while (offset < data.byteLength) {\n seq.add(reviverFunction(EMPTY_KEY, decodeItem()));\n }\n return seq;\n }\n return mode === \"sequence\" ? new Sequence([ret]) : ret;\n}\nexport function parse(data, reviver, cborOptions) {\n return decode(data, reviver, cborOptions);\n}\n","// deno-lint-ignore-file no-explicit-any\nimport { EMPTY_KEY, kCborTag, kCborTagFloat32, kCborTagFloat64, kCborTagInt16, kCborTagInt32, kCborTagInt8, kCborTagUint16, kCborTagUint32, kCborTagUint8, MAX_SAFE_INTEGER, OMIT_VALUE, POW_2_32, POW_2_53, } from \"./constants.js\";\nimport { lexicographicalCompare, objectIs } from \"./helpers.js\";\nimport { Sequence } from \"./Sequence.js\";\nimport { SimpleValue } from \"./SimpleValue.js\";\nimport { TaggedValue } from \"./TaggedValue.js\";\n/**\n * Converts a JavaScript value to a Concise Binary Object Representation (CBOR) buffer.\n *\n * ```typescript\n * const map = new Map<any, any>([[1, 2], [\"1\", 3000]])\n * const encoded = encode(map)\n * console.log(new Uint8Array(encoded)) // Expect: Uint8Array(8) [ 162, 1, 2, 97, 49, 25, 11, 184 ]\n * ```\n *\n * Add a replacer function - just like `JSON.stringify`.\n *\n * ```typescript\n * const map = new Map<any, any>([[1, 2], [\"1\", 3000]])\n * const encoded = encode(map, (key, value) => key === \"1\" ? OMIT_VALUE : value)\n * console.log(new Uint8Array(encoded)) // Expect: Uint8Array(8) [ 161, 1, 2 ]\n * ```\n *\n * @param value - A JavaScript value, usually an object or array, to be converted.\n * @param replacer - A function that alters the behavior of the encoding process,\n * or an array of strings or numbers naming properties of value that should be included\n * in the output. If replacer is null or not provided, all properties of the object are\n * included in the resulting CBOR buffer.\n * @returns The JavaScript value converted to CBOR format.\n */\nexport function encode(value, replacer) {\n let data = new ArrayBuffer(256);\n let dataView = new DataView(data);\n let byteView = new Uint8Array(data);\n let lastLength;\n let offset = 0;\n let replacerFunction = (_key, value) => value;\n if (typeof replacer === \"function\")\n replacerFunction = replacer;\n if (Array.isArray(replacer)) {\n const exclusive = replacer.slice();\n replacerFunction = (key, value) => {\n if (key === EMPTY_KEY || exclusive.includes(key))\n return value;\n return OMIT_VALUE;\n };\n }\n function prepareWrite(length) {\n let newByteLength = data.byteLength;\n const requiredLength = offset + length;\n while (newByteLength < requiredLength)\n newByteLength <<= 1;\n if (newByteLength !== data.byteLength) {\n const oldDataView = dataView;\n data = new ArrayBuffer(newByteLength);\n dataView = new DataView(data);\n byteView = new Uint8Array(data);\n const uint32count = (offset + 3) >> 2;\n for (let i = 0; i < uint32count; ++i) {\n dataView.setUint32(i << 2, oldDataView.getUint32(i << 2));\n }\n }\n lastLength = length;\n return dataView;\n }\n function commitWrite(..._args) {\n offset += lastLength;\n }\n function writeFloat64(val) {\n commitWrite(prepareWrite(8).setFloat64(offset, val));\n }\n function writeUint8(val) {\n commitWrite(prepareWrite(1).setUint8(offset, val));\n }\n function writeUint8Array(val) {\n prepareWrite(val.length);\n byteView.set(val, offset);\n commitWrite();\n }\n function writeUint16(val) {\n commitWrite(prepareWrite(2).setUint16(offset, val));\n }\n function writeUint32(val) {\n commitWrite(prepareWrite(4).setUint32(offset, val));\n }\n function writeUint64(val) {\n const low = val % POW_2_32;\n const high = (val - low) / POW_2_32;\n const view = prepareWrite(8);\n view.setUint32(offset, high);\n view.setUint32(offset + 4, low);\n commitWrite();\n }\n function writeBigUint64(val) {\n commitWrite(prepareWrite(8).setBigUint64(offset, val));\n }\n function writeVarUint(val, mod) {\n if (val <= 0xff) {\n if (val < 24) {\n writeUint8(Number(val) | mod);\n }\n else {\n writeUint8(0x18 | mod);\n writeUint8(Number(val));\n }\n }\n else if (val <= 0xffff) {\n writeUint8(0x19 | mod);\n writeUint16(Number(val));\n }\n else if (val <= 0xffffffff) {\n writeUint8(0x1a | mod);\n writeUint32(Number(val));\n }\n else {\n writeUint8(0x1b | mod);\n if (typeof val === \"number\")\n writeUint64(val);\n else\n writeBigUint64(val);\n }\n }\n function writeTypeAndLength(type, length) {\n if (length < 24) {\n writeUint8((type << 5) | length);\n }\n else if (length < 0x100) {\n writeUint8((type << 5) | 24);\n writeUint8(length);\n }\n else if (length < 0x10000) {\n writeUint8((type << 5) | 25);\n writeUint16(length);\n }\n else if (length < 0x100000000) {\n writeUint8((type << 5) | 26);\n writeUint32(length);\n }\n else {\n writeUint8((type << 5) | 27);\n writeUint64(length);\n }\n }\n function writeArray(val) {\n const startOffset = offset;\n const length = val.length;\n let total = 0;\n writeTypeAndLength(4, length);\n const typeLengthOffset = offset;\n for (let i = 0; i < length; i += 1) {\n const result = replacerFunction(i, val[i]);\n if (result === OMIT_VALUE)\n continue;\n encodeItem(result);\n total += 1;\n }\n if (length > total) {\n const encoded = byteView.slice(typeLengthOffset, offset);\n offset = startOffset;\n writeTypeAndLength(4, total);\n writeUint8Array(encoded);\n }\n }\n function writeDictionary(val) {\n const encodedMap = [];\n const startOffset = offset;\n let typeLengthOffset = offset;\n let keyCount = 0;\n let keyTotal = 0;\n if (val instanceof Map) {\n keyCount = val.size;\n writeTypeAndLength(5, keyCount);\n typeLengthOffset = offset;\n for (const [key, value] of val.entries()) {\n const result = replacerFunction(key, value);\n if (result === OMIT_VALUE)\n continue;\n let cursor = offset;\n encodeItem(key);\n const keyBytes = byteView.slice(cursor, offset);\n cursor = offset;\n encodeItem(result);\n const valueBytes = byteView.slice(cursor, offset);\n keyTotal += 1;\n encodedMap.push([keyBytes, valueBytes]);\n }\n }\n else {\n const keys = Object.keys(val);\n keyCount = keys.length;\n writeTypeAndLength(5, keyCount);\n typeLengthOffset = offset;\n for (let i = 0; i < keyCount; i += 1) {\n const key = keys[i];\n const result = replacerFunction(key, val[key]);\n if (result === OMIT_VALUE)\n continue;\n let cursor = offset;\n encodeItem(key);\n const keyBytes = byteView.slice(cursor, offset);\n cursor = offset;\n encodeItem(result);\n const valueBytes = byteView.slice(cursor, offset);\n keyTotal += 1;\n encodedMap.push([keyBytes, valueBytes]);\n }\n }\n function sortEncodedKeys(length) {\n offset = startOffset;\n writeTypeAndLength(5, keyTotal);\n encodedMap.sort(([keyA], [keyB]) => lexicographicalCompare(keyA, keyB));\n for (let i = 0; i < length; i += 1) {\n const [encodedKey, encodedValue] = encodedMap[i];\n writeUint8Array(encodedKey);\n writeUint8Array(encodedValue);\n }\n }\n if (keyCount > keyTotal) {\n const encodedMapLength = encodedMap.length;\n if (encodedMapLength > 1) {\n sortEncodedKeys(encodedMapLength);\n }\n else {\n const encoded = byteView.slice(typeLengthOffset, offset);\n offset = startOffset;\n writeTypeAndLength(5, keyTotal);\n writeUint8Array(encoded);\n }\n }\n else {\n const encodedMapLength = encodedMap.length;\n if (encodedMapLength > 1) {\n sortEncodedKeys(encodedMapLength);\n }\n }\n }\n function writeBigInteger(val) {\n let type = 0;\n if (0 <= val && val <= MAX_SAFE_INTEGER) {\n type = 0;\n }\n else if (-MAX_SAFE_INTEGER <= val && val < 0) {\n type = 1;\n val = -(val + 1n);\n }\n else {\n throw new Error(\"CBORError: Encountered unsafe integer outside of valid CBOR range.\");\n }\n if (val < 0x100000000n) {\n return writeTypeAndLength(type, Number(val));\n }\n else {\n writeUint8((type << 5) | 27);\n writeBigUint64(val);\n }\n }\n function encodeItem(val) {\n if (val === OMIT_VALUE)\n return;\n if (val === false)\n return writeUint8(0xf4);\n if (val === true)\n return writeUint8(0xf5);\n if (val === null)\n return writeUint8(0xf6);\n if (val === undefined)\n return writeUint8(0xf7);\n if (objectIs(val, -0))\n return writeUint8Array([0xf9, 0x80, 0x00]);\n switch (typeof val) {\n case \"bigint\":\n return writeBigInteger(val);\n case \"number\":\n if (Math.floor(val) === val) {\n if (0 <= val && val <= POW_2_53)\n return writeTypeAndLength(0, val);\n if (-POW_2_53 <= val && val < 0) {\n return writeTypeAndLength(1, -(val + 1));\n }\n }\n writeUint8(0xfb);\n return writeFloat64(val);\n case \"string\": {\n const utf8data = [];\n const strLength = val.length;\n for (let i = 0; i < strLength; ++i) {\n let charCode = val.charCodeAt(i);\n if (charCode < 0x80) {\n utf8data.push(charCode);\n }\n else if (charCode < 0x800) {\n utf8data.push(0xc0 | (charCode >> 6));\n utf8data.push(0x80 | (charCode & 0x3f));\n }\n else if (charCode < 0xd800 || charCode >= 0xe000) {\n utf8data.push(0xe0 | (charCode >> 12));\n utf8data.push(0x80 | ((charCode >> 6) & 0x3f));\n utf8data.push(0x80 | (charCode & 0x3f));\n }\n else {\n charCode = (charCode & 0x3ff) << 10;\n charCode |= val.charCodeAt(++i) & 0x3ff;\n charCode += 0x10000;\n utf8data.push(0xf0 | (charCode >> 18));\n utf8data.push(0x80 | ((charCode >> 12) & 0x3f));\n utf8data.push(0x80 | ((charCode >> 6) & 0x3f));\n utf8data.push(0x80 | (charCode & 0x3f));\n }\n }\n writeTypeAndLength(3, utf8data.length);\n return writeUint8Array(utf8data);\n }\n default: {\n let converted;\n if (Array.isArray(val)) {\n writeArray(val);\n } // RFC8746 CBOR Tags\n else if (val instanceof Uint8Array) {\n writeVarUint(kCborTagUint8, kCborTag << 5);\n writeTypeAndLength(2, val.length);\n writeUint8Array(val);\n }\n else if (val instanceof Int8Array) {\n writeVarUint(kCborTagInt8, kCborTag << 5);\n writeTypeAndLength(2, val.byteLength);\n writeUint8Array(new Uint8Array(val.buffer));\n }\n else if (val instanceof Uint16Array) {\n writeVarUint(kCborTagUint16, kCborTag << 5);\n writeTypeAndLength(2, val.byteLength);\n writeUint8Array(new Uint8Array(val.buffer));\n }\n else if (val instanceof Int16Array) {\n writeVarUint(kCborTagInt16, kCborTag << 5);\n writeTypeAndLength(2, val.byteLength);\n writeUint8Array(new Uint8Array(val.buffer));\n }\n else if (val instanceof Uint32Array) {\n writeVarUint(kCborTagUint32, kCborTag << 5);\n writeTypeAndLength(2, val.byteLength);\n writeUint8Array(new Uint8Array(val.buffer));\n }\n else if (val instanceof Int32Array) {\n writeVarUint(kCborTagInt32, kCborTag << 5);\n writeTypeAndLength(2, val.byteLength);\n writeUint8Array(new Uint8Array(val.buffer));\n }\n else if (val instanceof Float32Array) {\n writeVarUint(kCborTagFloat32, kCborTag << 5);\n writeTypeAndLength(2, val.byteLength);\n writeUint8Array(new Uint8Array(val.buffer));\n }\n else if (val instanceof Float64Array) {\n writeVarUint(kCborTagFloat64, kCborTag << 5);\n writeTypeAndLength(2, val.byteLength);\n writeUint8Array(new Uint8Array(val.buffer));\n }\n else if (ArrayBuffer.isView(val)) {\n converted = new Uint8Array(val.buffer);\n writeTypeAndLength(2, converted.length);\n writeUint8Array(converted);\n }\n else if (val instanceof ArrayBuffer ||\n (typeof SharedArrayBuffer === \"function\" &&\n val instanceof SharedArrayBuffer)) {\n converted = new Uint8Array(val);\n writeTypeAndLength(2, converted.length);\n writeUint8Array(converted);\n }\n else if (val instanceof TaggedValue) {\n writeVarUint(val.tag, 0b11000000);\n encodeItem(val.value);\n }\n else if (val instanceof SimpleValue) {\n writeTypeAndLength(7, val.value);\n }\n else if (val instanceof Sequence) {\n if (offset !== 0) {\n throw new Error(\"CBORError: A CBOR Sequence may not be nested.\");\n }\n const length = val.size;\n for (let i = 0; i < length; i += 1)\n encodeItem(val.get(i));\n }\n else {\n writeDictionary(val);\n }\n }\n }\n }\n encodeItem(replacerFunction(EMPTY_KEY, value));\n if (\"slice\" in data)\n return data.slice(0, offset);\n const ret = new ArrayBuffer(offset);\n const retView = new DataView(ret);\n for (let i = 0; i < offset; ++i)\n retView.setUint8(i, dataView.getUint8(i));\n return ret;\n}\n/**\n * Alias of `encode`. Converts a JavaScript value to a Concise Binary Object Representation (CBOR) buffer.\n * @param value - A JavaScript value, usually an object or array, to be converted.\n * @param replacer - A function that alters the behavior of the encoding process,\n * or an array of strings or numbers naming properties of value that should be included\n * in the output. If replacer is null or not provided, all properties of the object are\n * included in the resulting CBOR buffer.\n * @returns The JavaScript value converted to CBOR format.\n */\nexport function binarify(value, replacer) {\n return encode(value, replacer);\n}\n","import { decode, parse } from \"./decode.js\";\nimport { binarify, encode } from \"./encode.js\";\n/**\n * An intrinsic object that provides functions to convert JavaScript values\n * to and from the Concise Binary Object Representation (CBOR) format.\n *\n * ```typescript\n * // Simply a conveniently named-export.\n * CBOR.binarify(...)\n * CBOR.decode(...)\n * CBOR.encode(...)\n * CBOR.parse(...)\n * ```\n */\nexport const CBOR = {\n binarify,\n decode,\n encode,\n parse,\n};\n","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport { CBOR as CBORRedux } from './@cbor-redux';\nimport { DocumentID } from './document-id';\n/** @internal */\nexport class CBOR {\n /** @internal */\n static encode(data, replacer) {\n const arrayBuffer = CBORRedux.encode(data, replacer);\n return new Uint8Array(arrayBuffer);\n }\n /** @internal */\n static decode(data, reviver) {\n const arrayBuffer = data.buffer;\n return CBORRedux.decode(arrayBuffer, reviver);\n }\n}\n/**\n * Custom replacer that converts `DocumentID` instances to their string\n * representation.\n *\n * @internal\n */\nexport function documentIDReplacer(key, value) {\n if (value instanceof DocumentID) {\n return value.toString();\n }\n return value;\n}\n//# sourceMappingURL=cbor.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { CBOR } from './cbor';\n/** Represents a unique identifier for a {@link Document}. */\nexport class DocumentID {\n /**\n * Returns the value of the receiver, lazily decoded from its CBOR\n * representation if needed.\n */\n get value() {\n let value = this['@ditto.value'];\n if (typeof value === 'undefined') {\n value = CBOR.decode(this['@ditto.cbor']);\n this['@ditto.value'] = value;\n }\n return value;\n }\n /**\n * Creates a new `DocumentID`.\n *\n * A document ID can be created from any of the following:\n *\n * - `string`\n * - `number` (integer)\n * - `boolean`\n * - `null`\n * - raw data in the form of a JS [Typed Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays)\n * - `Array` (containing any of the items in this list)\n * - Map (a raw JS `object`, where the keys must be strings and the values\n * can be made up of any of the items in this list)\n *\n * Note that you cannot use floats or other custom types to create a document\n * ID.\n *\n * Document IDs are also limited in size, based on their serialized\n * representation, to 256 bytes. You will receive an error if you try to\n * create a document ID that exceeds the size limit.\n *\n * @param value The value that represents the document identifier.\n * @param skipCBOREncoding If `true, skips CBOR encoding and assumes\n * the passed in `value` is already CBOR encoded. You shouldn't need to ever\n * pass this parameter, it's only used internally for certain edge cases.\n * @param skipValidation If `true, skips validation of the passed in value or\n * CBOR. You shouldn't need to ever pass this parameter, it's only used\n * internally for certain edge cases.\n */\n constructor(value, skipCBOREncoding = false, skipValidation = false) {\n const cbor = skipCBOREncoding ? value : CBOR.encode(value);\n const validatedCBOR = skipValidation ? cbor : validateDocumentIDCBOR(cbor);\n if (!validatedCBOR) {\n throw new Error(`Can't create DocumentID, passed in value is not valid: ${value}`);\n }\n this.isValidated = !skipValidation;\n this['@ditto.cbor'] = validatedCBOR;\n }\n /**\n * Returns `true` if passed in `documentID` is equal to the receiver,\n * otherwise returns `false`.\n */\n equals(documentID) {\n const left = this['@ditto.cbor'];\n const right = documentID['@ditto.cbor'];\n if (left === right) {\n return true;\n }\n if (!(left instanceof Uint8Array)) {\n return false;\n }\n if (!(right instanceof Uint8Array)) {\n return false;\n }\n if (left.length !== right.length) {\n return false;\n }\n for (let i = 0; i < left.length; i += 1) {\n if (left[i] !== right[i])\n return false;\n }\n return true;\n }\n /**\n * Returns a string representation of the receiver.\n *\n * If you need a string representation to be used directly in a query,\n * please use `toQueryCompatibleString()` instead.\n */\n toString() {\n return FFI.documentIDQueryCompatible(this['@ditto.cbor'], 'WithoutQuotes');\n }\n /**\n * Returns a byte representation of the document ID value as base64 string.\n */\n toBase64String() {\n const bytes = this['@ditto.cbor'];\n return btoa(String.fromCharCode.apply(null, bytes));\n }\n /**\n * Returns a query compatible string representation of the receiver.\n *\n * The returned string can be used directly in queries that you use with\n * other Ditto functions. For example you could create a query that was like\n * this:\n *\n * ``` TypeScript\n * collection.find(`_id == ${documentID.toQueryCompatibleString()}`)\n * ```\n */\n toQueryCompatibleString() {\n return FFI.documentIDQueryCompatible(this['@ditto.cbor'], 'WithQuotes');\n }\n /** @internal */\n toCBOR() {\n return this['@ditto.cbor'];\n }\n}\n// -----------------------------------------------------------------------------\n/** @internal */\nexport function validateDocumentIDValue(id) {\n if (typeof id === 'undefined') {\n throw new Error(`Invalid document ID: ${id}`);\n }\n return id;\n}\n/** @internal */\nexport function validateDocumentIDCBOR(idCBOR) {\n const validatedIDCBOROrNull = FFI.validateDocumentID(idCBOR);\n return validatedIDCBOROrNull !== null && validatedIDCBOROrNull !== void 0 ? validatedIDCBOROrNull : idCBOR;\n}\n//# sourceMappingURL=document-id.js.map","//\n// Copyright © 2023 DittoLive Incorporated. All rights reserved.\n//\nvar _a;\nimport * as FFI from './ffi';\nimport { Logger } from './logger';\n// REFACTOR: tweak the API to use Rust concepts of ownership. For example,\n// register() could be named something like yieldOwnership() while unregister()\n// be named takeOwnership() and return the taken pointer. See discussion here:\n// https://dittolive.slack.com/archives/C01NLL95095/p1618311222027700?thread_ts=1618308918.024500&cid=C01NLL95095\n// Add bridged type name to debug, for example 'Ditto'.\nconst DEBUG_TYPE_NAMES = [];\nconst DEBUG_ALL_TYPES = false;\n/**\n * A handle serves as a safe wrapper around a pointer to a native object.\n *\n * A bridge keeps track of all handles that have been created on its\n * {@link Bridge.handlesByAddress | `handlesByAddress`} property, which allows\n * enumerating all objects that are currently managed by the bridge.\n *\n * @internal */\nexport class Handle {\n /**\n * Warning: Do not call this constructor directly. Use\n * {@link Bridge.handleFor | `Bridge.<type>.handleFor()`} instead.\n *\n * @internal\n */\n constructor(bridge, object, pointer) {\n this.isClosed = false;\n this.isFinalized = false;\n this.isUnregistered = false;\n this.bridge = bridge;\n this.objectWeakRef = new WeakRef(object);\n this.pointer = pointer;\n }\n /** The type of this handle's bridge */\n get type() {\n return this.bridge.type;\n }\n /**\n * Returns the pointer associated with this handle.\n *\n * @throws {Error} if the object has already been closed, garbage collected,\n * or unregistered from the bridge.\n */\n deref() {\n if (this.isClosed) {\n throw new Error(`Bridging error: can't get pointer for an object that has been closed.`);\n }\n if (this.isFinalized) {\n throw new Error(`Bridging error: can't get pointer for an object that has been finalized.`);\n }\n if (this.isUnregistered) {\n throw new Error(`Bridging error: can't get pointer for an object that has been unregistered.`);\n }\n return this.pointer;\n }\n /**\n * Returns the pointer associated with this handle or `null` if the object\n * has been closed, garbage collected, or unregistered.\n */\n derefOrNull() {\n var _b;\n if (this.isClosed) {\n return null;\n }\n if (this.isFinalized) {\n return null;\n }\n if (this.isUnregistered) {\n return null;\n }\n return (_b = this.pointer) !== null && _b !== void 0 ? _b : null;\n }\n /**\n * Returns the object associated with this handle.\n *\n * @throws {Error} if the object has been closed, unregistered, or garbage collected,\n * closed or unregistered.\n */\n object() {\n const object = this.objectWeakRef.deref();\n if (object == null) {\n throw new Error(`Bridging error: ${this.bridge.type.name} object has been garbage collected.`);\n }\n if (this.isClosed) {\n throw new Error(`Bridging error: ${this.bridge.type.name} object has been closed.`);\n }\n if (this.isUnregistered) {\n throw new Error(`Bridging error: ${this.bridge.type.name} object has been unregistered.`);\n }\n return object;\n }\n /**\n * Returns the object associated with this handle or `null` if the object\n * has been closed, unregistered, or garbage collected.\n */\n objectOrNull() {\n var _b;\n return (_b = this.objectWeakRef.deref()) !== null && _b !== void 0 ? _b : null;\n }\n /** @internal */\n toString() {\n const pointer = this.derefOrNull();\n return `{ Handle | type: ${this.bridge.type}, object: ${this.objectWeakRef.deref()}, FFI address: ${pointer === null || pointer === void 0 ? void 0 : pointer.addr}, FFI type: ${pointer === null || pointer === void 0 ? void 0 : pointer.type} }`;\n }\n /** @internal */\n bridgeWillClose() {\n // @ts-expect-error setting readonly property\n this.isClosed = true;\n }\n /** @internal */\n bridgeDidClose() {\n // @ts-expect-error setting readonly property\n this.pointer = null;\n }\n /** @internal */\n bridgeWillFinalize() {\n // @ts-expect-error setting readonly property\n this.isFinalized = true;\n }\n /** @internal */\n bridgeDidFinalize() {\n // @ts-expect-error setting readonly property\n this.pointer = null;\n }\n /** @internal */\n bridgeWillUnregister() {\n // @ts-expect-error setting readonly property\n this.isUnregistered = true;\n }\n /** @internal */\n bridgeDidUnregister() {\n // @ts-expect-error setting readonly property\n this.pointer = null;\n }\n}\n/**\n * Use this for passing arrays of pointers to the FFI.\n */\n// REFACTOR: Use an iterator instead of an array to deref handles lazily.\nexport class Handles {\n /**\n * @throws {Error} if any of the objects are not registered in the bridge.\n * @throws {Error} if any of the objects have already been garbage collected.\n */\n constructor(bridge, objects) {\n this.handles = objects.map((object) => bridge.handleFor(object));\n }\n deref() {\n return this.handles.map((handle) => handle.deref());\n }\n}\n/**\n * A bridge manages memory allocated by the FFI that is used in the JS SDK.\n *\n * The main purpose of a bridge is keeping track of JavaScript objects that\n * require access to memory allocated by the FFI. When such objects are\n * garbage collected in JavaScript, the bridge instructs the FFI to free the\n * corresponding memory. Every managed memory pointer corresponds to exactly\n * one JS Object.\n *\n * There is a static `Bridge` instance for every class of objects that can be\n * managed:\n *\n * - {@link Attachment}: `Bridge.attachment`\n * - {@link Ditto}: `Bridge.ditto`\n * - {@link Document}: `Bridge.document`\n * - {@link MutableDocument}: `Bridge.mutableDocument`\n * - {@link StaticTCPClient}: `Bridge.staticTCPClient`\n * - {@link WebsocketClient}: `Bridge.websocketClient`\n *\n * Use `Bridge.<type>.handleFor()` to obtain a handle, which is a wrapper around\n * the raw pointer, and `Bridge.<type>.bridge()` to get or create the matching\n * object for a memory address.\n *\n * @internal */\nexport class Bridge {\n /**\n * Creates a new bridge for objects of `type`. Requires a `release` function\n * that is called whenever a registered object is garbage collected, passing\n * the associated `pointer` to it. The release function is then responsible\n * to free or drop the corresponding native object.\n *\n * **IMPORTANT**: The `type` of all bridges needs to be set in `epilogue.ts`\n * after initiating the bridge instance. This helps avoid import cycles\n * (otherwise anything importing the bridge instance, would also have to\n * import the type, which usually leads to import cycles).\n *\n * @private\n */\n constructor(release) {\n // ------ Private ------\n this.internalType = null;\n this.release = release;\n this.handlesByAddress = {};\n this.handlesByObject = new WeakMap();\n this.finalizationRegistry = new FinalizationRegistry(this.finalize.bind(this));\n Bridge.all.push(new WeakRef(this));\n }\n /**\n * The type of a bridge is the JavaScript `Class` of objects it represents.\n *\n * @internal */\n get type() {\n if (this.internalType == null) {\n throw new Error('Bridge type has not been registered yet.');\n }\n return this.internalType;\n }\n /**\n * All bridges' types have to be registered in `epilogue.ts` before using\n * them.\n *\n * @internal */\n registerType(value) {\n if (this.internalType === value) {\n // Nothing to do.\n return;\n }\n if (this.internalType) {\n throw new Error(`Can't register bridged type '${value.name}', another type was already registered: ${this.internalType}`);\n }\n this.internalType = value;\n }\n /**\n * Returns the handle for a bridged object.\n *\n * Use `handle.deref()` to get the pointer for the object at the time of use.\n *\n * @throws {Error} if the object is not registered.\n *\n * @internal\n */\n handleFor(object) {\n const handle = this.handlesByObject.get(object);\n if (handle == null) {\n throw new Error(`Bridging error: ${this.type.name} object is not currently registered in this bridge.`);\n }\n return handle;\n }\n /**\n * Returns a `Handles` instance for an array of objects.\n *\n * @internal\n */\n handlesFor(objects) {\n return new Handles(this, objects);\n }\n /**\n * Convenience method, returns the object for the FFI `pointer` if registered,\n * otherwise returns `undefined`. If the object associated with the `pointer`\n * has been unregistered before, returns `undefined`, too.\n *\n * @internal\n */\n objectFor(pointer) {\n const handle = this.handlesByAddress[pointer.addr];\n if (!handle)\n return undefined;\n if (handle.type !== this.type)\n throw new Error(`Can't return object for pointer, pointer is associated with an object of type ${handle.type} but this bridge is configured for ${this.type}`);\n // This throws an error if the object has been garbage collected but the\n // finalizer has not been called yet.\n return handle.object();\n }\n /**\n * Returns the object for the FFI `pointer` if registered. Otherwise, calls\n * the passed in `create` function to create a new object, which it then\n * returns after registering. If no `create` function is given, uses the\n * type of the bridge as a constructor and creates a new instance of it\n * without passing any parameters.\n *\n * @param pointer reference to the FFi instance for the object\n * @param objectOrCreate can either be the JS object, or a function that returns the instance when called. If undefined, an object is created based on the Bridge type.\n * @throws {Error} if `objectOrCreate` is a function that returns an object that is not an instance of the bridge's type.\n * @internal\n */\n bridge(pointer, objectOrCreate) {\n const existingObject = this.objectFor(pointer);\n if (existingObject) {\n return existingObject;\n }\n if (!objectOrCreate) {\n objectOrCreate = () => {\n return Reflect.construct(this.type, []);\n };\n }\n let object;\n if (typeof objectOrCreate === 'function') {\n object = objectOrCreate();\n if (!(object instanceof this.type)) {\n throw new Error(`Can't bridge, expected passed in create function to return a ${this.type.name} object but got: ${object}`);\n }\n }\n else {\n object = objectOrCreate;\n }\n this.register(object, pointer);\n return object;\n }\n /**\n * Registers an instance in this bridge's {@link FinalizationRegistry}.\n *\n * This causes the FFI to drop the memory linked to the object as soon as it\n * is garbage collected in JavaScript.\n *\n * If you want to control the order with which a number of objects' memory is\n * dropped, use {@link Bridge.unregister | Bridge.unregister()}\n *\n * @private */\n register(object, pointer) {\n const objectType = object.constructor;\n if (objectType !== this.type)\n throw new Error(`Can't register, bridge is configured for type ${this.type.name} but passed in object is of type ${objectType.name}`);\n const existingHandle = this.handlesByObject.get(object);\n const existingPointer = existingHandle ? existingHandle.pointer : null;\n // Check that both pointer and handle are undefined at this point.\n if (existingPointer != null && existingHandle != null)\n throw new Error(`Can't register, an object for the passed in pointer has previously been registered: ${existingHandle.object()}`);\n if (existingPointer != null && existingHandle == null)\n throw new Error(`Internal inconsistency, trying to register an object which has an associated pointer but no handle entry: ${objectType.name} at ${existingPointer.type} ${existingPointer.addr}`);\n if (existingPointer == null && existingHandle != null)\n throw new Error(`Internal inconsistency, trying to register an object which has a handle entry but no associated pointer: ${objectType.name} ${object}`);\n const handle = new Handle(this, object, pointer);\n this.handlesByAddress[pointer.addr] = handle;\n this.handlesByObject.set(object, handle);\n this.finalizationRegistry.register(object, handle, object);\n if (DEBUG_TYPE_NAMES.includes(this.type.name) || DEBUG_ALL_TYPES) {\n Logger.debug(`[VERBOSE] Bridge REGISTERED a new instance of ${this.type.name}, current count: ${Object.keys(this.handlesByAddress).length}`);\n }\n }\n /**\n * Removes an instance from this bridge's {@link FinalizationRegistry}.\n *\n * This lets you control the order with which memory is dropped in the FFI.\n * After calling this function, manually call the FFI function to drop the\n * memory then finally delete the JavaScript instance.\n *\n * @internal */\n unregister(object) {\n const objectType = object.constructor;\n const bridgeType = this.type;\n if (objectType !== bridgeType)\n throw new Error(`Can't unregister, bridge is configured for type ${bridgeType.name} but passed in object is of type ${objectType.name}`);\n const handle = this.handlesByObject.get(object);\n if (handle == null)\n throw new Error(`Can't unregister, object has not been registered before: ${object}`);\n if (handle.type !== bridgeType)\n throw new Error(`Internal inconsistency, trying to unregister an object that has a handle with a different type than that of the bridge: ${handle}`);\n if (handle.objectOrNull() !== object)\n throw new Error(`Internal inconsistency, trying to unregister an object whose associated handle holds a different object: ${handle}`);\n if (handle.isClosed)\n throw new Error(`Can't unregister, object has been closed before: ${object}`);\n if (handle.isFinalized)\n throw new Error(`Can't unregister, object has been finalized before: ${object}`);\n if (handle.isUnregistered)\n throw new Error(`Can't unregister, object has been unregistered already: ${object}`);\n handle.bridgeWillUnregister();\n this.finalizationRegistry.unregister(object);\n delete this.handlesByAddress[handle.pointer.addr];\n this.handlesByObject.delete(object);\n handle.bridgeDidUnregister();\n if (DEBUG_TYPE_NAMES.includes(this.type.name) || DEBUG_ALL_TYPES) {\n Logger.debug(`[VERBOSE] Bridge UNREGISTERED an instance of ${this.type.name}, current count: ${Object.keys(this.handlesByAddress).length}`);\n }\n }\n /** @internal */\n unregisterAll() {\n if (DEBUG_TYPE_NAMES.includes(this.type.name) || DEBUG_ALL_TYPES) {\n Logger.debug(`[VERBOSE] Unregistering ALL bridged instances of type ${this.type.name}.`);\n }\n for (const handle of Object.values(this.handlesByAddress)) {\n const object = handle.object();\n if (object) {\n this.unregister(object);\n }\n }\n }\n /**\n * Closes the object by calling `release()` and `null`-ing its pointer, such\n * that its handle can't be `deref()`-ed afterwards.\n *\n * @internal */\n async close(object) {\n const objectType = object.constructor;\n const bridgeType = this.type;\n if (objectType !== bridgeType)\n throw new Error(`Can't close, bridge is configured for type ${bridgeType.name} but passed in object is of type ${objectType.name}`);\n const handle = this.handlesByObject.get(object);\n if (handle == null)\n throw new Error(`Can't close an object that has not been registered before: ${object}`);\n if (handle.type !== bridgeType)\n throw new Error(`Internal inconsistency, trying to close an object that has a handle with a different type than that of the bridge: ${handle}`);\n if (handle.isUnregistered)\n throw new Error(`Can't close object, object has been unregistered.`);\n if (handle.isFinalized)\n throw new Error(`Internal inconsistency, trying to close an object that has already been finalized.`);\n if (handle.isClosed)\n return;\n const pointer = handle.pointer;\n if (!pointer)\n throw new Error(`Internal inconsistency, trying to close an object whose pointer is null.`);\n handle.bridgeWillClose();\n delete this.handlesByAddress[pointer.addr];\n await this.release(pointer);\n handle.bridgeDidClose();\n if (DEBUG_TYPE_NAMES.includes(this.type.name) || DEBUG_ALL_TYPES) {\n Logger.debug(`[VERBOSE] Bridge CLOSED an instance of ${this.type.name}, current count: ${Object.keys(this.handlesByAddress).length}`);\n }\n }\n /** @internal */\n get count() {\n return Object.keys(this.handlesByAddress).length;\n }\n async finalize(handle) {\n if (handle.isFinalized)\n throw new Error(`Internal inconsistency, trying to finalize an object that has already been finalized.`);\n if (handle.isUnregistered)\n throw new Error(`Internal inconsistency, trying to finalize an object that has been unregistered before.`);\n handle.bridgeWillFinalize();\n if (!handle.isClosed) {\n const pointer = handle.pointer;\n if (!pointer)\n throw new Error(`Internal inconsistency, trying to finalize an object whose pointer is null.`);\n delete this.handlesByAddress[pointer.addr];\n await this.release(pointer);\n }\n handle.bridgeDidFinalize();\n if (DEBUG_TYPE_NAMES.includes(this.type.name) || DEBUG_ALL_TYPES) {\n Logger.debug(`[VERBOSE] Bridge FINALIZED an instance of ${this.type.name}, current count: ${Object.keys(this.handlesByAddress).length}`);\n }\n }\n}\n_a = Bridge;\n/**\n * Keeps track of all bridges for debugging and test purposes. With this, we\n * can iterate over all bridges and make sure everything is deallocated after\n * a test, or a suite of tests, has run.\n *\n * @internal */\nBridge.all = [];\n/** @internal */\nBridge.attachment = new Bridge(FFI.freeAttachmentHandle);\n/** @internal */\nBridge.document = new Bridge(FFI.documentFree);\n/** @internal */\nBridge.mutableDocument = new Bridge(FFI.documentFree);\n/** @internal */\nBridge.dqlResponse = new Bridge(FFI.dqlResponseFree);\n/** @internal */\nBridge.dqlResult = new Bridge(FFI.dqlResultFree);\n/** @internal */\nBridge.staticTCPClient = new Bridge(FFI.staticTCPClientFreeHandle);\n/** @internal */\nBridge.websocketClient = new Bridge(FFI.websocketClientFreeHandle);\n/** @internal */\nBridge.ditto = new Bridge(async (dittoPointer) => {\n // HACK: quick and dirty, clear all presence callbacks. This covers presence\n // v1 and v2 callbacks. v3 should be cleared properly by the `Presence`\n // class itself.\n FFI.dittoClearPresenceCallback(dittoPointer);\n await FFI.dittoShutdown(dittoPointer);\n FFI.dittoFree(dittoPointer);\n});\n//# sourceMappingURL=bridge.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\n/*\n * Provides information about a successful update operation on a document.\n *\n * The update result can be one of the following types:\n * - `set`\n * - `removed`\n * - `incremented`\n */\nexport class UpdateResult {\n // ----------------------------------------------------------- Internal ------\n /** @internal */\n static set(docID, path, value) {\n return new UpdateResult('set', docID, path, value, undefined);\n }\n /** @internal */\n static incremented(docID, path, amount) {\n return new UpdateResult('incremented', docID, path, undefined, amount);\n }\n /** @internal */\n static removed(docID, path) {\n return new UpdateResult('removed', docID, path, undefined, undefined);\n }\n /** @internal */\n constructor(type, docID, path, value, amount) {\n this.type = type;\n this.docID = docID;\n this.path = path;\n if (value !== undefined)\n this.value = value;\n if (amount !== undefined)\n this.amount = amount;\n }\n}\n//# sourceMappingURL=update-result.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { Bridge } from './bridge';\nimport * as Environment from './@environment';\n/**\n * Represents an attachment and can be used to insert the associated attachment\n * into a document at a specific key-path. You can't instantiate an attachment\n * directly, please use the {@link Collection.newAttachment | newAttachment()}\n * method of {@link Collection} instead.\n */\nexport class Attachment {\n /** The attachment's metadata. */\n get metadata() {\n return this.token.metadata;\n }\n /**\n * Returns the attachment's data.\n */\n getData() {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return this.ditto.deferCloseAsync(async () => {\n if (Environment.isWebBuild) {\n const attachmentHandle = Bridge.attachment.handleFor(this);\n return await FFI.dittoGetCompleteAttachmentData(dittoHandle.deref(), attachmentHandle.deref());\n }\n if (Environment.isNodeBuild) {\n const attachmentHandle = Bridge.attachment.handleFor(this);\n const attachmentPath = FFI.dittoGetCompleteAttachmentPath(dittoHandle.deref(), attachmentHandle.deref());\n const fs = require('fs').promises;\n return await fs.readFile(attachmentPath);\n }\n });\n }\n /**\n * Copies the attachment to the specified file path. Node-only,\n * throws in the browser.\n *\n * @param path The path that the attachment should be copied to.\n */\n copyToPath(path) {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return this.ditto.deferCloseAsync(async () => {\n if (Environment.isWebBuild) {\n throw new Error(`Can't copy attachment to path, not available when running in the browser.`);\n }\n if (Environment.isNodeBuild) {\n const attachmentHandle = Bridge.attachment.handleFor(this);\n const attachmentPath = FFI.dittoGetCompleteAttachmentPath(dittoHandle.deref(), attachmentHandle.deref());\n const fs = require('fs').promises;\n // If the file already exists, we fail. This is the same behavior as\n // for the Swift/ObjC SDK.\n return await fs.copyFile(attachmentPath, path, fs.COPYFILE_EXCL);\n }\n });\n }\n /** @internal */\n constructor(ditto, token) {\n this.ditto = ditto;\n this.token = token;\n }\n}\n//# sourceMappingURL=attachment.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\n// NOTE: proxy was originally written in pure JS rather than TypeScript. We'll\n// gradually port it to TypeScript and until done, we've renamed the pure JS\n// file to proxy.raw.js and introduced proxy.ts that'll contain all parts ported\n// to TypeScript or type declarations for the JS parts.\n// import * as proxyRaw from './proxy.raw'\nimport * as FFI from './ffi';\nimport { DocumentID } from './document-id';\nimport { AttachmentToken } from './attachment-token';\nimport { Attachment } from './attachment';\nimport { Counter } from './counter';\nimport { Register } from './register';\n// Takes an annotated JSON representation of a document (see CRDT's Document\n// class for more info about what an annotated representation is) and turns it\n// into a JavaScript-appropriate version. This means that counters get\n// represented by `Counter` objects and attachments get represented by\n// `Attachment` objects.\nexport function augmentJSONValue(json, mutDoc, workingPath) {\n if (json && typeof json === 'object') {\n if (Array.isArray(json)) {\n return json.map((v, idx) => augmentJSONValue(v, mutDoc, `${workingPath}[${idx}]`));\n }\n else if (json[FFI.DittoCRDTTypeKey] === FFI.DittoCRDTType.counter) {\n return Counter['@ditto.create'](mutDoc, workingPath, json[FFI.DittoCRDTValueKey]);\n }\n else if (json[FFI.DittoCRDTTypeKey] === FFI.DittoCRDTType.register) {\n return Register['@ditto.create'](mutDoc, workingPath, json[FFI.DittoCRDTValueKey]);\n }\n else if (json[FFI.DittoCRDTTypeKey] === FFI.DittoCRDTType.attachment) {\n return new AttachmentToken(json);\n }\n else {\n for (const [key, value] of Object.entries(json)) {\n json[key] = augmentJSONValue(value, mutDoc, `${workingPath}['${key}']`);\n }\n return json;\n }\n }\n else {\n return json;\n }\n}\n/**\n * Converts objects that may contain instances of classes of this SDK, i.e.\n * `DocumentID`, `Counter`, `Register` and `Attachment`, into plain JS objects\n * that can be passed to the FFI layer.\n */\nexport function desugarJSObject(jsObj, atRoot = false) {\n if (jsObj && typeof jsObj === 'object') {\n if (Array.isArray(jsObj)) {\n return jsObj.map((v, idx) => desugarJSObject(v, false));\n }\n else if (jsObj instanceof DocumentID) {\n return jsObj.value;\n }\n else if (jsObj instanceof Counter) {\n const counterJSON = {};\n counterJSON[FFI.DittoCRDTTypeKey] = FFI.DittoCRDTType.counter;\n counterJSON[FFI.DittoCRDTValueKey] = jsObj.value;\n return counterJSON;\n }\n else if (jsObj instanceof Register) {\n const registerJSON = {};\n registerJSON[FFI.DittoCRDTTypeKey] = FFI.DittoCRDTType.register;\n registerJSON[FFI.DittoCRDTValueKey] = jsObj.value;\n return registerJSON;\n }\n else if (jsObj instanceof Attachment) {\n const attachmentJSON = {\n _id: jsObj.token.id,\n _len: jsObj.token.len,\n _meta: jsObj.token.metadata,\n };\n attachmentJSON[FFI.DittoCRDTTypeKey] = FFI.DittoCRDTType.attachment;\n return attachmentJSON;\n }\n else {\n for (const [key, value] of Object.entries(jsObj)) {\n jsObj[key] = desugarJSObject(value, false);\n }\n return jsObj;\n }\n }\n else {\n checkForUnsupportedValues(jsObj);\n return jsObj;\n }\n}\n/**\n * Throws an error if input is a non-finite float value.\n *\n * Workaround while we don't have a reliable way of receiving error messages\n * from `dittoCore.ditto_collection_insert_value()`.\n *\n * See https://github.com/getditto/ditto/issues/8657 for details.\n *\n * @param jsObj The object to check.\n * @throws {Error} If `jsObj` is a non-finite float value.\n */\nfunction checkForUnsupportedValues(jsObj) {\n if (Number.isNaN(jsObj) || jsObj === Infinity || jsObj === -Infinity) {\n throw new Error('Non-finite float values are not supported');\n }\n}\n//# sourceMappingURL=augment.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport * as Environment from './@environment';\n// ------------------------------------------------------------ Constants ------\nexport const defaultDittoCloudDomain = `cloud.ditto.live`;\n// ------------------------------------------------------------- Defaults ------\n/** @internal */\nexport function defaultAuthURL(appID) {\n return `https://${appID}.${defaultDittoCloudDomain}`;\n}\n/** @internal */\nexport function defaultDittoCloudURL(appID) {\n return `wss://${appID}.${defaultDittoCloudDomain}`;\n}\n// ---------------------------------------------------------- Validations ------\n/**\n * Validates a number and returns it as-is if all requirements are met,\n * otherwise throws an exception. Options:\n *\n * - `integer`: if `true`, requires the number to be an integer\n *\n * - `min`: if given, requires the number to be >= `min`\n * - `max`: if given, requires the number to be <= `max`\n *\n * - `minX`: if given, requires the number to be > `minX` (x stands for \"exclusive\")\n * - `maxX`: if given, requires the number to be < `maxX` (x stands for \"exclusive\")\n *\n * You can also customize the error message by providing a prefix via\n * `errorMessagePrefix`, which defaults to `\"Number validation failed:\"`.\n *\n * @internal\n */\nexport function validateNumber(value, options = {}) {\n var _a;\n const errorMessagePrefix = (_a = options['errorMessagePrefix']) !== null && _a !== void 0 ? _a : 'Number validation failed:';\n const integer = !!options['integer'];\n const min = options['min'];\n const max = options['max'];\n const minX = options['minX'];\n const maxX = options['maxX'];\n if (typeof value !== 'number')\n throw new Error(`${errorMessagePrefix} '${value}' is not a number.`);\n if (integer && Math.floor(value) !== value)\n throw new Error(`${errorMessagePrefix} '${value}' is not an integer.`);\n if (typeof min !== 'undefined' && value < min)\n throw new Error(`${errorMessagePrefix} '${value}' must be >= ${min}.`);\n if (typeof max !== 'undefined' && value > max)\n throw new Error(`${errorMessagePrefix} '${value}' must be <= ${max}.`);\n if (typeof minX !== 'undefined' && value <= minX)\n throw new Error(`${errorMessagePrefix} '${value}' must be > ${minX}.`);\n if (typeof maxX !== 'undefined' && value >= maxX)\n throw new Error(`${errorMessagePrefix} '${value}' must be < ${maxX}.`);\n return value;\n}\nexport function validateQuery(query, options = {}) {\n var _a;\n const errorMessagePrefix = (_a = options['errorMessagePrefix']) !== null && _a !== void 0 ? _a : 'Query validation failed,';\n if (typeof query !== 'string')\n throw new Error(`${errorMessagePrefix} query is not a string: ${query}`);\n if (query === '')\n throw new Error(`${errorMessagePrefix} query is an empty string.`);\n const validatedQuery = query.trim();\n if (validatedQuery === '')\n throw new Error(`${errorMessagePrefix} query contains only whitespace characters.`);\n return validatedQuery;\n}\n// -------------------------------------------------------------- Helpers ------\n/**\n * Generate a random hex-encoded token using the WebCrypto API.\n *\n * @internal */\nexport function generateEphemeralToken() {\n let webcrypto = undefined;\n let data = new Uint16Array(16);\n // Note: Replacing conditional with polymorphism. (#10731)\n if (Environment.isNodeBuild) {\n webcrypto = require('crypto').webcrypto;\n webcrypto.getRandomValues(data);\n }\n else if (Environment.isWebBuild) {\n webcrypto = crypto;\n webcrypto.getRandomValues(data);\n }\n else if (Environment.isReactNativeBuild) {\n data = FFI.getRandomValues(data);\n }\n else {\n throw new Error('Internal inconsistency, incorrect environment to run getRandomValues()');\n }\n const doublets = Array.from(data);\n return doublets.map((doublet) => doublet.toString(16)).join('');\n}\n// --------------------------------------------------------------- System ------\n/** @internal */\nexport function sleep(milliseconds) {\n return new Promise((resolve, reject) => {\n setTimeout(resolve, milliseconds);\n });\n}\n/** @internal use this to asyncify chunks of code. */\nexport async function step(closure) {\n await sleep(0);\n return closure();\n}\n/** @internal */\n// WORKAROUND: the corresponding FFI function(s) is not async at the\n// moment, we therefore artificially make it async via step() until an\n// async variant becomes available.\n//\n// Why? Any function marked as async that isn't under the hood appears to be\n// yield-ing on the use site but isn't. This may lead to blocking the\n// event loop for a long time, which in turn can lead to excessive memory\n// consumption and other side-effects. Plus, WebAssembly limitations may\n// lead to deadlocks and other crashes.\n//\n// The function alias here is to be able to easily see that its use is\n// a workaround, plus easily finding all of those workarounds to fix\n// them all once the FFI API is properly asyncified.\n//\n// See PR #4833 for details:\n// https://github.com/getditto/ditto/pull/4833\nexport const performAsyncToWorkaroundNonAsyncFFIAPI = step;\n//# sourceMappingURL=internal.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nconst regularKeyPattern = /\\.([A-Za-z_]\\w*)/.source;\nconst subscriptIndexPattern = /\\[(\\d+)\\]/.source;\nconst subscriptSingleQuoteKeyPattern = /\\[\\'(.+?)\\'\\]/.source;\nconst subscriptDoubleQuoteKeyPattern = /\\[\\\"(.+?)\\\"\\]/.source;\nconst validKeyPathPattern = `((${regularKeyPattern})|(${subscriptIndexPattern})|(${subscriptSingleQuoteKeyPattern})|(${subscriptDoubleQuoteKeyPattern}))*`;\nconst regularKeyRegExp = new RegExp(`^${regularKeyPattern}`);\nconst subscriptIndexRegExp = new RegExp(`^${subscriptIndexPattern}`);\nconst subscriptSingleQuoteKeyRegExp = new RegExp(`^${subscriptSingleQuoteKeyPattern}`);\nconst subscriptDoubleQuoteKeyRegExp = new RegExp(`^${subscriptDoubleQuoteKeyPattern}`);\nconst validKeyPathRegExp = new RegExp(`^${validKeyPathPattern}$`);\n/**\n * Namespace for key-path related functions.\n * @internal\n */\nexport class KeyPath {\n /**\n * Returns the key-path by prefixing it with a leading dot if first key\n * starts with a character or an underscore.\n */\n static withLeadingDot(keyPath) {\n if (typeof keyPath === 'number') {\n return keyPath;\n }\n if (typeof keyPath !== 'string') {\n throw new Error(`Key-path must be a string or a number but is ${typeof keyPath}: ${keyPath}`);\n }\n const needsLeadingDot = typeof keyPath === 'string' && !!keyPath.match(/^[A-Za-z_]/);\n return needsLeadingDot ? `.${keyPath}` : keyPath;\n }\n /**\n * Returns the key-path by removing the leading dot if it starts with one.\n */\n static withoutLeadingDot(keyPath) {\n if (typeof keyPath === 'number') {\n return keyPath;\n }\n if (typeof keyPath !== 'string') {\n throw new Error(`Key-path must be a string or a number but is ${typeof keyPath}: ${keyPath}`);\n }\n const hasLeadingDot = typeof keyPath === 'string' && !!keyPath.match(/^\\./);\n return hasLeadingDot ? keyPath.slice(1) : keyPath;\n }\n /**\n * Validates a key-path by adding a leading dot if appropriate and checking\n * its syntax. Throws if syntax is invalid.\n */\n static validate(keyPath, options = {}) {\n var _a;\n const isInitial = (_a = options.isInitial) !== null && _a !== void 0 ? _a : false;\n if (typeof keyPath === 'number') {\n return Math.floor(Math.abs(keyPath));\n }\n if (typeof keyPath !== 'string') {\n throw new Error(`Key-path must be a string or a number but is ${typeof keyPath}: ${keyPath}`);\n }\n const keyPathWithLeadingDot = this.withLeadingDot(keyPath);\n if (!validKeyPathRegExp.test(keyPathWithLeadingDot)) {\n throw new Error(`Key-path is not valid: ${keyPath}`);\n }\n return isInitial ? keyPath : keyPathWithLeadingDot;\n }\n /**\n * Follows the `keyPath`, boring down through `object` recursively until the\n * final key-path is reached. Implemented as a free function to help ensure it's\n * purely functional in nature and that no modifications are made to a\n * `Document{ID}` or `DocumentPath` where similarly named variables are at play.\n * @internal\n */\n static evaluate(keyPath, object, options = {}) {\n var _a;\n const stopAtLastContainer = (_a = options.stopAtLastContainer) !== null && _a !== void 0 ? _a : false;\n const evaluationResult = {\n keyPath: keyPath,\n object: object,\n options: { ...options },\n coveredPath: null,\n nextPathComponent: null,\n remainingPath: keyPath,\n value: object,\n };\n function advance(keyPath) {\n if (typeof keyPath === 'number') {\n return { nextPathComponentRaw: keyPath, nextPathComponent: keyPath, remainingPath: '' };\n }\n if (typeof keyPath !== 'string') {\n throw new Error(`Can't return value at given keyPath, expected keyPath to be a string or a number but got ${typeof keyPath}: ${keyPath}`);\n }\n // NOTE: `nextPathComponentRaw` represents next path component plus all\n // of its surrounding delimiters, i.e. given a path `[\"abc\"].blah.blub`,\n // `nextPathComponentRaw` would be `[\"abc\"]` while nextPathComponent\n // would just yield 'abc'.\n const regularKeyMatch = keyPath.match(regularKeyRegExp);\n if (regularKeyMatch !== null) {\n const nextPathComponentRaw = regularKeyMatch[0];\n const nextPathComponent = regularKeyMatch[1];\n const remainingPath = keyPath.slice(nextPathComponent.length + /* stripped out . */ 1);\n return { nextPathComponentRaw, nextPathComponent, remainingPath };\n }\n const subscriptIndexMatch = keyPath.match(subscriptIndexRegExp);\n if (subscriptIndexMatch !== null) {\n const nextPathComponentRaw = subscriptIndexMatch[0];\n const nextPathComponentString = subscriptIndexMatch[1];\n const nextPathComponent = parseInt(nextPathComponentString);\n const remainingPath = keyPath.slice(nextPathComponentString.length + /* stripped out [] */ 2);\n return { nextPathComponentRaw, nextPathComponent, remainingPath };\n }\n const subscriptSingleQuoteMatch = keyPath.match(subscriptSingleQuoteKeyRegExp);\n if (subscriptSingleQuoteMatch !== null) {\n const nextPathComponentRaw = subscriptSingleQuoteMatch[0];\n const nextPathComponent = subscriptSingleQuoteMatch[1];\n const remainingPath = keyPath.slice(nextPathComponent.length + /* stripped out [''] */ 4);\n return { nextPathComponentRaw, nextPathComponent, remainingPath };\n }\n const subscriptDoubleQuoteMatch = keyPath.match(subscriptDoubleQuoteKeyRegExp);\n if (subscriptDoubleQuoteMatch !== null) {\n const nextPathComponentRaw = subscriptDoubleQuoteMatch[0];\n const nextPathComponent = subscriptDoubleQuoteMatch[1];\n const remainingPath = keyPath.slice(nextPathComponent.length + /* stripped out [\"\"] */ 4);\n return { nextPathComponentRaw, nextPathComponent, remainingPath };\n }\n throw new Error(`Can't return value at keyPath because the following part of the keyPath is invalid: ${keyPath}`);\n }\n function recurse(object, keyPath) {\n if (keyPath === '') {\n evaluationResult.value = object;\n return evaluationResult;\n }\n const { nextPathComponentRaw, nextPathComponent, remainingPath } = advance(keyPath);\n evaluationResult.nextPathComponent = nextPathComponent;\n evaluationResult.remainingPath = remainingPath;\n if (evaluationResult.coveredPath === null || typeof nextPathComponentRaw === 'number') {\n evaluationResult.coveredPath = nextPathComponentRaw;\n }\n else {\n evaluationResult.coveredPath += nextPathComponentRaw;\n }\n if (remainingPath === '' && stopAtLastContainer) {\n evaluationResult.value = object;\n return evaluationResult;\n }\n const nextObject = object[nextPathComponent];\n return recurse(nextObject, remainingPath);\n }\n const keyPathWithLeadingDot = this.withLeadingDot(keyPath);\n return recurse(object, keyPathWithLeadingDot);\n }\n constructor() { }\n}\n//# sourceMappingURL=key-path.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { CBOR } from './cbor';\nimport { Bridge } from './bridge';\nimport { Counter } from './counter';\nimport { Register } from './register';\nimport { AttachmentToken } from './attachment-token';\nimport { UpdateResult } from './update-result';\nimport { desugarJSObject, augmentJSONValue } from './augment';\nimport { validateNumber } from './internal';\nimport { KeyPath } from './key-path';\n// -----------------------------------------------------------------------------\n/**\n * Represents a portion of the document at a specific key-path.\n *\n * Provides an interface to specify a path to a key in a document that you can\n * then call a function on to get the value at the specified key as a specific\n * type. You don't create a `DocumentPath` directly but obtain one via the\n * {@link Document.path | path} property or the {@link Document.at | at()}\n * method of {@link Document}.\n */\nexport class DocumentPath {\n /**\n * Returns a new document path instance with the passed in key-path or\n * index appended.\n *\n * A key-path can be a single property name or multiple property names\n * separated by a dot. Indexes can also be specified as part of the key\n * path using the square bracket syntax. The empty string returns a document\n * path representing the same portion of the document as the receiver. If a\n * key-path starts with a property name and is prefixed by a dot, the dot is\n * ignored.\n *\n * Examples:\n *\n * - `documentPath.at('mileage')`\n * - `documentPath.at('driver.name')`\n * - `documentPath.at('passengers[2]')`\n * - `documentPath.at('passengers[2].belongings[1].kind')`\n * - `documentPath.at('.mileage')`\n */\n at(keyPathOrIndex) {\n if (typeof keyPathOrIndex === 'string') {\n const keyPath = keyPathOrIndex;\n const validatedKeyPath = KeyPath.validate(keyPath);\n // this.path can be an empty string.\n const absoluteKeyPath = KeyPath.withoutLeadingDot(`${this.path}${validatedKeyPath}`);\n return new DocumentPath(this.document, absoluteKeyPath, false);\n }\n if (typeof keyPathOrIndex === 'number') {\n const index = keyPathOrIndex;\n const validatedIndex = validateNumber(index, { integer: true, min: 0, errorMessagePrefix: 'DocumentPath.at() validation failed index:' });\n return new DocumentPath(this.document, `${this.path}[${validatedIndex.toString()}]`, false);\n }\n throw new Error(`Can't return document path at key-path or index, string or number expected but got ${typeof keyPathOrIndex}: ${keyPathOrIndex}`);\n }\n /**\n * Traverses the document with the key-path represented by the receiver and\n * returns the corresponding object or value.\n */\n get value() {\n return this.underlyingValueForPathType('Any');\n }\n /**\n * Returns the value at the previously specified key in the document as a\n * {@link Counter} if possible, otherwise returns `null`.\n */\n get counter() {\n const underlyingValue = this.underlyingValueForPathType('Counter');\n return typeof underlyingValue !== 'undefined' ? Counter['@ditto.create'](null, this.path, underlyingValue) : null;\n }\n /**\n * Returns the value at the previously specified key in the document as a\n * {@link Register} if possible, otherwise returns `null`.\n */\n get register() {\n const underlyingValue = this.underlyingValueForPathType('Register');\n return typeof underlyingValue !== 'undefined' ? Register['@ditto.create'](null, this.path, underlyingValue) : null;\n }\n /**\n * Returns the value at the previously specified key in the document as an\n * {@link AttachmentToken} if possible, otherwise returns `null`.\n */\n get attachmentToken() {\n const underlyingValue = this.underlyingValueForPathType('Attachment');\n return typeof underlyingValue !== 'undefined' ? new AttachmentToken(underlyingValue) : null;\n }\n /** @internal */\n constructor(document, path, validate) {\n this.document = document;\n this.path = validate ? KeyPath.validate(path, { isInitial: true }) : path;\n }\n /** @internal */\n underlyingValueForPathType(pathType) {\n const path = this.path;\n const document = this.document;\n const documentHandle = Bridge.document.handleFor(document);\n const cborPathResult = FFI.documentGetCBORWithPathType(documentHandle.deref(), path, pathType);\n return cborPathResult.cbor !== null ? CBOR.decode(cborPathResult.cbor) : undefined;\n }\n}\n// -----------------------------------------------------------------------------\n/**\n * Mutable version of {@link DocumentPath} allowing you to mutate a document at\n * a specific key-path. You don't create a `MutableDocumentPath` directly but\n * obtain one via the {@link MutableDocument.path | path} property or the\n * {@link MutableDocument.at | at()} method of {@link MutableDocument}.\n */\nexport class MutableDocumentPath {\n /**\n * Returns a new mutable document path instance with the passed in key-path or\n * index appended.\n *\n * A key-path can be a single property name or multiple property names\n * separated by a dot. Indexes can also be specified as part of the key\n * path using square brackets syntax. The empty string returns a document path\n * representing the same portion of the document as the receiver. If a key\n * path starts with a property name and is prefixed by a dot, the dot is\n * ignored.\n *\n * Examples:\n *\n * - `mutableDocumentPath.at('mileage')`\n * - `mutableDocumentPath.at('driver.name')`\n * - `mutableDocumentPath.at('passengers[2]')`\n * - `mutableDocumentPath.at('passengers[2].belongings[1].kind')`\n * - `mutableDocumentPath.at('.mileage')`\n */\n at(keyPathOrIndex) {\n if (typeof keyPathOrIndex === 'string') {\n const keyPath = keyPathOrIndex;\n const validatedKeyPath = KeyPath.validate(keyPath);\n // this.path can be an empty string.\n const absoluteKeyPath = KeyPath.withoutLeadingDot(`${this.path}${validatedKeyPath}`);\n return new MutableDocumentPath(this.mutableDocument, absoluteKeyPath, false);\n }\n if (typeof keyPathOrIndex === 'number') {\n const index = keyPathOrIndex;\n const validatedIndex = validateNumber(index, { integer: true, min: 0, errorMessagePrefix: 'MutableDocumentPath.at() validation failed index:' });\n return new MutableDocumentPath(this.mutableDocument, `${this.path}[${validatedIndex.toString()}]`, false);\n }\n throw new Error(`Can't return mutable document path at key-path or index, string or number expected but got ${typeof keyPathOrIndex}: ${keyPathOrIndex}`);\n }\n /**\n * Traverses the document with the key-path represented by the receiver and\n * returns the corresponding object or value.\n */\n get value() {\n return this.underlyingValueForPathType('Any');\n }\n /**\n * Returns the value at the previously specified key in the document as a\n * {@link MutableCounter} if possible, otherwise returns `null`.\n */\n get counter() {\n const underlyingValue = this.underlyingValueForPathType('Counter');\n return typeof underlyingValue !== 'undefined' ? Counter['@ditto.create'](this.mutableDocument, this.path, underlyingValue) : null;\n }\n /**\n * Returns the value at the previously specified key in the document as a\n * {@link MutableRegister} if possible, otherwise returns `null`.\n */\n get register() {\n const underlyingValue = this.underlyingValueForPathType('Register');\n return typeof underlyingValue !== 'undefined' ? Register['@ditto.create'](this.mutableDocument, this.path, underlyingValue) : null;\n }\n /**\n * Returns the value at the previously specified key in the document as a\n * {@link AttachmentToken} if possible, otherwise returns `null`.\n */\n get attachmentToken() {\n const underlyingValue = this.underlyingValueForPathType('Attachment');\n return typeof underlyingValue !== 'undefined' ? new AttachmentToken(underlyingValue) : null;\n }\n /**\n * Sets a value at the document's key-path defined by the receiver.\n *\n * @param isDefault Represents whether or not the value should be set as a\n * default value. Set this to `true` if you want to set a default value that\n * you expect to be overwritten by other devices in the network. The default\n * value is `false`.\n */\n set(value, isDefault) {\n return this['@ditto.set'](value, isDefault);\n }\n /**\n * Removes a value at the document's key-path defined by the receiver.\n */\n remove() {\n return this['@ditto.remove']();\n }\n /** @internal */\n constructor(mutableDocument, path, validate) {\n this.mutableDocument = mutableDocument;\n this.path = validate ? KeyPath.validate(path, { isInitial: true }) : path;\n }\n /** @internal */\n underlyingValueForPathType(pathType) {\n const path = this.path;\n const document = this.mutableDocument;\n const documentHandle = Bridge.mutableDocument.handleFor(document);\n const cborPathResult = FFI.documentGetCBORWithPathType(documentHandle.deref(), path, pathType);\n return cborPathResult.cbor !== null ? CBOR.decode(cborPathResult.cbor) : undefined;\n }\n /** @internal */\n '@ditto.increment'(amount) {\n // REFACTOR: this body should probably move to\n // `MutableCounter.incrementBy()`. Keeping as-is for now until we implement\n // more explicit CRDT types.\n const documentHandle = Bridge.mutableDocument.handleFor(this.mutableDocument);\n FFI.documentIncrementCounter(documentHandle.deref(), this.path, amount);\n const updateResult = UpdateResult.incremented(this.mutableDocument.id, this.path, amount);\n this.recordUpdateResult(updateResult);\n }\n /** @internal */\n '@ditto.set'(value, isDefault) {\n const documentHandle = Bridge.mutableDocument.handleFor(this.mutableDocument);\n const valueJSON = desugarJSObject(value, false);\n const valueCBOR = CBOR.encode(valueJSON);\n if (isDefault) {\n FFI.documentSetCBORWithTimestamp(documentHandle.deref(), this.path, valueCBOR, 0);\n }\n else {\n FFI.documentSetCBOR(documentHandle.deref(), this.path, valueCBOR);\n }\n // HACK: we need a copy of value because the original value can be mutated\n // later on and an update result needs the state of the value at this\n // particular point in time. Decoding from CBOR might be a bit inefficient\n // but good enough for now.\n const valueJSONCopy = CBOR.decode(valueCBOR);\n const valueCopy = augmentJSONValue(valueJSONCopy, this.mutableDocument, this.path);\n const updateResult = UpdateResult.set(this.mutableDocument.id, this.path, valueCopy);\n this.recordUpdateResult(updateResult);\n }\n /** @internal */\n '@ditto.remove'() {\n const documentHandle = Bridge.mutableDocument.handleFor(this.mutableDocument);\n FFI.documentRemove(documentHandle.deref(), this.path);\n this.updateInMemory((container, lastPathComponent) => {\n if (Array.isArray(container) && typeof lastPathComponent === 'number') {\n container.splice(lastPathComponent, 1);\n }\n else {\n delete container[lastPathComponent];\n }\n });\n const updateResult = UpdateResult.removed(this.mutableDocument.id, this.path);\n this.recordUpdateResult(updateResult);\n }\n /** @private */\n updateInMemory(block) {\n const mutableDocumentValue = this.mutableDocument.value;\n const evaluationResult = KeyPath.evaluate(this.path, mutableDocumentValue, { stopAtLastContainer: true });\n block(evaluationResult.value, evaluationResult.nextPathComponent);\n }\n /** @private */\n recordUpdateResult(updateResult) {\n // OPTIMIZE: not sure how much of a performance hit this\n // clone-modify-freeze dance implies. Investigate and fix.\n const updateResults = this.mutableDocument['@ditto.updateResults'].slice();\n updateResults.push(updateResult);\n Object.freeze(updateResults);\n this.mutableDocument['@ditto.updateResults'] = updateResults;\n }\n}\n//# sourceMappingURL=document-path.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { Bridge } from './bridge';\nimport { DocumentID } from './document-id';\nimport { validateDocumentIDCBOR } from './document-id';\nimport { DocumentPath, MutableDocumentPath } from './document-path';\n// -----------------------------------------------------------------------------\n/** A document belonging to a {@link Collection} with an inner value. */\nexport class Document {\n /**\n * Returns a hash that represents the passed in document(s).\n */\n static hash(documentOrMany) {\n const documents = documentsFrom(documentOrMany);\n const documentHandles = documents.map((doc) => Bridge.document.handleFor(doc));\n return FFI.documentsHash(documentHandles.map((handle) => handle.deref()));\n }\n /**\n * Returns a pattern of words that together create a mnemonic, which\n * represents the passed in document(s).\n */\n static hashMnemonic(documentOrMany) {\n const documents = documentsFrom(documentOrMany);\n const documentHandles = Bridge.document.handlesFor(documents);\n return FFI.documentsHashMnemonic(documentHandles.deref());\n }\n /**\n * Returns the document ID.\n */\n get id() {\n let id = this['@ditto.id'];\n if (typeof id === 'undefined') {\n const documentHandle = Bridge.document.handleFor(this);\n const documentIDCBOR = FFI.documentID(documentHandle.deref());\n id = new DocumentID(documentIDCBOR, true);\n this['@ditto.id'] = id;\n }\n return id;\n }\n /**\n * Returns the document path at the root of the document.\n */\n get path() {\n return new DocumentPath(this, '', false);\n }\n /**\n * Convenience property, same as calling `path.value`. The value is cached on\n * first access and returned on subsequent calls without calling `path.value`\n * again.\n */\n get value() {\n let value = this['@ditto.value'];\n if (typeof value === 'undefined') {\n value = this.path.value;\n this['@ditto.value'] = value;\n }\n return value;\n }\n /**\n * Convenience method, same as calling `path.at()`.\n */\n at(keyPathOrIndex) {\n return this.path.at(keyPathOrIndex);\n }\n /** @internal */\n constructor() { }\n // TEMPORARY: helpers to deal with non-canonical IDs.\n /** @internal */\n static idCBOR(document) {\n const documentHandle = Bridge.document.handleFor(document);\n return FFI.documentID(documentHandle.deref());\n }\n /** @internal */\n static canonicalizedIDCBOR(idCBOR) {\n return validateDocumentIDCBOR(idCBOR);\n }\n /** @internal */\n static isIDCBORCanonical(idCBOR) {\n const canonicalIDCBOR = this.canonicalizedIDCBOR(idCBOR);\n return idCBOR === canonicalIDCBOR;\n }\n}\n// -----------------------------------------------------------------------------\n// REFACTOR: adapt the mutable document proxying to the way it is done for\n// Document, i.e. only use the proxy to dispatch and delegate to actual\n// methods on the corresponding classes. The way it is right now is that\n// most of the code of this code is duplicated within the MutableDocument,\n// the MutableDocumentPath classes and the proxy implementation. Also make\n// sure to proxy the mutable document right within its constructor. Same\n// for mutable and immutable document path.\n/**\n * A representation of a {@link Document} that can be mutated via\n * {@link MutableDocumentPath}. You don't create or interact with\n * a `MutableDocument` directly but rather through our proxy-based\n * subscripting API exposed within the `update()` methods of\n * {@link PendingCursorOperation.update | PendingCursorOperation} and\n * {@link PendingIDSpecificOperation.update | PendingIDSpecificOperation}.\n */\nexport class MutableDocument {\n /**\n * Returns the ID of the document.\n */\n get id() {\n let id = this['@ditto.id'];\n if (typeof id === 'undefined') {\n const documentHandle = Bridge.mutableDocument.handleFor(this);\n const documentIDCBOR = FFI.documentID(documentHandle.deref());\n id = new DocumentID(documentIDCBOR, true);\n this['@ditto.id'] = id;\n }\n return id;\n }\n /**\n * Returns the document path at the root of the document.\n */\n get path() {\n return new MutableDocumentPath(this, '', false);\n }\n /**\n * Convenience property, same as `path.value`.\n */\n get value() {\n return this.path.value;\n }\n /**\n * Convenience method, same as calling `path.at()`.\n */\n at(keyPathOrIndex) {\n return this.path.at(keyPathOrIndex);\n }\n /** @internal */\n constructor() {\n /** @internal */\n this['@ditto.updateResults'] = [];\n }\n // TEMPORARY: helpers to deal with non-canonical IDs.\n /** @internal */\n static idCBOR(mutableDocument) {\n const documentHandle = Bridge.mutableDocument.handleFor(mutableDocument);\n return FFI.documentID(documentHandle.deref());\n }\n}\n/** @internal */\nMutableDocument.canonicalizedIDCBOR = Document.canonicalizedIDCBOR;\n/** @internal */\nMutableDocument.isIDCBORCanonical = Document.isIDCBORCanonical;\n// -----------------------------------------------------------------------------\n/** @private */\nfunction documentsFrom(documentOrMany) {\n if (!documentOrMany) {\n return [];\n }\n if (documentOrMany instanceof Document) {\n return [documentOrMany];\n }\n if (documentOrMany instanceof Array) {\n return documentOrMany;\n }\n throw new Error(`Expected null, a single document, or an array of documents but got value of type ${typeof documentOrMany}: ${documentOrMany}`);\n}\n//# sourceMappingURL=document.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport { DocumentID } from './document-id';\n/**\n * Maps a {@link DocumentID} to an array of\n * {@link UpdateResult | update results}. This is the data structure you get\n * when {@link PendingCursorOperation.update | updating} a set of documents\n * with detailed info about the performed updates.\n */\nexport class UpdateResultsMap {\n /**\n * Returns an array of {@link UpdateResult | update results} associated with\n * the `documentID` or undefined if not found.\n */\n get(documentIDOrValue) {\n const documentID = documentIDOrValue instanceof DocumentID ? documentIDOrValue : new DocumentID(documentIDOrValue);\n const documentIDString = documentID.toString();\n return this.updateResultsByDocumentIDString[documentIDString];\n }\n /**\n * Returns all contained keys, i.e. {@link DocumentID | document IDs}\n * contained in this map.\n */\n keys() {\n return this.documentIDs.slice();\n }\n // ----------------------------------------------------------- Internal ------\n /** @internal */\n constructor(documentIDs, updateResultsByDocumentIDString) {\n // REFACTOR: this quick & dirty implementation assumes Document.toString()\n // to be isomorphic, i.e. id1.equals(id2) <==> id1.toString() == id2.toString(),\n // which isn't the case in certain edge cases. Fix by implementing a proper\n // data structure ensuring correctness. One idea would be to use toString()\n // as a hash value and add a check plus conflict resolution after lookup.\n // Another idea would be to check for isomorphism for the particular subset\n // that is passed in and fallback to O(n) linear array search if not.\n const documentIDStrings = documentIDs\n .map((documentID) => documentID.toString())\n .sort()\n .join(', ');\n const updateResultsKeys = Object.keys(updateResultsByDocumentIDString).sort().join(', ');\n if (documentIDStrings !== updateResultsKeys) {\n throw new Error(\"Internal inconsistency, can't construct update results map, documentIDs must all be keys in update results (by document ID string)\");\n }\n this.documentIDs = documentIDs.slice();\n this.updateResultsByDocumentIDString = { ...updateResultsByDocumentIDString };\n }\n}\n//# sourceMappingURL=update-results-map.js.map","//\n// Copyright © 2023 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { MutableDocument } from './document';\nimport { UpdateResultsMap } from './update-results-map';\nimport { CBOR } from './cbor';\nimport { validateQuery } from './internal';\nimport { performAsyncToWorkaroundNonAsyncFFIAPI } from './internal';\nimport { Bridge } from './bridge';\nexport class BasePendingCursorOperation {\n /**\n * Sorts the documents that match the query provided in the preceding\n * `find`-like function call.\n *\n * @param query The query specifies the logic to be used when sorting the\n * matching documents.\n *\n * @param direction Specify whether you want the sorting order to be\n * `Ascending` or `Descending`.\n *\n * @return A cursor that you can chain further function calls and then either\n * get the matching documents immediately or get updates about them over time.\n */\n sort(propertyPath, direction = 'ascending') {\n this.orderBys.push({\n query: propertyPath,\n direction: direction === 'ascending' ? 'Ascending' : 'Descending',\n });\n return this;\n }\n /**\n * Offsets the resulting set of matching documents.\n *\n * This is useful if you aren't interested in the first N matching documents\n * for one reason or another. For example, you might already have queried the\n * collection and obtained the first 20 matching documents and so you might\n * want to run the same query as you did previously but ignore the first 20\n * matching documents, and that is when you would use `offset`.\n *\n * @param offset The number of matching documents that you want the eventual\n * resulting set of matching documents to be offset by (and thus not include).\n *\n * @return A cursor that you can chain further function calls and then either\n * get the matching documents immediately or get updates about them over time.\n */\n offset(offset) {\n // REFACTOR: factor out parameter validation.\n if (offset < 0)\n throw new Error(`Can't offset by '${offset}', offset must be >= 0`);\n if (!Number.isFinite(offset))\n throw new Error(`Can't offset by '${offset}', offset must be a finite number`);\n if (Number.isNaN(offset))\n throw new Error(`Can't offset by '${offset}', offset must be a valid number`);\n const integerOffset = Math.round(offset);\n if (offset !== integerOffset)\n throw new Error(`Can't offset by '${offset}', offset must be an integer number`);\n this.currentOffset = offset;\n return this;\n }\n /**\n * Limits the number of documents that get returned when querying a collection\n * for matching documents.\n *\n * @param limit The maximum number of documents that will be returned.\n *\n * @return A cursor that you can chain further function calls and then either\n * get the matching documents immediately or get updates about them over time.\n */\n limit(limit) {\n // REFACTOR: factor out parameter validation.\n if (limit < -1)\n throw new Error(`Can't limit to '${limit}', limit must be >= -1 (where -1 means unlimited)`);\n if (!Number.isFinite(limit))\n throw new Error(`Can't limit to '${limit}', limit must be a finite number`);\n if (Number.isNaN(limit))\n throw new Error(`Can't limit to '${limit}', limit must be a valid number`);\n const integerLimit = Math.round(limit);\n if (limit !== integerLimit)\n throw new Error(`Can't limit to '${limit}', limit must be an integer number`);\n this.currentLimit = limit;\n return this;\n }\n /**\n * Executes the query generated by the preceding function chaining and return\n * the list of matching documents.\n *\n * @returns An array promise containing {@link Document | documents} matching\n * the query generated by the preceding function chaining.\n */\n async exec() {\n const ditto = this.collection.store.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferCloseAsync(async () => {\n const query = this.query;\n const documentPointers = await performAsyncToWorkaroundNonAsyncFFIAPI(async () => {\n return await FFI.collectionExecQueryStr(dittoHandle.deref(), this.collection.name, null, query, this.queryArgsCBOR, this.orderBys, this.currentLimit, this.currentOffset);\n });\n return documentPointers.map((documentPointer) => {\n return Bridge.document.bridge(documentPointer);\n });\n });\n }\n // ----------------------------------------------------------- Internal ------\n /**\n * Updates documents that match the query generated by the preceding function\n * chaining.\n *\n * @param closure A closure that gets called with all of the documents\n * matching the query. The documents are instances of {@link MutableDocument}\n * so you can call update-related functions on them.\n * @param writeTransactionX a transaction to perform the operation in.\n *\n * @returns An {@link UpdateResultsMap} promise mapping document IDs to lists\n * of {@link UpdateResult | update results} that describe the updates that\n * were performed for each document.\n * @internal\n */\n async updateWithTransaction(closure, writeTransactionX) {\n const ditto = this.collection.store.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferCloseAsync(async () => {\n return await performAsyncToWorkaroundNonAsyncFFIAPI(async () => {\n const query = this.query;\n const documentsX = await FFI.collectionExecQueryStr(dittoHandle.deref(), this.collection.name, writeTransactionX, query, this.queryArgsCBOR, this.orderBys, this.currentLimit, this.currentOffset);\n const mutableDocuments = documentsX.map((documentX) => {\n return Bridge.mutableDocument.bridge(documentX, () => new MutableDocument());\n });\n closure(mutableDocuments);\n const updateResultsDocumentIDs = [];\n const updateResultsByDocumentIDString = {};\n for (const mutableDocument of mutableDocuments) {\n const documentID = mutableDocument.id;\n const documentIDString = documentID.toString();\n const updateResults = mutableDocument['@ditto.updateResults'];\n if (updateResultsByDocumentIDString[documentIDString]) {\n // HACK: in theory, 2 different document IDs can have the exact\n // same string representation at the time of this writing. There is\n // already a REFACTOR comment in `UpdateResultsMap` to implement a\n // proper and correct data structure for holding these update results.\n // Until then, we'll leave this check here to see how often we hit\n // this edge case.\n throw new Error(`Internal inconsistency, update results for document ID as string already exist: ${documentIDString}`);\n }\n updateResultsDocumentIDs.push(documentID);\n updateResultsByDocumentIDString[documentIDString] = updateResults;\n Bridge.mutableDocument.unregister(mutableDocument);\n }\n // NOTE: ownership of documentsX (and contained documents)\n // is transferred to Rust at this point.\n await FFI.collectionUpdateMultiple(dittoHandle.deref(), this.collection.name, writeTransactionX, documentsX);\n return new UpdateResultsMap(updateResultsDocumentIDs, updateResultsByDocumentIDString);\n });\n });\n }\n /** @internal */\n constructor(query, queryArgs, collection) {\n /** @internal */\n this.currentLimit = -1;\n /** @internal */\n this.currentOffset = 0;\n /** @internal */\n this.orderBys = [];\n this.query = validateQuery(query);\n this.queryArgs = queryArgs ? Object.freeze({ ...queryArgs }) : null;\n this.collection = collection;\n this.queryArgsCBOR = queryArgs ? CBOR.encode(queryArgs) : null;\n }\n /** @internal */\n then(onfulfilled, onrejected) {\n return this.exec().then(onfulfilled, onrejected);\n }\n}\n//# sourceMappingURL=base-pending-cursor-operation.js.map","//\n// Copyright © 2023 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { Bridge } from './bridge';\nimport { performAsyncToWorkaroundNonAsyncFFIAPI } from './internal';\n/**\n * These objects are returned when using\n * {@link Collection.findByID | findByID()} functionality on\n * {@link Collection | collections}.\n *\n * You can either call {@link exec | exec()} on the object to get an immediate\n * return value, or chain calls to update, evict or remove the document.\n *\n * Live queries and subscriptions are only available outside of a transaction.\n */\nexport class BasePendingIDSpecificOperation {\n /**\n * Executes the find operation to return the document with the matching ID.\n *\n * @returns The {@link Document} promise with the ID provided in the\n * {@link Collection.findByID | findByID()} call or `undefined` if the document was\n * not found.\n */\n async exec() {\n const ditto = this.collection.store.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferCloseAsync(async () => {\n return await performAsyncToWorkaroundNonAsyncFFIAPI(async () => {\n const readTransactionX = await FFI.readTransaction(dittoHandle.deref());\n const documentX = await FFI.collectionGet(dittoHandle.deref(), this.collection.name, this.documentIDCBOR, readTransactionX);\n let document = undefined;\n if (documentX)\n document = Bridge.document.bridge(documentX);\n FFI.readTransactionFree(readTransactionX);\n return document;\n });\n });\n }\n // ----------------------------------------------------------- Internal ------\n /** @internal */\n constructor(documentID, collection) {\n this.documentID = documentID;\n this.collection = collection;\n this.documentIDCBOR = documentID.toCBOR();\n }\n /** @internal */\n then(onfulfilled, onrejected) {\n return this.exec().then(onfulfilled, onrejected);\n }\n /** @internal */\n get query() {\n return `_id == ${this.documentID.toQueryCompatibleString()}`;\n }\n}\n//# sourceMappingURL=base-pending-id-specific-operation.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport { generateEphemeralToken } from './internal';\n/** @internal */\nexport class ObserverManager {\n /** @internal */\n constructor(id, options = {}) {\n var _a, _b, _c, _d;\n const keepAlive = (_a = options.keepAlive) !== null && _a !== void 0 ? _a : null;\n const register = (_b = options.register) !== null && _b !== void 0 ? _b : null;\n const unregister = (_c = options.unregister) !== null && _c !== void 0 ? _c : null;\n const process = (_d = options.process) !== null && _d !== void 0 ? _d : null;\n this.id = id;\n this.keepAlive = keepAlive;\n this.isClosed = false;\n this.isRegistered = false;\n this.callbacksByToken = {};\n if (register !== null) {\n this.register = register;\n }\n if (unregister !== null) {\n this.unregister = unregister;\n }\n if (process !== null) {\n this.process = process;\n }\n }\n /** @internal */\n addObserver(callback) {\n var _a;\n if (this.isClosed) {\n // REFACTOR: throw a catchable error here, such that calling code\n // can be more specific when forwarding it to the user.\n throw new Error(`Internal inconsistency, can't add '${this.id}' observer, observer mananger close()-ed.`);\n }\n this.registerIfNeeded();\n const token = generateEphemeralToken();\n this.callbacksByToken[token] = callback;\n (_a = this.keepAlive) === null || _a === void 0 ? void 0 : _a.retain(`${this.id}.${token}`);\n return token;\n }\n /** @internal */\n removeObserver(token) {\n var _a;\n const callback = this.callbacksByToken[token];\n if (typeof callback === 'undefined') {\n throw new Error(`Can't remove '${this.id}' observer, token '${token}' has never been registered before.`);\n }\n if (callback === null) {\n // Observer has already been removed, no-op.\n return;\n }\n // REFACTOR: not deleting the token here will keep eating up\n // memory over long periods of time. We actually need to track\n // the observer objects themselves and remove it from the table\n // as soon as the observer object is garbage collected.\n // The value is set to null to be able to discern between\n // observers that have been removed and observers that have\n // never been registered before.\n this.callbacksByToken[token] = null;\n (_a = this.keepAlive) === null || _a === void 0 ? void 0 : _a.release(`${this.id}.${token}`);\n this.unregisterIfNeeded();\n }\n hasObserver(token) {\n return typeof this.callbacksByToken[token] != 'undefined';\n }\n /** @internal */\n notify(...args) {\n if (this.isClosed) {\n // NOTE: we don't notify observers after closing and just swallow\n // the event.\n return;\n }\n const processedArgs = this.process(...args);\n for (const token in this.callbacksByToken) {\n const callback = this.callbacksByToken[token];\n if (callback)\n callback(...processedArgs);\n }\n }\n /** @internal */\n close() {\n this.isClosed = true;\n for (const token in this.callbacksByToken) {\n this.removeObserver(token);\n }\n }\n /**\n * Can be injected and replaced via constructor options.\n *\n * @abstract\n */\n register(callback) {\n // No-op, subclasses may override and register.\n }\n /**\n * Can be injected and replaced via constructor options.\n *\n * @abstract\n */\n unregister() {\n // No-op, subclasses may override and unregister.\n }\n /**\n * Can be injected and replaced via constructor options.\n *\n * @abstract\n */\n process(...args) {\n // No-op, subclasses may override and process/transform the callback parameters.\n return args;\n }\n hasObservers() {\n return Object.keys(this.callbacksByToken).length > 0;\n }\n registerIfNeeded() {\n const needsToRegister = !this.isRegistered;\n if (needsToRegister) {\n const weakThis = new WeakRef(this);\n this.isRegistered = true;\n this.register(function (...args) {\n const strongThis = weakThis.deref();\n if (!strongThis) {\n return;\n }\n strongThis.notify(...args);\n });\n }\n }\n unregisterIfNeeded() {\n const needsToUnregister = !this.hasObservers() && this.isRegistered;\n if (needsToUnregister) {\n this.isRegistered = false;\n this.unregister();\n }\n }\n}\n//# sourceMappingURL=observer-manager.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { Bridge } from './bridge';\nimport { Logger } from './logger';\nimport { Observer } from './observer';\nimport { ObserverManager } from './observer-manager';\n// -----------------------------------------------------------------------------\n/**\n * Log in to a remote authentication service, using an\n * `OnlineWithAuthentication` or an `Online` identity.\n */\nexport class Authenticator {\n /**\n Returns the current authentication status.\n */\n get status() {\n return this._status;\n }\n /**\n * Log in to Ditto with a third-party token. Throws if authentication is not\n * available, which can be checked with {@link loginSupported}.\n *\n * @param token the authentication token required to log in.\n * @param provider the name of the authentication provider.\n */\n loginWithToken(token, provider) {\n throw new Error(`Authenticator.loginWithToken() is abstract and must be implemented by subclasses.`);\n }\n /**\n * Log in to Ditto with a username and password. Throws if authentication is\n * not available, which can be checked with {@link loginSupported}.\n *\n * @param username the username component of the credentials used for log in.\n * @param password the password component of the credentials used for log in.\n * @param provider the name of the authentication provider.\n */\n loginWithUsernameAndPassword(username, password, provider) {\n throw new Error(`Authenticator.loginWithUsernameAndPassword() is abstract and must be implemented by subclasses.`);\n }\n /**\n * Log out of Ditto.\n *\n * This will stop sync, shut down all replication sessions, and remove any\n * cached authentication credentials. Note that this does not remove any data\n * from the store. If you wish to delete data from the store then use the\n * optional `cleanupFn` parameter to perform any required cleanup.\n *\n * @param cleanupFn An optional function that will be called with the relevant\n * [Ditto] instance as the sole argument that allows you to perform any\n * required cleanup of the store as part of the logout process.\n */\n logout(cleanupFn) {\n throw new Error(`Authenticator.logout() is abstract and must be implemented by subclasses.`);\n }\n /*\n * Registers a callback that is called whenever the authentication status\n * changes. Returns an `Observer` object that needs to be retained as long as\n * you want to receive the updates.\n */\n observeStatus(callback) {\n const token = this.observerManager.addObserver(callback);\n return new Observer(this.observerManager, token, { stopsWhenFinalized: true });\n }\n /** @internal */\n constructor(keepAlive) {\n this.keepAlive = keepAlive;\n this._status = { isAuthenticated: false, userID: null };\n this.loginSupported = false;\n this.observerManager = new ObserverManager('AuthenticationStatusObservation', { keepAlive });\n }\n /** @internal */\n '@ditto.authenticationExpiring'(number) {\n throw new Error(`Authenticator['@ditto.authenticationExpiring']() is abstract and must be implemented by subclasses.`);\n }\n /** @internal */\n '@ditto.authClientValidityChanged'(isWebValid, isX509Valid) {\n throw new Error(`Authenticator['@ditto.authClientValidityChanged']() is abstract and must be implemented by subclasses.`);\n }\n /** @internal */\n close() {\n this.observerManager.close();\n }\n}\n// -----------------------------------------------------------------------------\n/** @internal */\nexport class OnlineAuthenticator extends Authenticator {\n async loginWithToken(token, provider) {\n const ditto = this.ditto.deref();\n if (!ditto) {\n return;\n }\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n const dittoPointer = dittoHandle.derefOrNull();\n if (!dittoPointer) {\n return;\n }\n return ditto.deferCloseAsync(async () => {\n await FFI.dittoAuthClientLoginWithToken(dittoPointer, token, provider);\n });\n }\n async loginWithUsernameAndPassword(username, password, provider) {\n const ditto = this.ditto.deref();\n if (!ditto) {\n return;\n }\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n const dittoPointer = dittoHandle.derefOrNull();\n if (!dittoPointer) {\n return;\n }\n return ditto.deferCloseAsync(async () => {\n await FFI.dittoAuthClientLoginWithUsernameAndPassword(dittoPointer, username, password, provider);\n });\n }\n async logout(cleanupFn) {\n const ditto = this.ditto.deref();\n if (!ditto) {\n return;\n }\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n const dittoPointer = dittoHandle.derefOrNull();\n if (!dittoPointer) {\n return;\n }\n return ditto.deferCloseAsync(async () => {\n await FFI.dittoAuthClientLogout(dittoPointer);\n ditto.stopSync();\n cleanupFn === null || cleanupFn === void 0 ? void 0 : cleanupFn(ditto);\n });\n }\n constructor(keepAlive, ditto, authenticationHandler) {\n super(keepAlive);\n this.loginSupported = true;\n this._status = { isAuthenticated: false, userID: null };\n this.ditto = new WeakRef(ditto);\n this.authenticationHandler = authenticationHandler;\n this.updateAndNotify(false);\n }\n '@ditto.authenticationExpiring'(secondsRemaining) {\n const authenticationHandler = this.authenticationHandler;\n if (secondsRemaining > 0) {\n authenticationHandler.authenticationExpiringSoon(this, secondsRemaining);\n }\n else {\n authenticationHandler.authenticationRequired(this);\n }\n }\n '@ditto.authClientValidityChanged'(isWebValid, isX509Valid) {\n this.updateAndNotify(true);\n }\n updateAndNotify(shouldNotify) {\n var _a;\n const ditto = this.ditto.deref();\n if (!ditto) {\n Logger.debug('Unable to update auth status and notify, related Ditto object does not exist anymore.');\n return;\n }\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n const dittoPointer = dittoHandle.derefOrNull();\n if (!dittoPointer) {\n Logger.debug('Unable to update auth status and notify, related Ditto object does not exist anymore.');\n return;\n }\n const wasAuthenticated = this.status.isAuthenticated;\n const previousUserID = this.status.userID;\n const isAuthenticated = FFI.dittoAuthClientIsWebValid(dittoPointer);\n const userID = FFI.dittoAuthClientUserID(dittoPointer);\n const status = { isAuthenticated, userID };\n this._status = status;\n if (shouldNotify) {\n const sameStatus = !!wasAuthenticated === !!isAuthenticated && previousUserID === userID;\n if (!sameStatus) {\n (_a = this.authenticationHandler.authenticationStatusDidChange) === null || _a === void 0 ? void 0 : _a.call(this.authenticationHandler, this);\n this.observerManager.notify(status);\n }\n }\n }\n}\n// -----------------------------------------------------------------------------\n/** @internal */\nexport class NotAvailableAuthenticator extends Authenticator {\n async loginWithToken(token, provider) {\n throw new Error(`Can't login, authentication is not supported for the identity in use, please use an onlineWithAuthentication identity.`);\n }\n async loginWithUsernameAndPassword(username, password, provider) {\n throw new Error(`Can't login, authentication is not supported for the identity in use, please use an onlineWithAuthentication identity.`);\n }\n logout(cleanupFn) {\n throw new Error(`Can't logout, authentication is not supported for the identity in use, please use an onlineWithAuthentication identity.`);\n }\n '@ditto.authenticationExpiring'(secondsRemaining) {\n throw new Error(`Internal inconsistency, authentication is not available, yet the @ditto.authenticationExpiring() was called on authenticator: ${this}`);\n }\n '@ditto.authClientValidityChanged'(isWebValid, isX509Valid) {\n throw new Error(`Internal inconsistency, authentication is not available, yet the @ditto.authClientValidityChanged() was called on authenticator: ${this}`);\n }\n}\n//# sourceMappingURL=authenticator.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\n/** The list of identity types that require activation through an offlineLicenseToken */\nexport const IdentityTypesRequiringOfflineLicenseToken = ['manual', 'sharedKey', 'offlinePlayground'];\n//# sourceMappingURL=identity.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\n/**\n * Restore a `TransportConfig` from its serializable representation.\n *\n * @internal\n */\nexport function transportConfigFromDeserializable(serialized) {\n const peerToPeerJSON = serialized['peer_to_peer'];\n const bluetoothLEJSON = peerToPeerJSON['bluetooth_le'];\n const bluetoothLEEnabled = bluetoothLEJSON['enabled'];\n const awdlJSON = peerToPeerJSON['awdl'];\n const awdlEnabled = awdlJSON['enabled'];\n const lanJSON = peerToPeerJSON['lan'];\n const lanEnabled = lanJSON['enabled'];\n const lanMdnsEnabled = lanJSON['mdns_enabled'];\n const lanMulticastEnabled = lanJSON['multicast_enabled'];\n const connectJSON = serialized['connect'];\n const connectTcpServers = connectJSON['tcp_servers'];\n const connectWebsocketURLs = connectJSON['websocket_urls'];\n const connectRetryInterval = connectJSON['retry_interval'];\n const listenJSON = serialized['listen'];\n const tcpJSON = listenJSON['tcp'];\n const tcpEnabled = tcpJSON['enabled'];\n const tcpInterfaceIP = tcpJSON['interface_ip'];\n const tcpPort = tcpJSON['port'];\n const httpJSON = listenJSON['http'];\n const httpEnabled = httpJSON['enabled'];\n const httpInterfaceIP = httpJSON['interface_ip'];\n const httpPort = httpJSON['port'];\n const httpStaticContentPath = httpJSON['static_content_path'];\n const httpWebsocketSync = httpJSON['websocket_sync'];\n const httpTLSKeyPath = httpJSON['tls_key_path'];\n const httpTLSCertificatePath = httpJSON['tls_certificate_path'];\n const globalJSON = serialized['global'];\n const globalSyncGroup = globalJSON['sync_group'];\n const globalRoutingHint = globalJSON['routing_hint'];\n const config = new TransportConfig();\n config.peerToPeer.bluetoothLE.isEnabled = bluetoothLEEnabled;\n config.peerToPeer.awdl.isEnabled = awdlEnabled;\n config.peerToPeer.lan.isEnabled = lanEnabled;\n config.peerToPeer.lan.isMdnsEnabled = lanMdnsEnabled;\n config.peerToPeer.lan.isMulticastEnabled = lanMulticastEnabled;\n config.connect.tcpServers = connectTcpServers;\n config.connect.websocketURLs = connectWebsocketURLs;\n config.connect.retryInterval = connectRetryInterval;\n config.listen.tcp.isEnabled = tcpEnabled;\n config.listen.tcp.interfaceIP = tcpInterfaceIP;\n config.listen.tcp.port = tcpPort;\n config.listen.http.isEnabled = httpEnabled;\n config.listen.http.interfaceIP = httpInterfaceIP;\n config.listen.http.port = httpPort;\n config.listen.http.staticContentPath = httpStaticContentPath;\n config.listen.http.websocketSync = httpWebsocketSync;\n config.listen.http.tlsKeyPath = httpTLSKeyPath;\n config.listen.http.tlsCertificatePath = httpTLSCertificatePath;\n config.global.syncGroup = globalSyncGroup;\n config.global.routingHint = globalRoutingHint;\n return config;\n}\n/**\n * Convert a `TransportConfig` to a serializable representation.\n *\n * This mainly involves converting the `TransportConfig`'s properties to have the expected key names\n * and casing.\n *\n * @internal\n */\nexport function transportConfigToSerializable(config) {\n const peerToPeer = config.peerToPeer;\n const connect = config.connect;\n const listen = config.listen;\n const global = config.global;\n const serialized = {\n peer_to_peer: {\n bluetooth_le: {\n enabled: peerToPeer.bluetoothLE.isEnabled,\n },\n awdl: {\n enabled: peerToPeer.awdl.isEnabled,\n },\n lan: {\n enabled: peerToPeer.lan.isEnabled,\n mdns_enabled: peerToPeer.lan.isMdnsEnabled,\n multicast_enabled: peerToPeer.lan.isMulticastEnabled,\n },\n },\n connect: {\n tcp_servers: connect.tcpServers,\n websocket_urls: connect.websocketURLs,\n retry_interval: connect.retryInterval,\n },\n listen: {\n tcp: {\n enabled: listen.tcp.isEnabled,\n interface_ip: listen.tcp.interfaceIP,\n port: listen.tcp.port,\n },\n http: {\n enabled: listen.http.isEnabled,\n interface_ip: listen.http.interfaceIP,\n port: listen.http.port,\n websocket_sync: listen.http.websocketSync,\n },\n },\n global: {\n sync_group: global.syncGroup,\n routing_hint: global.routingHint,\n },\n };\n // Only set the optional properties if they are not undefined\n if (listen.http.staticContentPath) {\n serialized.listen.http['static_content_path'] = listen.http.staticContentPath;\n }\n if (listen.http.tlsKeyPath) {\n serialized.listen.http['tls_key_path'] = listen.http.tlsKeyPath;\n }\n if (listen.http.tlsCertificatePath) {\n serialized.listen.http['tls_certificate_path'] = listen.http.tlsCertificatePath;\n }\n return serialized;\n}\nconst NO_PREFERRED_ROUTE_HINT = 0;\n/**\n * A configuration object specifying which network transports Ditto should\n * use to sync data.\n *\n * A Ditto object comes with a default transport configuration where all\n * available peer-to-peer transports are enabled. You can customize this by\n * copying that or initializing a new `TransportConfig`, adjusting its\n * properties, and supplying it to `setTransportConfig()` on `Ditto`.\n *\n * When you initialize a new `TransportConfig` instance, all transports are\n * disabled. You must enable each one explicitly.\n *\n * Peer-to-peer transports will automatically discover peers in the vicinity\n * and create connections without any configuration. These are configured via\n * the `peerToPeer` property. To turn each one on, set its `isEnabled` property\n * to `true`.\n *\n * To connect to a peer at a known location, such as a Ditto Big Peer, add its\n * address inside the connect configuration. These are either \"host:port\"\n * strings for raw TCP sync, or a \"wss://…\" URL for websockets.\n *\n * The listen configurations are for specific less common data sync scenarios.\n * Please read the documentation on the Ditto website for examples. Incorrect\n * use of listen can result in insecure configurations.\n *\n * **IMPORTANT**: when running in the browser, only the `connect.websocketURLs`\n * part is considered, the rest of the configuration is ignored.\n */\nexport class TransportConfig {\n /**\n * Create a new transport config initialized with the default settings.\n */\n constructor() {\n this._isFrozen = false;\n this.peerToPeer = {\n bluetoothLE: { isEnabled: false },\n awdl: { isEnabled: false },\n lan: { isEnabled: false, isMdnsEnabled: true, isMulticastEnabled: true },\n };\n this.connect = {\n tcpServers: [],\n websocketURLs: [],\n retryInterval: 5000,\n };\n this.listen = {\n tcp: {\n isEnabled: false,\n interfaceIP: '0.0.0.0',\n port: 4040,\n },\n http: {\n isEnabled: false,\n interfaceIP: '0.0.0.0',\n port: 80,\n websocketSync: true,\n },\n };\n this.global = {\n syncGroup: 0,\n routingHint: NO_PREFERRED_ROUTE_HINT,\n };\n }\n /**\n * Enables all peer-to-peer transports. Throws if receiver is frozen.\n */\n setAllPeerToPeerEnabled(enabled) {\n this.peerToPeer.bluetoothLE.isEnabled = enabled;\n this.peerToPeer.lan.isEnabled = enabled;\n this.peerToPeer.awdl.isEnabled = enabled;\n }\n /**\n * Returns `true` if the transport configuration is frozen, otherwise\n * returns `false`.\n */\n get isFrozen() {\n return this._isFrozen;\n }\n /**\n * (Deep) freezes the receiver such that it can't be modified anymore.\n */\n freeze() {\n if (this.isFrozen)\n return this;\n this._isFrozen = true;\n Object.freeze(this.peerToPeer.bluetoothLE);\n Object.freeze(this.peerToPeer.awdl);\n Object.freeze(this.peerToPeer.lan);\n Object.freeze(this.peerToPeer);\n Object.freeze(this.connect.tcpServers);\n Object.freeze(this.connect.websocketURLs);\n Object.freeze(this.connect);\n Object.freeze(this.listen.tcp);\n Object.freeze(this.listen.http);\n Object.freeze(this.listen);\n Object.freeze(this.global);\n return this;\n }\n /**\n * Returns a (deep) copy of the receiver.\n */\n copy() {\n const copy = new TransportConfig();\n copy.peerToPeer.bluetoothLE.isEnabled = this.peerToPeer.bluetoothLE.isEnabled;\n copy.peerToPeer.awdl.isEnabled = this.peerToPeer.awdl.isEnabled;\n copy.peerToPeer.lan.isEnabled = this.peerToPeer.lan.isEnabled;\n copy.peerToPeer.lan.isMdnsEnabled = this.peerToPeer.lan.isMdnsEnabled;\n copy.peerToPeer.lan.isMulticastEnabled = this.peerToPeer.lan.isMulticastEnabled;\n copy.connect.tcpServers = this.connect.tcpServers.slice();\n copy.connect.websocketURLs = this.connect.websocketURLs.slice();\n copy.connect.retryInterval = this.connect.retryInterval;\n copy.listen.tcp = { ...this.listen.tcp };\n copy.listen.http = { ...this.listen.http };\n copy.global.syncGroup = this.global.syncGroup;\n copy.global.routingHint = this.global.routingHint;\n return copy;\n }\n /**\n * Returns `true` if passed in TCP configurations are equal, otherwise\n * returns `false`.\n */\n static areListenTCPsEqual(left, right) {\n /* eslint-disable */\n // prettier-ignore\n return (left.isEnabled === right.isEnabled &&\n left.interfaceIP === right.interfaceIP &&\n left.port === right.port);\n /* eslint-enable */\n }\n /**\n * Returns `true` if passed in HTTP configurations are equal, otherwise\n * returns `false`.\n */\n static areListenHTTPsEqual(left, right) {\n /* eslint-disable */\n // prettier-ignore\n return (left.isEnabled === right.isEnabled &&\n left.interfaceIP === right.interfaceIP &&\n left.port === right.port &&\n left.staticContentPath === right.staticContentPath &&\n left.websocketSync === right.websocketSync &&\n left.tlsKeyPath === right.tlsKeyPath &&\n left.tlsCertificatePath === right.tlsCertificatePath);\n /* eslint-enable */\n }\n}\n//# sourceMappingURL=transport-config.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport { generateEphemeralToken } from './internal';\n/**\n * Used to subscribe to receive updates from remote peers about matching\n * documents.\n *\n * While {@link Subscription} objects remain in scope they ensure that\n * documents in the collection specified and that match the query provided will\n * try to be kept up-to-date with the latest changes from remote peers.\n */\nexport class Subscription {\n /**\n * Returns `true` if subscription has been explicitly cancelled, `false`\n * otherwise.\n */\n get isCancelled() {\n return this._isCancelled;\n }\n /**\n * The name of the collection that the subscription is based on.\n */\n get collectionName() {\n return this.collection.name;\n }\n /**\n * Cancels a subscription and releases all associated resources.\n */\n cancel() {\n if (!this.isCancelled) {\n this._isCancelled = true;\n this.manager.remove(this);\n }\n }\n // ----------------------------------------------------------- Internal ------\n /** @internal */\n constructor(collection, query, queryArgsCBOR, orderBys, limit, offset) {\n this._isCancelled = false;\n // Query should be validated at this point.\n this.query = query;\n this.queryArgsCBOR = queryArgsCBOR;\n this.collection = collection;\n this.contextInfo = {\n id: generateEphemeralToken(),\n collectionName: collection.name,\n query,\n queryArgsCBOR,\n orderBys,\n limit,\n offset,\n };\n this.manager = collection.store.ditto.subscriptionManager;\n this.manager.add(this);\n }\n}\n//# sourceMappingURL=subscription.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { Bridge } from './bridge';\nimport { Logger } from './logger';\n// -----------------------------------------------------------------------------\n/**\n * First event fired immediately after registering a live query without any\n * mutations. All subsequent events are of type {@link LiveQueryEventUpdate}.\n */\nexport class LiveQueryEventInitial {\n constructor() {\n /**\n * Whether or not this is the initial event being delivered. Always `true`\n * for `LiveQueryEventInitial`.\n */\n this.isInitial = true;\n }\n /**\n * Returns a hash that represents the set of matching documents.\n *\n * @deprecated use {@link Document.hash | Document.hash()} instead.\n */\n hash(documents) {\n Logger.warning('LiveQueryEventInitial.hash() is deprecated, use Document.hash() instead');\n const documentHandles = Bridge.document.handlesFor(documents);\n return FFI.documentsHash(documentHandles.deref());\n }\n /**\n * Returns a pattern of words that together create a mnemonic, which\n * represents the set of matching documents.\n *\n * @deprecated use {@link Document.hashMnemonic | Document.hashMnemonic()} instead.\n */\n hashMnemonic(documents) {\n Logger.warning('LiveQueryEventInitial.hashMnemonic() is deprecated, use Document.hashMnemonic() instead');\n const documentHandles = Bridge.document.handlesFor(documents);\n return FFI.documentsHashMnemonic(documentHandles.deref());\n }\n}\n// -----------------------------------------------------------------------------\n/**\n * Represents an update event describing all changes that occured for documents\n * covered by a (live) query.\n */\nexport class LiveQueryEventUpdate {\n /**\n * Returns a hash that represents the set of matching documents.\n *\n * @deprecated use {@link Document.hash | Document.hash()} instead.\n */\n hash(documents) {\n Logger.warning('LiveQueryEventUpdate.hash() is deprecated, use Document.hash() instead');\n const documentHandles = Bridge.document.handlesFor(documents);\n return FFI.documentsHash(documentHandles.deref());\n }\n /**\n * Returns a pattern of words that together create a mnemonic, which\n * represents the set of matching documents.\n *\n * @deprecated use {@link Document.hashMnemonic | Document.hashMnemonic()} instead.\n */\n hashMnemonic(documents) {\n Logger.warning('LiveQueryEventUpdate.hashMnemonic() is deprecated, use Document.hashMnemonic() instead');\n const documentHandles = Bridge.document.handlesFor(documents);\n return FFI.documentsHashMnemonic(documentHandles.deref());\n }\n /** @internal */\n constructor(params) {\n /**\n * Whether or not this is the initial event being delivered. Always `false`\n * for `LiveQueryEventUpdate`.\n */\n this.isInitial = false;\n this.oldDocuments = params.oldDocuments;\n this.insertions = params.insertions;\n this.deletions = params.deletions;\n this.updates = params.updates;\n this.moves = params.moves;\n }\n}\n// -----------------------------------------------------------------------------\n/**\n * Provides information about a live query event relating to a single document\n * live query.\n */\nexport class SingleDocumentLiveQueryEvent {\n /**\n * Returns a hash that represents the set of matching documents.\n *\n * @deprecated use {@link Document.hash | Document.hash()} instead.\n */\n hash(document) {\n Logger.warning('SingleDocumentLiveQueryEvent.hash() is deprecated, use Document.hash() instead');\n const documentHandles = Bridge.document.handlesFor(document == null ? [] : [document]);\n return FFI.documentsHash(documentHandles.deref());\n }\n /**\n * Returns a pattern of words that together create a mnemonic, which\n * represents the set of matching documents.\n *\n * @deprecated use {@link Document.hashMnemonic | Document.hashMnemonic()} instead.\n */\n hashMnemonic(document) {\n Logger.warning('SingleDocumentLiveQueryEvent.hashMnemonic() is deprecated, use Document.hashMnemonic() instead');\n const documentHandles = Bridge.document.handlesFor(document == null ? [] : [document]);\n return FFI.documentsHashMnemonic(documentHandles.deref());\n }\n /** @internal */\n constructor(isInitial, oldDocument) {\n this.isInitial = isInitial;\n this.oldDocument = oldDocument;\n }\n}\n//# sourceMappingURL=live-query-event.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { Bridge } from './bridge';\nimport { LiveQueryEventInitial } from './live-query-event';\nimport { LiveQueryEventUpdate } from './live-query-event';\n/**\n * The type that is returned when calling\n * {@link PendingCursorOperation.observeLocal | observeLocal()} on a\n * {@link PendingCursorOperation} object. It handles the logic for calling the\n * event handler that is provided to `observeLocal()` calls.\n *\n * Ditto will prevent the process from exiting as long as there are active live\n * queries (not relevant when running in the browser).\n *\n * `LiveQuery` objects must be kept in scope for as long as you wish to have\n * your event handler be called when there is an update to a document matching\n * the query you provide. When you no longer want to receive updates about\n * documents matching a query then you must call {@link stop | stop()}.\n */\nexport class LiveQuery {\n /** The name of the collection that the live query is based on. */\n get collectionName() {\n return this.collection.name;\n }\n /** Returns true if the receiver has been stopped. */\n get isStopped() {\n return !this.liveQueryManager;\n }\n /**\n * Stop the live query from delivering updates.\n */\n stop() {\n if (!this.isStopped) {\n ;\n this.liveQueryManager.stopLiveQuery(this);\n }\n }\n get liveQueryID() {\n return this._liveQueryID;\n }\n /** @internal */\n constructor(query, queryArgs, queryArgsCBOR, orderBys, limit, offset, collection, handler) {\n // Query should be validated at this point.\n this.query = query;\n this.queryArgs = queryArgs ? Object.freeze({ ...queryArgs }) : null;\n this.queryArgsCBOR = queryArgsCBOR;\n this.orderBys = orderBys;\n this.limit = limit;\n this.offset = offset;\n this.collection = collection;\n this.handler = handler;\n this.liveQueryManager = null;\n const collectionName = collection.name;\n const weakDitto = new WeakRef(collection.store.ditto);\n let liveQueryID = undefined;\n const signalNext = async () => {\n const ditto = weakDitto.deref();\n if (!ditto)\n return;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n const dittoPointer = dittoHandle.derefOrNull();\n if (!dittoPointer)\n return;\n return ditto.deferCloseAsync(async () => {\n await FFI.liveQuerySignalAvailableNext(dittoPointer, liveQueryID);\n });\n };\n const ditto = collection.store.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n ditto.deferClose(() => {\n liveQueryID = FFI.liveQueryRegister(dittoHandle.deref(), collectionName, query, queryArgsCBOR, this.orderBys, limit, offset, (cCBParams) => {\n const documents = cCBParams.documents.map((ptr) => Bridge.document.bridge(ptr));\n let event;\n if (cCBParams.is_initial) {\n event = new LiveQueryEventInitial();\n }\n else {\n event = new LiveQueryEventUpdate({\n oldDocuments: cCBParams.old_documents.map((ptr) => Bridge.document.bridge(ptr)),\n insertions: cCBParams.insertions,\n deletions: cCBParams.deletions,\n updates: cCBParams.updates,\n moves: cCBParams.moves.map((move) => ({ from: move[0], to: move[1] })),\n });\n }\n handler(documents, event, signalNext);\n });\n });\n if (!liveQueryID) {\n throw new Error(\"Internal inconsistency, couldn't create a valid live query ID.\");\n }\n this._liveQueryID = liveQueryID;\n }\n /** @internal */\n async signalNext() {\n // IDEA: make this public?\n const ditto = this.collection.store.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n const dittoPointer = dittoHandle.derefOrNull();\n if (!dittoPointer)\n return;\n return ditto.deferCloseAsync(async () => {\n await FFI.liveQuerySignalAvailableNext(dittoHandle.deref(), this.liveQueryID);\n });\n }\n}\n//# sourceMappingURL=live-query.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { Bridge } from './bridge';\nimport { Subscription } from './subscription';\nimport { DocumentID } from './document-id';\nimport { LiveQuery } from './live-query';\nimport { performAsyncToWorkaroundNonAsyncFFIAPI } from './internal';\nimport { BasePendingCursorOperation } from './base-pending-cursor-operation';\n// -----------------------------------------------------------------------------\n/**\n * These objects are returned when using `find`-like functionality on\n * {@link Collection}.\n *\n * They allow chaining of further query-related functions to do things like add\n * a limit to the number of documents you want returned or specify how you want\n * the documents to be sorted and ordered.\n *\n * You can either call {@link exec | exec()} on the object to get an array of\n * {@link Document | documents} as an immediate return value, or you can\n * establish either a live query or a subscription, which both work over time.\n *\n * A live query, established by calling\n * {@link PendingCursorOperation.observeLocal | observeLocal()}, will notify you\n * every time there's an update to a document that matches the query you\n * provided in the preceding `find`-like call.\n *\n * A subscription, established by calling\n * {@link PendingCursorOperation.subscribe | subscribe()}, will act as a signal\n * to other peers that the device connects to that you would like to receive\n * updates from them about documents that match the query you provided in the\n * preceding `find`-like call.\n *\n * Update and remove functionality is also exposed through this object.\n */\nexport class PendingCursorOperation extends BasePendingCursorOperation {\n sort(propertyPath, direction = 'ascending') {\n return super.sort(propertyPath, direction);\n }\n offset(offset) {\n return super.offset(offset);\n }\n limit(limit) {\n return super.limit(limit);\n }\n async remove() {\n const ditto = this.collection.store.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferCloseAsync(async () => {\n const query = this.query;\n const documentsX = await performAsyncToWorkaroundNonAsyncFFIAPI(async () => {\n const writeTransactionX = await FFI.writeTransaction(dittoHandle.deref());\n const results = await FFI.collectionRemoveQueryStr(dittoHandle.deref(), this.collection.name, writeTransactionX, query, this.queryArgsCBOR, this.orderBys, this.currentLimit, this.currentOffset);\n await FFI.writeTransactionCommit(dittoHandle.deref(), writeTransactionX);\n return results;\n });\n return documentsX.map((idCBOR) => {\n return new DocumentID(idCBOR, true);\n });\n });\n }\n async evict() {\n const ditto = this.collection.store.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferCloseAsync(async () => {\n const query = this.query;\n const documentsX = await performAsyncToWorkaroundNonAsyncFFIAPI(async () => {\n const writeTransactionX = await FFI.writeTransaction(dittoHandle.deref());\n const results = await FFI.collectionEvictQueryStr(dittoHandle.deref(), this.collection.name, writeTransactionX, query, this.queryArgsCBOR, this.orderBys, this.currentLimit, this.currentOffset);\n await FFI.writeTransactionCommit(dittoHandle.deref(), writeTransactionX);\n return results;\n });\n return documentsX.map((idCBOR) => {\n return new DocumentID(idCBOR, true);\n });\n });\n }\n async update(closure) {\n const ditto = this.collection.store.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferCloseAsync(async () => {\n return await performAsyncToWorkaroundNonAsyncFFIAPI(async () => {\n const writeTransactionX = await FFI.writeTransaction(dittoHandle.deref());\n const results = await super.updateWithTransaction(closure, writeTransactionX);\n await FFI.writeTransactionCommit(dittoHandle.deref(), writeTransactionX);\n return results;\n });\n });\n }\n /**\n * Enables you to subscribe to changes that occur in a collection remotely.\n *\n * Having a subscription acts as a signal to other peers that you are\n * interested in receiving updates when local or remote changes are made to\n * documents that match the query generated by the chain of operations that\n * precedes the call to {@link subscribe | subscribe()}.\n *\n * The returned {@link Subscription} object must be kept in scope for as long\n * as you want to keep receiving updates.\n *\n * @returns A {@link Subscription} object that must be kept in scope for as\n * long as you want to keep receiving updates for documents that match the\n * query specified in the preceding chain.\n */\n subscribe() {\n const subscription = new Subscription(this.collection, this.query, this.queryArgsCBOR, this.orderBys, this.currentLimit, this.currentOffset);\n this.collection.store.ditto.subscriptionManager.add(subscription);\n return subscription;\n }\n /**\n * Enables you to listen for changes that occur in a collection locally.\n *\n * The `handler` block will be called when local changes are\n * made to documents that match the query generated by the chain of operations\n * that precedes the call to {@link PendingCursorOperation.observeLocal | observeLocal()}.\n * The returned {@link LiveQuery} object must be kept in scope for as long as\n * you want the provided `handler` to be called when an update occurs.\n *\n * This won't subscribe to receive changes made remotely by others and so it\n * will only fire updates when a local change is made. If you want to receive\n * remotely performed updates as well, you'll have to create a subscription\n * via {@link PendingCursorOperation.subscribe | subscribe()} with the\n * relevant query. The returned {@link LiveQuery} object must be kept in scope\n * for as long as you want the provided `eventHandler` to be called when an\n * update occurs.\n *\n * @param handler A closure that will be called every time there is a\n * transaction committed to the store that involves modifications to documents\n * matching the query in the collection this method was called on.\n *\n * @return A {@link LiveQuery} object that must be kept in scope for as long\n * as you want to keep receiving updates.\n */\n observeLocal(handler) {\n return this._observe(handler, false);\n }\n /**\n * Enables you to listen for changes that occur in a collection locally and\n * to signal when you are ready for the live query to deliver the next event.\n *\n * The `handler` block will be called when local changes are\n * made to documents that match the query generated by the chain of operations\n * that precedes the call to {@link PendingCursorOperation.observeLocalWithNextSignal | observeLocalWithNextSignal()}.\n * The returned {@link LiveQuery} object must be kept in scope for as long as\n * you want the provided `handler` to be called when an update occurs.\n *\n * This won't subscribe to receive changes made remotely by others and so it\n * will only fire updates when a local change is made. If you want to receive\n * remotely performed updates as well, you'll have to create a subscription\n * via {@link PendingCursorOperation.subscribe | subscribe()} with the\n * relevant query. The returned {@link LiveQuery} object must be kept in scope\n * for as long as you want the provided `eventHandler` to be called when an\n * update occurs.\n *\n * @param handler A closure that will be called every time there is a\n * transaction committed to the store that involves modifications to\n * documents matching the query in the collection that this method was called\n * on.\n *\n * @return A {@link LiveQuery} object that must be kept in scope for as long\n * as you want to keep receiving updates.\n */\n observeLocalWithNextSignal(handler) {\n return this._observe(handler, true);\n }\n // ----------------------------------------------------------- Internal ------\n /** @internal */\n constructor(query, queryArgs, collection) {\n super(query, queryArgs, collection);\n }\n /** @internal */\n _observe(handler, waitForNextSignal) {\n function wrappedHandler(documents, event, nextSignal) {\n try {\n return handler.call(this, documents, event);\n }\n finally {\n nextSignal();\n }\n }\n const handlerOrWrapped = waitForNextSignal ? handler : wrappedHandler;\n const liveQuery = new LiveQuery(this.query, this.queryArgs, this.queryArgsCBOR, this.orderBys, this.currentLimit, this.currentOffset, this.collection, handlerOrWrapped);\n this.collection.store.ditto.liveQueryManager.startLiveQuery(liveQuery);\n return liveQuery;\n }\n}\n//# sourceMappingURL=pending-cursor-operation.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { Bridge } from './bridge';\nimport { Subscription } from './subscription';\nimport { LiveQuery } from './live-query';\nimport { MutableDocument } from './document';\nimport { performAsyncToWorkaroundNonAsyncFFIAPI } from './internal';\nimport { BasePendingIDSpecificOperation } from './base-pending-id-specific-operation';\nimport { SingleDocumentLiveQueryEvent } from './live-query-event';\n// -----------------------------------------------------------------------------\n/**\n * These objects are returned when using {@link Collection.findByID | findByID()}\n * functionality on {@link Collection | collections}.\n *\n * You can either call {@link exec | exec()} on the object to get an immediate\n * return value, or you can establish either a live query or a subscription,\n * which both work over time.\n *\n * A live query, established by calling\n * {@link PendingIDSpecificOperation.observeLocal | observeLocal()}, will notify\n * you every time there's an update to the document with the ID you provided in\n * the preceding {@link Collection.findByID | findByID()} call.\n *\n * A subscription, established by calling {@link PendingIDSpecificOperation.subscribe | subscribe()}, will\n * act as a signal to other peers that you would like to receive updates from\n * them about the document with the ID you provided in the preceding\n * {@link Collection.findByID | findByID()} call.\n *\n * Update and remove functionality is also exposed through this object.\n */\nexport class PendingIDSpecificOperation extends BasePendingIDSpecificOperation {\n async remove() {\n const ditto = this.collection.store.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferCloseAsync(async () => {\n return await performAsyncToWorkaroundNonAsyncFFIAPI(async () => {\n const writeTransactionX = await FFI.writeTransaction(dittoHandle.deref());\n const didRemove = await FFI.collectionRemove(dittoHandle.deref(), this.collection.name, writeTransactionX, this.documentIDCBOR);\n await FFI.writeTransactionCommit(dittoHandle.deref(), writeTransactionX);\n return didRemove;\n });\n });\n }\n async evict() {\n const ditto = this.collection.store.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferCloseAsync(async () => {\n return await performAsyncToWorkaroundNonAsyncFFIAPI(async () => {\n const writeTransactionX = await FFI.writeTransaction(dittoHandle.deref());\n const didEvict = await FFI.collectionEvict(dittoHandle.deref(), this.collection.name, writeTransactionX, this.documentIDCBOR);\n await FFI.writeTransactionCommit(dittoHandle.deref(), writeTransactionX);\n return didEvict;\n });\n });\n }\n async update(closure) {\n const ditto = this.collection.store.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferCloseAsync(async () => {\n const readTransactionX = await FFI.readTransaction(dittoHandle.deref());\n const documentX = await FFI.collectionGet(dittoHandle.deref(), this.collection.name, this.documentIDCBOR, readTransactionX);\n FFI.readTransactionFree(readTransactionX);\n if (!documentX)\n throw new Error(`Can't update, document with ID '${this.documentID.toString()}' not found in collection named '${this.collection.name}'`);\n const mutableDocument = Bridge.mutableDocument.bridge(documentX, () => new MutableDocument());\n closure(mutableDocument);\n // Ownership is transferred back to the FFI layer via collectionUpdate(),\n // we therefore need to explicitly unregister the instance.\n Bridge.mutableDocument.unregister(mutableDocument);\n const writeTransactionX = await FFI.writeTransaction(dittoHandle.deref());\n await FFI.collectionUpdate(dittoHandle.deref(), this.collection.name, writeTransactionX, documentX);\n await FFI.writeTransactionCommit(dittoHandle.deref(), writeTransactionX);\n return mutableDocument['@ditto.updateResults'].slice();\n });\n }\n /**\n * Enables you to subscribe to changes that occur in relation to a document\n * remotely.\n *\n * Having a subscription acts as a signal to other peers that you are\n * interested in receiving updates when local or remote changes are made to\n * the relevant document.\n *\n * The returned {@link Subscription} object must be kept in scope for as long\n * as you want to keep receiving updates.\n *\n * @returns A {@link Subscription} object that must be kept in scope for as\n * long as you want to keep receiving updates for the document.\n */\n subscribe() {\n const subscription = new Subscription(this.collection, this.query, null, [], -1, 0);\n this.collection.store.ditto.subscriptionManager.add(subscription);\n return subscription;\n }\n /**\n * Enables you to listen for changes that occur in relation to a document\n * locally.\n *\n * This won't subscribe to receive changes made remotely by others and so it\n * will only fire updates when a local change is made. If you want to receive\n * remotely performed updates as well, you'll have to create a subscription\n * via {@link PendingIDSpecificOperation.subscribe | subscribe()} for the same\n * document ID.\n *\n * The returned {@link LiveQuery} object must be kept in scope for as long\n * as you want the provided `handler` to be called when an update\n * occurs.\n *\n * @param handler A block that will be called every time there is a\n * transaction committed to the store that involves a modification to the\n * document with the relevant ID in the collection that\n * {@link PendingIDSpecificOperation.observeLocal | observeLocal()} was called on.\n *\n * @returns A {@link LiveQuery} object that must be kept in scope for as long\n * as you want to keep receiving updates.\n */\n observeLocal(handler) {\n return this._observe(handler, false);\n }\n /**\n * Enables you to listen for changes that occur in relation to a document\n * locally and to signal when you are ready for the live query to deliver\n * the next event.\n *\n * This won't subscribe to receive changes made remotely by others and so it\n * will only fire updates when a local change is made. If you want to receive\n * remotely performed updates as well, you'll have to create a subscription\n * via {@link PendingIDSpecificOperation.subscribe | subscribe()} for the same\n * document ID.\n *\n * The returned {@link LiveQuery} object must be kept in scope for as long\n * as you want the provided `handler` to be called when an update\n * occurs.\n *\n * @param handler A block that will be called every time there is a\n * transaction committed to the store that involves a modification to the\n * document with the relevant ID in the collection that\n * {@link PendingIDSpecificOperation.observeLocal | observeLocal()} was called on.\n *\n * @returns A {@link LiveQuery} object that must be kept in scope for as long\n * as you want to keep receiving updates.\n */\n observeLocalWithNextSignal(handler) {\n return this._observe(handler, true);\n }\n /** @internal */\n constructor(documentID, collection) {\n super(documentID, collection);\n }\n /** @internal */\n _observe(handler, waitForNextSignal) {\n const liveQuery = new LiveQuery(this.query, null, null, [], -1, 0, this.collection, (documents, event, signalNext) => {\n if (documents.length > 1) {\n const documentIDsAsBase64Strings = documents.map((document) => document.id.toBase64String());\n throw new Error(`Internal inconsistency, single document live query returned more than one document. Query: ${this.query}, documentIDs: ${documentIDsAsBase64Strings.join(', ')}.`);\n }\n if (event.isInitial === false && event.oldDocuments.length > 1)\n throw new Error(`Internal inconsistency, single document live query returned an update event with more than one old documents. Query ${this.query}.`);\n if (event.isInitial === false && event.insertions.length > 1)\n throw new Error(`Internal inconsistency, single document live query returned an update event with more than one insertion, which doesn't make sense for single document observations. Query ${this.query}.`);\n if (event.isInitial === false && event.deletions.length > 1)\n throw new Error(`Internal inconsistency, single document live query returned an update event with more than one deletion, which doesn't make sense for single document observations. Query ${this.query}.`);\n if (event.isInitial === false && event.updates.length > 1)\n throw new Error(`Internal inconsistency, single document live query returned an update event with more than one update, which doesn't make sense for single document observations. Query ${this.query}.`);\n if (event.isInitial === false && event.moves.length > 0)\n throw new Error(`Internal inconsistency, single document live query returned an update event with moves, which doesn't make sense for single document observations. Query ${this.query}.`);\n const totalNumberOfManipulations = event.isInitial === true ? 0 : event.insertions.length + event.deletions.length + event.updates.length;\n if (totalNumberOfManipulations > 1)\n throw new Error(`Internal inconsistency, single document live query returned a combination of inserts, updates, and/or deletes, which doesn't make sense for single document observation. Query ${this.query}.`);\n // IDEA: use `undefined` instead of `null` and\n // adapt Wasm variant plus API definition.\n const document = documents[0] || null;\n const oldDocument = event.isInitial === true ? undefined : event.oldDocuments[0];\n const singleDocumentEvent = new SingleDocumentLiveQueryEvent(event.isInitial, oldDocument);\n if (waitForNextSignal) {\n handler(document, singleDocumentEvent, signalNext);\n }\n else {\n try {\n handler(document, singleDocumentEvent);\n }\n finally {\n signalNext();\n }\n }\n });\n this.collection.store.ditto.liveQueryManager.startLiveQuery(liveQuery);\n return liveQuery;\n }\n}\n//# sourceMappingURL=pending-id-specific-operation.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport * as Environment from './@environment';\nimport { CBOR } from './cbor';\nimport { DocumentID } from './document-id';\nimport { Bridge } from './bridge';\nimport { Attachment } from './attachment';\nimport { AttachmentToken } from './attachment-token';\nimport { PendingCursorOperation } from './pending-cursor-operation';\nimport { PendingIDSpecificOperation } from './pending-id-specific-operation';\nimport { performAsyncToWorkaroundNonAsyncFFIAPI } from './internal';\nimport { desugarJSObject } from './augment';\n/**\n * Represents a collection of a Ditto store.\n *\n * This is the entrypoint for inserting documents into a collection, as well as\n * querying a collection. You can get a collection by calling\n * {@link Store.collection | collection()} on a {@link Store} of a {@link Ditto}\n * object.\n */\nexport class Collection {\n /**\n * Generates a {@link PendingCursorOperation} using the provided query.\n *\n * The returned object can be used to find and return the documents or you can\n * chain a call to `observeLocal()` or `subscribe()` if you want to get\n * updates about the list of matching documents over time. It can also be used\n * to update, remove or evict the matching documents.\n *\n * You can incorporate dynamic data into the query string with placeholders in\n * the form of `$args.my_arg_name`, along with providing an accompanying\n * dictionary in the form of `{ \"my_arg_name\": \"some value\" }`. The\n * placeholders will be appropriately replaced by the corresponding argument\n * contained in `queryArgs`. This includes handling things like wrapping\n * strings in quotation marks and arrays in square brackets, for example.\n *\n * Find more information about the query string format in the documentation's\n * section on {@link https://docs.ditto.live/javascript/common/concepts/querying Querying}\n *\n * @param query The query to run against the collection.\n * @param queryArgs The arguments to use to replace placeholders in the\n * provided query.\n */\n find(query, queryArgs) {\n return new PendingCursorOperation(query, queryArgs !== null && queryArgs !== void 0 ? queryArgs : null, this);\n }\n findAll() {\n return this.find('true');\n }\n /**\n * Generates a {@link PendingIDSpecificOperation} with the provided document\n * ID.\n *\n * The returned object can be used to find and return the document or you can\n * chain a call to\n * {@link PendingIDSpecificOperation.observeLocal | observeLocal()}, or\n * {@link PendingIDSpecificOperation.subscribe | subscribe()} if you want to\n * get updates about the document over time. It can also be used to update,\n * remove or evict the document.\n *\n * @param id The ID of the document to find.\n */\n findByID(id) {\n const documentID = id instanceof DocumentID ? id : new DocumentID(id);\n return new PendingIDSpecificOperation(documentID, this);\n }\n async upsert(value, options = {}) {\n const ditto = this.store.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferCloseAsync(async () => {\n var _a;\n const writeStrategy = (_a = options.writeStrategy) !== null && _a !== void 0 ? _a : 'merge';\n const documentValueJSON = desugarJSObject(value, true);\n const documentValueCBOR = CBOR.encode(documentValueJSON);\n const idCBOR = await performAsyncToWorkaroundNonAsyncFFIAPI(async () => {\n return await FFI.collectionInsertValue(dittoHandle.deref(), this.name, documentValueCBOR, writeStrategy, undefined);\n });\n return new DocumentID(idCBOR, true);\n });\n }\n /**\n * Creates a new {@link Attachment} object, which can then be inserted into a\n * document. Node only, throws when running in the web browser.\n *\n * The file residing at the provided path will be copied into Ditto's store.\n * The {@link Attachment} object that is returned is what you can then use to\n * insert an attachment into a document.\n *\n * You can provide metadata about the attachment, which will be replicated to\n * other peers alongside the file attachment.\n *\n * Below is a snippet to show how you can use the\n * {@link newAttachment | newAttachment()} functionality to insert an\n * attachment into a document.\n *\n * ``` JavaScript\n * const attachment = await collection.newAttachment('/path/to/my/file.pdf')\n * await collection.upsert({ _id: '123', attachment, other: 'some-string' })\n * }\n * ```\n *\n * @param pathOrData The path to the file that you want to create an\n * attachment with or the raw data.\n *\n * @param metadata Metadata relating to the attachment.\n */\n async newAttachment(pathOrData, metadata = {}) {\n const ditto = this.store.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferCloseAsync(async () => {\n const { id, len, handle } = await (async () => {\n if (typeof pathOrData === 'string') {\n if (Environment.isWebBuild) {\n throw new Error(`Can't create attachment from file when running in the browser. Please pass the raw data (as a Uint8Array) instead.`);\n }\n if (Environment.isNodeBuild) {\n return FFI.dittoNewAttachmentFromFile(dittoHandle.deref(), pathOrData, 'Copy');\n }\n }\n if (pathOrData instanceof Uint8Array) {\n return await FFI.dittoNewAttachmentFromBytes(dittoHandle.deref(), pathOrData);\n }\n throw new Error(`Can't create new attachment, only file path as string or raw data as Uint8Array are supported, but got: ${typeof pathOrData}, ${pathOrData}`);\n })();\n const attachmentTokenJSON = { _id: id, _len: len, _meta: { ...metadata } };\n attachmentTokenJSON[FFI.DittoCRDTTypeKey] = FFI.DittoCRDTType.attachment;\n const attachmentToken = new AttachmentToken(attachmentTokenJSON);\n const attachment = new Attachment(ditto, attachmentToken);\n return Bridge.attachment.bridge(handle, () => attachment);\n });\n }\n /**\n * Trigger an attachment to be downloaded locally to the device and observe\n * its progress as it does so.\n *\n * When you encounter a document that contains an attachment the attachment\n * will not automatically be downloaded along with the document. You trigger\n * an attachment to be downloaded locally to a device by calling this method.\n * It will report events relating to the attachment fetch attempt as it tries\n * to download it. The `eventHandler` block may be called multiple times with\n * progress events. It will then be called with either a `Completed` event or\n * a `Deleted` event. If downloading the attachment succeeds then the\n * `Completed` event that the `eventHandler` will be called with will hold a\n * reference to the downloaded attachment.\n *\n * @param token The {@link AttachmentToken} relevant to the attachment that\n * you wish to download and observe. Throws if token is invalid.\n *\n * @param eventHandler An optional callback that will be called when there is\n * an update to the status of the attachment fetch attempt.\n *\n * @return An `AttachmentFetcher` object, which must be kept alive for the\n * fetch request to proceed and for you to be notified about the attachment's\n * fetch status changes.\n */\n fetchAttachment(token, eventHandler) {\n if (token == null || !(token instanceof AttachmentToken)) {\n throw new Error(`Invalid attachment token: ${token}`);\n }\n const ditto = this.store.ditto;\n return ditto.deferClose(() => {\n return ditto.attachmentFetcherManager.startAttachmentFetcher(token, eventHandler);\n });\n }\n /** @internal */\n constructor(name, store) {\n this.name = name;\n this.store = store;\n }\n /** @internal */\n findByIDCBOR(idCBOR) {\n const documentID = new DocumentID(idCBOR, true, true);\n return new PendingIDSpecificOperation(documentID, this);\n }\n}\n//# sourceMappingURL=collection.js.map","//\n// Copyright © 2023 DittoLive Incorporated. All rights reserved.\n//\n/**\n * Error code and default error message for all Ditto error messages.\n *\n * Keys of this object define _error codes_ with each value containing the\n * accompanying error description that is set as the default error message for\n * errors instantiated with this code.\n *\n * Error codes may start with an error domain and a slash to group categories of\n * errors together.\n */\nexport const ERROR_CODES = {\n /** Internal error for unexpected system states */\n internal: 'An unexpected internal error occured. Please get in touch with Ditto customer service to report this incident.',\n /** Internal error with an unknown error cause **/\n 'internal/unknown-error': 'An unexpected internal error occured. Please get in touch with Ditto customer service to report this incident.',\n //\n // Query errors\n //\n /** Error for invalid DQL query arguments. */\n 'query/arguments-invalid': 'The query arguments were invalid.',\n /** Errors that occur during execution of a query */\n 'query/execution': 'The query could not be executed.',\n /** Error for an invalid DQL query. */\n 'query/invalid': 'The query was invalid.',\n /** Error for a query that uses DQL features not supported in this version or not supported by the currently used API. */\n 'query/unsupported': 'The query contains unsupported features.',\n //\n // Store errors\n //\n /** Error in the storage backend. */\n 'store/backend': 'An error occurred with the storage backend.',\n /** Error for an invalid CRDT. */\n 'store/crdt': 'An error occurred processing a CRDT.',\n /** Error for a document not found. */\n 'store/document-not-found': 'The document with the provided ID could not be found.',\n};\n//# sourceMappingURL=error-codes.js.map","//\n// Copyright © 2023 DittoLive Incorporated. All rights reserved.\n//\nimport { ERROR_CODES } from './error-codes';\nimport { DittoFFIError } from './ffi-error';\n/** @see {@link FFIErrorMapping} */\nconst DEFAULT_STATUS_CODE_MAPPING = {\n // SDK-specific errors\n JsFloatingStoreOperation: ['internal', 'Internal inconsistency, an outstanding store operation was not awaited.'],\n // DQL errors\n DqlQueryCompilation: ['query/invalid'],\n DqlInvalidQueryArgs: ['query/arguments-invalid'],\n DqlUnsupported: ['query/unsupported'],\n StoreQuery: ['query/execution'],\n // Store errors\n StoreDocumentNotFound: ['store/document-not-found'],\n StoreDatabase: ['store/backend'],\n Crdt: ['store/crdt'],\n default: ['internal/unknown-error'],\n};\n/**\n * `DittoError` is a subclass of the default Javascript `Error`. You can\n * identify specific errors programatically using the\n * {@link DittoError.code | code} property.\n *\n * Please reference {@link ERROR_CODES} for a comprehensive list of\n * possible error codes in this SDK version.\n */\nexport class DittoError extends Error {\n // --------------------------------------- Internal ------------------------\n /**\n * @internal\n * @param code string error code, see {@link ERROR_CODES}\n * @param message optional error message that replace's the message for the given error code\n * @param context optional object containing data that can help debug this error\n * @throws {@link DittoError} `internal`: when supplied with an invalid error code\n */\n constructor(code, message, context = {}) {\n if (ERROR_CODES[code] == null) {\n throw new DittoError('internal', `Invalid error code: ${code}`);\n }\n super(`<${code}> ${message || ERROR_CODES[code]}`);\n /**\n * Use the error code to identify a specific error programatically.\n *\n * @see {@link ERROR_CODES} for a comprehensive list of possible\n * error codes in this SDK version.\n */\n this.code = 'internal';\n this.code = code;\n this.context = Object.freeze({ ...context });\n }\n /**\n * Create a {@link DittoError} from a {@link DittoFFIError}.\n *\n * The error message will be set to the optional `messageOverride` parameter\n * if supplied, otherwise it will be taken from the `message` property of the\n * given {@link DittoFFIError}. In any case, the details of the underlying FFI\n * error are made available in the error context of the returned {@link DittoError}.\n *\n * @internal\n * @param code string error code from {@link ERROR_CODES}\n * @param messageOverride optional string that will be used as the error\n * message even if a thread-local error message has been retrieved from the\n * FFI\n * @param context optional object containing data that can help debug this error\n * @returns {@link DittoError}\n */\n static fromFFIError(ffiError, code, messageOverride, context) {\n const message = messageOverride || ffiError.message;\n const errorContext = {\n coreError: ffiError.code,\n coreErrorMessage: ffiError.message,\n ...context,\n };\n return new DittoError(code, message, errorContext);\n }\n}\n/**\n * Wraps the given function to catch any {@link DittoFFIError} and rethrow it as\n * a {@link DittoError}, mapping status codes of the {@link DittoFFIError} to\n * error codes of the {@link DittoError} using the given `statusCodeMapping`.\n *\n * Use either this function or {@link mapFFIErrorsAsync} to wrap all calls into\n * the FFI that can fail.\n *\n * If the given status code mapping contains error messages, they will replace\n * any error message that is returned by the FFI.\n *\n * @internal\n * @param closure function that can throw a {@link DittoFFIError}\n * @param statusCodeMapping optional mapping of status codes of the\n * {@link DittoFFIError} to error codes of the {@link DittoError}\n * @param context optional object containing data that can help debug this error\n * @throws {@link DittoError} when the wrapped function throws a {@link DittoFFIError}\n */\nexport function mapFFIErrors(closure, statusCodeMapping, context) {\n try {\n return closure();\n }\n catch (error) {\n if (error instanceof DittoFFIError) {\n throw translateFFIError(error, statusCodeMapping, context);\n }\n throw error;\n }\n}\n/**\n * Wraps the given async function to catch any {@link DittoFFIError} and rethrow\n * it as a {@link DittoError}, mapping status codes of the {@link DittoFFIError}\n * to error codes of the {@link DittoError} using the given `statusCodeMapping`.\n *\n * Use either this function or {@link mapFFIErrors} to wrap any calls into the\n * FFI that can fail.\n *\n * If the given status code mapping contains error messages, they will replace\n * any error message that is returned by the FFI.\n *\n * @internal\n * @param closure async function that can throw a {@link DittoFFIError}\n * @param statusCodeMapping optional mapping of status codes of the\n * {@link DittoFFIError} to error codes of the {@link DittoError}.\n * @param context optional object containing data that can help debug this error\n * @throws {@link DittoError} when the wrapped function throws a {@link DittoFFIError}\n */\nexport async function mapFFIErrorsAsync(closure, statusCodeMapping, context) {\n try {\n return await closure();\n }\n catch (error) {\n if (error instanceof DittoFFIError) {\n throw translateFFIError(error, statusCodeMapping, context);\n }\n throw error;\n }\n}\nconst translateFFIError = (ffiError, customStatusCodeMapping, context) => {\n var _a;\n // Convert the status code to a string because it may be a negative number,\n // which can't be used as an index into an object.\n const statusCode = ffiError.code.toString();\n let code, message;\n if (customStatusCodeMapping != null && customStatusCodeMapping[statusCode] != null) {\n ;\n [code, message] = customStatusCodeMapping[statusCode];\n }\n else {\n ;\n [code, message] = (_a = DEFAULT_STATUS_CODE_MAPPING[statusCode]) !== null && _a !== void 0 ? _a : DEFAULT_STATUS_CODE_MAPPING.default;\n }\n return DittoError.fromFFIError(ffiError, code, message, context);\n};\n//# sourceMappingURL=error.js.map","//\n// Copyright © 2023 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { Bridge } from './bridge';\nimport { DocumentID } from './document-id';\n/**\n * Represents results returned when executing a DQL query containing a\n * {@link QueryResultItem} for each match.\n *\n * More info, such as metrics, will be provided in the near future.\n */\nexport class QueryResult {\n /**\n * IDs of documents that were mutated _locally_ by a _mutating_ DQL query\n * passed to {@link Store.execute | `execute()`}. Empty array if no documents\n * have been mutated.\n *\n * **Note: Query results received from a {@link StoreObserver} never contain\n * mutated document IDs because a store observer is always registered using a\n * non-mutating `SELECT` query.\n *\n * **Important:** The returned document IDs are not cached, make sure to call\n * this method once and keep the return value for as long as needed.\n *\n * @returns an array of document IDs\n */\n mutatedDocumentIDs() {\n const responseHandle = Bridge.dqlResponse.handleFor(this);\n const affectedCBORIDs = FFI.dqlMutatedDocumentIDs(responseHandle.deref());\n return affectedCBORIDs.map((id) => new DocumentID(id, true));\n }\n // ----------------------------------------------------- Internal ------------\n /** @internal */\n constructor(responsePointer) {\n if (responsePointer == null) {\n throw new Error('Internal inconsistency, failed to initialize query result without a response pointer');\n }\n const results = FFI.dqlResponseResults(responsePointer);\n this.items = results.map((r) => Bridge.dqlResult.bridge(r));\n }\n}\n//# sourceMappingURL=query-result.js.map","//\n// Copyright © 2023 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { Bridge } from './bridge';\nimport { CBOR, documentIDReplacer } from './cbor';\nimport { DittoError, mapFFIErrors } from './error';\nimport { Logger } from './logger';\nimport { QueryResult } from './query-result';\n/**\n * A store observer invokes a given handler whenever results for its query\n * change.\n *\n * The store observer will remain active until it is {@link cancel | cancelled},\n * or the Ditto instance managing the observer has been\n * {@link Ditto.close | closed}.\n *\n * Create a store observer by calling\n * {@link Store.registerObserver | `ditto.store.registerObserver()`}.\n */\nexport class StoreObserver {\n /**\n * Convenience property, returns `true` once the store observer has been\n * cancelled.\n */\n get isCancelled() {\n return this._isCancelled;\n }\n /**\n * Cancels the store observer and unregisters it. No-op if the\n * store observer has already been cancelled.\n */\n cancel() {\n if (this._isCancelled)\n return;\n this._isCancelled = true;\n this.ditto.store.unregisterObserver(this);\n }\n /** @internal */\n constructor(ditto, query, queryArguments, observationHandler) {\n // --------------------------- Private --------------------------------------\n /**\n * `true` when the store observer has been cancelled.\n *\n * We mark the store observer as cancelled here as an optimization to avoid a\n * scan of all store observers in the store whenever the `isCancelled`\n * property is checked.\n */\n this._isCancelled = false;\n this.queryString = query;\n this.queryArguments = queryArguments ? Object.freeze({ ...queryArguments }) : undefined;\n this.ditto = ditto;\n let queryArgumentsCBOR = null;\n if (queryArguments != null) {\n try {\n queryArgumentsCBOR = CBOR.encode(queryArguments, documentIDReplacer);\n }\n catch (error) {\n throw new DittoError('query/arguments-invalid');\n }\n }\n let storeObserverID;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n this.ditto.deferClose(() => {\n const weakThis = new WeakRef(this);\n function wrappedObservationHandler(cCBParams) {\n const strongThis = weakThis.deref();\n if (strongThis == null) {\n Logger.debug(`Ignoring change event received by store observer ${storeObserverID} after it was cancelled`);\n return;\n }\n const response = Bridge.dqlResponse.bridge(cCBParams.query_result, () => new QueryResult(cCBParams.query_result));\n Logger.debug(`Invoking user event handler with new event for store observer ${storeObserverID}`);\n observationHandler(response, () => {\n strongThis.signalNext();\n });\n }\n const errorContext = {\n query,\n queryArguments,\n };\n mapFFIErrors(() => {\n storeObserverID = FFI.tryExperimentalRegisterChangeObserver(dittoHandle.deref(), query, queryArgumentsCBOR, wrappedObservationHandler);\n }, undefined, errorContext);\n });\n if (storeObserverID == null) {\n throw new DittoError('internal', 'Internal inconsistency, store observer ID is undefined after registering');\n }\n this.liveQueryID = storeObserverID;\n }\n /**\n * Signals to Ditto Core that the observer is ready for the next event.\n */\n signalNext() {\n const ditto = this.ditto;\n if (!ditto || ditto.isClosed)\n return;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n const dittoPointer = dittoHandle.derefOrNull();\n if (!dittoPointer)\n return;\n if (this.liveQueryID == null) {\n throw new Error('live query ID is null while signaling ready for next event');\n }\n return ditto.deferCloseAsync(async () => {\n Logger.debug(`Signaling availability for live query ${this.liveQueryID}`);\n await FFI.liveQuerySignalAvailableNext(dittoPointer, this.liveQueryID);\n });\n }\n}\n//# sourceMappingURL=store-observer.js.map","//\n// Copyright (c) 2020 - 2021 DittoLive Inc. All rights reserved.\n//\n// -----------------------------------------------------------------------------\n/**\n * Provides information about the changes that have occurred in relation to an\n * event delivered when observing the collections in a {@link Store}.\n *\n * It contains information about the collections that are known about as well as\n * the collections that were previously known about in the previous event, along\n * with information about what collections have been inserted, deleted, updated,\n * or moved since the last event.\n */\nexport class CollectionsEvent {\n /** @internal */\n static initial(collections) {\n return new CollectionsEvent({\n isInitial: true,\n collections: collections,\n oldCollections: [],\n insertions: [],\n deletions: [],\n updates: [],\n moves: [],\n });\n }\n /** @internal */\n constructor(params) {\n this.isInitial = params.isInitial;\n this.collections = params.collections;\n this.oldCollections = params.oldCollections;\n this.insertions = params.insertions;\n this.deletions = params.deletions;\n this.updates = params.updates;\n this.moves = params.moves;\n }\n}\n//# sourceMappingURL=collections-event.js.map","//\n// Copyright (c) 2020 - 2021 DittoLive Inc. All rights reserved.\n//\nimport { Collection } from './collection';\nimport { PendingCursorOperation } from './pending-cursor-operation';\nimport { CollectionsEvent } from './collections-event';\n// -----------------------------------------------------------------------------\n/**\n * These objects are returned when calling\n * {@link Store.collections | collections()} on {@link Store}.\n *\n * They allow chaining of further collections-related functions. You can either\n * call {@link exec | exec()} on the object to get an array of\n * {@link Collection}s as an immediate return value, or you can establish either\n * a live query or a subscription, which both work over time.\n *\n * A live query, established by calling\n * {@link PendingCollectionsOperation.observeLocal | observeLocal()}, will\n * notify you every time there's a change in the collections that the device\n * knows about.\n *\n * A subscription, established by calling {@link subscribe | subscribe()}, will\n * act as a signal to other peers that the device connects to that you would\n * like to receive updates from them about the collections that they know about.\n */\nexport class PendingCollectionsOperation {\n /**\n * Sort the collections based on a property of the collection.\n *\n * @param propertyPath The property path specifies the logic to be used when\n * sorting the matching collections.\n *\n * @param direction Specify whether you want the sorting order to be\n * `Ascending` or `Descending`.\n *\n * @return A {@link PendingCollectionsOperation} that you can chain further\n * function calls to.\n */\n sort(propertyPath, direction = 'ascending') {\n this.pendingCursorOperation.sort(propertyPath, direction);\n return this;\n }\n /**\n * Offset the resulting set of collections.\n *\n * This is useful if you aren't interested in the first N collections for one\n * reason or another. For example, you might already have obtained the first\n * 20 collections and so you might want to get the next 20 collections, and\n * that is when you would use {@link offset | offset()}.\n *\n * @param offset The number of collections that you want the eventual\n * resulting set of collections to be offset by (and thus not include).\n *\n * @return A {@link PendingCollectionsOperation} that you can chain further\n * function calls to.\n */\n offset(offset) {\n this.pendingCursorOperation.offset(offset);\n return this;\n }\n /**\n * Limit the number of collections that get returned.\n *\n * @param limit The maximum number of collections that will be returned.\n *\n * @return A {@link PendingCollectionsOperation} that you can chain further\n * function calls to.\n */\n limit(limit) {\n this.pendingCursorOperation.limit(limit);\n return this;\n }\n /**\n * Subscribes the device to updates about collections that other devices know\n * about.\n *\n * The returned {@link Subscription} object must be kept in scope for as long\n * as you want to keep receiving updates.\n *\n * @return A {@link Subscription} object that must be kept in scope for as\n * long as you want to keep receiving updates from other devices about the\n * collections that they know about.\n */\n subscribe() {\n return this.pendingCursorOperation.subscribe();\n }\n /**\n * Enables you to listen for changes that occur in relation to the collections\n * that are known about locally.\n *\n * The returned {@link LiveQuery} object must be kept in scope for as long as\n * you want the provided `handler` to be called when an update occurs.\n *\n * This won't subscribe to receive updates from other devices and so it will\n * only fire when a local change to the known about collections occurs. If\n * you want to receive remote updates as well, then create a subscription via\n * {@link PendingCollectionsOperation.subscribe | subscribe()}.\n *\n * @param handler A closure that will be called every time there is an update\n * about the list of known about collections.\n *\n * @return A {@link LiveQuery} object that must be kept in scope for as long\n * as you want to keep receiving updates.\n */\n observeLocal(handler) {\n return this._observe(handler, false);\n }\n /**\n * Enables you to listen for changes that occur in relation to the collections\n * that are known about locally.\n *\n * The returned {@link LiveQuery} object must be kept in scope for as long as\n * you want the provided `handler` to be called when an update occurs.\n *\n * This won't subscribe to receive updates from other devices and so it will\n * only fire when a local change to the known about collections occurs. If\n * you want to receive remote updates as well, then create a subscription via\n * {@link PendingCollectionsOperation.subscribe | subscribe()}.\n *\n * @param handler A closure that will be called every time there is an update\n * about the list of known about collections.\n *\n * @return A {@link LiveQuery} object that must be kept in scope for as long\n * as you want to keep receiving updates.\n */\n observeLocalWithNextSignal(handler) {\n return this._observe(handler, true);\n }\n /**\n * Return the list of collections requested based on the preceding function\n * chaining.\n *\n * @return A list of {@link Collection}s based on the preceding function\n * chaining.\n */\n async exec() {\n const documents = await this.pendingCursorOperation.exec();\n return collectionsFromDocuments(documents, this.store);\n }\n /** @internal */\n constructor(store) {\n this.store = store;\n this.pendingCursorOperation = new PendingCursorOperation('true', null, new Collection('__collections', store));\n }\n /** @internal */\n then(onfulfilled, onrejected) {\n return this.exec().then(onfulfilled, onrejected);\n }\n // ----------------------------------------------------------- Internal ------\n /** @internal */\n _observe(handler, waitForNextSignal) {\n const weakStore = new WeakRef(this.store);\n const collectionsObservationHandler = function (documents, event, nextSignal) {\n const strongStore = weakStore.deref();\n if (!strongStore) {\n return;\n }\n const collections = collectionsFromDocuments(documents, strongStore);\n let collEvent;\n if (event.isInitial === true) {\n collEvent = CollectionsEvent.initial(collections);\n }\n else {\n const oldCollections = collectionsFromDocuments(event.oldDocuments, strongStore);\n collEvent = new CollectionsEvent({\n isInitial: false,\n collections,\n oldCollections,\n insertions: event.insertions,\n deletions: event.deletions,\n updates: event.updates,\n moves: event.moves,\n });\n }\n if (waitForNextSignal) {\n handler(collEvent, nextSignal);\n }\n else {\n handler(collEvent);\n }\n };\n return this.pendingCursorOperation._observe(collectionsObservationHandler, waitForNextSignal);\n }\n}\n/** @private */\nfunction collectionsFromDocuments(documents, store) {\n const collections = [];\n for (const document of documents) {\n const collectionName = document.at('name').value;\n if (collectionName !== undefined && typeof collectionName === 'string') {\n collections.push(new Collection(collectionName, store));\n }\n }\n return collections;\n}\n//# sourceMappingURL=pending-collections-operation.js.map","//\n// Copyright © 2023 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { Bridge } from './bridge';\nimport { DocumentID } from './document-id';\nimport { performAsyncToWorkaroundNonAsyncFFIAPI } from './internal';\nimport { BasePendingCursorOperation } from './base-pending-cursor-operation';\n/**\n * These objects are returned when using `find`-like functionality on\n * {@link Collection}.\n *\n * They allow chaining of further query-related functions to do things like add\n * a limit to the number of documents you want returned or specify how you want\n * the documents to be sorted and ordered.\n *\n * You can call {@link exec | exec()} on the cursor to get an array of\n * {@link Document | documents} or you can use methods for updating, removing\n * or evicting any matching documents.\n *\n * Live queries and subscriptions are only available outside of transactions.\n */\nexport class WriteTransactionPendingCursorOperation extends BasePendingCursorOperation {\n sort(propertyPath, direction = 'ascending') {\n return super.sort(propertyPath, direction);\n }\n offset(offset) {\n return super.offset(offset);\n }\n limit(limit) {\n return super.limit(limit);\n }\n async remove() {\n const ditto = this.collection.store.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferCloseAsync(async () => {\n const query = this.query;\n const transaction = this.collection.writeTransaction;\n const documentsX = await performAsyncToWorkaroundNonAsyncFFIAPI(async () => FFI.collectionRemoveQueryStr(dittoHandle.deref(), this.collection.name, transaction.writeTransactionPointer, query, this.queryArgsCBOR, this.orderBys, this.currentLimit, this.currentOffset));\n const results = documentsX.map((idCBOR) => {\n return new DocumentID(idCBOR, true);\n });\n results.forEach((documentId) => {\n transaction.addResult('removed', documentId, this.collection.name);\n });\n return results;\n });\n }\n async evict() {\n const ditto = this.collection.store.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferCloseAsync(async () => {\n const query = this.query;\n const transaction = this.collection.writeTransaction;\n const documentsX = await performAsyncToWorkaroundNonAsyncFFIAPI(async () => FFI.collectionEvictQueryStr(dittoHandle.deref(), this.collection.name, transaction.writeTransactionPointer, query, this.queryArgsCBOR, this.orderBys, this.currentLimit, this.currentOffset));\n const results = documentsX.map((idCBOR) => {\n return new DocumentID(idCBOR, true);\n });\n results.forEach((documentId) => {\n transaction.addResult('evicted', documentId, this.collection.name);\n });\n return results;\n });\n }\n async update(closure) {\n const transaction = this.collection.writeTransaction;\n const results = await super.updateWithTransaction(closure, transaction.writeTransactionPointer);\n results.keys().forEach((documentId) => {\n transaction.addResult('updated', documentId, this.collection.name);\n });\n return results;\n }\n // ----------------------------------------------------------- Internal ------\n /** @internal */\n constructor(query, queryArgs, collection) {\n super(query, queryArgs, collection);\n }\n}\n//# sourceMappingURL=write-transaction-pending-cursor-operation.js.map","//\n// Copyright © 2023 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { Bridge } from './bridge';\nimport { MutableDocument } from './document';\nimport { performAsyncToWorkaroundNonAsyncFFIAPI } from './internal';\nimport { BasePendingIDSpecificOperation } from './base-pending-id-specific-operation';\nexport class WriteTransactionPendingIDSpecificOperation extends BasePendingIDSpecificOperation {\n async remove() {\n const ditto = this.collection.store.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferCloseAsync(async () => {\n const transaction = this.collection.writeTransaction;\n const result = await performAsyncToWorkaroundNonAsyncFFIAPI(async () => FFI.collectionRemove(dittoHandle.deref(), this.collection.name, transaction.writeTransactionPointer, this.documentIDCBOR));\n transaction.addResult('removed', this.documentID, this.collection.name);\n return result;\n });\n }\n async evict() {\n const ditto = this.collection.store.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferCloseAsync(async () => {\n const transaction = this.collection.writeTransaction;\n const result = await performAsyncToWorkaroundNonAsyncFFIAPI(async () => await FFI.collectionEvict(dittoHandle.deref(), this.collection.name, transaction.writeTransactionPointer, this.documentIDCBOR));\n transaction.addResult('evicted', this.documentID, this.collection.name);\n return result;\n });\n }\n async update(closure) {\n const ditto = this.collection.store.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferCloseAsync(async () => {\n const transaction = this.collection.writeTransaction;\n const readTransactionX = await FFI.readTransaction(dittoHandle.deref());\n const documentX = await FFI.collectionGet(dittoHandle.deref(), this.collection.name, this.documentIDCBOR, readTransactionX);\n FFI.readTransactionFree(readTransactionX);\n if (!documentX)\n throw new Error(`Can't update, document with ID '${this.documentID.toString()}' not found in collection named '${this.collection.name}'`);\n const mutableDocument = Bridge.mutableDocument.bridge(documentX, () => new MutableDocument());\n closure(mutableDocument);\n // Ownership is transferred back to the FFI layer via collectionUpdate(),\n // we therefore need to explicitly unregister the instance.\n Bridge.mutableDocument.unregister(mutableDocument);\n await FFI.collectionUpdate(dittoHandle.deref(), this.collection.name, transaction.writeTransactionPointer, documentX);\n transaction.addResult('updated', this.documentID, this.collection.name);\n return mutableDocument['@ditto.updateResults'].slice();\n });\n }\n // ----------------------------------------------------------- Internal ------\n /** @internal */\n constructor(documentID, collection) {\n super(documentID, collection);\n }\n}\n//# sourceMappingURL=write-transaction-pending-id-specific-operation.js.map","//\n// Copyright © 2023 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { Bridge } from './bridge';\nimport { CBOR } from './cbor';\nimport { desugarJSObject } from './augment';\nimport { DocumentID } from './document-id';\nimport { performAsyncToWorkaroundNonAsyncFFIAPI } from './internal';\nimport { WriteTransactionPendingCursorOperation } from './write-transaction-pending-cursor-operation';\nimport { WriteTransactionPendingIDSpecificOperation } from './write-transaction-pending-id-specific-operation';\n/**\n * Represents a collection of a Ditto store that is used in the context of a\n * write transaction.\n *\n * Supports most of a regular {@link Collection | collection}'s functionality\n * but cannot be subscribed or live queried and can not be used to create\n * attachments.\n *\n * Create a `WriteTransactionCollection` by starting a {@link WriteTransaction}\n * and using its `scoped` method.\n */\nexport class WriteTransactionCollection {\n /**\n * Search for documents in this collection using the provided query string.\n *\n * The returned cursor operation can be used to chain operations on the\n * resulting document set.\n *\n * @param query The query to run against the collection.\n * @param queryArgs These arguments replace placeholders in the provided\n * query.\n */\n find(query, queryArgs) {\n return new WriteTransactionPendingCursorOperation(query, queryArgs !== null && queryArgs !== void 0 ? queryArgs : null, this);\n }\n /**\n * Convenience method, equivalent to calling {@link find | find()} and passing\n * the query `\"true\"`.\n */\n findAll() {\n return this.find('true');\n }\n /**\n * Generates a {@link WriteTransactionPendingIDSpecificOperation} with the\n * provided document ID.\n *\n * The returned object can be used to find and return the document. It can also be used to update, remove or evict the document.\n *\n * @param id The ID of the document to find.\n */\n findByID(id) {\n const documentID = id instanceof DocumentID ? id : new DocumentID(id);\n return new WriteTransactionPendingIDSpecificOperation(documentID, this);\n }\n async upsert(value, options = {}) {\n const ditto = this.store.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferCloseAsync(async () => {\n var _a;\n const writeStrategy = (_a = options.writeStrategy) !== null && _a !== void 0 ? _a : 'merge';\n const documentValueJSON = desugarJSObject(value, true);\n const documentValueCBOR = CBOR.encode(documentValueJSON);\n const idCBOR = await performAsyncToWorkaroundNonAsyncFFIAPI(async () => {\n return await FFI.collectionInsertValue(dittoHandle.deref(), this.name, documentValueCBOR, writeStrategy, this.writeTransaction.writeTransactionPointer);\n });\n const insertedDocumentId = new DocumentID(idCBOR, true);\n this.writeTransaction.addResult('inserted', insertedDocumentId, this.name);\n return new DocumentID(idCBOR, true);\n });\n }\n /**\n * See comment in {@link CollectionInterface.findByIDCBOR()}\n *\n * @internal */\n findByIDCBOR(idCBOR) {\n const documentID = new DocumentID(idCBOR, true, true);\n return new WriteTransactionPendingIDSpecificOperation(documentID, this);\n }\n /**\n * This constructor is marked internal because write transaction collections\n * should be created from a {@link WriteTransaction} instance.\n *\n * @internal */\n constructor(name, store, writeTransaction) {\n this.name = name;\n this.store = store;\n this.writeTransaction = writeTransaction;\n }\n}\n//# sourceMappingURL=write-transaction-collection.js.map","//\n// Copyright © 2023 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { Bridge } from './bridge';\nimport { WriteTransactionCollection } from './write-transaction-collection';\n/**\n * Perform writes in a transaction.\n *\n * Create a write transaction using {@link Store.write | ditto.store.write}.\n */\nexport class WriteTransaction {\n /**\n * Initialise a write transaction given a Ditto instance.\n *\n * This is not implemented as a constructor in order to be able to use FFI\n * async functions. Users start transactions through {@link Store.write}.\n *\n * @param ditto an instance of Ditto\n * @internal\n */\n static async init(ditto) {\n return ditto.deferCloseAsync(async () => {\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n const writeTransactionPointer = await FFI.writeTransaction(dittoHandle.deref());\n return new WriteTransaction(ditto, writeTransactionPointer);\n });\n }\n /**\n * Creates a transaction-specific\n * {@link WriteTransactionCollection | collection} object that will ensure\n * that operations called on it are all in the context of the collection name\n * provided to this function. You can create many\n * {@link WriteTransactionCollection | collection} objects per\n * {@link WriteTransaction} object.\n * */\n scoped(toCollectionNamed) {\n if (typeof toCollectionNamed !== 'string') {\n throw new Error('Collection name must be a string');\n }\n return new WriteTransactionCollection(toCollectionNamed, this.ditto.store, this);\n }\n // ----------------------------------------------------------- Internal ------\n /** @internal */\n async commit() {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferCloseAsync(async () => {\n return FFI.writeTransactionCommit(dittoHandle.deref(), this.writeTransactionPointer);\n });\n }\n /** @internal */\n async rollback() {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferCloseAsync(async () => {\n return FFI.writeTransactionRollback(dittoHandle.deref(), this.writeTransactionPointer);\n });\n }\n /**\n * Adds an entry to the list of results that is returned at the end of a\n * transaction.\n *\n * @internal */\n addResult(type, docID, collectionName) {\n this.results.push({\n type,\n docID,\n collectionName,\n });\n }\n /** @internal */\n constructor(ditto, cTransaction) {\n this.writeTransactionPointer = cTransaction;\n this.ditto = ditto;\n this.results = [];\n }\n}\n//# sourceMappingURL=write-transaction.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { Bridge } from './bridge';\nimport { CBOR, documentIDReplacer } from './cbor';\nimport { Collection } from './collection';\nimport { StoreObserver } from './store-observer';\nimport { DocumentID } from './document-id';\nimport { DittoError, mapFFIErrors, mapFFIErrorsAsync } from './error';\nimport { performAsyncToWorkaroundNonAsyncFFIAPI, step, validateQuery } from './internal';\nimport { Logger } from './logger';\nimport { PendingCollectionsOperation } from './pending-collections-operation';\nimport { QueryResult } from './query-result';\nimport { WriteTransaction } from './write-transaction';\n/**\n * The entrypoint for all actions that relate to data stored by Ditto. Provides\n * access to collections, a write transaction API, and a query hash API.\n *\n * You don't create one directly but can access it from a particular\n * {@link Ditto} instance via its {@link Ditto.store | store} property.\n */\nexport class Store {\n /**\n * Register a handler to be called whenever a query's results change in the\n * local store.\n *\n * Convenience method, same as\n * {@link registerObserverWithSignalNext | registerObserverWithSignalNext()},\n * except that here, the next invocation of the observation handler is\n * triggered automatically instead of having to call the passed in\n * `signalNext` function.\n *\n * @param query a string containing a valid query expressed in DQL.\n * @param observationHandler a function that is called whenever the query's results\n * change. The function is passed a {@link QueryResult} containing a\n * {@link QueryResultItem} for each match.\n * @param queryArguments an object of values keyed by the placeholder name\n * without the leading `:`. Example: `{ \"name\": \"Joanna\" }` for a query like\n * `SELECT * FROM people WHERE name = :name`.\n * @returns a {@link StoreObserver} that can be used to cancel the\n * observation.\n * @throws {@link DittoError} `query/invalid`: if `query` argument is not a\n * string or not valid DQL.\n * @throws {@link DittoError} `query/arguments-invalid`: if `queryArguments`\n * argument is invalid (e.g. contains unsupported types).\n * @throws {@link DittoError} `query/unsupported`: if the query is not a\n * `SELECT` query.\n * @throws {@link DittoError} may throw other errors.\n */\n registerObserver(query, observationHandler, queryArguments) {\n const changeHandlerWithSignalNext = (queryResult, signalNext) => {\n try {\n observationHandler(queryResult);\n }\n finally {\n signalNext();\n }\n };\n return this.registerObserverWithSignalNext(query, changeHandlerWithSignalNext, queryArguments);\n }\n /**\n * Registers and returns a store observer for a query, configuring Ditto to\n * trigger the passed in observation handler whenever documents in the local\n * store change such that the result of the matching query changes. The passed\n * in query must be a `SELECT` query.\n *\n * Here, a function is passed as an additional argument to the observation\n * handler. Call this function as soon as the observation handler is ready to\n * process the the next change event. This allows the observation handler to\n * control how frequently it is called. See\n * {@link registerObserver | registerObserver()} for a convenience method that\n * automatically signals the next invocation.\n *\n * The first invocation of `observationHandler` will always happen after this\n * method has returned.\n *\n * @param query a string containing a valid query expressed in DQL.\n * @param observationHandler an observation handler function that is called\n * whenever the query's results change. The function is passed a\n * {@link QueryResult} containing a {@link QueryResultItem} for each match.\n * @param queryArguments an object of values keyed by the placeholder name\n * without the leading `:`. Example: `{ \"name\": \"Joanna\" }` for a query like\n * `SELECT * FROM people WHERE name = :name`.\n * @returns a {@link StoreObserver} that can be used to cancel the\n * observation.\n * @throws {@link DittoError} `query/invalid`: if `query` argument is not a\n * string or not valid DQL.\n * @throws {@link DittoError} `query/arguments-invalid`: if `queryArguments`\n * argument is invalid (e.g. contains unsupported types).\n * @throws {@link DittoError} `query/unsupported`: if the query is not a\n * `SELECT` query.\n * @throws {@link DittoError} may throw other errors.\n */\n registerObserverWithSignalNext(query, observationHandler, queryArguments) {\n if (typeof query !== 'string') {\n throw new DittoError('query/invalid', `Expected parameter 'query' to be of type 'string', found: ${typeof query}`);\n }\n const storeObserver = new StoreObserver(this.ditto, query, queryArguments !== null && queryArguments !== void 0 ? queryArguments : null, observationHandler);\n // @ts-expect-error modifying readonly property\n this.observers = Object.freeze([...this.observers, storeObserver]);\n // We have two requirements for this step: (1) we want to be able to wait\n // for the call to FFI to finish while closing ditto and (2) we want to\n // return from this function without waiting for the call to FFI to finish.\n // If we would await the call here, we could end up in a situation where\n // the first callback to the event handler is emitted before we return from\n // the method call that started the observer.\n const dittoHandle = Bridge.ditto.handleFor(this.ditto);\n this.ditto.deferCloseAsync(async () => {\n return new Promise((resolve) => {\n step(async () => {\n try {\n // prettier-ignore\n await mapFFIErrorsAsync(async () => await FFI.liveQueryStart(dittoHandle.deref(), storeObserver.liveQueryID));\n }\n catch (error) {\n // As this closure executes after the surrounding method has returned we don't throw\n // the error here. Instead we log the error.\n Logger.error(`Failed to start live query: ${error.message}`);\n }\n resolve();\n });\n });\n });\n return storeObserver;\n }\n /**\n * Returns the collection for the given name. If the collection doesn't\n * exist yet, it will be created automatically as soon as the first\n * entry is inserted.\n * A collection name is valid if:\n * * its length is less than 100\n * * it is not empty\n * * it does not contain the char '\\0'\n * * it does not begin with \"$TS_\"\n */\n collection(name) {\n return new Collection(name, this);\n }\n /**\n * Returns an object that lets you fetch or observe the collections in the\n * store.\n *\n * @return A {@link PendingCollectionsOperation} object that you can use to\n * fetch or observe the collections in the store\n */\n collections() {\n return new PendingCollectionsOperation(this);\n }\n /**\n * Returns the names of all available collections in the store of the\n * related {@link Ditto} instance.\n */\n collectionNames() {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferClose(() => {\n return mapFFIErrors(() => FFI.dittoGetCollectionNames(dittoHandle.deref()));\n });\n }\n /**\n * Executes a DQL query and returns matching items as a query result.\n *\n * @param query a string containing a valid query expressed in DQL.\n * @param queryArguments an object of values keyed by the placeholder name\n * without the leading `:`. Example: `{ \"name\": \"John\" }` for a query like\n * `SELECT * FROM people WHERE name = :name`.\n * @returns a promise for a {@link QueryResult} containing a\n * {@link QueryResultItem} for each match.\n * @throws {@link DittoError} `query/invalid`: if `query` argument is not a\n * string or not valid DQL.\n * @throws {@link DittoError} `query/arguments-invalid`: if `queryArguments`\n * argument is invalid (e.g. contains unsupported types).\n * @throws {@link DittoError} may throw other errors.\n */\n async execute(query, queryArguments) {\n if (typeof query !== 'string') {\n throw new DittoError('query/invalid', `Expected parameter 'query' to be of type 'string', found: ${typeof query}`);\n }\n const dittoHandle = Bridge.ditto.handleFor(this.ditto);\n return this.ditto.deferCloseAsync(async () => {\n // A one-off query execution uses a transaction internally but a\n // transaction API is not implemented yet.\n const writeTransaction = null;\n let queryArgumentsCBOR = null;\n if (queryArguments != null) {\n try {\n queryArgumentsCBOR = CBOR.encode(queryArguments, documentIDReplacer);\n }\n catch (error) {\n throw new DittoError('query/arguments-invalid', `Unable to encode query arguments: ${error.message}`);\n }\n }\n const errorContext = { query, queryArguments };\n // prettier-ignore\n const responsePointer = await mapFFIErrorsAsync(async () => await performAsyncToWorkaroundNonAsyncFFIAPI(() => FFI.tryExperimentalExecQueryStr(dittoHandle.deref(), writeTransaction, query, queryArgumentsCBOR)), undefined, errorContext);\n return Bridge.dqlResponse.bridge(responsePointer, () => new QueryResult(responsePointer));\n });\n }\n /**\n * Initiate a write transaction in a callback.\n *\n * Allows you to group multiple operations together that affect multiple documents, potentially across multiple collections.\n *\n * @param callback is given access to a {@link WriteTransaction | write transaction object} that can be used to perform operations on the store.\n * @returns a list of `WriteTransactionResult`s. There is a result for each operation performed as part of the write transaction.\n */\n async write(callback) {\n // Run caller's callback, rolling back if needed.\n return this.ditto.deferCloseAsync(async () => {\n const transaction = await WriteTransaction.init(this.ditto);\n try {\n await callback(transaction);\n }\n catch (error) {\n await transaction.rollback();\n Logger.warning(`Transaction rolled back due to an error: ${error === null || error === void 0 ? void 0 : error.message}`);\n throw error;\n }\n await transaction.commit();\n return transaction.results;\n });\n }\n // ----------------------------------------------------------- Internal ------\n /** @internal */\n constructor(ditto) {\n /**\n * All currently active store observers.\n *\n * **Note:** Manage store observers using\n * {@link registerObserver | registerObserver()} to register a new store\n * observer and {@link StoreObserver.cancel | StoreObserver.cancel()} to\n * remove an existing store observer.\n */\n this.observers = Object.freeze([]);\n this.ditto = ditto;\n }\n /**\n * Registers a URL to be called whenever the given `SELECT` query observes\n * changes.\n *\n * No validation is performed on the URL, so it is up to the caller to ensure\n * that the URL is valid and can be reached.\n *\n * @internal\n * @returns a promise for a document id that acts as a webhook id\n * @throws {@link DittoError} `store/query-invalid`: if the query is invalid\n * @throws {@link DittoError} `store/query-arguments-invalid`: if the query arguments\n * are invalid\n * @throws {@link DittoError} `store/query-unsupported`: if the query is not a\n * `SELECT` query\n * @throws {@link DittoError} for any other error that occurs during query execution\n */\n async registerObserverWebhook(query, url, queryArguments) {\n let queryArgumentsCBOR = null;\n if (queryArguments != null) {\n try {\n queryArgumentsCBOR = CBOR.encode(queryArguments, documentIDReplacer);\n }\n catch (error) {\n throw new DittoError('query/arguments-invalid', `Invalid query arguments: ${error.message}`);\n }\n }\n const errorContext = { query, queryArguments };\n const dittoHandle = Bridge.ditto.handleFor(this.ditto);\n // prettier-ignore\n return this.ditto.deferCloseAsync(async () => {\n const webhookIDCBOR = await mapFFIErrorsAsync(async () => await FFI.tryExperimentalWebhookRegisterDqlLiveQuery(dittoHandle.deref(), query, queryArgumentsCBOR, url), undefined, errorContext);\n return new DocumentID(webhookIDCBOR, true);\n });\n }\n /**\n * Unregister a store observer. No-op if the change observer has already\n * been removed.\n *\n * This must only be called by the store observer itself.\n *\n * @param changeObserver the store observer to unregister\n * @returns true if the store observer was found and removed, false otherwise\n * @throws {@link DittoError} `internal`: if the store observer does not belong to\n * this store\n * @throws {@link DittoError} `internal`: if the store observer has not been\n * cancelled yet\n * @throws {@link DittoError} `internal`: for any other error that occurs while\n * trying to unregister the store observer\n * @internal\n */\n unregisterObserver(storeObserver) {\n if (storeObserver.ditto !== this.ditto) {\n throw new DittoError('internal', `Internal inconsistency, can't remove store observer that does not belong to this store`);\n }\n if (!storeObserver.isCancelled) {\n throw new DittoError('internal', \"Internal inconsistency, can't remove store observer that has not been cancelled\");\n }\n // Return early if the store observer has already been removed.\n const indexToDelete = this.observers.findIndex((observer) => observer === storeObserver);\n if (indexToDelete === -1) {\n return false;\n }\n const newObservers = [...this.observers];\n newObservers.splice(indexToDelete, 1);\n // @ts-expect-error modifying readonly property\n this.observers = Object.freeze(newObservers);\n const dittoHandle = Bridge.ditto.handleFor(this.ditto);\n this.ditto.deferClose(() => {\n // prettier-ignore\n mapFFIErrors(() => FFI.liveQueryStop(dittoHandle.deref(), storeObserver.liveQueryID));\n });\n return true;\n }\n /** @internal */\n close() {\n for (const observer of this.observers) {\n observer.cancel();\n }\n // NOTE: live query webhook is taken care of by the FFI's\n // `ditto_shutdown()`, no need to unregister it here.\n }\n /**\n * Private method, used only by the Portal https://github.com/getditto/ditto/pull/3652\n * @internal\n */\n async registerLiveQueryWebhook(collectionName, query, url) {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferCloseAsync(async () => {\n const validatedQuery = validateQuery(query);\n const idCBOR = await FFI.liveQueryWebhookRegister(dittoHandle.deref(), collectionName, validatedQuery, [], 0, 0, url);\n return new DocumentID(idCBOR, true);\n });\n }\n}\n//# sourceMappingURL=store.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { Bridge } from './bridge';\nimport { Observer } from './observer';\nimport { ObserverManager } from './observer-manager';\n// -----------------------------------------------------------------------------\n/**\n * Returns a string representation of the given address. Use this function\n * to compare multiple addresses or whenever you need the address to be a key\n * in a hash object.\n */\nexport function addressToString(address) {\n return `${address.siteId}-${address.pubkey}`;\n}\n// -----------------------------------------------------------------------------\n/**\n * The entrypoint for all actions that relate presence of other peers known by\n * the current peer, either directly or through other peers.\n *\n * You don't create one directly but can access it from a particular `Ditto`\n * instance via its `presence` property.\n */\nexport class Presence {\n /**\n * Returns the current presence graph capturing all known peers and\n * connections between them.\n */\n get graph() {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferClose(() => {\n const graphJSONString = FFI.dittoPresenceV3(dittoHandle.deref());\n return JSON.parse(graphJSONString);\n });\n }\n /**\n * Request information about Ditto peers in range of this device.\n *\n * This method returns an observer which should be held as long as updates are\n * required. A newly registered observer will have a peers update delivered to\n * it immediately. From then on it will be invoked repeatedly when Ditto\n * devices come and go, or the active connections to them change.\n */\n observe(didChangeHandler) {\n const observerToken = this.observerManager.addObserver(didChangeHandler);\n const observer = new Observer(this.observerManager, observerToken, { stopsWhenFinalized: true });\n // REFACTOR: make the initial callback call async, too (othewise we'd be\n // mixing sync with async, which is a bit problematic in general but might\n // be OK with single-threaded JS). This is a bit tricky, simply\n // setTimeout(..., 0) here could lead us to a situation where the initial\n // call would be sent AFTER the regular notification.\n didChangeHandler(this.graph);\n return observer;\n }\n /** @internal */\n constructor(ditto) {\n this.ditto = ditto;\n this.observerManager = new ObserverManager('PresenceObservation', {\n keepAlive: ditto.keepAlive,\n register: (callback) => {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n ditto.deferClose(() => {\n FFI.dittoRegisterPresenceV3Callback(dittoHandle.deref(), callback);\n });\n },\n unregister: () => {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n ditto.deferClose(() => {\n FFI.dittoClearPresenceV3Callback(dittoHandle.deref());\n });\n },\n process: (presenceGraphJSONString) => {\n const presenceGraph = JSON.parse(presenceGraphJSONString);\n return [presenceGraph];\n },\n });\n }\n /** @internal */\n close() {\n this.observerManager.close();\n }\n}\n//# sourceMappingURL=presence.js.map","//\n// Copyright © 2023 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { Bridge } from './bridge';\nimport { step } from './internal';\n/** @internal */\nexport class LiveQueryManager {\n /** @internal */\n constructor(ditto, keepAlive) {\n this.finalizationRegistry = new FinalizationRegistry(this.finalize);\n this.ditto = ditto;\n this.keepAlive = keepAlive;\n this.liveQueriesByID = {};\n }\n /** @internal */\n startLiveQuery(liveQuery) {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n // REFACTOR: the starting closure runs detached from here which is a smell.\n // Can we make this whole starting mechanism non-async? The culprit is\n // the workaround for a zalgo with `ditto_live_query_start()` FFI function:\n // It immediately triggers the live query handler making it run \"in-line\"\n // when creating a live query, while subsequent invocations are async\n // (by definition). This is a classic zalgo case. Fix by making\n // `ditto_live_query_start()` trigger the first live query callback `async`,\n // just like the subsequent ones.\n ditto.deferCloseAsync(async () => {\n const liveQueryID = liveQuery.liveQueryID;\n if (!liveQueryID) {\n throw new Error(\"Internal inconsistency, tried to add a live query that doesn't have a live query ID (probably stopped).\");\n }\n const existingLiveQuery = this.liveQueriesByID[liveQueryID];\n if (existingLiveQuery) {\n throw new Error('Internal inconsistency, tried to add a live query with an ID that has already been added.');\n }\n const weakLiveQuery = new WeakRef(liveQuery);\n this.liveQueriesByID[liveQueryID] = weakLiveQuery;\n this.finalizationRegistry.register(liveQuery, liveQueryID, this.finalize);\n liveQuery.liveQueryManager = this;\n ditto.keepAlive.retain(`LiveQuery.${liveQueryID}`);\n return new Promise((resolve, reject) => {\n // not awaited on purpose; let the invocation of the initial observation\n // happen in a \"fire-and-forget\" / detached / escaping fashion, to be\n // consistent with the subsequent invocations.\n step(async () => {\n await FFI.liveQueryStart(dittoHandle.deref(), liveQueryID);\n // @ts-ignore\n resolve();\n });\n });\n });\n }\n /** @internal */\n stopLiveQuery(liveQuery) {\n this.finalizationRegistry.unregister(liveQuery);\n const liveQueryID = liveQuery.liveQueryID;\n if (!liveQueryID) {\n throw new Error(\"Internal inconsistency, tried to remove a live query that doesn't have a live query ID (probably stopped).\");\n }\n liveQuery.liveQueryManager = null;\n this.stopLiveQueryWithID(liveQueryID);\n }\n /** @internal */\n close() {\n for (const liveQueryID in this.liveQueriesByID) {\n const weakLiveQuery = this.liveQueriesByID[liveQueryID];\n const liveQuery = weakLiveQuery.deref();\n if (liveQuery) {\n this.stopLiveQuery(liveQuery);\n }\n }\n }\n stopLiveQueryWithID(liveQueryID) {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n ditto.deferClose(() => {\n FFI.liveQueryStop(dittoHandle.deref(), liveQueryID);\n this.keepAlive.release(`LiveQuery.${liveQueryID}`);\n delete this.liveQueriesByID[liveQueryID];\n });\n }\n finalize(liveQueryID) {\n this.stopLiveQueryWithID(liveQueryID);\n }\n}\n//# sourceMappingURL=live-query-manager.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { Bridge } from './bridge';\nimport { generateEphemeralToken } from './internal';\n/**\n * @internal\n * @deprecated Replaced by `Presence`.\n */\nexport class PresenceManager {\n constructor(ditto) {\n this.ditto = ditto;\n this.isClosed = false;\n this.isRegistered = false;\n this.currentRemotePeers = [];\n this.callbacksByPresenceToken = {};\n }\n /** @internal */\n addObserver(callback) {\n if (this.isClosed) {\n // REFACTOR: throw a catchable error here, such that calling code\n // can be more specific when forwarding it to the user.\n throw new Error(`Internal inconsistency, can't add presence observer, observer mananger close()-ed.`);\n }\n this.registerIfNeeded();\n const token = generateEphemeralToken();\n this.callbacksByPresenceToken[token] = callback;\n this.ditto.keepAlive.retain(`PresenceObservation.${token}`);\n // REFACTOR: make the initial callback call async, too (othewise we'd be\n // mixing sync with async, which is a bit problematic in general but might\n // be OK with single-threaded JS). This is a bit tricky, simply\n // setTimeout(..., 0) here could lead us to a situation where the initial\n // call would be sent AFTER the regular notification.\n callback(this.currentRemotePeers);\n return token;\n }\n /** @internal */\n removeObserver(token) {\n const callback = this.callbacksByPresenceToken[token];\n if (typeof callback === 'undefined') {\n throw new Error(`Can't remove presence observer, token '${token}' has never been registered before.`);\n }\n if (callback === null) {\n // Observer has already been removed, no-op.\n return;\n }\n if (typeof this.callbacksByPresenceToken[token] != 'undefined') {\n this.ditto.keepAlive.release(`PresenceObservation.${token}`);\n // REFACTOR: not deleting the token here will keep eating up\n // memory over long periods of time. We actually need to track\n // the observer objects themselves and remove it from the table\n // as soon as the observer object is garbage collected.\n this.callbacksByPresenceToken[token] = null;\n this.unregisterIfNeeded();\n }\n }\n /** @internal */\n hasObserver(token) {\n return typeof this.callbacksByPresenceToken[token] != 'undefined';\n }\n /** @internal */\n close() {\n this.isClosed = true;\n for (const token in this.callbacksByPresenceToken) {\n this.removeObserver(token);\n }\n }\n hasObservers() {\n return Object.keys(this.callbacksByPresenceToken).length > 0;\n }\n registerIfNeeded() {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(this.ditto);\n ditto.deferClose(() => {\n const needsToRegister = !this.isRegistered;\n if (needsToRegister) {\n this.isRegistered = true;\n const remotePeersJSONString = FFI.dittoPresenceV1(dittoHandle.deref());\n this.currentRemotePeers = this.decode(remotePeersJSONString).sort(this.compareRemotePeers);\n FFI.dittoRegisterPresenceV1Callback(dittoHandle.deref(), this.handlePresenceV1Callback.bind(this));\n }\n });\n }\n unregisterIfNeeded() {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n ditto.deferClose(() => {\n const needsToUnregister = !this.hasObservers() && this.isRegistered;\n if (needsToUnregister) {\n this.isRegistered = false;\n FFI.dittoClearPresenceCallback(dittoHandle.deref());\n this.currentRemotePeers = [];\n }\n });\n }\n handlePresenceV1Callback(remotePeersJSONString) {\n const remotePeers = this.decode(remotePeersJSONString).sort(this.compareRemotePeers);\n this.currentRemotePeers = remotePeers;\n this.notify();\n }\n notify() {\n if (this.isClosed) {\n // NOTE: we don't notify observers after closing.\n return;\n }\n for (const token in this.callbacksByPresenceToken) {\n const callback = this.callbacksByPresenceToken[token];\n if (callback)\n callback(this.currentRemotePeers);\n }\n }\n decode(remotePeersJSONString) {\n const remotePeersJSON = JSON.parse(remotePeersJSONString);\n return remotePeersJSON.map((remotePeerJSON) => {\n var _a, _b;\n return {\n networkID: remotePeerJSON['network_id'],\n deviceName: remotePeerJSON['device_name'],\n rssi: (_a = remotePeerJSON['rssi']) !== null && _a !== void 0 ? _a : undefined,\n approximateDistanceInMeters: (_b = remotePeerJSON['approximate_distance_in_meters']) !== null && _b !== void 0 ? _b : undefined,\n connections: remotePeerJSON['connections'],\n };\n });\n }\n compareRemotePeers(left, right) {\n // NOTE: we use the exact same sort order here as in the ObjC version.\n if (left.connections.length === 0 && right.connections.length > 0)\n return +1;\n if (left.connections.length > 0 && right.connections.length === 0)\n return -1;\n if (left.deviceName < right.deviceName)\n return -1;\n if (left.deviceName > right.deviceName)\n return +1;\n return 0;\n }\n}\n//# sourceMappingURL=presence-manager.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { Bridge } from './bridge';\nimport { ObserverManager } from './observer-manager';\n/** @internal */\nexport class TransportConditionsManager extends ObserverManager {\n constructor(ditto) {\n const keepAlive = ditto.keepAlive;\n super('TransportConditionsObservation', { keepAlive });\n this.ditto = ditto;\n }\n register(callback) {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferClose(() => {\n return FFI.dittoRegisterTransportConditionChangedCallback(dittoHandle.deref(), callback);\n });\n }\n unregister() {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferClose(() => {\n return FFI.dittoRegisterTransportConditionChangedCallback(dittoHandle.deref(), null);\n });\n }\n process(conditionSource, transportCondition) {\n /* eslint-disable */\n let apiConditionSource;\n switch (conditionSource) {\n case 'Bluetooth':\n apiConditionSource = 'BLE';\n break;\n case 'Tcp':\n apiConditionSource = 'TCP';\n break;\n case 'Awdl':\n apiConditionSource = 'AWDL';\n break;\n case 'Mdns':\n apiConditionSource = 'MDNS';\n break;\n }\n /* eslint-enable */\n /* eslint-disable */\n let apiTransportCondition;\n switch (transportCondition) {\n case 'Unknown':\n apiTransportCondition = 'Unknown';\n break;\n case 'Ok':\n apiTransportCondition = 'OK';\n break;\n case 'GenericFailure':\n apiTransportCondition = 'GenericFailure';\n break;\n case 'AppInBackground':\n apiTransportCondition = 'AppInBackground';\n break;\n case 'MdnsFailure':\n apiTransportCondition = 'MDNSFailure';\n break;\n case 'TcpListenFailure':\n apiTransportCondition = 'TCPListenFailure';\n break;\n case 'NoBleCentralPermission':\n apiTransportCondition = 'NoBLECentralPermission';\n break;\n case 'NoBlePeripheralPermission':\n apiTransportCondition = 'NoBLEPeripheralPermission';\n break;\n case 'CannotEstablishConnection':\n apiTransportCondition = 'CannotEstablishConnection';\n break;\n case 'BleDisabled':\n apiTransportCondition = 'BLEDisabled';\n break;\n case 'NoBleHardware':\n apiTransportCondition = 'NoBLEHardware';\n break;\n case 'WifiDisabled':\n apiTransportCondition = 'WiFiDisabled';\n break;\n case 'TemporarilyUnavailable':\n apiTransportCondition = 'TemporarilyUnavailable';\n break;\n }\n /* eslint-enable */\n return [apiTransportCondition, apiConditionSource];\n }\n}\n//# sourceMappingURL=transport-conditions-manager.js.map","//\n// Copyright © 2023 DittoLive Incorporated. All rights reserved.\n//\nimport { DittoError } from './error';\n/**\n * A sync subscription configures Ditto to receive updates from remote peers\n * about documents matching the subscription's query.\n *\n * The sync subscription will remain active until it is\n * {@link SyncSubscription.cancel | cancelled}, or the Ditto instance managing\n * the subscription has been {@link Ditto.close | closed}.\n *\n * Create a sync subscription by calling\n * {@link Sync.registerSubscription | `ditto.sync.registerSubscription()`}.\n */\nexport class SyncSubscription {\n /**\n * `true` when the sync subscription has been cancelled or the {@link Ditto}\n * instance managing this subscription has been closed.\n */\n get isCancelled() {\n return this._isCancelled;\n }\n /**\n * Cancels the sync subscription and unregisters it. No-op\n * if the sync subscription has already been cancelled or the {@link Ditto}\n * instance managing this subscription has been closed.\n */\n cancel() {\n if (this._isCancelled)\n return;\n this._isCancelled = true;\n this.ditto.sync.unregisterSubscription(this);\n }\n // --------------------------- Internal --------------------------------------\n /** @internal */\n constructor(ditto, query, queryArguments, queryArgumentsCBOR) {\n // --------------------------- Private --------------------------------------\n /**\n * `true` when the ssync ubscription has been cancelled.\n *\n * We mark the sync subscription as cancelled here as an optimization to avoid\n * a scan of all subscriptions in the store whenever the `isCancelled`\n * property is checked.\n */\n this._isCancelled = false;\n if ((queryArguments == null) !== (queryArgumentsCBOR == null)) {\n throw new DittoError('internal', 'Internal inconsistency, query arguments and query arguments CBOR must be both null or both non-null', { queryArguments, queryArgumentsCBOR });\n }\n this.ditto = ditto;\n this.queryString = query;\n this.queryArguments = queryArguments ? Object.freeze({ ...queryArguments }) : undefined;\n this.queryArgumentsCBOR = queryArgumentsCBOR;\n }\n}\n//# sourceMappingURL=sync-subscription.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport * as Environment from './@environment';\nimport { Bridge } from './bridge';\nimport { CBOR, documentIDReplacer } from './cbor';\nimport { defaultDittoCloudURL } from './internal';\nimport { SyncSubscription } from './sync-subscription';\nimport { TransportConfig } from './transport-config';\nimport { DittoError, mapFFIErrors } from './error';\n/**\n * Provides access to sync related functionality of Ditto.\n *\n * Access this object via {@link Ditto.sync | Ditto.sync} on any Ditto instance.\n */\nexport class Sync {\n /**\n * Installs and returns a sync subscription for a query, configuring Ditto to\n * receive updates from other peers for documents matching that query. The\n * passed in query must be a `SELECT` query, otherwise an error is thrown.\n *\n * @param query a string containing a valid query expressed in DQL.\n * @param queryArguments an object containing the arguments for the query.\n * Example: `{mileage: 123}` for a query with `:mileage` placeholder.\n * @returns An active `SyncSubscription` for the passed in query and\n * arguments. It will remain active until it is\n * {@link SyncSubscription.cancel | cancelled} or the {@link Ditto} instance\n * managing the sync subscription has been closed.\n * @throws {@link DittoError} `query/invalid`: if `query` argument is not a\n * string or not valid DQL.\n * @throws {@link DittoError} `query/arguments-invalid`: if `queryArguments`\n * argument is invalid (e.g. contains unsupported types).\n * @throws {@link DittoError} `query/unsupported`: if the query is not a\n * `SELECT` query.\n * @throws {@link DittoError} may throw other errors.\n */\n registerSubscription(query, queryArguments) {\n if (typeof query !== 'string') {\n throw new DittoError('query/invalid', `Expected parameter 'query' to be of type 'string', found: ${typeof query}`);\n }\n let queryArgumentsCBOR = null;\n if (queryArguments != null) {\n try {\n queryArgumentsCBOR = CBOR.encode(queryArguments, documentIDReplacer);\n }\n catch (error) {\n throw new DittoError('query/arguments-invalid', `Unable to encode query arguments: ${error.message}`);\n }\n }\n const errorContext = { query, queryArguments };\n const dittoHandle = Bridge.ditto.handleFor(this.ditto);\n this.ditto.deferClose(() => {\n mapFFIErrors(() => FFI.tryExperimentalAddDQLSubscription(dittoHandle.deref(), query, queryArgumentsCBOR), undefined, errorContext);\n });\n const subscription = new SyncSubscription(this.ditto, query, queryArguments || null, queryArgumentsCBOR);\n // @ts-expect-error modifying readonly property\n this.subscriptions = Object.freeze([...this.subscriptions, subscription]);\n return subscription;\n }\n // ---------------------------------------------------------- Internal ------\n /** @internal */\n get parameters() {\n return this.state.underlyingSyncParameters;\n }\n /** @internal */\n constructor(ditto) {\n /**\n * All currently active sync subscriptions.\n *\n * **Note:** Manage sync subscriptions using\n * {@link registerSubscription | registerSubscription()} to register a new\n * sync subscription and\n * {@link SyncSubscription.cancel | SyncSubscription.cancel()} to remove an\n * existing sync subscription.\n */\n this.subscriptions = Object.freeze([]);\n this.bluetoothLETransportPointer = null;\n this.awdlTransportPointer = null;\n this.lanTransportPointer = null;\n this.mdnsClientTransportPointer = null;\n this.mdnsServerAdvertiserPointer = null;\n const identity = ditto.identity;\n const transportConfig = new TransportConfig();\n const parameters = { identity, transportConfig, ditto, isWebValid: false, isX509Valid: false, isSyncActive: false };\n this.ditto = ditto;\n this.state = stateFrom(parameters);\n FFI.transportsInit();\n }\n /**\n * Removes the passed in `syncSubscription`, configuring Ditto to not receive\n * updates for documents matching the corresponding query anymore. No-op if\n * the passed in `syncSubscription` has already been removed.\n *\n * This must only be called by the sync subscription itself.\n *\n * @param syncSubscription the sync subscription to remove\n * @returns `true` if the passed in sync subscription could be found and has\n * been removed, otherwise returns `false`.\n * @throws {@link DittoError} `internal`: if the replication subscription does not\n * belong to this store\n * @throws {@link DittoError} `internal`: if the replication subscription has not\n * been cancelled yet\n * @internal\n */\n unregisterSubscription(syncSubscription) {\n if (syncSubscription.ditto !== this.ditto) {\n throw new DittoError('internal', `Can't remove replication subscription that does not belong to this store`);\n }\n if (!syncSubscription.isCancelled) {\n throw new DittoError('internal', \"Internal inconsistency, can't remove replication subscription that has not been cancelled\");\n }\n const indexToDelete = this.subscriptions.findIndex((s) => s === syncSubscription);\n if (indexToDelete === -1) {\n return false;\n }\n const newSyncSubscriptions = [...this.subscriptions];\n newSyncSubscriptions.splice(indexToDelete, 1);\n // @ts-expect-error modifying readonly property\n this.subscriptions = Object.freeze(newSyncSubscriptions);\n const dittoHandle = Bridge.ditto.handleFor(this.ditto);\n this.ditto.deferClose(() => {\n // prettier-ignore\n mapFFIErrors(() => FFI.tryExperimentalRemoveDQLSubscription(dittoHandle.deref(), syncSubscription.queryString, syncSubscription.queryArgumentsCBOR));\n });\n return true;\n }\n /** @internal */\n update(parameters) {\n // NOTE: updating is a two-step process. Given all parameters, we\n // first compute the final \"state\" we want the transports stuff to\n // be in via the `stateFrom()` function. We then take that \"desired\" state\n // and feed it into the various update methods, which essentially perform\n // a diff on the state before and after, and update the low-level transports\n // machinery accordingly.\n const stateOld = this.state;\n const stateNew = stateFrom(parameters);\n this.updatePeerToPeerBluetoothLE(stateOld, stateNew);\n this.updatePeerToPeerAWDL(stateOld, stateNew);\n this.updatePeerToPeerLAN(stateOld, stateNew);\n this.updateListenTCP(stateOld, stateNew);\n this.updateListenHTTP(stateOld, stateNew);\n this.updateConnectTCPServers(stateOld, stateNew);\n this.updateConnectWebsocketURLs(stateOld, stateNew);\n this.updateGlobal(stateOld, stateNew);\n this.updateConnectRetryInterval(stateOld, stateNew);\n this.state = stateNew;\n }\n /** @internal */\n close() {\n if (this.parameters.isSyncActive) {\n throw new Error(`Internal inconsistency, can't close sync object while sync is active, please 'stopSync()' first.`);\n }\n for (const subscription of this.subscriptions) {\n subscription.cancel();\n }\n // Nothing to do, when sync is stopped, this object should be\n // already be cleaned up properly.\n }\n updatePeerToPeerBluetoothLE(stateOld, stateNew) {\n // Updating BLE transport is a no-op outside of Node.js & React Native.\n if (!Environment.isNodeBuild && !Environment.isReactNativeBuild)\n return;\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n ditto.deferClose(() => {\n const bluetoothLEOld = stateOld.effectiveTransportConfig.peerToPeer.bluetoothLE;\n const bluetoothLENew = stateNew.effectiveTransportConfig.peerToPeer.bluetoothLE;\n const shouldStart = !bluetoothLEOld.isEnabled && bluetoothLENew.isEnabled;\n const shouldStop = bluetoothLEOld.isEnabled && !bluetoothLENew.isEnabled;\n if (shouldStart && this.bluetoothLETransportPointer)\n throw new Error(`Internal inconsistency, when starting BLE transport, no BLE transport pointer should exist.`);\n if (shouldStop && !this.bluetoothLETransportPointer)\n throw new Error(`Internal inconsistency, when stopping BLE transport, a BLE transport pointer should exist.`);\n // HACK: quick & dirty Linux & Windows hack. A proper implementation\n // should encapsulate everything behind the transports module. To undo,\n // remove the whole if block.\n if (process.platform === 'linux' || process.platform === 'win32') {\n if (shouldStart) {\n const clientTransport = FFI.dittoAddInternalBLEClientTransport(dittoHandle.deref());\n const serverTransport = FFI.dittoAddInternalBLEServerTransport(dittoHandle.deref());\n const blePlatform = { clientTransport, serverTransport };\n this.bluetoothLETransportPointer = blePlatform;\n }\n if (shouldStop) {\n const blePlatform = this.bluetoothLETransportPointer;\n const { clientTransport, serverTransport } = blePlatform;\n FFI.bleServerFreeHandle(serverTransport);\n FFI.bleClientFreeHandle(clientTransport);\n this.bluetoothLETransportPointer = null;\n }\n return;\n }\n if (shouldStart) {\n this.bluetoothLETransportPointer = FFI.transportsBLECreate(dittoHandle.deref());\n }\n if (shouldStop) {\n // null check is performed above\n FFI.transportsBLEDestroy(this.bluetoothLETransportPointer);\n this.bluetoothLETransportPointer = null;\n }\n });\n }\n updatePeerToPeerAWDL(stateOld, stateNew) {\n // Updating AWDL transport is a no-op outside of Node.js & React Native.\n if (!Environment.isNodeBuild && !Environment.isReactNativeBuild)\n return;\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n ditto.deferClose(() => {\n const awdlOld = stateOld.effectiveTransportConfig.peerToPeer.awdl;\n const awdlNew = stateNew.effectiveTransportConfig.peerToPeer.awdl;\n const shouldStart = !awdlOld.isEnabled && awdlNew.isEnabled;\n const shouldStop = awdlOld.isEnabled && !awdlNew.isEnabled;\n if (shouldStart && this.awdlTransportPointer)\n throw new Error(`Internal inconsistency, when starting AWDL transport, no AWDL transport pointer should exist.`);\n if (shouldStop && !this.awdlTransportPointer)\n throw new Error(`Internal inconsistency, when stopping AWDL transport, an AWDL transport pointer should exist.`);\n if (shouldStart) {\n this.awdlTransportPointer = FFI.transportsAWDLCreate(dittoHandle.deref());\n }\n if (shouldStop) {\n // null check is performed above\n FFI.transportsAWDLDestroy(this.awdlTransportPointer);\n this.awdlTransportPointer = null;\n }\n });\n }\n updatePeerToPeerLAN(stateOld, stateNew) {\n // Updating LAN transport currently only works with Node.js & React Native.\n if (!Environment.isNodeBuild && !Environment.isReactNativeBuild)\n return;\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n ditto.deferClose(() => {\n const lanOld = stateOld.effectiveTransportConfig.peerToPeer.lan;\n const lanNew = stateNew.effectiveTransportConfig.peerToPeer.lan;\n // HACK: quick & dirty Linux & Windows hack. A proper implementation\n // should encapsulate everything behind the transports module. To undo,\n // remove the whole if block.\n if (process.platform === 'win32' || process.platform === 'linux') {\n if (lanOld.isEnabled) {\n if (lanOld.isMdnsEnabled) {\n if (this.mdnsClientTransportPointer == null)\n throw new Error(`Internal inconsistency, when stopping LAN transport, a LAN transport pointer should exist.`);\n FFI.mdnsClientFreeHandle(this.mdnsClientTransportPointer);\n this.mdnsClientTransportPointer = null;\n if (this.mdnsServerAdvertiserPointer == null)\n throw new Error(`Internal inconsistency, when stopping LAN transport, a LAN transport pointer should exist.`);\n FFI.mdnsServerFreeHandle(this.mdnsServerAdvertiserPointer);\n this.mdnsServerAdvertiserPointer = null;\n }\n if (lanOld.isMulticastEnabled) {\n FFI.dittoRemoveMulticastTransport(dittoHandle.deref());\n }\n }\n if (lanNew.isEnabled) {\n if (lanNew.isMdnsEnabled) {\n this.mdnsClientTransportPointer = FFI.dittoAddInternalMdnsTransport(dittoHandle.deref());\n this.mdnsServerAdvertiserPointer = FFI.dittoAddInternalMdnsAdvertiser(dittoHandle.deref());\n }\n if (lanNew.isMulticastEnabled) {\n FFI.dittoAddMulticastTransport(dittoHandle.deref());\n }\n }\n return;\n }\n // IDEA: move the logic for this dance into stateFrom() signal\n // via some additional state signaling the actions here.\n if (lanOld.isEnabled) {\n if (lanOld.isMdnsEnabled) {\n if (this.lanTransportPointer == null)\n throw new Error(`Internal inconsistency, when stopping LAN transport, a LAN transport pointer should exist.`);\n FFI.transportsLANDestroy(this.lanTransportPointer);\n this.lanTransportPointer = null;\n }\n if (lanOld.isMulticastEnabled) {\n FFI.dittoRemoveMulticastTransport(dittoHandle.deref());\n }\n }\n if (lanNew.isEnabled) {\n if (lanNew.isMdnsEnabled) {\n if (this.lanTransportPointer != null)\n throw new Error(`Internal inconsistency, when starting LAN transport, no LAN transport pointer should exist.`);\n this.lanTransportPointer = FFI.transportsLANCreate(dittoHandle.deref());\n }\n if (lanNew.isMulticastEnabled) {\n FFI.dittoAddMulticastTransport(dittoHandle.deref());\n }\n }\n });\n }\n updateListenTCP(stateOld, stateNew) {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n ditto.deferClose(() => {\n const tcpOld = stateOld.effectiveTransportConfig.listen.tcp;\n const tcpNew = stateNew.effectiveTransportConfig.listen.tcp;\n if (TransportConfig.areListenTCPsEqual(tcpNew, tcpOld))\n return;\n if (tcpOld.isEnabled)\n FFI.dittoStopTCPServer(dittoHandle.deref());\n if (tcpNew.isEnabled)\n FFI.dittoStartTCPServer(dittoHandle.deref(), `${tcpNew.interfaceIP}:${tcpNew.port}`);\n });\n }\n updateListenHTTP(stateOld, stateNew) {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n ditto.deferClose(() => {\n const httpOld = stateOld.effectiveTransportConfig.listen.http;\n const httpNew = stateNew.effectiveTransportConfig.listen.http;\n if (TransportConfig.areListenHTTPsEqual(httpOld, httpNew))\n return;\n if (httpOld.isEnabled)\n FFI.dittoStopHTTPServer(dittoHandle.deref());\n /* eslint-disable */\n if (httpNew.isEnabled) {\n FFI.dittoStartHTTPServer(dittoHandle.deref(), `${httpNew.interfaceIP}:${httpNew.port}`, httpNew.staticContentPath || null, httpNew.websocketSync ? 'Enabled' : 'Disabled', httpNew.tlsCertificatePath || null, httpNew.tlsKeyPath || null);\n }\n /* eslint-enable */\n });\n }\n updateConnectTCPServers(stateOld, stateNew) {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n ditto.deferClose(() => {\n const tcpServers = stateNew.effectiveTransportConfig.connect.tcpServers;\n FFI.dittoSetStaticTCPClients(dittoHandle.deref(), tcpServers);\n });\n }\n updateConnectWebsocketURLs(stateOld, stateNew) {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n ditto.deferClose(() => {\n const websocketURLs = stateNew.effectiveTransportConfig.connect.websocketURLs;\n const routingHint = stateNew.effectiveTransportConfig.global.routingHint;\n FFI.dittoSetStaticWebsocketClients(dittoHandle.deref(), websocketURLs, routingHint);\n });\n }\n updateGlobal(stateOld, stateNew) {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n ditto.deferClose(() => {\n if (stateOld.effectiveTransportConfig.global.syncGroup !== stateNew.effectiveTransportConfig.global.syncGroup) {\n FFI.dittoSetSyncGroup(dittoHandle.deref(), stateNew.effectiveTransportConfig.global.syncGroup);\n }\n });\n }\n updateConnectRetryInterval(stateOld, stateNew) {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n ditto.deferClose(() => {\n FFI.dittoSetConnectRetryInterval(dittoHandle.deref(), stateNew.effectiveTransportConfig.connect.retryInterval);\n });\n }\n}\n/**\n * Computes the effective transport config given a desired transport config and\n * some additional state.\n *\n * Disables all transports that are unavailable due to the runtime environment\n * or authentication requirements. Adds websocket URL for Ditto Cloud if\n * enabled.\n *\n * Throws if the target transport config enables sync but contains transports\n * that are not available in the current environment. Does not throw when\n * transports are enabled but not available due to authentication requirements.\n *\n * @private\n */\nfunction stateFrom(parameters) {\n // IMPORTANT: this function maps a set of sync parameters to an effective\n // transport config plus some extra state where need be. Make sure\n // to keep this function free of side-effects.\n var _a, _b;\n const identity = parameters.identity;\n const isSyncActive = parameters.isSyncActive;\n const isX509Valid = parameters.isX509Valid;\n const isWebValid = parameters.isWebValid;\n let appID;\n let customDittoCloudURL;\n let isDittoCloudSyncEnabled = false;\n if (identity.type === 'onlinePlayground' || identity.type === 'onlineWithAuthentication') {\n // NOTE: enableDittoCloudSync is true by default for any online identity.\n appID = identity.appID;\n customDittoCloudURL = (_a = identity.customDittoCloudURL) !== null && _a !== void 0 ? _a : null;\n isDittoCloudSyncEnabled = (_b = identity.enableDittoCloudSync) !== null && _b !== void 0 ? _b : true;\n }\n validateEnabledTransportsAvailable(parameters.ditto, parameters.transportConfig);\n const transportConfig = parameters.transportConfig.copy();\n if (!isSyncActive || !isX509Valid) {\n transportConfig.peerToPeer.bluetoothLE.isEnabled = false;\n transportConfig.peerToPeer.awdl.isEnabled = false;\n transportConfig.peerToPeer.lan.isEnabled = false;\n transportConfig.listen.tcp.isEnabled = false;\n transportConfig.connect.tcpServers = [];\n }\n if (!isSyncActive || !isWebValid) {\n transportConfig.connect.websocketURLs = [];\n }\n if (!isSyncActive) {\n transportConfig.listen.http.isEnabled = false;\n }\n // NOTE: we have to smuggle in an additional Ditto Cloud websocket URL to\n // connect to if cloud sync is enabled.\n if (isSyncActive && isWebValid && isDittoCloudSyncEnabled) {\n // @ts-ignore To fix this type error, refactor using a switch\n // statement, c.f.\n // https://github.com/getditto/ditto/blob/d35b6c1cb280cdd6368d14137c97609b9b9b9296/js/sources/sync.ts#L488\n const dittoCloudURL = customDittoCloudURL !== null && customDittoCloudURL !== void 0 ? customDittoCloudURL : defaultDittoCloudURL(appID);\n transportConfig.connect.websocketURLs.push(dittoCloudURL);\n }\n return {\n underlyingSyncParameters: parameters,\n effectiveTransportConfig: transportConfig.freeze(),\n };\n}\n/**\n * Validate that all enabled transports are available in the current environment\n * and throw an error if not.\n *\n * @private\n */\nfunction validateEnabledTransportsAvailable(ditto, transportConfig) {\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n return ditto.deferClose(() => {\n // - BLE\n // - AWDL\n // - LAN / mDNS\n const unavailableButEnabledP2PTransports = [];\n const isBLEAvailable = FFI.transportsBLEIsAvailable(dittoHandle.deref());\n const isAWDLAvailable = FFI.transportsAWDLIsAvailable(dittoHandle.deref());\n const isLANAvailable = FFI.transportsLANIsAvailable(dittoHandle.deref());\n if (transportConfig.peerToPeer.bluetoothLE.isEnabled && !isBLEAvailable) {\n unavailableButEnabledP2PTransports.push('BluetoothLE');\n }\n if (transportConfig.peerToPeer.awdl.isEnabled && !isAWDLAvailable) {\n unavailableButEnabledP2PTransports.push('AWDL');\n }\n if (transportConfig.peerToPeer.lan.isEnabled && !isLANAvailable) {\n unavailableButEnabledP2PTransports.push('LAN');\n }\n if (unavailableButEnabledP2PTransports.length > 0) {\n throw new Error(`The following P2P transports are enabled in the transport config but are not supported in the current environment: ${unavailableButEnabledP2PTransports.join(', ')}`);\n }\n // - Websocket / HTTP\n // - TCP\n if (transportConfig.connect.tcpServers.length > 0 && Environment.isWebBuild) {\n throw new Error(`The transport config contains TCP servers, but this transport is not supported in web environments`);\n }\n if (transportConfig.listen.http.isEnabled && Environment.isWebBuild) {\n throw new Error(`The transport config contains an HTTP listener, which is not supported in web environments`);\n }\n if (transportConfig.listen.tcp.isEnabled && Environment.isWebBuild) {\n throw new Error(`The transport config contains a TCP listener, which is not supported in web environments`);\n }\n });\n}\n//# sourceMappingURL=sync.js.map","//\n// Copyright © 2023 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { Bridge } from './bridge';\n/**\n * Tracks `Subscription` instances in order to remove them when Ditto is\n * closed.\n *\n * @internal\n */\nexport class SubscriptionManager {\n /** @internal */\n constructor(ditto) {\n this.ditto = ditto;\n this.subscriptions = {};\n this.finalizationRegistry = new FinalizationRegistry(this.removeWithContextInfo.bind(this));\n }\n /**\n * Begin tracking a subscription instance and start it.\n *\n * @internal */\n add(subscription) {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n const contextInfo = subscription.contextInfo;\n ditto.deferClose(async () => {\n this.subscriptions[contextInfo.id] = new WeakRef(subscription);\n this.finalizationRegistry.register(subscription, subscription.contextInfo, subscription);\n FFI.addSubscription(dittoHandle.deref(), contextInfo.collectionName, contextInfo.query, contextInfo.queryArgsCBOR, contextInfo.orderBys, contextInfo.limit, contextInfo.offset);\n });\n }\n /**\n * Stop tracking a subscription instance and cancel it.\n *\n * @internal */\n remove(subscription) {\n if (this.subscriptions[subscription.contextInfo.id] == null) {\n throw new Error(`Internal inconsistency, tried to remove a subscription that is not tracked: ${subscription.contextInfo.id}`);\n }\n this.finalizationRegistry.unregister(subscription);\n this.removeWithContextInfo(subscription.contextInfo);\n }\n /**\n * Stop tracking all subscriptions and cancel them.\n *\n * @internal */\n close() {\n this.ditto.deferClose(async () => {\n for (const subscriptionID in this.subscriptions) {\n const subscription = this.subscriptions[subscriptionID].deref();\n if (subscription != null) {\n // This doesn't call `Subscription.cancel()` because that is not\n // async and we want to wait for all subscriptions to be removed.\n this.remove(subscription);\n }\n }\n });\n }\n /**\n * Remove tracked subscription without unregistering from finalization\n * registry.\n *\n * @internal */\n removeWithContextInfo(contextInfo) {\n const ditto = this.ditto;\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n ditto.deferClose(() => {\n delete this.subscriptions[contextInfo.id];\n FFI.removeSubscription(dittoHandle.deref(), contextInfo.collectionName, contextInfo.query, contextInfo.queryArgsCBOR, contextInfo.orderBys, contextInfo.limit, contextInfo.offset);\n });\n }\n}\n//# sourceMappingURL=subscription-manager.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { Bridge } from './bridge';\nimport { Attachment } from './attachment';\nimport { generateEphemeralToken, step } from './internal';\n/**\n * These objects are returned by calls to\n * {@link Collection.fetchAttachment | fetchAttachment()} on {@link Collection}\n * and allow you to stop an in-flight attachment fetch.\n */\nexport class AttachmentFetcher {\n /**\n * Stops fetching the associated attachment and cleans up any associated\n * resources.\n *\n * Note that you are not required to call `stop()` once your attachment fetch\n * operation has finished. The method primarily exists to allow you to cancel\n * an attachment fetch request while it is ongoing if you no longer wish for\n * the attachment to be made available locally to the device.\n */\n stop() {\n // No need for synchronicity here: we let the \"stop promise\" float / run in\n // a detached fashion since there is no point in awaiting the \"stop\n // signaling\" itself.\n step(async () => {\n await this.manager.stopAttachmentFetcher(this);\n if (this.rejectPendingFetch != null) {\n this.rejectPendingFetch();\n }\n });\n }\n /** @internal */\n then(onfulfilled, onrejected) {\n return this.attachment.then(onfulfilled, onrejected);\n }\n /** @internal */\n constructor(ditto, token, manager, eventHandler) {\n // --------------------------------------- Internal ------------------------\n /** @internal */\n this.cancelTokenPromise = null;\n /**\n * This function is defined while a fetch is in progress and is used to reject\n * the promise `this.attachment` when the fetch is canceled.\n *\n * @internal\n */\n this.rejectPendingFetch = null;\n this.ditto = ditto;\n this.token = token;\n this.manager = manager;\n this.id = generateEphemeralToken();\n const eventHandlerOrNoOp = eventHandler || function () { };\n const dittoHandle = Bridge.ditto.handleFor(ditto);\n this.attachment = new Promise((resolve, reject) => {\n // REFACTOR: The callbacks hold quite a bunch of objects with most\n // probably lead to retain cycles and therefore memory leaks. This needs\n // to be\n // fixed.\n const onComplete = (attachmentHandlePointer) => {\n const attachment = new Attachment(this.ditto, this.token);\n Bridge.attachment.bridge(attachmentHandlePointer, () => attachment);\n eventHandlerOrNoOp({ type: 'Completed', attachment });\n this.rejectPendingFetch = null;\n resolve(attachment);\n };\n const onProgress = (downloaded, toDownload) => {\n eventHandlerOrNoOp({ type: 'Progress', totalBytes: toDownload, downloadedBytes: downloaded });\n };\n const onDelete = () => {\n eventHandlerOrNoOp({ type: 'Deleted' });\n this.rejectPendingFetch = null;\n resolve(null);\n };\n const onError = () => {\n ;\n (err) => {\n this.rejectPendingFetch = null;\n // REFACTOR: We simply throw this error at the moment. Maybe we should\n // bubble it up?\n reject(err);\n };\n };\n // The core doesn't call any of the handlers defined above when a fetch is\n // cancelled through `this.stop()` so we use this function to reject the\n // promise from the outside.\n this.rejectPendingFetch = () => {\n reject(new Error('Attachment fetch was canceled'));\n };\n // Not awaited yet; only needs to be fully resolved (and `await`ed over)\n // when using the actual `cancelTokenPromise`, which only happens in\n // `AttachmentFetcherManager.stopWithContextInfo()`.\n // @ts-expect-error setting readonly property\n this.cancelTokenPromise = FFI.dittoResolveAttachment(dittoHandle.deref(), token.id, { onComplete, onProgress, onDelete }, onError);\n });\n }\n}\n//# sourceMappingURL=attachment-fetcher.js.map","//\n// Copyright © 2023 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { AttachmentFetcher } from './attachment-fetcher';\nimport { Bridge } from './bridge';\n/**\n * Manages attachment fetchers to make sure we free all resources when the\n * fetcher is garbage collected and to allow us to wait for freeing of\n * ressources to be finished before the ditto instance is closed.\n *\n * @internal */\nexport class AttachmentFetcherManager {\n /** @internal */\n constructor(ditto) {\n // --- Private ---\n this.contextInfoByID = {};\n this.finalizationRegistry = new FinalizationRegistry(this.stopWithContextInfo);\n this.ditto = ditto;\n }\n /**\n * Start an attachment fetcher.\n *\n * @internal */\n startAttachmentFetcher(token, eventHandler) {\n return this.ditto.deferClose(() => {\n const attachmentFetcher = new AttachmentFetcher(this.ditto, token, this, eventHandler);\n // Register in finalization registry.\n const contextInfo = {\n id: attachmentFetcher.id,\n attachmentTokenID: token.id,\n cancelTokenPromise: attachmentFetcher.cancelTokenPromise,\n attachmentFetcher: new WeakRef(attachmentFetcher),\n };\n this.finalizationRegistry.register(attachmentFetcher, contextInfo, attachmentFetcher);\n // Keep a reference to the context info so that we can stop the fetcher.\n this.contextInfoByID[attachmentFetcher.id] = contextInfo;\n // Prevent cancellation of the fetch once it was fulfilled or rejected.\n const resetCancelToken = () => {\n if (this.contextInfoByID[attachmentFetcher.id] != null) {\n this.contextInfoByID[attachmentFetcher.id].cancelTokenPromise = null;\n }\n };\n attachmentFetcher.attachment.then((value) => {\n resetCancelToken();\n return value;\n }, (reason) => {\n resetCancelToken();\n return reason;\n });\n // Keep the attachment fetcher alive until it is stopped.\n this.ditto.keepAlive.retain(`AttachmentFetcher.${attachmentFetcher.id})`);\n return attachmentFetcher;\n });\n }\n /**\n * Stop an attachment fetcher and wait for it to be stopped.\n *\n * @internal */\n async stopAttachmentFetcher(attachmentFetcher) {\n this.finalizationRegistry.unregister(attachmentFetcher);\n const contextInfo = this.contextInfoByID[attachmentFetcher.id];\n if (contextInfo == null) {\n throw new Error(`Internal inconsistency: cannot stop attachment fetcher ${attachmentFetcher.id}, which is not registered.`);\n }\n await this.stopWithContextInfo(contextInfo);\n }\n /**\n * Closing the manager will cancel all attachment fetchers.\n *\n * @internal\n */\n close() {\n // REFACTOR: the closing closure runs detached from here which is a smell.\n // Can we make this whole closing mechanism non-async? The culprit is\n // the cancelTokenPromise that _have to_ `await` on close. The reason\n // for this is that the FFI function `ditto_resolve_attachment()` is\n // async but should be non-async. Refactor and make that non-async, then\n // de-async-ify the closing mechanism.\n this.ditto.deferCloseAsync(async () => {\n const contextInfos = Object.values(this.contextInfoByID);\n const stopped = contextInfos.map(async (contextInfo) => {\n const attachmentFetcher = contextInfo.attachmentFetcher.deref();\n if (attachmentFetcher != null) {\n await this.stopAttachmentFetcher(attachmentFetcher);\n }\n });\n await Promise.all(stopped);\n });\n }\n /**\n * Stop the attachment fetcher without unregistering it from the finalization\n * registry.\n */\n stopWithContextInfo(contextInfo) {\n const dittoHandle = Bridge.ditto.handleFor(this.ditto);\n return this.ditto.deferCloseAsync(async () => {\n // Remove the manager's own record of the context info.\n if (this.contextInfoByID[contextInfo.id] == null) {\n throw new Error(`Internal inconsistency: attachment fetcher ${contextInfo.id} not found in active attachment fetchers.`);\n }\n delete this.contextInfoByID[contextInfo.id];\n // Release the keep-alive.\n this.ditto.keepAlive.release(`AttachmentFetcher.${contextInfo.id})`);\n // Cancel the fetcher if it is still running.\n const cancelToken = await contextInfo.cancelTokenPromise;\n if (cancelToken) {\n FFI.dittoCancelResolveAttachment(dittoHandle.deref(), contextInfo.attachmentTokenID, cancelToken);\n }\n });\n }\n}\n//# sourceMappingURL=attachment-fetcher-manager.js.map","//\n// Copyright © 2023 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { Bridge } from './bridge';\n/**\n * The entrypoint for small peer user info collection. Small peer info consists\n * of information gathered into a system collection on a regular interval and\n * optionally synced to the Big Peer for device dashboard and debugging\n * purposes.\n *\n * An instance of this class is available on each `Ditto` instance via its\n * {@link Ditto.smallPeerInfo | `smallPeerInfo`} property. Instantiating this\n * class directly is not supported.\n */\nexport class SmallPeerInfo {\n /**\n * Indicates whether small peer info collection is currently enabled, defaults\n * to `false`.\n *\n * **Note**: whether the background ingestion process is enabled or not is a\n * separate decision to whether this information is allowed to sync to other\n * peers (including the big peer). This is controlled by\n * {@link getSyncScope | getSyncScope()} and\n * {@link setSyncScope | setSyncScope()}.\n */\n get isEnabled() {\n const dittoHandle = Bridge.ditto.handleFor(this.ditto);\n return this.ditto.deferClose(() => {\n return FFI.dittoSmallPeerInfoGetIsEnabled(dittoHandle.deref());\n });\n }\n /**\n * Set whether small peer info collection is enabled.\n *\n * @throws when set to a non-boolean value.\n */\n set isEnabled(newValue) {\n if (typeof newValue !== 'boolean') {\n throw new TypeError(`Expected boolean, got ${typeof newValue}`);\n }\n const dittoHandle = Bridge.ditto.handleFor(this.ditto);\n this.ditto.deferClose(() => {\n FFI.dittoSmallPeerInfoSetEnabled(dittoHandle.deref(), newValue);\n });\n }\n /**\n * The metadata associated with the small peer info.\n *\n * Small peer info metadata is a free-form, user-provided JSON object that\n * is inserted into the small peer info system document at each collection\n * interval.\n */\n get metadata() {\n return JSON.parse(this.metadataJSONString);\n }\n /**\n * Set the metadata associated with the small peer info.\n *\n * The metadata must be a JSON-serializable object that conforms to the\n * following constraints:\n *\n * - Must be a JSON object (not an array, string, number, etc.)\n * - The size when encoded as JSON must be less than 128 KB\n * - May only be nested up to 2 levels deep\n *\n * @example <caption>Valid metadata</caption>\n * ditto.smallPeerInfo.metadata = {\n * \"foo\": \"bar\",\n * \"nested\": {\n * \"inner\": \"value\"\n * }\n * }\n *\n * @example <caption>Invalid metadata</caption>\n * // This is invalid and results in an error.\n * ditto.smallPeerInfo.metadata = {\n * \"foo\": \"bar\",\n * \"nested\": {\n * \"illegal\": {\n * \"inner\": \"value\"\n * }\n * }\n * }\n *\n * @throws when set to a value that violates any of the constraints listed\n * above.\n */\n set metadata(metadata) {\n this.metadataJSONString = JSON.stringify(metadata);\n }\n /**\n * The metadata associated with the small peer info, as a JSON string.\n */\n get metadataJSONString() {\n const dittoHandle = Bridge.ditto.handleFor(this.ditto);\n return this.ditto.deferClose(() => {\n return FFI.dittoSmallPeerInfoGetMetadata(dittoHandle.deref());\n });\n }\n /**\n * Set the metadata associated with the small peer info, as a JSON string.\n *\n * @see {@link SmallPeerInfo.metadata | `metadata`} for more information on\n * valid values.\n * @throws when set to a value that violates any of the constraints listed in\n * {@link SmallPeerInfo.metadata | `metadata`}.\n */\n set metadataJSONString(metadata) {\n if (typeof metadata !== 'string') {\n throw new TypeError(`Expected string, got ${typeof metadata}`);\n }\n const dittoHandle = Bridge.ditto.handleFor(this.ditto);\n this.ditto.deferClose(() => {\n // throws if any validation errors occur\n FFI.dittoSmallPeerInfoSetMetadata(dittoHandle.deref(), metadata);\n });\n }\n /**\n * Determines which \"kind\" of peers the small peer info will be\n * replicated to.\n *\n * Defaults to `LocalPeerOnly`, which means no replication. Set this to\n * `BigPeerOnly` to replicate collected info to the Big Peer.\n */\n async getSyncScope() {\n const dittoHandle = Bridge.ditto.handleFor(this.ditto);\n return this.ditto.deferCloseAsync(async () => {\n return FFI.dittoSmallPeerInfoGetSyncScope(dittoHandle.deref());\n });\n }\n /**\n * Set the sync scope.\n *\n * See {@link getSyncScope} for more information.\n *\n * @param syncScope the new sync scope.\n * @throws when set to a value other than `BigPeerOnly` or `LocalPeerOnly`.\n */\n async setSyncScope(syncScope) {\n const dittoHandle = Bridge.ditto.handleFor(this.ditto);\n return this.ditto.deferCloseAsync(async () => {\n return FFI.dittoSmallPeerInfoSetSyncScope(dittoHandle.deref(), syncScope);\n });\n }\n /** @internal */\n constructor(ditto) {\n this.ditto = ditto;\n }\n}\n//# sourceMappingURL=small-peer-info.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport * as Environment from './@environment';\nimport { TransportConfig, transportConfigToSerializable } from './transport-config';\nimport { OnlineAuthenticator, NotAvailableAuthenticator } from './authenticator';\nimport { IdentityTypesRequiringOfflineLicenseToken } from './identity';\nimport { Bridge } from './bridge';\nimport { CBOR } from './cbor';\nimport { Store } from './store';\nimport { Logger } from './logger';\nimport { KeepAlive } from './keep-alive';\nimport { Observer } from './observer';\nimport { Presence } from './presence';\nimport { LiveQueryManager } from './live-query-manager';\nimport { PresenceManager } from './presence-manager';\nimport { TransportConditionsManager } from './transport-conditions-manager';\nimport { Sync } from './sync';\nimport { defaultAuthURL } from './internal';\nimport { SubscriptionManager } from './subscription-manager';\nimport { AttachmentFetcherManager } from './attachment-fetcher-manager';\nimport { SmallPeerInfo } from './small-peer-info';\n// -----------------------------------------------------------------------------\n// The name of the directory, relative to cwd, that will be used for persistence\n// if no other directory is specified.\nconst DEFAULT_PERSISTENCE_DIRECTORY = 'ditto';\n/**\n * Ditto is the entry point for accessing Ditto-related functionality.\n */\nexport class Ditto {\n /**\n * A string containing the semantic version of the Ditto SDK. Example: 4.4.3\n */\n static get VERSION() {\n // Requires having called FFI.initSDKVersion() first.\n return FFI.dittoGetSDKSemver();\n }\n /** Returns a string identifying the version of the Ditto SDK. */\n get sdkVersion() {\n const dittoHandle = Bridge.ditto.handleFor(this);\n return this.deferClose(() => {\n return FFI.dittoGetSDKVersion(dittoHandle.deref());\n });\n }\n /**\n * The path this Ditto instance was initialized with, if no path was given at\n * construction time, the default value is returned (see constructor).\n *\n * @deprecated `Ditto.path` is deprecated. Please update your code to use the\n * new 'Ditto.persistenceDirectory' property instead.\n */\n get path() {\n Logger.warning(\"⚠️ Deprecation Warning: The 'Ditto.path' property is deprecated. Please update your code to use the new 'Ditto.persistenceDirectory' property instead.\");\n return this.persistenceDirectory;\n }\n /**\n * Returns `true` if an offline license token has been set, otherwise returns `false`.\n *\n * @see {@link setOfflineOnlyLicenseToken | setOfflineOnlyLicenseToken()}\n */\n get isActivated() {\n var _a;\n return (_a = this._isActivated) !== null && _a !== void 0 ? _a : false;\n }\n /**\n * `true` once {@link close | Ditto.close()} has been called, otherwise\n * `false`.\n */\n get isClosed() {\n var _a;\n return (_a = this._isClosed) !== null && _a !== void 0 ? _a : false;\n }\n /**\n * Returns `true` if sync is active, otherwise returns `false`. Use\n * {@link startSync | startSync()} to activate and\n * {@link stopSync | stopSync()} to deactivate sync.\n */\n get isSyncActive() {\n var _a;\n return (_a = this._isSyncActive) !== null && _a !== void 0 ? _a : false;\n }\n /**\n * Initializes a new `Ditto` instance.\n *\n * **NOTE**: The `sharedKey` identity is only supported for Node environments,\n * using this to create a Ditto instance in the web browser will throw an\n * exception.\n *\n * @param identity - Identity for the new Ditto instance, defaults to\n * `offlinePlayground` with `appID` being the empty string `''`.\n *\n * @param persistenceDirectory optional string containing a directory path\n * that Ditto will use for persistence. Defaults to `\"ditto\"`. On Windows,\n * the path will be automatically normalized.\n *\n * @see {@link Ditto.identity}\n * @see {@link Ditto.persistenceDirectory}\n * @throws {Error} when the current environment is not supported by this SDK.\n * @throws {Error} for other failures during initialization of Ditto and\n * validation of the provided identity.\n */\n constructor(identity, persistenceDirectory) {\n // ------------------------------------------------------------ Private ------\n this.deferCloseAllowed = true;\n this.isWebValid = false;\n this.isX509Valid = false;\n this._isSyncActive = false;\n this._isClosed = false;\n /** Set of pending operations that need to complete before the Ditto instance can be closed in a safe manner. */\n this.pendingOperations = new Set();\n if (!Ditto.isEnvironmentSupported()) {\n throw new Error('Ditto does not support this JavaScript environment. Please consult the Ditto JavaScript documentation for a list of supported environments and browsers. You can use `Ditto.isEnvironmentSupported()` to run this check anytime.');\n }\n this.persistenceDirectory = Ditto.initPersistenceDirectory(persistenceDirectory);\n const identityOrDefault = identity !== null && identity !== void 0 ? identity : { type: 'offlinePlayground', appID: '' };\n const validIdentity = Object.freeze(this.validateIdentity(identityOrDefault));\n this.identity = Object.freeze(validIdentity);\n // Check if device name stays the same on sdk and core levels (#10729).\n if (Environment.isNodeBuild) {\n const os = require('os');\n this.deviceName = os.hostname();\n }\n if (Environment.isWebBuild) {\n this.deviceName = navigator.userAgent;\n }\n if (Environment.isReactNativeBuild) {\n this.deviceName = FFI.getDeviceName();\n }\n this.keepAlive = new KeepAlive();\n // NOTE: some behavior not implemented yet as compared to the ObjC/Swift\n // version:\n //\n // 1. Optional `identity` parameter falling back to a default one.\n //\n // 2. Optional siteID of the identity, falling back to a random one if\n // newly created or to the stored one if already persisted.\n const uninitializedDittoX = FFI.uninitializedDittoMake(this.persistenceDirectory);\n // WORKAROUND: the login provider triggers the registered callback right\n // when the auth client is being constructed. At this point, we don't have\n // the auth client, which would be needed to perform a login, nor did we\n // have a chance to create an authenticator. Therefore catch that first\n // callback, store the seconds remaining and proceed with propagating\n // it after all pieces are in place.\n let secondsRemainingUntilAuthenticationExpires = null;\n const weakThis = new WeakRef(this);\n const identityConfig = (() => {\n var _a, _b, _c;\n if (validIdentity.type === 'offlinePlayground') {\n if (Environment.isReactNativeBuild) {\n throw new Error('OfflinePlayground Identity is currently not implemented for React Native.');\n }\n return FFI.dittoIdentityConfigMakeOfflinePlayground(validIdentity.appID, (_a = validIdentity.siteID) !== null && _a !== void 0 ? _a : 0);\n }\n if (validIdentity.type === 'manual') {\n if (Environment.isReactNativeBuild) {\n throw new Error('Manual Identify is currently not implemented for React Native.');\n }\n return FFI.dittoIdentityConfigMakeManual(validIdentity.certificate);\n }\n if (validIdentity.type === 'sharedKey') {\n if (Environment.isReactNativeBuild) {\n throw new Error('Shared Key Identity is currently not implemented for React Native.');\n }\n return FFI.dittoIdentityConfigMakeSharedKey(validIdentity.appID, validIdentity.sharedKey, validIdentity.siteID);\n }\n if (validIdentity.type === 'onlinePlayground') {\n const authURL = (_b = validIdentity.customAuthURL) !== null && _b !== void 0 ? _b : defaultAuthURL(validIdentity.appID);\n return FFI.dittoIdentityConfigMakeOnlinePlayground(validIdentity.appID, validIdentity.token, authURL);\n }\n if (validIdentity.type === 'onlineWithAuthentication') {\n const authURL = (_c = validIdentity.customAuthURL) !== null && _c !== void 0 ? _c : defaultAuthURL(validIdentity.appID);\n return FFI.dittoIdentityConfigMakeOnlineWithAuthentication(validIdentity.appID, authURL);\n }\n throw new Error(`Can't create Ditto, unsupported identity type: ${validIdentity}`);\n })();\n const dittoPointer = FFI.dittoMake(uninitializedDittoX, identityConfig);\n FFI.dittoAuthClientSetValidityListener(dittoPointer, function (...args) {\n const ditto = weakThis.deref();\n if (ditto == null || ditto.isClosed) {\n Logger.info('Ditto is closed, ignoring auth client validity change');\n }\n else {\n ditto.authClientValidityChanged(...args);\n }\n });\n const isWebValid = FFI.dittoAuthClientIsWebValid(dittoPointer);\n const isX509Valid = FFI.dittoAuthClientIsX509Valid(dittoPointer);\n const appID = FFI.dittoAuthClientGetAppID(dittoPointer);\n const siteID = FFI.dittoAuthClientGetSiteID(dittoPointer);\n Bridge.ditto.bridge(dittoPointer, this);\n // IMPORTANT: Keeping the auth client around accumulates run-times and\n // resources which becomes a problem specifically in tests (where we use one\n // Ditto instance per test). We therefore keep it only if needed, i.e.\n // _only_ for the onlineWithAuthentication and online identities and\n // transfer ownership of it to the authenticator.\n if (validIdentity.type === 'onlineWithAuthentication') {\n this.auth = new OnlineAuthenticator(this.keepAlive, this, validIdentity.authHandler);\n const loginProviderX = FFI.dittoAuthClientMakeLoginProvider(function (secondsRemaining) {\n const strongThis = weakThis.deref();\n if (!strongThis) {\n Logger.warning(`Internal inconsistency, LoginProvider callback fired after the corresponding Ditto instance has been deallocated.`);\n return;\n }\n if (strongThis.auth) {\n strongThis.auth['@ditto.authenticationExpiring'](secondsRemaining);\n }\n else {\n // WORKAROUND: see description above where the\n // secondsRemainingUntilAuthenticationExpires variable is declared.\n secondsRemainingUntilAuthenticationExpires = secondsRemaining;\n }\n });\n // We don't need to worry about awaiting the result of this call because\n // auth all happens in the background and so there are no guarantees we\n // need to uphold by making sure things are in a certain state before the\n // constructor finishes\n FFI.dittoAuthSetLoginProvider(dittoPointer, loginProviderX);\n }\n else if (validIdentity.type === 'onlinePlayground') {\n this.auth = new OnlineAuthenticator(this.keepAlive, this, {\n authenticationRequired: function (authenticator) {\n // No-op.\n },\n authenticationExpiringSoon: function (authenticator, secondsRemaining) {\n // No-op.\n },\n });\n }\n else {\n this.auth = new NotAvailableAuthenticator(this.keepAlive);\n }\n const transportConfig = this.makeDefaultTransportConfig().freeze();\n //\n // Assign instance properties.\n //\n this.appID = appID;\n this.siteID = siteID;\n this.isX509Valid = isX509Valid;\n this.isWebValid = isWebValid;\n this.sync = new Sync(this);\n this.sync.update({ isSyncActive: false, isX509Valid, isWebValid, identity: validIdentity, ditto: this, transportConfig });\n // We don't need a license when running in the browser, so we\n // mark the instance as activated from the get-go in that case.\n this._isActivated = Environment.isWebBuild || !IdentityTypesRequiringOfflineLicenseToken.includes(validIdentity.type);\n this.store = new Store(this);\n this.smallPeerInfo = new SmallPeerInfo(this);\n this.presence = new Presence(this);\n this.presenceManager = new PresenceManager(this);\n this.liveQueryManager = new LiveQueryManager(this, this.keepAlive);\n this.attachmentFetcherManager = new AttachmentFetcherManager(this);\n this.transportConditionsManager = new TransportConditionsManager(this);\n this.subscriptionManager = new SubscriptionManager(this);\n disableDeadlockTimeoutWhenDebugging();\n // WORKAROUND: see description above where the\n // secondsRemainingUntilAuthenticationExpires variable is declared.\n if (secondsRemainingUntilAuthenticationExpires != null) {\n this.auth['@ditto.authenticationExpiring'](secondsRemainingUntilAuthenticationExpires);\n }\n }\n /**\n * Don't terminate the process when callbacks are pending for a long time.\n *\n * Some methods in the Ditto library accept asynchronous functions as callback\n * parameters. If these asynchronous functions do not resolve within a certain\n * period of time after having been invoked by Ditto, deadlock detection gets\n * triggered, resulting in the termination of the process.\n *\n * When Ditto is executed in a Node.js environment with an interactive\n * debugger attached, this deadlock detection might get activated upon\n * encountering a breakpoint. Calling `Ditto.disableDeadlockDetection()`\n * disables this behavior, thus allowing the use of an interactive debugger\n * without triggering the deadlock detection.\n *\n * This feature is not available in the browser.\n */\n static disableDeadlockDetection() {\n if (Environment.isNodeBuild) {\n const current = FFI.getDeadlockTimeout();\n if (current !== 0) {\n try {\n FFI.setDeadlockTimeout(0);\n }\n catch (e) {\n throw new Error(`Failed to disable deadlock detection: ${e === null || e === void 0 ? void 0 : e.message}`);\n }\n }\n }\n }\n /**\n * Returns `true` if deadlock detection is enabled.\n *\n * See\n * {@link Ditto.disableDeadlockDetection | Ditto.disableDeadlockDetection()}\n * for more information.\n *\n * This method always returns `false` in the browser where deadlock detection\n * is not available.\n *\n * @returns `true` if deadlock detection is enabled\n */\n static hasDeadlockDetection() {\n if (Environment.isNodeBuild) {\n return FFI.getDeadlockTimeout() !== 0;\n }\n return false;\n }\n /**\n * Check if the current environment supports running Ditto.\n *\n * Required APIs include:\n *\n * - `BigInt`\n * - `FinalizationRegistry`\n * - `WeakRef`\n *\n * Internet Explorer is not supported.\n *\n * @returns `true` if the environment is supported\n */\n static isEnvironmentSupported() {\n // From https://stackoverflow.com/questions/21825157/internet-explorer-11-detection\n let isIE = false;\n if (typeof window !== 'undefined' && window.navigator && window.navigator.userAgent && window.navigator.appVersion) {\n isIE = window.navigator.userAgent.indexOf('MSIE') !== -1 || window.navigator.appVersion.indexOf('Trident/') > -1;\n }\n let hasRequiredAPIs;\n try {\n hasRequiredAPIs = checkAPIs();\n }\n catch (error) {\n throw new Error(`Error checking environment support: ${error}`);\n }\n return !isIE && hasRequiredAPIs;\n }\n /**\n * Validates and creates the given directory and returns its path.\n *\n * Any string containing non-whitespace characters is considered valid.\n * Defaults to `ditto` if no path or an invalid path is given. In web\n * environments, the given path is returned as-is if it is valid.\n *\n * @param path optional string containing a writable directory path\n * @returns validated path\n * @internal\n */\n static initPersistenceDirectory(path) {\n let validatedPath;\n if (path == null) {\n validatedPath = DEFAULT_PERSISTENCE_DIRECTORY;\n }\n else if (path.trim().length === 0) {\n throw new Error(`Invalid argument for path parameter: '${path}'`);\n }\n else {\n validatedPath = path;\n }\n if (Environment.isNodeBuild) {\n const fs = require('fs');\n const path = require('path');\n if (process.platform === 'win32') {\n // Normalize the path on Windows to prevent issues with its max path\n // length. Windows has a hard limit at 260 characters for file paths\n // [1]. When this limit is exceeded reads and writes may fail.\n //\n // [1]: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maximum-path-length-limitation\n validatedPath = `\\\\\\\\?\\\\${path.resolve(validatedPath)}`;\n }\n const absolutePath = path.resolve(validatedPath);\n // We check if the directory exists before creating it to be able to\n // provide a more helpful error message in case the directory is not\n // writable.\n let isDirectoryExisting = false;\n try {\n fs.statSync(absolutePath);\n isDirectoryExisting = true;\n }\n catch (error) {\n // On Windows, permissions can prevent us from checking if the directory\n // exists: https://github.com/nodejs/node/issues/35853\n if (error.code === 'EPERM') {\n throw new Error(`Missing read or write permissions for the persistence directory path '${absolutePath}'. Please update the permissions or use a different path.`);\n }\n }\n if (!isDirectoryExisting) {\n try {\n fs.mkdirSync(absolutePath, { recursive: true });\n }\n catch (error) {\n throw new Error(`Failed to create persistence directory at path '${absolutePath}'.\\n\\n${error}`);\n }\n }\n // Caveat: It is still possible that these permissions are revoked during runtime.\n if (!isDirectoryWritable(absolutePath)) {\n throw new Error(`Missing read or write permissions for the persistence directory path '${absolutePath}'. Please update the permissions or use a different path.`);\n }\n }\n if (Environment.isReactNativeBuild) {\n validatedPath = FFI.createDirectory(validatedPath);\n }\n return validatedPath;\n }\n /**\n * Activate a `Ditto` instance by setting an offline only license token. You\n * cannot initiate sync with `Ditto` before you have activated it. The offline\n * license token is only valid for identities of type `development`, `manual`,\n * `offlinePlayground`, and `sharedKey`.\n *\n * @param licenseToken the license token to activate the `Ditto` instance\n * with. You can find yours on the [Ditto portal](https://portal.ditto.live).\n *\n * @throws {Error} if called in a React Native environment.\n */\n setOfflineOnlyLicenseToken(licenseToken) {\n if (Environment.isWebBuild) {\n // We don't need a license when running in the browser. Web builds mark the instance as activated\n // inside the constructor.\n Logger.info('Offline license token are ignored on web builds. Token validation will be skipped.');\n }\n if (Environment.isReactNativeBuild) {\n throw new Error('Offline license tokens are currently not implemented for the React Native SDK.');\n }\n else {\n if (IdentityTypesRequiringOfflineLicenseToken.includes(this.identity.type)) {\n const { result, errorMessage } = FFI.verifyLicense(licenseToken);\n if (result !== 'LicenseOk') {\n this._isActivated = false;\n throw new Error(errorMessage);\n }\n else {\n this._isActivated = true;\n }\n }\n else {\n throw new Error('Offline license tokens should only be used for manual, sharedKey or offlinePlayground identities');\n }\n }\n }\n /**\n * Returns the current transport configuration, frozen. If you want to modify\n * the transport config, make a {@link TransportConfig.copy | copy} first. Or\n * use the {@link updateTransportConfig | updateTransportConfig()}\n * convenience method. By default peer-to-peer transports (Bluetooth, WiFi,\n * and AWDL) are enabled if available in the current environment\n * (Web, Node, OS, etc.).\n *\n * @see {@link setTransportConfig | setTransportConfig()}\n * @see {@link updateTransportConfig | updateTransportConfig()}\n */\n get transportConfig() {\n return this.sync.parameters.transportConfig;\n }\n /**\n * Assigns a new transports configuration. By default peer-to-peer transports\n * (Bluetooth, WiFi, and AWDL) are enabled. You may use this method to alter\n * the configuration at any time, however sync will not begin until\n * {@link startSync | startSync()} is called.\n *\n * @see {@link transportConfig}\n * @see {@link updateTransportConfig | updateTransportConfig()}\n */\n setTransportConfig(transportConfig) {\n const transportConfigNew = transportConfig.copy().freeze();\n const identity = this.identity;\n const isWebValid = this.isWebValid;\n const isX509Valid = this.isX509Valid;\n this.sync.update({ transportConfig: transportConfigNew, identity, isWebValid, isX509Valid, isSyncActive: this.isSyncActive, ditto: this });\n const configSerializeReady = transportConfigToSerializable(transportConfigNew);\n const configCBOR = CBOR.encode(configSerializeReady);\n const dittoHandle = Bridge.ditto.handleFor(this);\n this.deferClose(() => {\n FFI.dittoSmallPeerInfoCollectionSetTransportConfigData(dittoHandle.deref(), configCBOR);\n });\n }\n /**\n * Convenience method for updating the transport config. Creates a copy of the\n * current transport config, passes that copy to the `update` closure,\n * allowing it to mutate as needed, and sets that updated copy afterwards.\n */\n updateTransportConfig(update) {\n const transportConfig = this.transportConfig.copy();\n update(transportConfig);\n this.setTransportConfig(transportConfig);\n return this;\n }\n /**\n * Starts the network transports. Ditto will connect to other devices.\n *\n * By default Ditto will enable all peer-to-peer transport types. On **Node**,\n * this means BluetoothLE, WiFi/LAN, and AWDL. On the **Web**, only connecting\n * via Websockets is supported. The network configuration can be\n * customized with {@link updateTransportConfig | updateTransportConfig()}\n * or replaced entirely with {@link setTransportConfig | setTransportConfig()}.\n *\n *\n * Ditto will prevent the process from exiting until sync is stopped (not\n * relevant when running in the browser).\n *\n * **NOTE**: the BluetoothLE transport on Linux is experimental, this\n * method panics if no BluetoothLE hardware is available. Therefore, contrary\n * to the above, the BluetoothLE transport is temporarily disabled by default\n * on Linux.\n *\n * @see {@link isSyncActive}\n * @see {@link stopSync | stopSync()}\n */\n startSync() {\n this.setSyncActive(true);\n }\n /**\n * Stops all network transports.\n *\n * You may continue to use the database locally but no data will sync to or\n * from other devices.\n *\n * @see {@link isSyncActive}\n * @see {@link startSync | startSync()}\n */\n stopSync() {\n this.setSyncActive(false);\n }\n /**\n * Registers an observer for info about Ditto peers in range of this device.\n *\n * Ditto will prevent the process from exiting as long as there are active\n * peers observers (not relevant when running in the browser).\n *\n * @param callback called immediately with the current state of peers\n * in range and whenever that state changes. Then it will be invoked\n * repeatedly when Ditto devices come and go, or the active connections to\n * them change.\n *\n * @deprecated please use {@link Presence.observe | presence.observe()} instead.\n */\n observePeers(callback) {\n Logger.warning('`ditto.observePeers()` is deprecated, please use `ditto.presence.observe()` instead.');\n const token = this.presenceManager.addObserver(callback);\n return new Observer(this.presenceManager, token, { stopsWhenFinalized: true });\n }\n /**\n * Register observer for changes of underlying transport conditions.\n *\n * Ditto will prevent the process from exiting as long as there are active\n * transport conditions observers (not relevant when running in the browser).\n *\n * @param callback called when underlying transport conditions change with\n * the changed `condition` and its `source`.\n */\n observeTransportConditions(callback) {\n const token = this.transportConditionsManager.addObserver(callback);\n return new Observer(this.transportConditionsManager, token, { stopsWhenFinalized: true });\n }\n /**\n * Removes all sync metadata for any remote peers which aren't currently\n * connected. This method shouldn't usually be called. Manually running\n * garbage collection often will result in slower sync times. Ditto\n * automatically runs a garbage a collection process in the background at\n * optimal times.\n *\n * Manually running garbage collection is typically only useful during testing\n * if large amounts of data are being generated. Alternatively, if an entire\n * data set is to be evicted and it's clear that maintaining this metadata\n * isn't necessary, then garbage collection could be run after evicting the\n * old data.\n *\n * Only available in Node environments at the moment, no-op in the browser.\n */\n runGarbageCollection() {\n const dittoHandle = Bridge.ditto.handleFor(this);\n return this.deferClose(() => {\n FFI.dittoRunGarbageCollection(dittoHandle.deref());\n });\n }\n /**\n * Explicitly opt-in to disabling the ability to sync with Ditto peers running\n * any version of the SDK in the v3 (or lower) series of releases.\n *\n * Assuming this succeeds then this peer will only be able to sync with other\n * peers using SDKs in the v4 (or higher) series of releases. Note that this\n * disabling of sync spreads to peers that sync with a peer that has disabled,\n * or has (transitively) had disabled, syncing with v3 SDK peers.\n *\n * @throws {Error} if called in a React Native environment.\n */\n async disableSyncWithV3() {\n if (Environment.isReactNativeBuild) {\n throw new Error('Disabling sync with V3 is not supported in a React Native environment.');\n }\n const dittoHandle = Bridge.ditto.handleFor(this);\n return this.deferCloseAsync(async () => {\n await FFI.dittoDisableSyncWithV3(dittoHandle.deref());\n });\n }\n /**\n * Shut down Ditto and release all resources.\n *\n * Must be called before recreating a Ditto instance that uses the same\n * persistence directory.\n */\n async close() {\n if (this.isClosed) {\n return;\n }\n this._isClosed = true;\n this.stopSync();\n this.store.close();\n this.presence.close();\n this.auth.close();\n this.sync.close();\n this.presenceManager.close();\n this.liveQueryManager.close();\n this.attachmentFetcherManager.close();\n this.transportConditionsManager.close();\n this.subscriptionManager.close();\n if (this.keepAlive.isActive) {\n throw new Error('Internal inconsistency, still kept alive after the Ditto object has been close()-ed. ');\n }\n // Await all pending operations before closing. Rejected promises are\n // ignored because they are handled at the original call site.\n do {\n await Promise.allSettled(this.pendingOperations);\n // REFACTOR: in theory, we could end up in an endless loop here if for\n // some reason a resolved or rejected promise isn't removed from\n // `pendingOperations`. AFAICS, this is not possible atm due to the\n // way `deferClose` and `deferCloseAsync` is implemented. Would be\n // great to rework this and make it more solid if possible.\n } while (this.pendingOperations.size > 0);\n this.deferCloseAllowed = false;\n await Bridge.ditto.close(this);\n }\n /**\n * The number of operations pending before the Ditto instance can be closed.\n *\n * For testing purposes only.\n * @internal */\n get numPendingOperations() {\n return this.pendingOperations.size;\n }\n /**\n * Makes sure that the closure is executed only if the Ditto instance hasn't\n * been closed yet.\n *\n * @param closure the synchronous closure to execute.\n * @returns the result of the closure.\n * @throws if the Ditto instance was closed before calling this method.\n * @internal */\n deferClose(closure) {\n if (!this.deferCloseAllowed) {\n throw new Error(`Can't perform operation using a Ditto instance that has been closed.`);\n }\n return closure();\n }\n /**\n * Makes sure that the closure is executed to completion before the Ditto\n * instance is closed.\n *\n * Any calls to {@link close | `Ditto.close()`} will wait until the closure\n * has completed before closing the Ditto instance.\n *\n * @param closure the asynchronous closure to execute.\n * @returns the result of the closure.\n * @throws if the Ditto instance was closed before calling this method.\n * @internal */\n async deferCloseAsync(closure) {\n if (!this.deferCloseAllowed) {\n throw new Error(`Can't perform operation using a Ditto instance that has been closed.`);\n }\n const pendingOperation = closure();\n this.pendingOperations.add(pendingOperation);\n let result;\n try {\n result = await pendingOperation;\n }\n finally {\n // Remove the promise from the set of pending operations even if it\n // rejected.\n this.pendingOperations.delete(pendingOperation);\n }\n return result;\n }\n authClientValidityChanged(isWebValid, isX509Valid) {\n const transportConfig = this.transportConfig;\n const identity = this.identity;\n const isSyncActive = this.isSyncActive;\n const wasX509Valid = this.isX509Valid;\n const wasWebValid = this.isWebValid;\n this.isX509Valid = isX509Valid;\n this.isWebValid = isWebValid;\n this.auth['@ditto.authClientValidityChanged'](isWebValid, isX509Valid);\n this.sync.update({ transportConfig, identity, isWebValid, isX509Valid, isSyncActive, ditto: this });\n }\n validateIdentity(identity) {\n const validIdentity = { ...identity };\n // @ts-expect-error we validate the existence of the value below.\n const appID = identity.appID;\n if (!['offlinePlayground', 'sharedKey', 'manual', 'onlinePlayground', 'onlineWithAuthentication'].includes(identity.type)) {\n throw new Error(`Can't create Ditto instance, unknown identity type: ${identity.type}`);\n }\n if ((identity.type === 'offlinePlayground' || identity.type === 'sharedKey' || identity.type === 'onlinePlayground' || identity.type === 'onlineWithAuthentication') && typeof appID === 'undefined') {\n throw new Error(`Property .appID must be given for identity, but isn't.`);\n }\n if (typeof appID !== 'undefined' && typeof appID !== 'string') {\n throw new Error(`Property .appID must be be of type string, but is of type '${typeof appID}': ${appID}`);\n }\n if ((identity.type === 'offlinePlayground' || identity.type === 'sharedKey') && typeof identity.siteID !== 'undefined') {\n const siteID = identity.siteID;\n const isSiteIDNumberOrBigInt = typeof siteID === 'number' || typeof siteID === 'bigint';\n if (!isSiteIDNumberOrBigInt)\n throw new Error(\"Can't create Ditto instance, siteID must be a number or BigInt\");\n if (siteID < 0)\n throw new Error(\"Can't create Ditto instance, siteID must be >= 0\");\n if (siteID > BigInt('0xffffffffffffffff'))\n throw new Error(\"Can't create Ditto instance, siteID must be < 2^64\");\n }\n if (identity.type === 'sharedKey') {\n // No validations yet.\n }\n if (identity.type === 'manual') {\n // No validations yet.\n }\n if (identity.type === 'onlinePlayground') {\n const token = identity.token;\n if (typeof token === 'undefined') {\n throw new Error(`Property .token must be given for identity but isn't. You can find the corresponding token on the Ditto Portal.`);\n }\n if (typeof token !== 'undefined' && typeof token !== 'string') {\n throw new Error(`Property .token of identity must be be of type string, but is of type '${typeof token}': ${token}`);\n }\n }\n if (identity.type === 'onlineWithAuthentication') {\n // No validations yet.\n }\n return validIdentity;\n }\n setSyncActive(flag) {\n const dittoHandle = Bridge.ditto.handleFor(this);\n this.deferClose(() => {\n if (flag && IdentityTypesRequiringOfflineLicenseToken.includes(this.identity.type) && !this.isActivated) {\n throw new Error('Sync could not be started because Ditto has not yet been activated. This can be achieved with a successful call to `setOfflineOnlyLicenseToken`. If you need to obtain a license token then please visit https://portal.ditto.live.');\n }\n if (!this.isSyncActive && flag) {\n this.keepAlive.retain('sync');\n }\n if (this.isSyncActive && !flag) {\n this.keepAlive.release('sync');\n }\n this._isSyncActive = flag;\n const isWebValid = this.isWebValid;\n const isX509Valid = this.isX509Valid;\n const identity = this.identity;\n const transportConfig = this.transportConfig;\n FFI.dittoSetDeviceName(dittoHandle.deref(), this.deviceName);\n this.sync.update({ identity, transportConfig, isWebValid, isX509Valid, isSyncActive: !!flag, ditto: this });\n });\n }\n makeDefaultTransportConfig() {\n const dittoHandle = Bridge.ditto.handleFor(this);\n return this.deferClose(() => {\n const transportConfig = new TransportConfig();\n if (FFI.transportsBLEIsAvailable(dittoHandle.deref())) {\n transportConfig.peerToPeer.bluetoothLE.isEnabled = true;\n }\n if (FFI.transportsAWDLIsAvailable(dittoHandle.deref())) {\n transportConfig.peerToPeer.awdl.isEnabled = true;\n }\n if (FFI.transportsLANIsAvailable(dittoHandle.deref())) {\n transportConfig.peerToPeer.lan.isEnabled = true;\n }\n return transportConfig.freeze();\n });\n }\n}\n/**\n * Returns true if the current JS environment supports all required APIs.\n *\n * @param _globalObject optional global object to test this function without\n * having to mock `global`.\n * @returns `true` iff all required APIs exist on `global`.\n * @internal\n */\nexport const checkAPIs = (_globalObject) => {\n const requiredBrowserAPIs = ['BigInt', 'WeakRef', 'FinalizationRegistry'];\n const globalObject = _globalObject || globalThis || global || window;\n return requiredBrowserAPIs.every((apiName) => !!globalObject[apiName]);\n};\n/**\n * Disable deadlock timeout when Node.js is running with `--inspect` parameter.\n *\n * This heuristic is not failsafe as debugging mode can also be enabled by\n * sending a `SIGUSR1` signal to the process.\n *\n * @internal\n */\nexport const disableDeadlockTimeoutWhenDebugging = () => {\n var _a, _b;\n if (Environment.isNodeBuild) {\n const hasInspector = process && ((_a = process === null || process === void 0 ? void 0 : process.execArgv) === null || _a === void 0 ? void 0 : _a.some((arg) => arg.includes('--inspect') || arg.includes('--debug')));\n // @ts-ignore - v8debug may be undefined\n const hasLegacyDebugMode = (process && ((_b = process === null || process === void 0 ? void 0 : process.execArgv) === null || _b === void 0 ? void 0 : _b.some((arg) => arg.includes('--debug')))) || typeof v8debug === 'object';\n if (hasInspector || hasLegacyDebugMode) {\n try {\n FFI.setDeadlockTimeout(0);\n Logger.warning('Detected Node running with inspector enabled, disabling deadlock timeout.');\n }\n catch (e) {\n Logger.error(`Detected Node running with inspector enabled but failed to disable deadlock timeout: ${e === null || e === void 0 ? void 0 : e.message}`);\n }\n }\n }\n};\n/**\n * Return true if we have read and write permissions for the given directory.\n *\n * Always returns `true` in the browser.\n *\n * Uses `fs.accessSync()` on all platforms except Windows, where ACLs are not\n * checked by that method [1]. On Windows, we try writing and removing a temp\n * file to the given path instead.\n *\n * [1]:\n * https://nodejs.org/docs/latest-v18.x/api/fs.html#fsaccesspath-mode-callback\n *\n * @internal\n */\nconst isDirectoryWritable = (directoryPath) => {\n if (Environment.isNodeBuild) {\n const fs = require('fs');\n const path = require('path');\n if (process.platform === 'win32') {\n const persistenceDirectory = path.resolve(directoryPath);\n const testFilePath = path.join(persistenceDirectory, 'ditto-permissions-test.txt');\n const testFileContents = 'permissions test';\n try {\n fs.writeFileSync(testFilePath, testFileContents);\n const fileContents = fs.readFileSync(testFilePath, 'utf8');\n if (fileContents !== testFileContents) {\n Logger.debug(`Failed to read back test file contents, expected '${testFileContents}' but got '${fileContents}'`);\n return false;\n }\n fs.unlinkSync(testFilePath);\n }\n catch (error) {\n Logger.debug(`Failed to access persistence directory: ${error === null || error === void 0 ? void 0 : error.message}`);\n return false;\n }\n }\n else {\n try {\n fs.accessSync(directoryPath, fs.constants.W_OK | fs.constants.R_OK);\n }\n catch (error) {\n Logger.debug(`Failed to access persistence directory: ${error === null || error === void 0 ? void 0 : error.message}`);\n return false;\n }\n }\n }\n return true;\n};\n//# sourceMappingURL=ditto.js.map","//\n// Copyright © 2023 DittoLive Incorporated. All rights reserved.\n//\nimport * as FFI from './ffi';\nimport { CBOR } from './cbor';\nimport { Bridge } from './bridge';\n/**\n * Represents a single match of a DQL query, similar to a “row” in SQL terms.\n * It’s a reference type serving as a “cursor”, allowing for efficient access of\n * the underlying data in various formats.\n *\n * The {@link QueryResultItem.value | value } property is lazily\n * materialized and kept in memory until it goes out of scope. To reduce the\n * memory footprint, structure your code such that items can be processed as a\n * stream, i.e. one by one (or in batches) and\n * {@link QueryResultItem.dematerialize | dematerialize() } them\n * right after use.\n */\nexport class QueryResultItem {\n /**\n * Returns the content as a materialized object.\n *\n * The item's value is\n * {@link QueryResultItem.materialize | materialized() } on first access\n * and subsequently on each access after performing\n * {@link QueryResultItem.dematerialize | dematerialize() }. Once\n * materialized, the value is kept in memory until explicitly\n * {@link QueryResultItem.dematerialize | dematerialize() }-ed or the item\n * goes out of scope.\n *\n * Note: This property is very similar to {@link Document.value}.\n */\n get value() {\n this.materialize();\n if (this.materializedValue === undefined) {\n throw new Error('Internal Error: Materialized value is undefined');\n }\n return this.materializedValue;\n }\n /**\n * Returns `true` if value is currently held materialized in memory, otherwise\n * returns `false`.\n *\n * See {@link QueryResultItem.materialize | materialize()} and\n * {@link QueryResultItem.dematerialize | dematerialize()}.\n */\n get isMaterialized() {\n return this.materializedValue !== undefined;\n }\n /**\n * Loads the CBOR representation of the item's content, decodes it as an\n * object so it can be accessed via {@link QueryResultItem.value | value }.\n * Keeps the object in memory until\n * {@link QueryResultItem.dematerialize | dematerialize() } is called. No-op\n * if {@link QueryResultItem.value | value } is already materialized.\n */\n materialize() {\n if (!this.isMaterialized) {\n const cborValue = this.cborData();\n let materializedValue;\n try {\n materializedValue = CBOR.decode(cborValue);\n }\n catch (error) {\n throw new Error(`Internal inconsistency: CBOR decoding error while materializing result item: ${error.message}`);\n }\n if (materializedValue === undefined) {\n throw new Error('Internal inconsistency: Materialized value is undefined');\n }\n this.materializedValue = materializedValue;\n }\n }\n /**\n * Releases the materialized value from memory. No-op if item is not\n * materialized.\n */\n dematerialize() {\n this.materializedValue = undefined;\n }\n /**\n * Returns the content of the item as CBOR data.\n *\n * Important: The returned CBOR data is not cached, make sure to call this\n * method once and keep it for as long as needed.\n */\n cborData() {\n const resultHandle = Bridge.dqlResult.handleFor(this);\n return FFI.dqlResultCBOR(resultHandle.deref());\n }\n /**\n * Returns the content of the item as a JSON string.\n *\n * Important: The returned JSON string is not cached, make sure to call this\n * method once and keep it for as long as needed.\n */\n jsonString() {\n const resultHandle = Bridge.dqlResult.handleFor(this);\n return FFI.dqlResultJSON(resultHandle.deref());\n }\n /** @internal */\n constructor() { }\n}\n//# sourceMappingURL=query-result-item.js.map","import { Bridge } from './bridge';\n/**\n * Get a count of bridged objects binned by bridge type.\n *\n * Use this in testing to ensure that all objects are properly garbage collected at the end of tests.\n *\n * @returns an object with a key per bridge type, set to the count of registered\n * objects.\n */\nexport function getBridgeLoad() {\n const countsByType = {};\n Bridge.all.map((bridgeWeakRef) => {\n const bridge = bridgeWeakRef.deref();\n if (!bridge) {\n return null;\n }\n if (bridge.count === 0) {\n return null;\n }\n countsByType[bridge.type.name] = bridge.count;\n });\n return countsByType;\n}\n//# sourceMappingURL=test-helpers.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\n// HACK: don't export these publicly, only needed internally.\n/** @internal */\nexport class StaticTCPClient {\n}\n//# sourceMappingURL=static-tcp-client.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\n// HACK: don't export these publicly, only needed internally.\n/** @internal */\nexport class WebsocketClient {\n}\n//# sourceMappingURL=websocket-client.js.map","//\n// Copyright © 2021 DittoLive Incorporated. All rights reserved.\n//\n// NOTE: this is the last file to be rolled up. Typically, you'll use this to\n// tie up certain associations that would otherwise lead to import cycles. The\n// bridges are a good example of this: the type constructors for the bridged\n// types need to be registered with it, but can't do it at creation time of the\n// bridges, because anything that would require a certain bridge would\n// immediately require the bridged type, oftentimes leading to an import cycle.\nimport { Attachment } from './attachment';\nimport { Document, MutableDocument } from './document';\nimport { StaticTCPClient } from './static-tcp-client';\nimport { WebsocketClient } from './websocket-client';\nimport { Ditto } from './ditto';\nimport { Bridge } from './bridge';\nimport { QueryResult } from './query-result';\nimport { QueryResultItem } from './query-result-item';\nBridge.attachment.registerType(Attachment);\nBridge.document.registerType(Document);\nBridge.dqlResult.registerType(QueryResultItem);\nBridge.dqlResponse.registerType(QueryResult);\nBridge.mutableDocument.registerType(MutableDocument);\nBridge.staticTCPClient.registerType(StaticTCPClient);\nBridge.websocketClient.registerType(WebsocketClient);\nBridge.ditto.registerType(Ditto);\n//# sourceMappingURL=epilogue.js.map"],"names":["privateToken","getDeadlockTimeout","setDeadlockTimeout","withOutPtr","dittoCore.dittoffi_error_code","dittoCore.boxCStringIntoString","dittoCore.dittoffi_error_description","dittoCore.dittoffi_error_free","dittoCore.ditto_error_message","dittoCore.ditto_add_internal_ble_client_transport","dittoCore.ditto_add_internal_ble_server_transport","dittoCore.ble_client_free_handle","dittoCore.ble_server_free_handle","dittoCore.ditto_add_internal_mdns_client_transport","dittoCore.mdns_client_free_handle","dittoCore.ditto_add_internal_mdns_server_transport","dittoCore.mdns_server_free_handle","dittoCore.ditto_document_set_cbor_with_timestamp","dittoCore.ditto_document_set_cbor","dittoCore.ditto_document_id","dittoCore.boxCBytesIntoBuffer","dittoCore.ditto_document_get_cbor_with_path_type","dittoCore.ditto_document_remove","dittoCore.ditto_document_increment_counter","dittoCore.ditto_document_free","dittoCore.ditto_document_id_query_compatible","dittoCore.withOutBoxCBytes","dittoCore.ditto_validate_document_id","dittoCore.ditto_collection_get","dittoCore.ditto_collection_insert_value","dittoCore.ditto_collection_remove","dittoCore.ditto_collection_evict","dittoCore.ditto_collection_update","dittoCore.jsDocsToCDocs","dittoCore.ditto_collection_update_multiple","dittoCore.ditto_collection_exec_query_str","dittoCore.ditto_collection_remove_query_str","dittoCore.ditto_collection_evict_query_str","dittoCore.dittoffi_try_experimental_exec_statement_str","dittoCore.ditto_add_subscription","dittoCore.ditto_remove_subscription","dittoCore.dittoffi_try_experimental_add_dql_subscription","dittoCore.dittoffi_try_experimental_remove_dql_subscription","dittoCore.ditto_dql_response_free","dittoCore.ditto_dql_result_free","dittoCore.ditto_dql_response_result_count","dittoCore.ditto_dql_response_result_at","dittoCore.ditto_dql_response_affected_document_id_count","dittoCore.ditto_dql_response_affected_document_id_at","dittoCore.ditto_result_cbor","dittoCore.ditto_result_json","dittoCore.ditto_live_query_register_str_detached","dittoCore.dittoffi_try_experimental_register_change_observer_str_detached","dittoCore.ditto_live_query_start","dittoCore.ditto_live_query_stop","dittoCore.ditto_live_query_signal_available_next","dittoCore.ditto_live_query_webhook_register_str","dittoCore.dittoffi_try_experimental_webhook_register_dql_live_query_str","dittoCore.ditto_read_transaction","dittoCore.ditto_read_transaction_free","dittoCore.ditto_write_transaction","dittoCore.ditto_write_transaction_commit","dittoCore.ditto_write_transaction_rollback","dittoCore.static_tcp_client_free_handle","dittoCore.websocket_client_free_handle","dittoCore.ditto_logger_init","dittoCore.ditto_logger_set_custom_log_cb","dittoCore.ditto_logger_enabled","dittoCore.ditto_logger_enabled_get","dittoCore.ditto_logger_emoji_headings_enabled","dittoCore.ditto_logger_emoji_headings_enabled_get","dittoCore.ditto_logger_minimum_log_level","dittoCore.ditto_logger_minimum_log_level_get","dittoCore.ditto_logger_set_log_file","dittoCore.ditto_log","dittoCore.ditto_identity_config_make_online_playground","dittoCore.ditto_identity_config_make_online_with_authentication","dittoCore.ditto_identity_config_make_offline_playground","dittoCore.ditto_identity_config_make_shared_key","dittoCore.ditto_identity_config_make_manual_v0","dittoCore.ditto_auth_client_get_site_id","dittoCore.ditto_auth_client_get_app_id","dittoCore.ditto_auth_client_user_id","dittoCore.ditto_auth_client_is_web_valid","dittoCore.ditto_auth_client_is_x509_valid","dittoCore.ditto_auth_client_login_with_token","dittoCore.ditto_auth_client_login_with_credentials","dittoCore.ditto_auth_client_logout","dittoCore.ditto_uninitialized_ditto_make","dittoCore.ditto_make","dittoCore.ditto_get_collection_names","dittoCore.cStringVecToStringArray","dittoCore.ditto_free","dittoCore.getDeadlockTimeout","dittoCore.setDeadlockTimeout","dittoCore.ditto_register_presence_v1_callback","dittoCore.refCStringToString","dittoCore.ditto_clear_presence_callback","dittoCore.ditto_register_presence_v3_callback","dittoCore.ditto_clear_presence_v3_callback","dittoCore.ditto_small_peer_info_get_is_enabled","dittoCore.ditto_small_peer_info_set_enabled","dittoCore.ditto_small_peer_info_get_sync_scope","dittoCore.ditto_small_peer_info_set_sync_scope","dittoCore.ditto_small_peer_info_get_metadata","dittoCore.ditto_small_peer_info_set_metadata","dittoCore.ditto_small_peer_info_set_transport_config_data","dittoCore.ditto_register_transport_condition_changed_callback","dittoCore.ditto_set_device_name","dittoCore.ditto_set_connect_retry_interval","dittoCore.ditto_set_sync_group","dittoCore.ditto_new_attachment_from_file","dittoCore.ditto_new_attachment_from_bytes","dittoCore.ditto_resolve_attachment","dittoCore.ditto_cancel_resolve_attachment","dittoCore.ditto_free_attachment_handle","dittoCore.ditto_get_complete_attachment_path","dittoCore.ditto_get_sdk_version","dittoCore.dittoffi_get_sdk_semver","dittoCore.ditto_presence_v1","dittoCore.ditto_presence_v3","dittoCore.ditto_start_tcp_server","dittoCore.ditto_stop_tcp_server","dittoCore.ditto_shutdown","dittoCore.ditto_add_multicast_transport","dittoCore.ditto_remove_multicast_transport","dittoCore.ditto_start_http_server","dittoCore.ditto_stop_http_server","dittoCore.ditto_run_garbage_collection","dittoCore.ditto_disable_sync_with_v3","dittoCore.ditto_set_static_tcp_clients","dittoCore.ditto_set_static_websocket_clients","dittoCore.ditto_documents_hash","dittoCore.ditto_documents_hash_mnemonic","dittoCore.ditto_auth_set_login_provider","dittoCore.ditto_auth_client_make_login_provider","dittoCore.ditto_auth_client_set_validity_listener","dittoCore.ditto_sdk_transports_error_new","dittoCore.ditto_sdk_transports_init","dittoCore.ditto_sdk_transports_error_value","dittoCore.ditto_sdk_transports_error_free","dittoCore.ditto_sdk_transports_ble_is_available","dittoCore.ditto_sdk_transports_ble_create","dittoCore.ditto_sdk_transports_ble_destroy","dittoCore.ditto_sdk_transports_lan_is_available","dittoCore.ditto_sdk_transports_lan_create","dittoCore.ditto_sdk_transports_lan_destroy","dittoCore.ditto_sdk_transports_awdl_is_available","dittoCore.ditto_sdk_transports_awdl_create","dittoCore.ditto_sdk_transports_awdl_destroy","dittoCore.withOutPtr","dittoCore.ditto_init_sdk_version","dittoCore.ditto_verify_license","FFI.DittoCRDTTypeKey","FFI.DittoCRDTType","FFI.initSDKVersion","FFI.loggerInit","FFI.loggerSetLogFile","FFI.loggerEnabledGet","FFI.loggerEnabled","FFI.loggerEmojiHeadingsEnabledGet","FFI.loggerEmojiHeadingsEnabled","FFI.loggerMinimumLogLevelGet","FFI.loggerMinimumLogLevel","FFI.loggerSetCustomLogCb","FFI.log","this","CBOR","CBORRedux","FFI.documentIDQueryCompatible","FFI.validateDocumentID","FFI.freeAttachmentHandle","FFI.documentFree","FFI.dqlResponseFree","FFI.dqlResultFree","FFI.staticTCPClientFreeHandle","FFI.websocketClientFreeHandle","FFI.dittoClearPresenceCallback","FFI.dittoShutdown","FFI.dittoFree","FFI.dittoGetCompleteAttachmentPath","FFI.DittoCRDTValueKey","FFI.documentGetCBORWithPathType","FFI.documentIncrementCounter","FFI.documentSetCBORWithTimestamp","FFI.documentSetCBOR","FFI.documentRemove","FFI.documentsHash","FFI.documentsHashMnemonic","FFI.documentID","FFI.collectionExecQueryStr","FFI.collectionUpdateMultiple","FFI.readTransaction","FFI.collectionGet","FFI.readTransactionFree","FFI.dittoAuthClientLoginWithToken","FFI.dittoAuthClientLoginWithUsernameAndPassword","FFI.dittoAuthClientLogout","FFI.dittoAuthClientIsWebValid","FFI.dittoAuthClientUserID","FFI.liveQuerySignalAvailableNext","FFI.liveQueryRegister","FFI.writeTransaction","FFI.collectionRemoveQueryStr","FFI.writeTransactionCommit","FFI.collectionEvictQueryStr","FFI.collectionRemove","FFI.collectionEvict","FFI.collectionUpdate","FFI.collectionInsertValue","FFI.dittoNewAttachmentFromFile","FFI.dittoNewAttachmentFromBytes","FFI.dqlMutatedDocumentIDs","FFI.dqlResponseResults","FFI.tryExperimentalRegisterChangeObserver","FFI.writeTransactionRollback","FFI.liveQueryStart","FFI.dittoGetCollectionNames","FFI.tryExperimentalExecQueryStr","FFI.tryExperimentalWebhookRegisterDqlLiveQuery","FFI.liveQueryStop","FFI.liveQueryWebhookRegister","FFI.dittoPresenceV3","FFI.dittoRegisterPresenceV3Callback","FFI.dittoClearPresenceV3Callback","FFI.dittoPresenceV1","FFI.dittoRegisterPresenceV1Callback","FFI.dittoRegisterTransportConditionChangedCallback","FFI.tryExperimentalAddDQLSubscription","FFI.transportsInit","FFI.tryExperimentalRemoveDQLSubscription","FFI.dittoAddInternalBLEClientTransport","FFI.dittoAddInternalBLEServerTransport","FFI.bleServerFreeHandle","FFI.bleClientFreeHandle","FFI.transportsBLECreate","FFI.transportsBLEDestroy","FFI.transportsAWDLCreate","FFI.transportsAWDLDestroy","FFI.mdnsClientFreeHandle","FFI.mdnsServerFreeHandle","FFI.dittoRemoveMulticastTransport","FFI.dittoAddInternalMdnsTransport","FFI.dittoAddInternalMdnsAdvertiser","FFI.dittoAddMulticastTransport","FFI.transportsLANDestroy","FFI.transportsLANCreate","FFI.dittoStopTCPServer","FFI.dittoStartTCPServer","FFI.dittoStopHTTPServer","FFI.dittoStartHTTPServer","FFI.dittoSetStaticTCPClients","FFI.dittoSetStaticWebsocketClients","FFI.dittoSetSyncGroup","FFI.dittoSetConnectRetryInterval","FFI.transportsBLEIsAvailable","FFI.transportsAWDLIsAvailable","FFI.transportsLANIsAvailable","Environment.isWebBuild","FFI.addSubscription","FFI.removeSubscription","FFI.dittoResolveAttachment","FFI.dittoCancelResolveAttachment","FFI.dittoSmallPeerInfoGetIsEnabled","FFI.dittoSmallPeerInfoSetEnabled","FFI.dittoSmallPeerInfoGetMetadata","FFI.dittoSmallPeerInfoSetMetadata","FFI.dittoSmallPeerInfoGetSyncScope","FFI.dittoSmallPeerInfoSetSyncScope","FFI.dittoGetSDKSemver","FFI.dittoGetSDKVersion","FFI.uninitializedDittoMake","FFI.dittoIdentityConfigMakeOfflinePlayground","FFI.dittoIdentityConfigMakeManual","FFI.dittoIdentityConfigMakeSharedKey","FFI.dittoIdentityConfigMakeOnlinePlayground","FFI.dittoIdentityConfigMakeOnlineWithAuthentication","FFI.dittoMake","FFI.dittoAuthClientSetValidityListener","FFI.dittoAuthClientIsX509Valid","FFI.dittoAuthClientGetAppID","FFI.dittoAuthClientGetSiteID","FFI.dittoAuthClientMakeLoginProvider","FFI.dittoAuthSetLoginProvider","FFI.getDeadlockTimeout","FFI.setDeadlockTimeout","FFI.verifyLicense","FFI.dittoSmallPeerInfoCollectionSetTransportConfigData","FFI.dittoRunGarbageCollection","FFI.dittoDisableSyncWithV3","FFI.dittoSetDeviceName","FFI.dqlResultCBOR","FFI.dqlResultJSON"],"mappings":";;AAAA;AACA;AACA;AACA;AACO,MAAM,SAAS,CAAC;AACvB;AACA,IAAI,IAAI,QAAQ,GAAG;AACnB,QAAQ,OAAO,IAAI,CAAC,UAAU,KAAK,IAAI,CAAC;AACxC,KAAK;AACL;AACA,IAAI,WAAW,GAAG;AAClB,QAAQ,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;AAC7B,QAAQ,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;AAC/B,KAAK;AACL;AACA,IAAI,MAAM,CAAC,EAAE,EAAE;AACf,QAAQ,IAAI,OAAO,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,WAAW,EAAE;AACxD,YAAY,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AACpC,SAAS;AACT,QAAQ,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;AACjC,QAAQ,IAAI,IAAI,CAAC,UAAU,KAAK,IAAI,EAAE;AACtC;AACA;AACA;AACA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