Combines an array of blocks to a new joined block. Running this single block
has the same effect as running all source blocks.

@param {Function[]} configSetters  Array of functions as returned by webpack blocks.
@return {Function}
769371
function group(configSetters) {
  assertConfigSetters(configSetters)

  const pre = getHooks(configSetters, 'pre')
  const post = getHooks(configSetters, 'post')

  const groupBlock = context => config => invokeConfigSetters(configSetters, context, config)

  return Object.assign(groupBlock, { pre, post })
}
319288
public function importBlocks(array $blocks)
    {
        foreach ($blocks as $name => $list) {
            foreach ($list as $block) {
                /* @var BlockElement $block */
                $block->addCompiler($this);
            }
        }

        return $this;
    }
405860
private function mergeNeoBlockTypes(array $oldBlockTypes, array $newBlockTypes): array
    {
        $oldIDs = array_map(function($a) { return $a['id']; }, $oldBlockTypes);
        $oldHandles = array_map(function($a) { return $a['handle']; }, $oldBlockTypes);
        $updatedBlockTypes = [];
        $newCount = 1;
        foreach ($newBlockTypes as $newIndex => $blockType) {
            if (isset($blockType['id'])) {
                $oldIndex = array_search($blockType['id'], $oldIDs, false);
            } else {
                $oldIndex = array_search($blockType['handle'], $oldHandles, false);
            }
            if ($oldIndex !== false) {
                $oldId = $oldBlockTypes[$oldIndex]['id'];
                $updatedBlockTypes[$oldId] = $blockType;
                $updatedBlockTypes[$oldId]['id'] = $oldId;
                $updatedBlockTypes[$oldId]['fieldId'] = $oldBlockTypes[$oldIndex]['fieldId'];
                $updatedBlockTypes[$oldId]['fieldLayoutId'] = $oldBlockTypes[$oldIndex]['fieldLayoutId'];

            } else {
                $updatedBlockTypes['new' . $newCount] = $blockType;
                $newCount++;
            }
        }
        return $updatedBlockTypes;
    }
1221670
async function liveTracking(config) {
  setupOriginJS(config)
  const context = await new Context(config).init()

  let lastLogBlock = getLastBlock(config)
  let lastCheckedBlock = 0
  const checkIntervalSeconds = 5
  let start

  const check = async () => {
    await withRetrys(async () => {
      start = new Date()
      const currentBlockNumber = await web3.eth.getBlockNumber()
      if (currentBlockNumber == lastCheckedBlock) {
        console.log('No new block.')
        return scheduleNextCheck()
      }
      console.log('New block: ' + currentBlockNumber)
      const toBlock = Math.min(lastLogBlock+MAX_BATCH_BLOCKS, currentBlockNumber)
      const opts = { fromBlock: lastLogBlock + 1, toBlock: toBlock }
      await runBatch(opts, context)
      lastLogBlock = toBlock
      setLastBlock(config, toBlock)
      lastCheckedBlock = currentBlockNumber
      return scheduleNextCheck()
    })
  }
  const scheduleNextCheck = async () => {
    const elapsed = new Date() - start
    const delay = Math.max(checkIntervalSeconds * 1000 - elapsed, 1)
    setTimeout(check, delay)
  }

  check()
}
460375
function(tech) {
        return (this.level.getConfig().bundleBuildLevels || [])
            .concat([PATH.resolve(this.root, PATH.dirname(this.getNodePrefix()), 'blocks')]);
    }
1065929
function Block(options) {
        if ('object' !== typeof options) {
            throw new TypeError('Block constructor: options must be object: ' +
                                options);
        }

        if ('string' !== typeof options.type || options.type.trim() === '') {
            throw new TypeError('Block constructor: options.type must ' +
                                'be a non-empty string: ' + options.type);
        }

        if ('string' !== typeof options.id || options.id.trim() === '') {
            throw new TypeError('Block constructor: options.id must ' +
                                'be a non-empty string: ' + options.id);
        }

        // ### Properties

        /**
         * #### Block.type
         *
         * Stage or Step block
         */
        this.type = options.type;

        /**
         * #### Block.id
         *
         * An identifier (name) for the block instance
         */
        this.id = options.id;

        /**
         * #### Block.positions
         *
         * Positions in the enclosing Block that this block can occupy
         */
        this.positions = 'undefined' !== typeof options.positions ?
            options.positions : 'linear';

        /**
         * #### Block.takenPositions
         *
         * Positions within this Block that this are occupied
         */
        this.takenPositions = [];

        /**
         * #### Block.items
         *
         * The sequence of items within this Block
         */
        this.items = [];

        /**
         * #### Block.itemsIds
         *
         * List of the items added to the block so far
         */
        this.itemsIds = {};

        /**
         * #### Block.unfinishedItems
         *
         * Items that have not been assigned a position in this block
         */
        this.unfinishedItems = [];

         /**
         * #### Block.index
         *
         * Index of the current element to be returned by Block.next
         *
         * @see Block.next
         */
        this.index = 0;

        /**
         * #### Block.finalized
         *
         * Flag to indicate whether a block is completed
         */
        this.finalized = false;

        /**
         * #### Block.resetCache
         *
         * Cache object to reset Block after finalization
         */
        this.resetCache = null;

    }
