function sync_symbol_content_with_section_changes({ original_symbol_entries, original_symbol_fields, updated_section_entries, section_content_changes, updated_symbol_fields, field_changes }) {
	const new_section_entries = section_content_changes.filter((c) => c.action === 'insert').map((c) => c.data)
	const new_fields = field_changes.filter((c) => c.action === 'insert').map((c) => c.data)

	const unmodified_symbol_entries = []
	const deleted_symbol_entries = []
	const modified_symbol_entries = []

	for (const symbol_entry of original_symbol_entries) {
		const updated_field = get_entry_field({ entry: symbol_entry, entries: original_symbol_entries, fields: updated_symbol_fields })

		// if entry belongs to a field that no longer exists, delete it
		if (!updated_field) {
			deleted_symbol_entries.push(symbol_entry)
			continue
		}

		// if entry field type has changed, modify and clear its value
		const original_field = get_entry_field({ entry: symbol_entry, entries: original_symbol_entries, fields: original_symbol_fields })
		if (original_field.type !== updated_field.type) {
			// delete container entries when their field type has changed
			if (original_field.type === 'repeater' && symbol_entry.index !== null) {
				deleted_symbol_entries.push(symbol_entry)
				continue
			}
			const modified_entry = {
				...symbol_entry,
				value: get_empty_value(updated_field)
			}
			modified_symbol_entries.push(modified_entry)
			continue
		}

		// keep all other entries
		unmodified_symbol_entries.push(symbol_entry)
	}

	const remaining_symbol_entries = [...unmodified_symbol_entries, ...modified_symbol_entries]

	let new_symbol_entries = []
	for (const section_entry of new_section_entries) {
		const new_field = get_entry_field({ entry: section_entry, entries: new_section_entries, fields: new_fields })

		// don't include entries belonging to an existing field
		if (!new_field) continue

		// include all root-level entries and descendents of new root-level entries
		const root_ancestor_is_new = get_ancestors(new_field, new_fields).some((field) => !field.parent)
		if (!new_field.parent || root_ancestor_is_new) {
			new_symbol_entries.push(_.cloneDeep(section_entry))
			continue
		}

		// handle existing repeater children
		const section_entry_parent = updated_section_entries.find((e) => e.id === section_entry.parent)
		const section_entry_parent_field = get_entry_field({ entry: section_entry_parent, entries: updated_section_entries, fields: updated_symbol_fields })
		const existing_symbol_entry_parent_container = remaining_symbol_entries.find((symbol_entry) => {
			const field = get_entry_field({ entry: symbol_entry, entries: remaining_symbol_entries, fields: updated_symbol_fields })
			const fields_match = field.id === section_entry_parent_field.id
			const indeces_match = section_entry_parent.index === symbol_entry.index
			return fields_match && indeces_match
		})
		if (existing_symbol_entry_parent_container) {
			new_symbol_entries.push({ ...section_entry, parent: existing_symbol_entry_parent_container.id })
			continue
		}

		// handle existing group child
		const existing_symbol_entry_parent_group_entry = remaining_symbol_entries.find((symbol_entry) => {
			return symbol_entry.field && symbol_entry.field === new_field.parent
		})
		if (existing_symbol_entry_parent_group_entry) {
			const new_entry = Content_Row({ value: get_empty_value(new_field), parent: existing_symbol_entry_parent_group_entry.id, field: new_field.id })
			new_symbol_entries.push(new_entry)
			continue
		}
	}

	// Ensure no symbol containers are missing children
	const existing_symbol_repeater_entries = remaining_symbol_entries.filter((entry) => entry.index !== null)
	for (const container_entry of existing_symbol_repeater_entries) {
		const field = get_entry_field({ entry: container_entry, entries: remaining_symbol_entries, fields: updated_symbol_fields })

		// Skip to the next container entry if it already has the new child entries
		const has_existing_child_entries = new_symbol_entries.some((entry) => entry.parent === container_entry.id)
		if (has_existing_child_entries) {
			continue
		}

		// Create a new entry for each missing child
		const child_fields = new_fields.filter((f) => f.parent === field.id)
		for (const child_field of child_fields) {
			const new_symbol_container_child_entry = Content_Row({
				field: child_field.id,
				parent: container_entry.id,
				value: get_empty_value(child_field)
			})
			new_symbol_entries.push(new_symbol_container_child_entry)
		}
	}

	// remap IDs to avoid conflicts with original section entries
	new_symbol_entries = remap_entry_ids(new_symbol_entries)

	const symbol_content_insertions = new_symbol_entries.map((entry) => ({
		action: 'insert',
		id: entry.id,
		data: _.cloneDeep(entry)
	}))

	const symbol_content_updates = modified_symbol_entries.map((entry) => ({
		action: 'update',
		id: entry.id,
		data: { value: entry.value }
	}))

	const symbol_content_deletions = deleted_symbol_entries.map((entry) => ({
		action: 'delete',
		id: entry.id
	}))

	return {
		changes: [...symbol_content_deletions, ...symbol_content_updates, ...symbol_content_insertions],
		entries: [...remaining_symbol_entries, ...new_symbol_entries]
	}
}
Generates changes for symbol entries based on updates to section entries and fields.

@param {Object} params - The parameters for generating symbol entries changes.
@param {Array} params.original_symbol_entries - The original entries of the symbol.
@param {Array} params.original_symbol_fields - The original fields of the symbol.
@param {Array} params.updated_section_entries - The updated entries of the section.
@param {Array} params.section_content_changes - The changes made to the section entries.
@param {Array} params.updated_symbol_fields - The updated fields of the symbol.
@param {Array} params.field_changes - The changes made to the fields.
@returns {Object} An object containing the changes to be applied to the symbol entries.