function unloadInputUnnamed(node) {
  const input = new proto.ord.ReactionInput();

  const compounds = ord.compounds.unload(node);
  if (compounds.some(e => !ord.reaction.isEmptyMessage(e))) {
    input.setComponentsList(compounds);
  }

  const crudes = ord.crudes.unload(node);
  if (crudes.some(e => !ord.reaction.isEmptyMessage(e))) {
    input.setCrudeComponentsList(crudes);
  }

  const additionOrder = parseInt($('.input_addition_order', node).text());
  if (!isNaN(additionOrder)) {
    input.setAdditionOrder(additionOrder);
  }
  const additionTime = ord.reaction.readMetric(
      '.input_addition_time', new proto.ord.Time(), node);
  if (!ord.reaction.isEmptyMessage(additionTime)) {
    input.setAdditionTime(additionTime);
  }

  const additionSpeed = new proto.ord.ReactionInput.AdditionSpeed();
  additionSpeed.setType(
      ord.reaction.getSelector($('.input_addition_speed_type', node)));
  additionSpeed.setDetails($('.input_addition_speed_details', node).text());
  if (!ord.reaction.isEmptyMessage(additionSpeed)) {
    input.setAdditionSpeed(additionSpeed);
  }

  const additionDevice = new proto.ord.ReactionInput.AdditionDevice();
  additionDevice.setType(
      ord.reaction.getSelector($('.input_addition_device_type', node)));
  additionDevice.setDetails($('.input_addition_device_details', node).text());
  if (!ord.reaction.isEmptyMessage(additionDevice)) {
    input.setAdditionDevice(additionDevice);
  }

  const additionDuration = ord.reaction.readMetric(
      '.input_addition_duration', new proto.ord.Time(), node);
  if (!ord.reaction.isEmptyMessage(additionDuration)) {
    input.setAdditionDuration(additionDuration);
  }

  const additionTemperature = ord.reaction.readMetric(
      '.input_addition_temperature', new proto.ord.Temperature(), node);
  if (!ord.reaction.isEmptyMessage(additionTemperature)) {
    input.setAdditionTemperature(additionTemperature);
  }

  const flowRate = ord.reaction.readMetric(
      '.input_flow_rate', new proto.ord.FlowRate(), node);
  if (!ord.reaction.isEmptyMessage(flowRate)) {
    input.setFlowRate(flowRate);
  }

  return input;
}
/**
 * Fetches a single reaction input defined in the form.
 * @param {!Node} node Root node for the reaction input.
 * @return {!proto.ord.ReactionInput}
 */