1126832
function importNonBlocks(blocks, tokens) {
    var temp = [];
    utils.each(blocks, function (block) { temp.push(block); });
    utils.each(temp.reverse(), function (block) {
      if (block.name !== 'block') {
        tokens.unshift(block);
      }
    });
  }
319593
function handleBlocks (config) {
  let blocks = []
  let blocksObj = config.blocks
  for (let i in blocksObj) {
    if (blocksObj.hasOwnProperty(i)) {
      if (isLanguage(blocksObj[i])) {
        blocks.push(_getBlock(config, 'language', true))
      } else {
        blocks.push(_getBlock(config, i))
      }
    }
  }
  return blocks
}
608998
private void addAllToSplitterQueue(Collection<Block<S, L>> blocks) {
        for (Block<S, L> block : blocks) {
            addToSplitterQueue(block);
        }
    }
1189918
function mergeOne(dst, src) {
    if (src === _undefined) return dst;

    // According to specification arrays must be concatenated.
    // Also, the '.concat' creates a new array instance. Overrides the 'dst'.
    if (isArray(src)) return (isArray(dst) ? dst : []).concat(src);

    // Now deal with non plain 'src' object. 'src' overrides 'dst'
    // Note that functions are also assigned! We do not deep merge functions.
    if (!isPlainObject(src)) return src;

    var keys = objectKeys(src), i = 0, key;
    for (; i < keys[_length];) {
      key = keys[i++];

      // Do not merge properties with the '_undefined' value.
      if (src[key] !== _undefined) {
        // deep merge each property. Recursion!
        dst[key] = mergeOne(
          // Recursive calls to mergeOne() must allow only plain objects or arrays in dst
          isPlainObject(dst[key]) || isArray(src[key]) ? dst[key] : {},
          src[key]
        );
      }
    }

    return dst;
  }
265994
function concatJS() {
    let tasks = [];

    Object.keys(config).forEach((key) => {
        let val = config[key];
        tasks.push(gulp.src(val.src)
            .pipe(plumber({ errorHandler: handleErrors }))
            .pipe(concat(key + '.js'))
            .pipe(gulp.dest(val.dest)));
    });

    return merge(tasks);
}
31458
function(attrs, attributeBlocks){
    var ast = [];
    if (attributeBlocks.length) {
      if (attrs.length) {
        var val = this.attrs(attrs);
        attributeBlocks.unshift(val);
      }
      if (attributeBlocks.length > 1) {
        push.apply(ast, this.bufferExpression(this.runtime('attrs') + '(' + this.runtime('merge') + '([' + attributeBlocks.join(',') + ']), ' + stringify(this.terse) + ')'));
      } else {
        push.apply(ast, this.bufferExpression(this.runtime('attrs') + '(' + attributeBlocks[0] + ', ' + stringify(this.terse) + ')'));
      }
    } else if (attrs.length) {
      push.apply(ast, this.bufferExpression(this.attrs(attrs, true)));
    }
    return ast;
  }
687302
function _setRedisItem (config, blocks) {
  let key = _buildRedisKey(config.redisKey, config.language)
  return config.redis.hmsetAsync(key, blocks)
    .then(function () {
      return config.redis.expireAsync(key, config.redisExpire)
    })
    .then(function () {
      return blocks
    })
}
603698
function mergeInner(base, mixin, mergeArrays) {
    if (base === null || typeof base !== 'object' || Array.isArray(base)) {
        throw new Error('base must be object');
    }
    if (mixin === null || typeof mixin !== 'object' || Array.isArray(mixin)) {
        throw new Error('mixin must be object');
    }
    Object.keys(mixin).forEach((name) => {
        mergeHelper(base, mixin, name, mergeArrays);
    });
}
40307
function copyJS() {
    let tasks = [];
    Object.keys(config).forEach((key) => {
        let val = config[key];
        tasks.push(gulp.src(val.src).pipe(gulp.dest(val.dest)));
    });

    return merge(tasks);
}
993379
function createSetter(namespace, mappings) {
    let mutation = mappings.mutation;

    if (namespace) {
        mutation = namespace + '/' + mutation;
    }

    return function (value) {
        this.$store.commit(mutation, value)
    };
}
641349
public GroupsConfigurationBuilder withGroupers(List<Grouper<?>> groupers) {
      attributes.attribute(GROUPERS).set(groupers);
      return this;
   }