@liveblocks/core 1.9.0-example1 → 1.19.0-test1

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/dist/index.d.mts CHANGED
@@ -756,8 +756,13 @@ declare type Options = {
756
756
  declare type PartialNullable<T> = {
757
757
  [P in keyof T]?: T[P] | null | undefined;
758
758
  };
759
+ declare type ThreadsFilterOptions<TThreadMetadata extends BaseMetadata> = {
760
+ query?: {
761
+ metadata?: Partial<TThreadMetadata>;
762
+ };
763
+ };
759
764
  declare type CommentsApi<TThreadMetadata extends BaseMetadata> = {
760
- getThreads(): Promise<ThreadData<TThreadMetadata>[]>;
765
+ getThreads(options?: ThreadsFilterOptions<TThreadMetadata>): Promise<ThreadData<TThreadMetadata>[]>;
761
766
  createThread(options: {
762
767
  threadId: string;
763
768
  commentId: string;
@@ -2153,12 +2158,7 @@ declare const fancyConsole_errorWithTitle: typeof errorWithTitle;
2153
2158
  declare const fancyConsole_warn: typeof warn;
2154
2159
  declare const fancyConsole_warnWithTitle: typeof warnWithTitle;
2155
2160
  declare namespace fancyConsole {
2156
- export {
2157
- fancyConsole_error as error,
2158
- fancyConsole_errorWithTitle as errorWithTitle,
2159
- fancyConsole_warn as warn,
2160
- fancyConsole_warnWithTitle as warnWithTitle,
2161
- };
2161
+ export { fancyConsole_error as error, fancyConsole_errorWithTitle as errorWithTitle, fancyConsole_warn as warn, fancyConsole_warnWithTitle as warnWithTitle };
2162
2162
  }
2163
2163
 
2164
2164
  /**
@@ -2323,14 +2323,7 @@ type DevToolsTreeNode_LsonTreeNode = LsonTreeNode;
2323
2323
  type DevToolsTreeNode_TreeNode = TreeNode;
2324
2324
  type DevToolsTreeNode_UserTreeNode = UserTreeNode;
2325
2325
  declare namespace DevToolsTreeNode {
2326
- export {
2327
- DevToolsTreeNode_CustomEventTreeNode as CustomEventTreeNode,
2328
- DevToolsTreeNode_JsonTreeNode as JsonTreeNode,
2329
- DevToolsTreeNode_LiveTreeNode as LiveTreeNode,
2330
- DevToolsTreeNode_LsonTreeNode as LsonTreeNode,
2331
- DevToolsTreeNode_TreeNode as TreeNode,
2332
- DevToolsTreeNode_UserTreeNode as UserTreeNode,
2333
- };
2326
+ export type { DevToolsTreeNode_CustomEventTreeNode as CustomEventTreeNode, DevToolsTreeNode_JsonTreeNode as JsonTreeNode, DevToolsTreeNode_LiveTreeNode as LiveTreeNode, DevToolsTreeNode_LsonTreeNode as LsonTreeNode, DevToolsTreeNode_TreeNode as TreeNode, DevToolsTreeNode_UserTreeNode as UserTreeNode };
2334
2327
  }
2335
2328
 
2336
2329
  /**
@@ -2450,12 +2443,7 @@ type protocol_FullClientToPanelMessage = FullClientToPanelMessage;
2450
2443
  type protocol_FullPanelToClientMessage = FullPanelToClientMessage;
2451
2444
  type protocol_PanelToClientMessage = PanelToClientMessage;
2452
2445
  declare namespace protocol {
2453
- export {
2454
- protocol_ClientToPanelMessage as ClientToPanelMessage,
2455
- protocol_FullClientToPanelMessage as FullClientToPanelMessage,
2456
- protocol_FullPanelToClientMessage as FullPanelToClientMessage,
2457
- protocol_PanelToClientMessage as PanelToClientMessage,
2458
- };
2446
+ export type { protocol_ClientToPanelMessage as ClientToPanelMessage, protocol_FullClientToPanelMessage as FullClientToPanelMessage, protocol_FullPanelToClientMessage as FullPanelToClientMessage, protocol_PanelToClientMessage as PanelToClientMessage };
2459
2447
  }
2460
2448
 
2461
2449
  declare type PromiseOrNot<T> = T | Promise<T>;
@@ -2581,4 +2569,4 @@ declare type EnsureJson<T> = [
2581
2569
  [K in keyof T]: EnsureJson<T[K]>;
2582
2570
  };
2583
2571
 
2584
- export { AckOp, AsyncCache, AsyncState, AsyncStateError, AsyncStateInitial, AsyncStateLoading, AsyncStateResolved, AsyncStateSuccess, BaseAuthResult, BaseMetadata, BaseUserMeta, Brand, BroadcastEventClientMsg, BroadcastOptions, BroadcastedEventServerMsg, Client, ClientMsg, ClientMsgCode, CommentBody, CommentBodyBlockElement, CommentBodyElement, CommentBodyInlineElement, CommentBodyLink, CommentBodyLinkElementArgs, CommentBodyMention, CommentBodyMentionElementArgs, CommentBodyParagraph, CommentBodyParagraphElementArgs, CommentBodyResolveUsersArgs, CommentBodyText, CommentBodyTextElementArgs, CommentData, CommentDataPlain, CommentReaction, CommentUserReaction, CommentUserReactionPlain, CommentsApi, CommentsApiError, CrdtType, CreateListOp, CreateMapOp, CreateObjectOp, CreateOp, CreateRegisterOp, CustomAuthenticationResult, Delegates, DeleteCrdtOp, DeleteObjectKeyOp, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, EnsureJson, EnterOptions, EventSource, FetchStorageClientMsg, FetchYDocClientMsg, History, IUserInfo, IWebSocket, IWebSocketCloseEvent, IWebSocketEvent, IWebSocketInstance, IWebSocketMessageEvent, IdTuple, Immutable, InitialDocumentStateServerMsg, Json, JsonArray, JsonObject, JsonScalar, LegacyConnectionStatus, LiveList, LiveListUpdate, LiveMap, LiveMapUpdate, LiveNode, LiveObject, LiveObjectUpdate, LiveStructure, LostConnectionEvent, Lson, LsonObject, NodeMap, Op, OpCode, Others, OthersEvent, ParentToChildNodeMap, PlainLson, PlainLsonFields, PlainLsonList, PlainLsonMap, PlainLsonObject, RejectedStorageOpServerMsg, Resolve, Room, RoomEventMessage, RoomInitializers, RoomStateServerMsg, SerializedChild, SerializedCrdt, SerializedList, SerializedMap, SerializedObject, SerializedRegister, SerializedRootObject, ServerMsg, ServerMsgCode, SetParentKeyOp, Status, StorageStatus, StorageUpdate, StringifyCommentBodyElements, StringifyCommentBodyOptions, ThreadData, ThreadDataPlain, ToImmutable, ToJson, UnsubscribeCallback, UpdateObjectOp, UpdatePresenceClientMsg, UpdatePresenceServerMsg, UpdateStorageClientMsg, UpdateStorageServerMsg, UpdateYDocClientMsg, User, UserJoinServerMsg, UserLeftServerMsg, WebsocketCloseCodes, YDocUpdateServerMsg, asPos, assert, assertNever, b64decode, cloneLson, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToThreadData, createAsyncCache, createClient, createCommentsApi, deprecate, deprecateIf, detectDupes, errorIf, freeze, getMentionedIdsFromCommentBody, isChildCrdt, isJsonArray, isJsonObject, isJsonScalar, isLiveNode, isPlainObject, isRootCrdt, legacy_patchImmutableObject, lsonToJson, makeEventSource, makePoller, makePosition, nn, patchLiveObjectKey, raise, shallow, stringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, withTimeout };
2572
+ export { type AckOp, type AsyncCache, type AsyncState, type AsyncStateError, type AsyncStateInitial, type AsyncStateLoading, type AsyncStateResolved, type AsyncStateSuccess, type BaseAuthResult, type BaseMetadata, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type Client, type ClientMsg, ClientMsgCode, type CommentBody, type CommentBodyBlockElement, type CommentBodyElement, type CommentBodyInlineElement, type CommentBodyLink, type CommentBodyLinkElementArgs, type CommentBodyMention, type CommentBodyMentionElementArgs, type CommentBodyParagraph, type CommentBodyParagraphElementArgs, type CommentBodyResolveUsersArgs, type CommentBodyText, type CommentBodyTextElementArgs, type CommentData, type CommentDataPlain, type CommentReaction, type CommentUserReaction, type CommentUserReactionPlain, type CommentsApi, CommentsApiError, CrdtType, type CreateListOp, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type CustomAuthenticationResult, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type EnsureJson, type EnterOptions, type EventSource, type FetchStorageClientMsg, type FetchYDocClientMsg, type History, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IdTuple, type Immutable, type InitialDocumentStateServerMsg, type Json, type JsonArray, type JsonObject, type JsonScalar, type LegacyConnectionStatus, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, type LostConnectionEvent, type Lson, type LsonObject, type NodeMap, type Op, OpCode, type Others, type OthersEvent, type ParentToChildNodeMap, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type RejectedStorageOpServerMsg, type Resolve, type Room, type RoomEventMessage, type RoomInitializers, type RoomStateServerMsg, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type SetParentKeyOp, type Status, type StorageStatus, type StorageUpdate, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type ThreadData, type ThreadDataPlain, type ThreadsFilterOptions, type ToImmutable, type ToJson, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateYDocClientMsg, type User, type UserJoinServerMsg, type UserLeftServerMsg, WebsocketCloseCodes, type YDocUpdateServerMsg, asPos, assert, assertNever, b64decode, cloneLson, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToThreadData, createAsyncCache, createClient, createCommentsApi, deprecate, deprecateIf, detectDupes, errorIf, freeze, getMentionedIdsFromCommentBody, isChildCrdt, isJsonArray, isJsonObject, isJsonScalar, isLiveNode, isPlainObject, isRootCrdt, legacy_patchImmutableObject, lsonToJson, makeEventSource, makePoller, makePosition, nn, patchLiveObjectKey, raise, shallow, stringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, withTimeout };
package/dist/index.d.ts CHANGED
@@ -756,8 +756,13 @@ declare type Options = {
756
756
  declare type PartialNullable<T> = {
757
757
  [P in keyof T]?: T[P] | null | undefined;
758
758
  };
759
+ declare type ThreadsFilterOptions<TThreadMetadata extends BaseMetadata> = {
760
+ query?: {
761
+ metadata?: Partial<TThreadMetadata>;
762
+ };
763
+ };
759
764
  declare type CommentsApi<TThreadMetadata extends BaseMetadata> = {
760
- getThreads(): Promise<ThreadData<TThreadMetadata>[]>;
765
+ getThreads(options?: ThreadsFilterOptions<TThreadMetadata>): Promise<ThreadData<TThreadMetadata>[]>;
761
766
  createThread(options: {
762
767
  threadId: string;
763
768
  commentId: string;
@@ -2153,12 +2158,7 @@ declare const fancyConsole_errorWithTitle: typeof errorWithTitle;
2153
2158
  declare const fancyConsole_warn: typeof warn;
2154
2159
  declare const fancyConsole_warnWithTitle: typeof warnWithTitle;
2155
2160
  declare namespace fancyConsole {
2156
- export {
2157
- fancyConsole_error as error,
2158
- fancyConsole_errorWithTitle as errorWithTitle,
2159
- fancyConsole_warn as warn,
2160
- fancyConsole_warnWithTitle as warnWithTitle,
2161
- };
2161
+ export { fancyConsole_error as error, fancyConsole_errorWithTitle as errorWithTitle, fancyConsole_warn as warn, fancyConsole_warnWithTitle as warnWithTitle };
2162
2162
  }
2163
2163
 
2164
2164
  /**
@@ -2323,14 +2323,7 @@ type DevToolsTreeNode_LsonTreeNode = LsonTreeNode;
2323
2323
  type DevToolsTreeNode_TreeNode = TreeNode;
2324
2324
  type DevToolsTreeNode_UserTreeNode = UserTreeNode;
2325
2325
  declare namespace DevToolsTreeNode {
2326
- export {
2327
- DevToolsTreeNode_CustomEventTreeNode as CustomEventTreeNode,
2328
- DevToolsTreeNode_JsonTreeNode as JsonTreeNode,
2329
- DevToolsTreeNode_LiveTreeNode as LiveTreeNode,
2330
- DevToolsTreeNode_LsonTreeNode as LsonTreeNode,
2331
- DevToolsTreeNode_TreeNode as TreeNode,
2332
- DevToolsTreeNode_UserTreeNode as UserTreeNode,
2333
- };
2326
+ export type { DevToolsTreeNode_CustomEventTreeNode as CustomEventTreeNode, DevToolsTreeNode_JsonTreeNode as JsonTreeNode, DevToolsTreeNode_LiveTreeNode as LiveTreeNode, DevToolsTreeNode_LsonTreeNode as LsonTreeNode, DevToolsTreeNode_TreeNode as TreeNode, DevToolsTreeNode_UserTreeNode as UserTreeNode };
2334
2327
  }
2335
2328
 
2336
2329
  /**
@@ -2450,12 +2443,7 @@ type protocol_FullClientToPanelMessage = FullClientToPanelMessage;
2450
2443
  type protocol_FullPanelToClientMessage = FullPanelToClientMessage;
2451
2444
  type protocol_PanelToClientMessage = PanelToClientMessage;
2452
2445
  declare namespace protocol {
2453
- export {
2454
- protocol_ClientToPanelMessage as ClientToPanelMessage,
2455
- protocol_FullClientToPanelMessage as FullClientToPanelMessage,
2456
- protocol_FullPanelToClientMessage as FullPanelToClientMessage,
2457
- protocol_PanelToClientMessage as PanelToClientMessage,
2458
- };
2446
+ export type { protocol_ClientToPanelMessage as ClientToPanelMessage, protocol_FullClientToPanelMessage as FullClientToPanelMessage, protocol_FullPanelToClientMessage as FullPanelToClientMessage, protocol_PanelToClientMessage as PanelToClientMessage };
2459
2447
  }
2460
2448
 
2461
2449
  declare type PromiseOrNot<T> = T | Promise<T>;
@@ -2581,4 +2569,4 @@ declare type EnsureJson<T> = [
2581
2569
  [K in keyof T]: EnsureJson<T[K]>;
2582
2570
  };
2583
2571
 
2584
- export { AckOp, AsyncCache, AsyncState, AsyncStateError, AsyncStateInitial, AsyncStateLoading, AsyncStateResolved, AsyncStateSuccess, BaseAuthResult, BaseMetadata, BaseUserMeta, Brand, BroadcastEventClientMsg, BroadcastOptions, BroadcastedEventServerMsg, Client, ClientMsg, ClientMsgCode, CommentBody, CommentBodyBlockElement, CommentBodyElement, CommentBodyInlineElement, CommentBodyLink, CommentBodyLinkElementArgs, CommentBodyMention, CommentBodyMentionElementArgs, CommentBodyParagraph, CommentBodyParagraphElementArgs, CommentBodyResolveUsersArgs, CommentBodyText, CommentBodyTextElementArgs, CommentData, CommentDataPlain, CommentReaction, CommentUserReaction, CommentUserReactionPlain, CommentsApi, CommentsApiError, CrdtType, CreateListOp, CreateMapOp, CreateObjectOp, CreateOp, CreateRegisterOp, CustomAuthenticationResult, Delegates, DeleteCrdtOp, DeleteObjectKeyOp, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, EnsureJson, EnterOptions, EventSource, FetchStorageClientMsg, FetchYDocClientMsg, History, IUserInfo, IWebSocket, IWebSocketCloseEvent, IWebSocketEvent, IWebSocketInstance, IWebSocketMessageEvent, IdTuple, Immutable, InitialDocumentStateServerMsg, Json, JsonArray, JsonObject, JsonScalar, LegacyConnectionStatus, LiveList, LiveListUpdate, LiveMap, LiveMapUpdate, LiveNode, LiveObject, LiveObjectUpdate, LiveStructure, LostConnectionEvent, Lson, LsonObject, NodeMap, Op, OpCode, Others, OthersEvent, ParentToChildNodeMap, PlainLson, PlainLsonFields, PlainLsonList, PlainLsonMap, PlainLsonObject, RejectedStorageOpServerMsg, Resolve, Room, RoomEventMessage, RoomInitializers, RoomStateServerMsg, SerializedChild, SerializedCrdt, SerializedList, SerializedMap, SerializedObject, SerializedRegister, SerializedRootObject, ServerMsg, ServerMsgCode, SetParentKeyOp, Status, StorageStatus, StorageUpdate, StringifyCommentBodyElements, StringifyCommentBodyOptions, ThreadData, ThreadDataPlain, ToImmutable, ToJson, UnsubscribeCallback, UpdateObjectOp, UpdatePresenceClientMsg, UpdatePresenceServerMsg, UpdateStorageClientMsg, UpdateStorageServerMsg, UpdateYDocClientMsg, User, UserJoinServerMsg, UserLeftServerMsg, WebsocketCloseCodes, YDocUpdateServerMsg, asPos, assert, assertNever, b64decode, cloneLson, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToThreadData, createAsyncCache, createClient, createCommentsApi, deprecate, deprecateIf, detectDupes, errorIf, freeze, getMentionedIdsFromCommentBody, isChildCrdt, isJsonArray, isJsonObject, isJsonScalar, isLiveNode, isPlainObject, isRootCrdt, legacy_patchImmutableObject, lsonToJson, makeEventSource, makePoller, makePosition, nn, patchLiveObjectKey, raise, shallow, stringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, withTimeout };
2572
+ export { type AckOp, type AsyncCache, type AsyncState, type AsyncStateError, type AsyncStateInitial, type AsyncStateLoading, type AsyncStateResolved, type AsyncStateSuccess, type BaseAuthResult, type BaseMetadata, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type Client, type ClientMsg, ClientMsgCode, type CommentBody, type CommentBodyBlockElement, type CommentBodyElement, type CommentBodyInlineElement, type CommentBodyLink, type CommentBodyLinkElementArgs, type CommentBodyMention, type CommentBodyMentionElementArgs, type CommentBodyParagraph, type CommentBodyParagraphElementArgs, type CommentBodyResolveUsersArgs, type CommentBodyText, type CommentBodyTextElementArgs, type CommentData, type CommentDataPlain, type CommentReaction, type CommentUserReaction, type CommentUserReactionPlain, type CommentsApi, CommentsApiError, CrdtType, type CreateListOp, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type CustomAuthenticationResult, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type EnsureJson, type EnterOptions, type EventSource, type FetchStorageClientMsg, type FetchYDocClientMsg, type History, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IdTuple, type Immutable, type InitialDocumentStateServerMsg, type Json, type JsonArray, type JsonObject, type JsonScalar, type LegacyConnectionStatus, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, type LostConnectionEvent, type Lson, type LsonObject, type NodeMap, type Op, OpCode, type Others, type OthersEvent, type ParentToChildNodeMap, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type RejectedStorageOpServerMsg, type Resolve, type Room, type RoomEventMessage, type RoomInitializers, type RoomStateServerMsg, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type SetParentKeyOp, type Status, type StorageStatus, type StorageUpdate, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type ThreadData, type ThreadDataPlain, type ThreadsFilterOptions, type ToImmutable, type ToJson, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateYDocClientMsg, type User, type UserJoinServerMsg, type UserLeftServerMsg, WebsocketCloseCodes, type YDocUpdateServerMsg, asPos, assert, assertNever, b64decode, cloneLson, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToThreadData, createAsyncCache, createClient, createCommentsApi, deprecate, deprecateIf, detectDupes, errorIf, freeze, getMentionedIdsFromCommentBody, isChildCrdt, isJsonArray, isJsonObject, isJsonScalar, isLiveNode, isPlainObject, isRootCrdt, legacy_patchImmutableObject, lsonToJson, makeEventSource, makePoller, makePosition, nn, patchLiveObjectKey, raise, shallow, stringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, withTimeout };
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ var __export = (target, all) => {
6
6
 
7
7
  // src/version.ts
8
8
  var PKG_NAME = "@liveblocks/core";
9
- var PKG_VERSION = "1.9.0-example1";
9
+ var PKG_VERSION = "1.19.0-test1";
10
10
  var PKG_FORMAT = "cjs";
11
11
 
12
12
  // src/dupe-detection.ts
@@ -2145,8 +2145,8 @@ function createCommentsApi(roomId, getAuthValue, config) {
2145
2145
  const url = new URL(
2146
2146
  `/v2/c/rooms/${encodeURIComponent(roomId2)}${endpoint}`,
2147
2147
  config.baseUrl
2148
- ).toString();
2149
- return await fetch(url, {
2148
+ );
2149
+ return await fetch(url.toString(), {
2150
2150
  ...options,
2151
2151
  headers: {
2152
2152
  ..._optionalChain([options, 'optionalAccess', _55 => _55.headers]),
@@ -2154,8 +2154,16 @@ function createCommentsApi(roomId, getAuthValue, config) {
2154
2154
  }
2155
2155
  });
2156
2156
  }
2157
- async function getThreads() {
2158
- const response = await fetchApi(roomId, "/threads");
2157
+ async function getThreads(options) {
2158
+ const response = await fetchApi(roomId, "/threads/search", {
2159
+ body: JSON.stringify({
2160
+ ..._optionalChain([options, 'optionalAccess', _56 => _56.query, 'optionalAccess', _57 => _57.metadata]) && { metadata: options.query.metadata }
2161
+ }),
2162
+ headers: {
2163
+ "Content-Type": "application/json"
2164
+ },
2165
+ method: "POST"
2166
+ });
2159
2167
  if (response.ok) {
2160
2168
  const json = await response.json();
2161
2169
  return json.data.map((thread) => convertToThreadData(thread));
@@ -2669,7 +2677,7 @@ var LiveRegister = class _LiveRegister extends AbstractCrdt {
2669
2677
  return [
2670
2678
  {
2671
2679
  type: 8 /* CREATE_REGISTER */,
2672
- opId: _optionalChain([pool, 'optionalAccess', _56 => _56.generateOpId, 'call', _57 => _57()]),
2680
+ opId: _optionalChain([pool, 'optionalAccess', _58 => _58.generateOpId, 'call', _59 => _59()]),
2673
2681
  id: this._id,
2674
2682
  parentId,
2675
2683
  parentKey,
@@ -2771,7 +2779,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
2771
2779
  const ops = [];
2772
2780
  const op = {
2773
2781
  id: this._id,
2774
- opId: _optionalChain([pool, 'optionalAccess', _58 => _58.generateOpId, 'call', _59 => _59()]),
2782
+ opId: _optionalChain([pool, 'optionalAccess', _60 => _60.generateOpId, 'call', _61 => _61()]),
2775
2783
  type: 2 /* CREATE_LIST */,
2776
2784
  parentId,
2777
2785
  parentKey
@@ -3048,7 +3056,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
3048
3056
  _applyInsertUndoRedo(op) {
3049
3057
  const { id, parentKey: key } = op;
3050
3058
  const child = creationOpToLiveNode(op);
3051
- if (_optionalChain([this, 'access', _60 => _60._pool, 'optionalAccess', _61 => _61.getNode, 'call', _62 => _62(id)]) !== void 0) {
3059
+ if (_optionalChain([this, 'access', _62 => _62._pool, 'optionalAccess', _63 => _63.getNode, 'call', _64 => _64(id)]) !== void 0) {
3052
3060
  return { modified: false };
3053
3061
  }
3054
3062
  child._attach(id, nn(this._pool));
@@ -3056,8 +3064,8 @@ var LiveList = class _LiveList extends AbstractCrdt {
3056
3064
  const existingItemIndex = this._indexOfPosition(key);
3057
3065
  let newKey = key;
3058
3066
  if (existingItemIndex !== -1) {
3059
- const before2 = _optionalChain([this, 'access', _63 => _63._items, 'access', _64 => _64[existingItemIndex], 'optionalAccess', _65 => _65._parentPos]);
3060
- const after2 = _optionalChain([this, 'access', _66 => _66._items, 'access', _67 => _67[existingItemIndex + 1], 'optionalAccess', _68 => _68._parentPos]);
3067
+ const before2 = _optionalChain([this, 'access', _65 => _65._items, 'access', _66 => _66[existingItemIndex], 'optionalAccess', _67 => _67._parentPos]);
3068
+ const after2 = _optionalChain([this, 'access', _68 => _68._items, 'access', _69 => _69[existingItemIndex + 1], 'optionalAccess', _70 => _70._parentPos]);
3061
3069
  newKey = makePosition(before2, after2);
3062
3070
  child._setParentLink(this, newKey);
3063
3071
  }
@@ -3072,7 +3080,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
3072
3080
  _applySetUndoRedo(op) {
3073
3081
  const { id, parentKey: key } = op;
3074
3082
  const child = creationOpToLiveNode(op);
3075
- if (_optionalChain([this, 'access', _69 => _69._pool, 'optionalAccess', _70 => _70.getNode, 'call', _71 => _71(id)]) !== void 0) {
3083
+ if (_optionalChain([this, 'access', _71 => _71._pool, 'optionalAccess', _72 => _72.getNode, 'call', _73 => _73(id)]) !== void 0) {
3076
3084
  return { modified: false };
3077
3085
  }
3078
3086
  this._unacknowledgedSets.set(key, nn(op.opId));
@@ -3194,7 +3202,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
3194
3202
  } else {
3195
3203
  this._items[existingItemIndex]._setParentLink(
3196
3204
  this,
3197
- makePosition(newKey, _optionalChain([this, 'access', _72 => _72._items, 'access', _73 => _73[existingItemIndex + 1], 'optionalAccess', _74 => _74._parentPos]))
3205
+ makePosition(newKey, _optionalChain([this, 'access', _74 => _74._items, 'access', _75 => _75[existingItemIndex + 1], 'optionalAccess', _76 => _76._parentPos]))
3198
3206
  );
3199
3207
  const previousIndex = this._items.indexOf(child);
3200
3208
  child._setParentLink(this, newKey);
@@ -3220,7 +3228,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
3220
3228
  if (existingItemIndex !== -1) {
3221
3229
  this._items[existingItemIndex]._setParentLink(
3222
3230
  this,
3223
- makePosition(newKey, _optionalChain([this, 'access', _75 => _75._items, 'access', _76 => _76[existingItemIndex + 1], 'optionalAccess', _77 => _77._parentPos]))
3231
+ makePosition(newKey, _optionalChain([this, 'access', _77 => _77._items, 'access', _78 => _78[existingItemIndex + 1], 'optionalAccess', _79 => _79._parentPos]))
3224
3232
  );
3225
3233
  }
3226
3234
  child._setParentLink(this, newKey);
@@ -3239,7 +3247,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
3239
3247
  if (existingItemIndex !== -1) {
3240
3248
  this._items[existingItemIndex]._setParentLink(
3241
3249
  this,
3242
- makePosition(newKey, _optionalChain([this, 'access', _78 => _78._items, 'access', _79 => _79[existingItemIndex + 1], 'optionalAccess', _80 => _80._parentPos]))
3250
+ makePosition(newKey, _optionalChain([this, 'access', _80 => _80._items, 'access', _81 => _81[existingItemIndex + 1], 'optionalAccess', _82 => _82._parentPos]))
3243
3251
  );
3244
3252
  }
3245
3253
  child._setParentLink(this, newKey);
@@ -3267,7 +3275,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
3267
3275
  if (existingItemIndex !== -1) {
3268
3276
  this._items[existingItemIndex]._setParentLink(
3269
3277
  this,
3270
- makePosition(newKey, _optionalChain([this, 'access', _81 => _81._items, 'access', _82 => _82[existingItemIndex + 1], 'optionalAccess', _83 => _83._parentPos]))
3278
+ makePosition(newKey, _optionalChain([this, 'access', _83 => _83._items, 'access', _84 => _84[existingItemIndex + 1], 'optionalAccess', _85 => _85._parentPos]))
3271
3279
  );
3272
3280
  }
3273
3281
  child._setParentLink(this, newKey);
@@ -3325,7 +3333,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
3325
3333
  * @param element The element to add to the end of the LiveList.
3326
3334
  */
3327
3335
  push(element) {
3328
- _optionalChain([this, 'access', _84 => _84._pool, 'optionalAccess', _85 => _85.assertStorageIsWritable, 'call', _86 => _86()]);
3336
+ _optionalChain([this, 'access', _86 => _86._pool, 'optionalAccess', _87 => _87.assertStorageIsWritable, 'call', _88 => _88()]);
3329
3337
  return this.insert(element, this.length);
3330
3338
  }
3331
3339
  /**
@@ -3334,7 +3342,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
3334
3342
  * @param index The index at which you want to insert the element.
3335
3343
  */
3336
3344
  insert(element, index) {
3337
- _optionalChain([this, 'access', _87 => _87._pool, 'optionalAccess', _88 => _88.assertStorageIsWritable, 'call', _89 => _89()]);
3345
+ _optionalChain([this, 'access', _89 => _89._pool, 'optionalAccess', _90 => _90.assertStorageIsWritable, 'call', _91 => _91()]);
3338
3346
  if (index < 0 || index > this._items.length) {
3339
3347
  throw new Error(
3340
3348
  `Cannot insert list item at index "${index}". index should be between 0 and ${this._items.length}`
@@ -3364,7 +3372,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
3364
3372
  * @param targetIndex The index where the element should be after moving.
3365
3373
  */
3366
3374
  move(index, targetIndex) {
3367
- _optionalChain([this, 'access', _90 => _90._pool, 'optionalAccess', _91 => _91.assertStorageIsWritable, 'call', _92 => _92()]);
3375
+ _optionalChain([this, 'access', _92 => _92._pool, 'optionalAccess', _93 => _93.assertStorageIsWritable, 'call', _94 => _94()]);
3368
3376
  if (targetIndex < 0) {
3369
3377
  throw new Error("targetIndex cannot be less than 0");
3370
3378
  }
@@ -3422,7 +3430,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
3422
3430
  * @param index The index of the element to delete
3423
3431
  */
3424
3432
  delete(index) {
3425
- _optionalChain([this, 'access', _93 => _93._pool, 'optionalAccess', _94 => _94.assertStorageIsWritable, 'call', _95 => _95()]);
3433
+ _optionalChain([this, 'access', _95 => _95._pool, 'optionalAccess', _96 => _96.assertStorageIsWritable, 'call', _97 => _97()]);
3426
3434
  if (index < 0 || index >= this._items.length) {
3427
3435
  throw new Error(
3428
3436
  `Cannot delete list item at index "${index}". index should be between 0 and ${this._items.length - 1}`
@@ -3455,7 +3463,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
3455
3463
  }
3456
3464
  }
3457
3465
  clear() {
3458
- _optionalChain([this, 'access', _96 => _96._pool, 'optionalAccess', _97 => _97.assertStorageIsWritable, 'call', _98 => _98()]);
3466
+ _optionalChain([this, 'access', _98 => _98._pool, 'optionalAccess', _99 => _99.assertStorageIsWritable, 'call', _100 => _100()]);
3459
3467
  if (this._pool) {
3460
3468
  const ops = [];
3461
3469
  const reverseOps = [];
@@ -3489,7 +3497,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
3489
3497
  }
3490
3498
  }
3491
3499
  set(index, item) {
3492
- _optionalChain([this, 'access', _99 => _99._pool, 'optionalAccess', _100 => _100.assertStorageIsWritable, 'call', _101 => _101()]);
3500
+ _optionalChain([this, 'access', _101 => _101._pool, 'optionalAccess', _102 => _102.assertStorageIsWritable, 'call', _103 => _103()]);
3493
3501
  if (index < 0 || index >= this._items.length) {
3494
3502
  throw new Error(
3495
3503
  `Cannot set list item at index "${index}". index should be between 0 and ${this._items.length - 1}`
@@ -3637,7 +3645,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
3637
3645
  _shiftItemPosition(index, key) {
3638
3646
  const shiftedPosition = makePosition(
3639
3647
  key,
3640
- this._items.length > index + 1 ? _optionalChain([this, 'access', _102 => _102._items, 'access', _103 => _103[index + 1], 'optionalAccess', _104 => _104._parentPos]) : void 0
3648
+ this._items.length > index + 1 ? _optionalChain([this, 'access', _104 => _104._items, 'access', _105 => _105[index + 1], 'optionalAccess', _106 => _106._parentPos]) : void 0
3641
3649
  );
3642
3650
  this._items[index]._setParentLink(this, shiftedPosition);
3643
3651
  }
@@ -3766,7 +3774,7 @@ var LiveMap = class _LiveMap extends AbstractCrdt {
3766
3774
  const ops = [];
3767
3775
  const op = {
3768
3776
  id: this._id,
3769
- opId: _optionalChain([pool, 'optionalAccess', _105 => _105.generateOpId, 'call', _106 => _106()]),
3777
+ opId: _optionalChain([pool, 'optionalAccess', _107 => _107.generateOpId, 'call', _108 => _108()]),
3770
3778
  type: 7 /* CREATE_MAP */,
3771
3779
  parentId,
3772
3780
  parentKey
@@ -3913,7 +3921,7 @@ var LiveMap = class _LiveMap extends AbstractCrdt {
3913
3921
  * @param value The value of the element to add. Should be serializable to JSON.
3914
3922
  */
3915
3923
  set(key, value) {
3916
- _optionalChain([this, 'access', _107 => _107._pool, 'optionalAccess', _108 => _108.assertStorageIsWritable, 'call', _109 => _109()]);
3924
+ _optionalChain([this, 'access', _109 => _109._pool, 'optionalAccess', _110 => _110.assertStorageIsWritable, 'call', _111 => _111()]);
3917
3925
  const oldValue = this._map.get(key);
3918
3926
  if (oldValue) {
3919
3927
  oldValue._detach();
@@ -3959,7 +3967,7 @@ var LiveMap = class _LiveMap extends AbstractCrdt {
3959
3967
  * @returns true if an element existed and has been removed, or false if the element does not exist.
3960
3968
  */
3961
3969
  delete(key) {
3962
- _optionalChain([this, 'access', _110 => _110._pool, 'optionalAccess', _111 => _111.assertStorageIsWritable, 'call', _112 => _112()]);
3970
+ _optionalChain([this, 'access', _112 => _112._pool, 'optionalAccess', _113 => _113.assertStorageIsWritable, 'call', _114 => _114()]);
3963
3971
  const item = this._map.get(key);
3964
3972
  if (item === void 0) {
3965
3973
  return false;
@@ -4138,7 +4146,7 @@ var LiveObject = class _LiveObject extends AbstractCrdt {
4138
4146
  if (this._id === void 0) {
4139
4147
  throw new Error("Cannot serialize item is not attached");
4140
4148
  }
4141
- const opId = _optionalChain([pool, 'optionalAccess', _113 => _113.generateOpId, 'call', _114 => _114()]);
4149
+ const opId = _optionalChain([pool, 'optionalAccess', _115 => _115.generateOpId, 'call', _116 => _116()]);
4142
4150
  const ops = [];
4143
4151
  const op = {
4144
4152
  type: 4 /* CREATE_OBJECT */,
@@ -4416,7 +4424,7 @@ var LiveObject = class _LiveObject extends AbstractCrdt {
4416
4424
  * @param value The value of the property to add
4417
4425
  */
4418
4426
  set(key, value) {
4419
- _optionalChain([this, 'access', _115 => _115._pool, 'optionalAccess', _116 => _116.assertStorageIsWritable, 'call', _117 => _117()]);
4427
+ _optionalChain([this, 'access', _117 => _117._pool, 'optionalAccess', _118 => _118.assertStorageIsWritable, 'call', _119 => _119()]);
4420
4428
  this.update({ [key]: value });
4421
4429
  }
4422
4430
  /**
@@ -4431,7 +4439,7 @@ var LiveObject = class _LiveObject extends AbstractCrdt {
4431
4439
  * @param key The key of the property to delete
4432
4440
  */
4433
4441
  delete(key) {
4434
- _optionalChain([this, 'access', _118 => _118._pool, 'optionalAccess', _119 => _119.assertStorageIsWritable, 'call', _120 => _120()]);
4442
+ _optionalChain([this, 'access', _120 => _120._pool, 'optionalAccess', _121 => _121.assertStorageIsWritable, 'call', _122 => _122()]);
4435
4443
  const keyAsString = key;
4436
4444
  const oldValue = this._map.get(keyAsString);
4437
4445
  if (oldValue === void 0) {
@@ -4484,7 +4492,7 @@ var LiveObject = class _LiveObject extends AbstractCrdt {
4484
4492
  * @param patch The object used to overrides properties
4485
4493
  */
4486
4494
  update(patch) {
4487
- _optionalChain([this, 'access', _121 => _121._pool, 'optionalAccess', _122 => _122.assertStorageIsWritable, 'call', _123 => _123()]);
4495
+ _optionalChain([this, 'access', _123 => _123._pool, 'optionalAccess', _124 => _124.assertStorageIsWritable, 'call', _125 => _125()]);
4488
4496
  if (this._pool === void 0 || this._id === void 0) {
4489
4497
  for (const key in patch) {
4490
4498
  const newValue = patch[key];
@@ -5128,15 +5136,15 @@ function installBackgroundTabSpy() {
5128
5136
  const doc = typeof document !== "undefined" ? document : void 0;
5129
5137
  const inBackgroundSince = { current: null };
5130
5138
  function onVisibilityChange() {
5131
- if (_optionalChain([doc, 'optionalAccess', _124 => _124.visibilityState]) === "hidden") {
5139
+ if (_optionalChain([doc, 'optionalAccess', _126 => _126.visibilityState]) === "hidden") {
5132
5140
  inBackgroundSince.current = _nullishCoalesce(inBackgroundSince.current, () => ( Date.now()));
5133
5141
  } else {
5134
5142
  inBackgroundSince.current = null;
5135
5143
  }
5136
5144
  }
5137
- _optionalChain([doc, 'optionalAccess', _125 => _125.addEventListener, 'call', _126 => _126("visibilitychange", onVisibilityChange)]);
5145
+ _optionalChain([doc, 'optionalAccess', _127 => _127.addEventListener, 'call', _128 => _128("visibilitychange", onVisibilityChange)]);
5138
5146
  const unsub = () => {
5139
- _optionalChain([doc, 'optionalAccess', _127 => _127.removeEventListener, 'call', _128 => _128("visibilitychange", onVisibilityChange)]);
5147
+ _optionalChain([doc, 'optionalAccess', _129 => _129.removeEventListener, 'call', _130 => _130("visibilitychange", onVisibilityChange)]);
5140
5148
  };
5141
5149
  return [inBackgroundSince, unsub];
5142
5150
  }
@@ -5325,7 +5333,7 @@ function createRoom(options, config) {
5325
5333
  }
5326
5334
  },
5327
5335
  assertStorageIsWritable: () => {
5328
- const scopes = _optionalChain([context, 'access', _129 => _129.dynamicSessionInfo, 'access', _130 => _130.current, 'optionalAccess', _131 => _131.scopes]);
5336
+ const scopes = _optionalChain([context, 'access', _131 => _131.dynamicSessionInfo, 'access', _132 => _132.current, 'optionalAccess', _133 => _133.scopes]);
5329
5337
  if (scopes === void 0) {
5330
5338
  return;
5331
5339
  }
@@ -5364,7 +5372,7 @@ function createRoom(options, config) {
5364
5372
  `/v2/c/rooms/${encodeURIComponent(config.roomId)}${endpoint}`,
5365
5373
  config.baseUrl
5366
5374
  ).toString();
5367
- const fetcher = _optionalChain([config, 'access', _132 => _132.polyfills, 'optionalAccess', _133 => _133.fetch]) || /* istanbul ignore next */
5375
+ const fetcher = _optionalChain([config, 'access', _134 => _134.polyfills, 'optionalAccess', _135 => _135.fetch]) || /* istanbul ignore next */
5368
5376
  fetch;
5369
5377
  return fetcher(url, {
5370
5378
  method: "POST",
@@ -5377,7 +5385,7 @@ function createRoom(options, config) {
5377
5385
  }
5378
5386
  function sendMessages(messages) {
5379
5387
  const serializedPayload = JSON.stringify(messages);
5380
- const nonce = _optionalChain([context, 'access', _134 => _134.dynamicSessionInfo, 'access', _135 => _135.current, 'optionalAccess', _136 => _136.nonce]);
5388
+ const nonce = _optionalChain([context, 'access', _136 => _136.dynamicSessionInfo, 'access', _137 => _137.current, 'optionalAccess', _138 => _138.nonce]);
5381
5389
  if (config.unstable_fallbackToHTTP && nonce) {
5382
5390
  const size = new TextEncoder().encode(serializedPayload).length;
5383
5391
  if (size > MAX_SOCKET_MESSAGE_SIZE) {
@@ -5639,7 +5647,7 @@ function createRoom(options, config) {
5639
5647
  }
5640
5648
  context.myPresence.patch(patch);
5641
5649
  if (context.activeBatch) {
5642
- if (_optionalChain([options2, 'optionalAccess', _137 => _137.addToHistory])) {
5650
+ if (_optionalChain([options2, 'optionalAccess', _139 => _139.addToHistory])) {
5643
5651
  context.activeBatch.reverseOps.unshift({
5644
5652
  type: "presence",
5645
5653
  data: oldValues
@@ -5649,7 +5657,7 @@ function createRoom(options, config) {
5649
5657
  } else {
5650
5658
  flushNowOrSoon();
5651
5659
  batchUpdates(() => {
5652
- if (_optionalChain([options2, 'optionalAccess', _138 => _138.addToHistory])) {
5660
+ if (_optionalChain([options2, 'optionalAccess', _140 => _140.addToHistory])) {
5653
5661
  addToUndoStack(
5654
5662
  [{ type: "presence", data: oldValues }],
5655
5663
  doNotBatchUpdates
@@ -5829,7 +5837,7 @@ function createRoom(options, config) {
5829
5837
  const unacknowledgedOps = new Map(context.unacknowledgedOps);
5830
5838
  createOrUpdateRootFromMessage(message, doNotBatchUpdates);
5831
5839
  applyAndSendOps(unacknowledgedOps, doNotBatchUpdates);
5832
- _optionalChain([_resolveStoragePromise, 'optionalCall', _139 => _139()]);
5840
+ _optionalChain([_resolveStoragePromise, 'optionalCall', _141 => _141()]);
5833
5841
  notifyStorageStatus();
5834
5842
  eventHub.storageDidLoad.notify();
5835
5843
  break;
@@ -5852,7 +5860,7 @@ function createRoom(options, config) {
5852
5860
  if (process.env.NODE_ENV !== "production") {
5853
5861
  const traces = /* @__PURE__ */ new Set();
5854
5862
  for (const opId of message.opIds) {
5855
- const trace = _optionalChain([context, 'access', _140 => _140.opStackTraces, 'optionalAccess', _141 => _141.get, 'call', _142 => _142(opId)]);
5863
+ const trace = _optionalChain([context, 'access', _142 => _142.opStackTraces, 'optionalAccess', _143 => _143.get, 'call', _144 => _144(opId)]);
5856
5864
  if (trace) {
5857
5865
  traces.add(trace);
5858
5866
  }
@@ -6165,7 +6173,7 @@ ${Array.from(traces).join("\n\n")}`
6165
6173
  /* NOTE: Exposing __internal here only to allow testing implementation details in unit tests */
6166
6174
  __internal: {
6167
6175
  get presenceBuffer() {
6168
- return deepClone(_nullishCoalesce(_optionalChain([context, 'access', _143 => _143.buffer, 'access', _144 => _144.presenceUpdates, 'optionalAccess', _145 => _145.data]), () => ( null)));
6176
+ return deepClone(_nullishCoalesce(_optionalChain([context, 'access', _145 => _145.buffer, 'access', _146 => _146.presenceUpdates, 'optionalAccess', _147 => _147.data]), () => ( null)));
6169
6177
  },
6170
6178
  // prettier-ignore
6171
6179
  get undoStack() {
@@ -6307,7 +6315,7 @@ function makeClassicSubscribeFn(events) {
6307
6315
  }
6308
6316
  if (isLiveNode(first)) {
6309
6317
  const node = first;
6310
- if (_optionalChain([options, 'optionalAccess', _146 => _146.isDeep])) {
6318
+ if (_optionalChain([options, 'optionalAccess', _148 => _148.isDeep])) {
6311
6319
  const storageCallback = second;
6312
6320
  return subscribeToLiveStructureDeeply(node, storageCallback);
6313
6321
  } else {
@@ -6432,12 +6440,12 @@ function createClient(options) {
6432
6440
  createSocket: makeCreateSocketDelegateForRoom(
6433
6441
  roomId,
6434
6442
  baseUrl,
6435
- _optionalChain([clientOptions, 'access', _147 => _147.polyfills, 'optionalAccess', _148 => _148.WebSocket])
6443
+ _optionalChain([clientOptions, 'access', _149 => _149.polyfills, 'optionalAccess', _150 => _150.WebSocket])
6436
6444
  ),
6437
6445
  authenticate: makeAuthDelegateForRoom(roomId, authManager)
6438
6446
  })),
6439
6447
  enableDebugLogging: clientOptions.enableDebugLogging,
6440
- unstable_batchedUpdates: _optionalChain([options2, 'optionalAccess', _149 => _149.unstable_batchedUpdates]),
6448
+ unstable_batchedUpdates: _optionalChain([options2, 'optionalAccess', _151 => _151.unstable_batchedUpdates]),
6441
6449
  baseUrl,
6442
6450
  unstable_fallbackToHTTP: !!clientOptions.unstable_fallbackToHTTP
6443
6451
  }
@@ -6452,7 +6460,7 @@ function createClient(options) {
6452
6460
  const shouldConnect = _nullishCoalesce(_nullishCoalesce(options2.autoConnect, () => ( options2.shouldInitiallyConnect)), () => ( true));
6453
6461
  if (shouldConnect) {
6454
6462
  if (typeof atob === "undefined") {
6455
- if (_optionalChain([clientOptions, 'access', _150 => _150.polyfills, 'optionalAccess', _151 => _151.atob]) === void 0) {
6463
+ if (_optionalChain([clientOptions, 'access', _152 => _152.polyfills, 'optionalAccess', _153 => _153.atob]) === void 0) {
6456
6464
  throw new Error(
6457
6465
  "You need to polyfill atob to use the client in your environment. Please follow the instructions at https://liveblocks.io/docs/errors/liveblocks-client/atob-polyfill"
6458
6466
  );
@@ -6468,11 +6476,11 @@ function createClient(options) {
6468
6476
  return room;
6469
6477
  }
6470
6478
  function getRoom(roomId) {
6471
- const room = _optionalChain([roomsById, 'access', _152 => _152.get, 'call', _153 => _153(roomId), 'optionalAccess', _154 => _154.room]);
6479
+ const room = _optionalChain([roomsById, 'access', _154 => _154.get, 'call', _155 => _155(roomId), 'optionalAccess', _156 => _156.room]);
6472
6480
  return room ? room : null;
6473
6481
  }
6474
6482
  function forceLeave(roomId) {
6475
- const unsubs = _nullishCoalesce(_optionalChain([roomsById, 'access', _155 => _155.get, 'call', _156 => _156(roomId), 'optionalAccess', _157 => _157.unsubs]), () => ( /* @__PURE__ */ new Set()));
6483
+ const unsubs = _nullishCoalesce(_optionalChain([roomsById, 'access', _157 => _157.get, 'call', _158 => _158(roomId), 'optionalAccess', _159 => _159.unsubs]), () => ( /* @__PURE__ */ new Set()));
6476
6484
  for (const unsub of unsubs) {
6477
6485
  unsub();
6478
6486
  }
@@ -6753,12 +6761,12 @@ function legacy_patchImmutableNode(state, path, update) {
6753
6761
  }
6754
6762
  const newState = Object.assign({}, state);
6755
6763
  for (const key in update.updates) {
6756
- if (_optionalChain([update, 'access', _158 => _158.updates, 'access', _159 => _159[key], 'optionalAccess', _160 => _160.type]) === "update") {
6764
+ if (_optionalChain([update, 'access', _160 => _160.updates, 'access', _161 => _161[key], 'optionalAccess', _162 => _162.type]) === "update") {
6757
6765
  const val = update.node.get(key);
6758
6766
  if (val !== void 0) {
6759
6767
  newState[key] = lsonToJson(val);
6760
6768
  }
6761
- } else if (_optionalChain([update, 'access', _161 => _161.updates, 'access', _162 => _162[key], 'optionalAccess', _163 => _163.type]) === "delete") {
6769
+ } else if (_optionalChain([update, 'access', _163 => _163.updates, 'access', _164 => _164[key], 'optionalAccess', _165 => _165.type]) === "delete") {
6762
6770
  delete newState[key];
6763
6771
  }
6764
6772
  }
@@ -6819,12 +6827,12 @@ function legacy_patchImmutableNode(state, path, update) {
6819
6827
  }
6820
6828
  const newState = Object.assign({}, state);
6821
6829
  for (const key in update.updates) {
6822
- if (_optionalChain([update, 'access', _164 => _164.updates, 'access', _165 => _165[key], 'optionalAccess', _166 => _166.type]) === "update") {
6830
+ if (_optionalChain([update, 'access', _166 => _166.updates, 'access', _167 => _167[key], 'optionalAccess', _168 => _168.type]) === "update") {
6823
6831
  const value = update.node.get(key);
6824
6832
  if (value !== void 0) {
6825
6833
  newState[key] = lsonToJson(value);
6826
6834
  }
6827
- } else if (_optionalChain([update, 'access', _167 => _167.updates, 'access', _168 => _168[key], 'optionalAccess', _169 => _169.type]) === "delete") {
6835
+ } else if (_optionalChain([update, 'access', _169 => _169.updates, 'access', _170 => _170[key], 'optionalAccess', _171 => _171.type]) === "delete") {
6828
6836
  delete newState[key];
6829
6837
  }
6830
6838
  }
@@ -6914,7 +6922,7 @@ function createCacheItem(key, asyncFunction, options) {
6914
6922
  let previousState = { isLoading: false };
6915
6923
  const eventSource2 = makeEventSource();
6916
6924
  function notify() {
6917
- const isEqual = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _170 => _170.isStateEqual]), () => ( isShallowEqual));
6925
+ const isEqual = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _172 => _172.isStateEqual]), () => ( isShallowEqual));
6918
6926
  if (!isEqual(previousState, state)) {
6919
6927
  previousState = state;
6920
6928
  eventSource2.notify(state);
@@ -6982,7 +6990,7 @@ function createAsyncCache(asyncFunction, options) {
6982
6990
  return create(key).get();
6983
6991
  }
6984
6992
  function getState(key) {
6985
- return _optionalChain([cache, 'access', _171 => _171.get, 'call', _172 => _172(key), 'optionalAccess', _173 => _173.getState, 'call', _174 => _174()]);
6993
+ return _optionalChain([cache, 'access', _173 => _173.get, 'call', _174 => _174(key), 'optionalAccess', _175 => _175.getState, 'call', _176 => _176()]);
6986
6994
  }
6987
6995
  function revalidate(key) {
6988
6996
  return create(key).revalidate();