text: 
  export function findChildInChildrenByKey (children, key) {
    let ret = null
    if (children) {
      children.forEach((c) => {
        if (ret || !c) {
          return
        }
        if (c.key === key) {
          ret = c
        }
      })
    }
    return ret
  }
  
  export function mergeChildren (prev, next) {
    let ret = []
    // For each key of `next`, the list of keys to insert before that key in
    // the combined list
    const nextChildrenPending = {}
    let pendingChildren = []
    let followChildrenKey
    prev.forEach((c) => {
      if (!c) {
        return
      }
      if (findChildInChildrenByKey(next, c.key)) {
        if (pendingChildren.length) {
          nextChildrenPending[c.key] = pendingChildren
          pendingChildren = []
        }
        followChildrenKey = c.key
      } else if (c.key) {
        pendingChildren.push(c)
      }
    })
    if (!followChildrenKey) {
      ret = ret.concat(pendingChildren)
    }
    next.forEach((c) => {
      if (!c) {
        return
      }
      if (nextChildrenPending.hasOwnProperty(c.key)) {
        ret = ret.concat(nextChildrenPending[c.key])
      }
      ret.push(c)
      if (c.key === followChildrenKey) {
        ret = ret.concat(pendingChildren)
      }
    })
  
    return ret
  }
  
  export function transformArguments (arg, key, i) {
    let result
    if (typeof arg === 'function') {
      result = arg({
        key,
        index: i
      })
    } else {
      result = arg
    }
    if (Array.isArray(result)) {
      if (result.length === 2) {
        return result
      }
      return [result[0], result[0]]
    }
    return [result, result]
  }
  
  export function getChildrenFromProps (vm) {
    return (vm && vm.$slots.default) || []
  }
  