 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ###
 
+_ = require "lodash"
+assert = require "assert"
+
 {Zombie} = require "../nucleus/zombie"
 {remote} = require "../membrane/remote"
 {Archetype} = require "../nucleus/archetype"

    # of whom describes each field in the formular; its value and
    # errors or warnings that it may have attached to it. This is
    # like serializing the inputted form data into a transferable.
    download: ->
        assert fields = @container.find(".field") or []
        sieve = (seq) -> _.filter seq, (value) -> value
        sieve _.map fields, (value, index, iteratee) ->

            handle.identity = try identity.toString()
            handle.value = $(input).val() or undefined
            handle.checked = try $(input).is ":checked"
            value.data warning: 0, error: null if reset
            do -> handle.warning = value.data "warning"
            handle.error = value.data "error"; handle