Fetches a single reaction input defined in the form.
@param {!Node} node Root node for the reaction input.
Fetches a single reaction input defined in the form . @param { !Node } node Root node for the reaction input .
function unloadInputUnnamed(node) {
  const input = new proto.ord.ReactionInput();
  const compounds = ord.compounds.unload(node);
  if (compounds.some(e => !ord.reaction.isEmptyMessage(e))) {
    input.setComponentsList(compounds);
  }
  const crudes = ord.crudes.unload(node);
  if (crudes.some(e => !ord.reaction.isEmptyMessage(e))) {
    input.setCrudeComponentsList(crudes);
  }
  const additionOrder = parseInt($('.input_addition_order', node).text());
  if (!isNaN(additionOrder)) {
    input.setAdditionOrder(additionOrder);
  }
  const additionTime = ord.reaction.readMetric(
      '.input_addition_time', new proto.ord.Time(), node);
  if (!ord.reaction.isEmptyMessage(additionTime)) {
    input.setAdditionTime(additionTime);
  }
  const additionSpeed = new proto.ord.ReactionInput.AdditionSpeed();
  additionSpeed.setType(
      ord.reaction.getSelector($('.input_addition_speed_type', node)));
  additionSpeed.setDetails($('.input_addition_speed_details', node).text());
  if (!ord.reaction.isEmptyMessage(additionSpeed)) {
    input.setAdditionSpeed(additionSpeed);
  }
  const additionDevice = new proto.ord.ReactionInput.AdditionDevice();
  additionDevice.setType(
      ord.reaction.getSelector($('.input_addition_device_type', node)));
  additionDevice.setDetails($('.input_addition_device_details', node).text());
  if (!ord.reaction.isEmptyMessage(additionDevice)) {
    input.setAdditionDevice(additionDevice);
  }
  const additionDuration = ord.reaction.readMetric(
      '.input_addition_duration', new proto.ord.Time(), node);
  if (!ord.reaction.isEmptyMessage(additionDuration)) {
    input.setAdditionDuration(additionDuration);
  }
  const additionTemperature = ord.reaction.readMetric(
      '.input_addition_temperature', new proto.ord.Temperature(), node);
  if (!ord.reaction.isEmptyMessage(additionTemperature)) {
    input.setAdditionTemperature(additionTemperature);
  }
  const flowRate = ord.reaction.readMetric(
      '.input_flow_rate', new proto.ord.FlowRate(), node);
  if (!ord.reaction.isEmptyMessage(flowRate)) {
    input.setFlowRate(flowRate);
  }
  return input;
}
function unloadInputUnnamed ( node ) { const input = new proto . ord . ReactionInput ( ) ; const compounds = ord . compounds . unload ( node ) ; if ( compounds . some ( e => ! ord . reaction . isEmptyMessage ( e ) ) ) { input . setComponentsList ( compounds ) ; } const crudes = ord . crudes . unload ( node ) ; if ( crudes . some ( e => ! ord . reaction . isEmptyMessage ( e ) ) ) { input . setCrudeComponentsList ( crudes ) ; } const additionOrder = parseInt ( $ ( '.input_addition_order' , node ) . text ( ) ) ; if ( ! isNaN ( additionOrder ) ) { input . setAdditionOrder ( additionOrder ) ; } const additionTime = ord . reaction . readMetric ( '.input_addition_time' , new proto . ord . Time ( ) , node ) ; if ( ! ord . reaction . isEmptyMessage ( additionTime ) ) { input . setAdditionTime ( additionTime ) ; } const additionSpeed = new proto . ord . ReactionInput . AdditionSpeed ( ) ; additionSpeed . setType ( ord . reaction . getSelector ( $ ( '.input_addition_speed_type' , node ) ) ) ; additionSpeed . setDetails ( $ ( '.input_addition_speed_details' , node ) . text ( ) ) ; if ( ! ord . reaction . isEmptyMessage ( additionSpeed ) ) { input . setAdditionSpeed ( additionSpeed ) ; } const additionDevice = new proto . ord . ReactionInput . AdditionDevice ( ) ; additionDevice . setType ( ord . reaction . getSelector ( $ ( '.input_addition_device_type' , node ) ) ) ; additionDevice . setDetails ( $ ( '.input_addition_device_details' , node ) . text ( ) ) ; if ( ! ord . reaction . isEmptyMessage ( additionDevice ) ) { input . setAdditionDevice ( additionDevice ) ; } const additionDuration = ord . reaction . readMetric ( '.input_addition_duration' , new proto . ord . Time ( ) , node ) ; if ( ! ord . reaction . isEmptyMessage ( additionDuration ) ) { input . setAdditionDuration ( additionDuration ) ; } const additionTemperature = ord . reaction . readMetric ( '.input_addition_temperature' , new proto . ord . Temperature ( ) , node ) ; if ( ! ord . reaction . isEmptyMessage ( additionTemperature ) ) { input . setAdditionTemperature ( additionTemperature ) ; } const flowRate = ord . reaction . readMetric ( '.input_flow_rate' , new proto . ord . FlowRate ( ) , node ) ; if ( ! ord . reaction . isEmptyMessage ( flowRate ) ) { input . setFlowRate ( flowRate ) ; } return input ; }
Fetches a single reaction input defined in the form.
Fetches a single reaction input defined in the form .