{ "version": 3, "sources": ["../../../lib.shared.model.patch/transform/transform_move_copy_card.ts", "../../../lib.shared.model.patch/transform/transform_copy_board.ts", "../../../lib.shared.model.patch/transform/transform_set_card_archived_ops.ts", "../../../lib.shared.model.patch/transform/index.ts"], "sourcesContent": ["import {\n Board,\n BoardUID,\n deep_copy,\n derive_PatchUID,\n ItemNotFound,\n MoveCard,\n PasteCard,\n Patch,\n PatchOpContainer,\n RemoveCard,\n CopyCard,\n derive_CardUID,\n CardChangelogEntry,\n CardPatchOpType,\n derive_BlobUID,\n BlobUIDMapping,\n} from \"@cling/lib.shared.model\"\nimport {assert, assert_never} from \"@cling/lib.shared.utils\"\nimport {InvalidPatchOp} from \"../index\"\n\nexport function move_copy_card_target_board_uids(patch: Patch): BoardUID[] {\n const result: BoardUID[] = []\n for (const op_container of patch.ops) {\n const op = op_container.op\n if (op instanceof CopyCard || op instanceof MoveCard) {\n if (op.target_board_uid) {\n result.push(op.target_board_uid)\n }\n }\n }\n return result\n}\n\nexport function transform(\n patches: Array<Patch>,\n board_factory: (board_uid: BoardUID) => Board,\n): Array<Patch> {\n const result = []\n for (const patch of patches) {\n const result_patch = deep_copy(patch)\n result_patch.ops = []\n const more_patches = new Map<BoardUID, Patch>()\n for (let i = 0; i < patch.ops.length; i++) {\n const op_container = patch.ops[i]\n const op = op_container.op\n if (op instanceof CopyCard || op instanceof MoveCard) {\n const board = board_factory(patch.board_uid)\n assert(board, \"Source board not present\")\n if (op.uid === board.root.uid) {\n throw new InvalidPatchOp(op, \"The root card must not be copied/moved\")\n }\n if (op.uid === board.inbox.uid) {\n throw new InvalidPatchOp(op, \"The inbox card must not be copied/moved\")\n }\n const blob_uid_mapping = []\n // Build up the correct `Remove` and `Paste` operations.\n let source_card\n try {\n source_card = board.card(op.uid)\n } catch (error) {\n throw new ItemNotFound(board.uid, op.uid, error)\n }\n source_card = deep_copy(source_card)\n source_card.sanitize()\n if (op instanceof MoveCard) {\n result_patch.ops.push(PatchOpContainer.from_op(new RemoveCard({uid: op.uid})))\n } else if (op instanceof CopyCard) {\n // Remove comments and changelog and set new UIDs.\n const cards = [source_card].concat(source_card.deep_children)\n for (const card of cards) {\n card.comments = []\n card.changelog = []\n card.task = undefined\n if (!op.retain_archived_flag) {\n card.archived = false\n }\n card.uid =\n op.new_card_uid && card === cards[0]\n ? op.new_card_uid\n : derive_CardUID(\n card.uid,\n `transform_move_copy_ops:${patch.uid}:${i}`,\n )\n // Every card needs a changelog. For the root card (`source_card`)\n // there will be a changelog created in `apply_paste`.\n if (card !== source_card) {\n card.changelog.push(\n new CardChangelogEntry({\n date: patch.applied_at,\n account_uid: patch.created_by,\n board_version: board.version + 1,\n patch_op_type: CardPatchOpType.PasteCard,\n extra_src_board_uid:\n op.target_board_uid === board.uid\n ? undefined\n : op.target_board_uid,\n }),\n )\n }\n for (const blob of card.blobs) {\n const src = blob.uid\n blob.uid = derive_BlobUID(\n blob.uid,\n `transform_move_copy_ops:${patch.uid}:${i}:${src}`,\n )\n blob_uid_mapping.push(new BlobUIDMapping({src, target: blob.uid}))\n }\n }\n } else {\n assert_never(op)\n }\n const paste_op = new PasteCard({\n value: source_card,\n target_card_uid: op.target_card_uid,\n target_pos: op.target_pos,\n into_inbox: !op.target_card_uid,\n })\n // Determine where to put the `Paste` operation.\n const target_board_uid = op.target_board_uid\n if (target_board_uid && target_board_uid !== board.uid) {\n let target_patch = more_patches.get(target_board_uid)\n if (!target_patch) {\n target_patch = new Patch({\n uid: derive_PatchUID(\n target_board_uid,\n `${patch.uid}transform_move_op${target_board_uid}`,\n ),\n created_by: patch.created_by,\n applied_at: patch.applied_at,\n board_uid: target_board_uid,\n ops: [],\n })\n more_patches.set(target_board_uid, target_patch)\n }\n paste_op.src_board_uid = board.uid\n target_patch.ops.push(PatchOpContainer.from_op(paste_op))\n target_patch.blob_uid_mapping.push(...blob_uid_mapping)\n } else {\n result_patch.blob_uid_mapping.push(...blob_uid_mapping)\n result_patch.ops.push(PatchOpContainer.from_op(paste_op))\n }\n } else {\n result_patch.ops.push(op_container)\n }\n }\n if (result_patch.ops.length) {\n result.push(result_patch)\n }\n result.push(...more_patches.values())\n }\n return result\n}\n\nexport default transform\n", "import {\n AddBoard,\n AddBoardValue,\n AddCard,\n AddCardValue,\n AddSystemBoard,\n AddSystemBoardValue,\n BlobUIDMapping,\n Board,\n BoardType,\n BoardUID,\n board_uid_type,\n Column,\n CopyBoard,\n CopyCard,\n deep_copy,\n derive_BlobUID,\n derive_CardUID,\n derive_PatchUID,\n Patch,\n PatchOpContainer,\n} from \"@cling/lib.shared.model\"\nimport {assert, assert_never} from \"@cling/lib.shared.utils\"\nimport {InvalidPatchOp} from \"../index\"\n\nexport function copy_board_src_board_uids(patch: Patch): BoardUID[] {\n return patch.ops.filter((x) => !!x.CopyBoard).map((x) => x.CopyBoard!.src_board_uid)\n}\n\nexport function transform(\n patches: Array<Patch>,\n board_factory: (board_uid: BoardUID) => Board,\n): Array<Patch> {\n const result = []\n const more_patches = []\n for (const patch of patches) {\n const result_patch = deep_copy(patch)\n result_patch.ops = []\n for (let i = 0; i < patch.ops.length; i++) {\n const op_container = patch.ops[i]\n const op = op_container.op\n if (op instanceof CopyBoard) {\n const copy_ops: CopyCard[] = []\n const board = board_factory(op.src_board_uid)\n assert(board, \"Source board not present\")\n const board_style = deep_copy(board.board_style)\n if (board.board_style.background_image_blob) {\n board_style.background_image_blob!.uid = derive_BlobUID(\n board_style.background_image_blob!.uid,\n `transform_copy_board:${patch.uid}`,\n )\n result_patch.blob_uid_mapping.push(\n new BlobUIDMapping({\n src: board.board_style.background_image_blob.uid,\n target: board_style.background_image_blob!.uid,\n }),\n )\n }\n const board_type = board_uid_type(patch.board_uid)\n if (board_type === BoardType.regular) {\n result_patch.ops.push(\n PatchOpContainer.from_op(\n new AddBoard({\n value: new AddBoardValue({name: board.name, board_style}),\n }),\n ),\n )\n } else if (\n board_type === BoardType.dashboard ||\n board_type === BoardType.clipboard ||\n board_type === BoardType.trashcan\n ) {\n result_patch.ops.push(\n PatchOpContainer.from_op(\n new AddSystemBoard({\n value: new AddSystemBoardValue({board_type, board_style}),\n }),\n ),\n )\n } else if (board_type === BoardType.people) {\n throw new InvalidPatchOp(op, \"Cannot copy TO a people board\")\n } else {\n assert_never(board_type)\n }\n for (const card of board.inbox.children) {\n copy_ops.push(\n new CopyCard({\n uid: card.uid,\n target_pos: 4242424242,\n target_board_uid: patch.board_uid,\n retain_archived_flag: true,\n }),\n )\n }\n for (const column of board.columns) {\n if (column.children.length === 0) {\n continue\n }\n const column_uid = derive_CardUID(\n column.uid,\n `transform_copy_board:${patch.board_uid}`,\n )\n result_patch.ops.push(\n PatchOpContainer.from_op(\n new AddCard({\n // This is how we determine the root card uid in `apply_add_board`.\n target_card_uid: derive_CardUID(patch.board_uid, \"Root\"),\n target_pos: 4242424242,\n value: new AddCardValue({uid: column_uid, column: new Column({})}),\n }),\n ),\n )\n for (const card of column.children) {\n copy_ops.push(\n new CopyCard({\n uid: card.uid,\n target_pos: 4242424242,\n target_board_uid: patch.board_uid,\n target_card_uid: column_uid,\n retain_archived_flag: true,\n }),\n )\n }\n }\n more_patches.push(\n new Patch({\n uid: derive_PatchUID(patch.uid, `transform_copy_board:${patch.board_uid}`),\n board_uid: op.src_board_uid,\n ops: copy_ops.map(PatchOpContainer.from_op),\n applied_at: patch.applied_at,\n created_by: patch.created_by,\n blob_uid_mapping: [],\n }),\n )\n } else {\n result_patch.ops.push(op_container)\n }\n }\n if (result_patch.ops.length) {\n result.push(result_patch)\n }\n }\n if (more_patches.length) {\n result.push(...more_patches)\n }\n return result\n}\n\nexport default transform\n", "/**\n * Transform a `SetCardArchived` operation to archive all children recursively.\n */\n\nimport {\n Board,\n BoardUID,\n deep_copy,\n ItemNotFound,\n Patch,\n PatchOpContainer,\n SetCardArchived,\n traverse_cards,\n} from \"@cling/lib.shared.model\"\nimport {assert} from \"@cling/lib.shared.utils\"\nimport {InvalidPatchOp} from \"../index\"\n\nexport function transform(\n patches: Array<Patch>,\n board_factory: (board_uid: BoardUID) => Board,\n): Array<Patch> {\n const result = []\n for (const patch of patches) {\n const result_patch = deep_copy(patch)\n result.push(result_patch)\n for (const op_container of patch.ops) {\n const op = op_container.op\n if (op instanceof SetCardArchived && op.value === true) {\n const board = board_factory(patch.board_uid)\n assert(board, \"Source board not present\")\n if (op.uid === board.root.uid) {\n throw new InvalidPatchOp(op, \"The root card must not be archived\")\n }\n if (op.uid === board.inbox.uid) {\n throw new InvalidPatchOp(op, \"The inbox card must not be archived\")\n }\n let card\n try {\n card = board.card(op.uid)\n } catch (error) {\n throw new ItemNotFound(board.uid, op.uid, error)\n }\n traverse_cards(card, (x) => {\n if (!x.archived) {\n result_patch.ops.push(\n PatchOpContainer.from_op(\n new SetCardArchived({\n uid: x.uid,\n value: true,\n }),\n ),\n )\n }\n })\n }\n }\n }\n return result\n}\n\nexport default transform\n", "/**\n * Transform the given patch into one ore more patches.\n */\nimport {\n move_copy_card_target_board_uids,\n transform as transform_move_copy_card,\n} from \"./transform_move_copy_card\"\nimport {copy_board_src_board_uids, transform as transform_copy_board} from \"./transform_copy_board\"\nimport {transform as transform_set_archived_ops} from \"./transform_set_card_archived_ops\"\nimport type {Board, BoardUID, Patch} from \"@cling/lib.shared.model\"\nimport {BoardNotFound} from \"../index\"\n\n/**\n * A synchronous way to transform patches that is only suitable in the client.\n */\nexport function transform_patch_client(\n patch: Patch,\n board_factory: (board_uid: BoardUID) => Board,\n): Patch[] {\n // Note: The order in which the transform functions are applied is important ...\n let patches = transform_set_archived_ops([patch], board_factory)\n patches = transform_copy_board(patches, board_factory)\n patches = transform_move_copy_card(patches, board_factory)\n patches = flatten_patches(patches)\n return patches\n}\n\nexport async function transform_patch_server(\n patch: Patch,\n board_factory: (board_uid: BoardUID) => Promise<Board>,\n): Promise<Patch[]> {\n const boards = new Map<BoardUID, Board>()\n const board_uids = new Set<BoardUID>(\n move_copy_card_target_board_uids(patch).concat(copy_board_src_board_uids(patch)),\n )\n if (!patch.will_create_new_board) {\n board_uids.add(patch.board_uid)\n }\n for (const board_uid of board_uids) {\n boards.set(board_uid, await board_factory(board_uid))\n }\n const sync_board_factory = (board_uid: BoardUID) => {\n const board = boards.get(board_uid)\n if (!board) {\n throw new BoardNotFound(board_uid)\n }\n return board\n }\n let patches = transform_set_archived_ops([patch], sync_board_factory)\n patches = transform_copy_board(patches, sync_board_factory)\n patches = transform_move_copy_card(patches, sync_board_factory)\n patches = flatten_patches(patches)\n return patches\n}\n\n/**\n * Flatten patches so that there is only one patch per board.\n */\nfunction flatten_patches(patches: Patch[]) {\n const flattened_patches: Patch[] = []\n for (const patch of patches) {\n const p = flattened_patches.find((x) => x.board_uid === patch.board_uid)\n if (p) {\n p.ops.push(...patch.ops)\n p.blob_uid_mapping.push(...patch.blob_uid_mapping)\n continue\n }\n flattened_patches.push(patch)\n }\n return flattened_patches\n}\n"], "mappings": "gWAkCO,SAASA,EACZC,EACAC,EACY,CACZ,IAAMC,EAAS,CAAC,EAChB,QAAWC,KAASH,EAAS,CACzB,IAAMI,EAAeC,EAAUF,CAAK,EACpCC,EAAa,IAAM,CAAC,EACpB,IAAME,EAAe,IAAI,IACzB,QAASC,EAAI,EAAGA,EAAIJ,EAAM,IAAI,OAAQI,IAAK,CACvC,IAAMC,EAAeL,EAAM,IAAII,CAAC,EAC1BE,EAAKD,EAAa,GACxB,GAAIC,aAAcC,GAAYD,aAAcE,EAAU,CAClD,IAAMC,EAAQX,EAAcE,EAAM,SAAS,EAE3C,GADAU,EAAOD,EAAO,0BAA0B,EACpCH,EAAG,MAAQG,EAAM,KAAK,IACtB,MAAM,IAAIE,EAAeL,EAAI,wCAAwC,EAEzE,GAAIA,EAAG,MAAQG,EAAM,MAAM,IACvB,MAAM,IAAIE,EAAeL,EAAI,yCAAyC,EAE1E,IAAMM,EAAmB,CAAC,EAEtBC,EACJ,GAAI,CACAA,EAAcJ,EAAM,KAAKH,EAAG,GAAG,CACnC,OAASQ,EAAO,CACZ,MAAM,IAAIC,EAAaN,EAAM,IAAK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,SAASoB,GACZC,EACAC,EACO,CAEP,IAAIC,EAAUC,EAA2B,CAACH,CAAK,EAAGC,CAAa,EAC/D,OAAAC,EAAUC,EAAqBD,EAASD,CAAa,EACrDC,EAAUC,EAAyBD,EAASD,CAAa,EACzDC,EAAUE,EAAgBF,CAAO,EAC1BA,CACX,CAVgBG,EAAAN,GAAA,0BA2ChB,SAASO,EAAgBC,EAAkB,CACvC,IAAMC,EAA6B,CAAC,EACpC,QAAWC,KAASF,EAAS,CACzB,IAAMG,EAAIF,EAAkB,KAAMG,GAAMA,EAAE,YAAcF,EAAM,SAAS,EACvE,GAAIC,EAAG,CACHA,EAAE,IAAI,KAAK,GAAGD,EAAM,GAAG,EACvBC,EAAE,iBAAiB,KAAK,GAAGD,EAAM,gBAAgB,EACjD,QACJ,CACAD,EAAkB,KAAKC,CAAK,CAChC,CACA,OAAOD,CACX,CAZSI,EAAAN,EAAA", "names": ["transform", "patches", "board_factory", "result", "patch", "result_patch", "deep_copy", "more_patches", "i", "op_container", "op", "CopyCard", "MoveCard", "board", "assert", "InvalidPatchOp", "blob_uid_mapping", "source_card", "error", "ItemNotFound", "PatchOpContainer", "RemoveCard", "cards", "card", "derive_CardUID", "CardChangelogEntry", "blob", "src", "derive_BlobUID", "BlobUIDMapping", "assert_never", "paste_op", "PasteCard", "target_board_uid", "target_patch", "Patch", "derive_PatchUID", "__name", "transform", "patches", "board_factory", "result", "more_patches", "patch", "result_patch", "deep_copy", "i", "op_container", "op", "CopyBoard", "copy_ops", "board", "assert", "board_style", "derive_BlobUID", "BlobUIDMapping", "board_type", "board_uid_type", "PatchOpContainer", "AddBoard", "AddBoardValue", "AddSystemBoard", "AddSystemBoardValue", "InvalidPatchOp", "assert_never", "card", "CopyCard", "column", "column_uid", "derive_CardUID", "AddCard", "AddCardValue", "Column", "Patch", "derive_PatchUID", "__name", "transform", "patches", "board_factory", "result", "patch", "result_patch", "deep_copy", "op_container", "op", "SetCardArchived", "board", "assert", "InvalidPatchOp", "card", "error", "ItemNotFound", "traverse_cards", "x", "PatchOpContainer", "__name", "transform_patch_client", "patch", "board_factory", "patches", "transform", "flatten_patches", "__name", "flatten_patches", "patches", "flattened_patches", "patch", "p", "x", "__name"] }