if(typeof Math.imul == "undefined" || (Math.imul(0xffffffff,5) == 0)) {
    Math.imul = function (a, b) {
        var ah  = (a >>> 16) & 0xffff;
        var al = a & 0xffff;
        var bh  = (b >>> 16) & 0xffff;
        var bl = b & 0xffff;
        // the shift by 0 fixes the sign on the high part
        // the final |0 converts the unsigned value into a signed value
        return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0);
    }
}

/**
 * React v0.12.2
 */
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.React=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule React
 */

"use strict";

var DOMPropertyOperations = _dereq_("./DOMPropertyOperations");
var EventPluginUtils = _dereq_("./EventPluginUtils");
var ReactChildren = _dereq_("./ReactChildren");
var ReactComponent = _dereq_("./ReactComponent");
var ReactCompositeComponent = _dereq_("./ReactCompositeComponent");
var ReactContext = _dereq_("./ReactContext");
var ReactCurrentOwner = _dereq_("./ReactCurrentOwner");
var ReactElement = _dereq_("./ReactElement");
var ReactElementValidator = _dereq_("./ReactElementValidator");
var ReactDOM = _dereq_("./ReactDOM");
var ReactDOMComponent = _dereq_("./ReactDOMComponent");
var ReactDefaultInjection = _dereq_("./ReactDefaultInjection");
var ReactInstanceHandles = _dereq_("./ReactInstanceHandles");
var ReactLegacyElement = _dereq_("./ReactLegacyElement");
var ReactMount = _dereq_("./ReactMount");
var ReactMultiChild = _dereq_("./ReactMultiChild");
var ReactPerf = _dereq_("./ReactPerf");
var ReactPropTypes = _dereq_("./ReactPropTypes");
var ReactServerRendering = _dereq_("./ReactServerRendering");
var ReactTextComponent = _dereq_("./ReactTextComponent");

var assign = _dereq_("./Object.assign");
var deprecated = _dereq_("./deprecated");
var onlyChild = _dereq_("./onlyChild");

ReactDefaultInjection.inject();

var createElement = ReactElement.createElement;
var createFactory = ReactElement.createFactory;

if ("production" !== "development") {
  createElement = ReactElementValidator.createElement;
  createFactory = ReactElementValidator.createFactory;
}

// TODO: Drop legacy elements once classes no longer export these factories
createElement = ReactLegacyElement.wrapCreateElement(
  createElement
);
createFactory = ReactLegacyElement.wrapCreateFactory(
  createFactory
);

var render = ReactPerf.measure('React', 'render', ReactMount.render);

var React = {
  Children: {
    map: ReactChildren.map,
    forEach: ReactChildren.forEach,
    count: ReactChildren.count,
    only: onlyChild
  },
  DOM: ReactDOM,
  PropTypes: ReactPropTypes,
  initializeTouchEvents: function(shouldUseTouch) {
    EventPluginUtils.useTouchEvents = shouldUseTouch;
  },
  createClass: ReactCompositeComponent.createClass,
  createElement: createElement,
  createFactory: createFactory,
  constructAndRenderComponent: ReactMount.constructAndRenderComponent,
  constructAndRenderComponentByID: ReactMount.constructAndRenderComponentByID,
  render: render,
  renderToString: ReactServerRendering.renderToString,
  renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup,
  unmountComponentAtNode: ReactMount.unmountComponentAtNode,
  isValidClass: ReactLegacyElement.isValidClass,
  isValidElement: ReactElement.isValidElement,
  withContext: ReactContext.withContext,

  // Hook for JSX spread, don't use this for anything else.
  __spread: assign,

  // Deprecations (remove for 0.13)
  renderComponent: deprecated(
    'React',
    'renderComponent',
    'render',
    this,
    render
  ),
  renderComponentToString: deprecated(
    'React',
    'renderComponentToString',
    'renderToString',
    this,
    ReactServerRendering.renderToString
  ),
  renderComponentToStaticMarkup: deprecated(
    'React',
    'renderComponentToStaticMarkup',
    'renderToStaticMarkup',
    this,
    ReactServerRendering.renderToStaticMarkup
  ),
  isValidComponent: deprecated(
    'React',
    'isValidComponent',
    'isValidElement',
    this,
    ReactElement.isValidElement
  )
};

// Inject the runtime into a devtools global hook regardless of browser.
// Allows for debugging when the hook is injected on the page.
if (
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') {
  __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({
    Component: ReactComponent,
    CurrentOwner: ReactCurrentOwner,
    DOMComponent: ReactDOMComponent,
    DOMPropertyOperations: DOMPropertyOperations,
    InstanceHandles: ReactInstanceHandles,
    Mount: ReactMount,
    MultiChild: ReactMultiChild,
    TextComponent: ReactTextComponent
  });
}

if ("production" !== "development") {
  var ExecutionEnvironment = _dereq_("./ExecutionEnvironment");
  if (ExecutionEnvironment.canUseDOM && window.top === window.self) {

    // If we're in Chrome, look for the devtools marker and provide a download
    // link if not installed.
    if (navigator.userAgent.indexOf('Chrome') > -1) {
      if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
        console.debug(
          'Download the React DevTools for a better development experience: ' +
          'http://fb.me/react-devtools'
        );
      }
    }

    var expectedFeatures = [
      // shims
      Array.isArray,
      Array.prototype.every,
      Array.prototype.forEach,
      Array.prototype.indexOf,
      Array.prototype.map,
      Date.now,
      Function.prototype.bind,
      Object.keys,
      String.prototype.split,
      String.prototype.trim,

      // shams
      Object.create,
      Object.freeze
    ];

    for (var i = 0; i < expectedFeatures.length; i++) {
      if (!expectedFeatures[i]) {
        console.error(
          'One or more ES5 shim/shams expected by React are not available: ' +
          'http://fb.me/react-warning-polyfills'
        );
        break;
      }
    }
  }
}

// Version exists only in the open-source version of React, not in Facebook's
// internal version.
React.version = '0.12.2';

module.exports = React;

},{"./DOMPropertyOperations":12,"./EventPluginUtils":20,"./ExecutionEnvironment":22,"./Object.assign":27,"./ReactChildren":31,"./ReactComponent":32,"./ReactCompositeComponent":34,"./ReactContext":35,"./ReactCurrentOwner":36,"./ReactDOM":37,"./ReactDOMComponent":39,"./ReactDefaultInjection":49,"./ReactElement":52,"./ReactElementValidator":53,"./ReactInstanceHandles":60,"./ReactLegacyElement":61,"./ReactMount":63,"./ReactMultiChild":64,"./ReactPerf":68,"./ReactPropTypes":72,"./ReactServerRendering":76,"./ReactTextComponent":78,"./deprecated":106,"./onlyChild":137}],2:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule AutoFocusMixin
 * @typechecks static-only
 */

"use strict";

var focusNode = _dereq_("./focusNode");

var AutoFocusMixin = {
  componentDidMount: function() {
    if (this.props.autoFocus) {
      focusNode(this.getDOMNode());
    }
  }
};

module.exports = AutoFocusMixin;

},{"./focusNode":111}],3:[function(_dereq_,module,exports){
/**
 * Copyright 2013 Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule BeforeInputEventPlugin
 * @typechecks static-only
 */

"use strict";

var EventConstants = _dereq_("./EventConstants");
var EventPropagators = _dereq_("./EventPropagators");
var ExecutionEnvironment = _dereq_("./ExecutionEnvironment");
var SyntheticInputEvent = _dereq_("./SyntheticInputEvent");

var keyOf = _dereq_("./keyOf");

var canUseTextInputEvent = (
  ExecutionEnvironment.canUseDOM &&
  'TextEvent' in window &&
  !('documentMode' in document || isPresto())
);

/**
 * Opera <= 12 includes TextEvent in window, but does not fire
 * text input events. Rely on keypress instead.
 */
function isPresto() {
  var opera = window.opera;
  return (
    typeof opera === 'object' &&
    typeof opera.version === 'function' &&
    parseInt(opera.version(), 10) <= 12
  );
}

var SPACEBAR_CODE = 32;
var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);

var topLevelTypes = EventConstants.topLevelTypes;

// Events and their corresponding property names.
var eventTypes = {
  beforeInput: {
    phasedRegistrationNames: {
      bubbled: keyOf({onBeforeInput: null}),
      captured: keyOf({onBeforeInputCapture: null})
    },
    dependencies: [
      topLevelTypes.topCompositionEnd,
      topLevelTypes.topKeyPress,
      topLevelTypes.topTextInput,
      topLevelTypes.topPaste
    ]
  }
};

// Track characters inserted via keypress and composition events.
var fallbackChars = null;

// Track whether we've ever handled a keypress on the space key.
var hasSpaceKeypress = false;

/**
 * Return whether a native keypress event is assumed to be a command.
 * This is required because Firefox fires `keypress` events for key commands
 * (cut, copy, select-all, etc.) even though no character is inserted.
 */
function isKeypressCommand(nativeEvent) {
  return (
    (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
    // ctrlKey && altKey is equivalent to AltGr, and is not a command.
    !(nativeEvent.ctrlKey && nativeEvent.altKey)
  );
}

/**
 * Create an `onBeforeInput` event to match
 * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
 *
 * This event plugin is based on the native `textInput` event
 * available in Chrome, Safari, Opera, and IE. This event fires after
 * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
 *
 * `beforeInput` is spec'd but not implemented in any browsers, and
 * the `input` event does not provide any useful information about what has
 * actually been added, contrary to the spec. Thus, `textInput` is the best
 * available event to identify the characters that have actually been inserted
 * into the target node.
 */
var BeforeInputEventPlugin = {

  eventTypes: eventTypes,

  /**
   * @param {string} topLevelType Record from `EventConstants`.
   * @param {DOMEventTarget} topLevelTarget The listening component root node.
   * @param {string} topLevelTargetID ID of `topLevelTarget`.
   * @param {object} nativeEvent Native browser event.
   * @return {*} An accumulation of synthetic events.
   * @see {EventPluginHub.extractEvents}
   */
  extractEvents: function(
      topLevelType,
      topLevelTarget,
      topLevelTargetID,
      nativeEvent) {

    var chars;

    if (canUseTextInputEvent) {
      switch (topLevelType) {
        case topLevelTypes.topKeyPress:
          /**
           * If native `textInput` events are available, our goal is to make
           * use of them. However, there is a special case: the spacebar key.
           * In Webkit, preventing default on a spacebar `textInput` event
           * cancels character insertion, but it *also* causes the browser
           * to fall back to its default spacebar behavior of scrolling the
           * page.
           *
           * Tracking at:
           * https://code.google.com/p/chromium/issues/detail?id=355103
           *
           * To avoid this issue, use the keypress event as if no `textInput`
           * event is available.
           */
          var which = nativeEvent.which;
          if (which !== SPACEBAR_CODE) {
            return;
          }

          hasSpaceKeypress = true;
          chars = SPACEBAR_CHAR;
          break;

        case topLevelTypes.topTextInput:
          // Record the characters to be added to the DOM.
          chars = nativeEvent.data;

          // If it's a spacebar character, assume that we have already handled
          // it at the keypress level and bail immediately. Android Chrome
          // doesn't give us keycodes, so we need to blacklist it.
          if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
            return;
          }

          // Otherwise, carry on.
          break;

        default:
          // For other native event types, do nothing.
          return;
      }
    } else {
      switch (topLevelType) {
        case topLevelTypes.topPaste:
          // If a paste event occurs after a keypress, throw out the input
          // chars. Paste events should not lead to BeforeInput events.
          fallbackChars = null;
          break;
        case topLevelTypes.topKeyPress:
          /**
           * As of v27, Firefox may fire keypress events even when no character
           * will be inserted. A few possibilities:
           *
           * - `which` is `0`. Arrow keys, Esc key, etc.
           *
           * - `which` is the pressed key code, but no char is available.
           *   Ex: 'AltGr + d` in Polish. There is no modified character for
           *   this key combination and no character is inserted into the
           *   document, but FF fires the keypress for char code `100` anyway.
           *   No `input` event will occur.
           *
           * - `which` is the pressed key code, but a command combination is
           *   being used. Ex: `Cmd+C`. No character is inserted, and no
           *   `input` event will occur.
           */
          if (nativeEvent.which && !isKeypressCommand(nativeEvent)) {
            fallbackChars = String.fromCharCode(nativeEvent.which);
          }
          break;
        case topLevelTypes.topCompositionEnd:
          fallbackChars = nativeEvent.data;
          break;
      }

      // If no changes have occurred to the fallback string, no relevant
      // event has fired and we're done.
      if (fallbackChars === null) {
        return;
      }

      chars = fallbackChars;
    }

    // If no characters are being inserted, no BeforeInput event should
    // be fired.
    if (!chars) {
      return;
    }

    var event = SyntheticInputEvent.getPooled(
      eventTypes.beforeInput,
      topLevelTargetID,
      nativeEvent
    );

    event.data = chars;
    fallbackChars = null;
    EventPropagators.accumulateTwoPhaseDispatches(event);
    return event;
  }
};

module.exports = BeforeInputEventPlugin;

},{"./EventConstants":16,"./EventPropagators":21,"./ExecutionEnvironment":22,"./SyntheticInputEvent":89,"./keyOf":133}],4:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule CSSProperty
 */

"use strict";

/**
 * CSS properties which accept numbers but are not in units of "px".
 */
var isUnitlessNumber = {
  columnCount: true,
  flex: true,
  flexGrow: true,
  flexShrink: true,
  fontWeight: true,
  lineClamp: true,
  lineHeight: true,
  opacity: true,
  order: true,
  orphans: true,
  widows: true,
  zIndex: true,
  zoom: true,

  // SVG-related properties
  fillOpacity: true,
  strokeOpacity: true
};

/**
 * @param {string} prefix vendor-specific prefix, eg: Webkit
 * @param {string} key style name, eg: transitionDuration
 * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
 * WebkitTransitionDuration
 */
function prefixKey(prefix, key) {
  return prefix + key.charAt(0).toUpperCase() + key.substring(1);
}

/**
 * Support style names that may come passed in prefixed by adding permutations
 * of vendor prefixes.
 */
var prefixes = ['Webkit', 'ms', 'Moz', 'O'];

// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
// infinite loop, because it iterates over the newly added props too.
Object.keys(isUnitlessNumber).forEach(function(prop) {
  prefixes.forEach(function(prefix) {
    isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
  });
});

/**
 * Most style properties can be unset by doing .style[prop] = '' but IE8
 * doesn't like doing that with shorthand properties so for the properties that
 * IE8 breaks on, which are listed here, we instead unset each of the
 * individual properties. See http://bugs.jquery.com/ticket/12385.
 * The 4-value 'clock' properties like margin, padding, border-width seem to
 * behave without any problems. Curiously, list-style works too without any
 * special prodding.
 */
var shorthandPropertyExpansions = {
  background: {
    backgroundImage: true,
    backgroundPosition: true,
    backgroundRepeat: true,
    backgroundColor: true
  },
  border: {
    borderWidth: true,
    borderStyle: true,
    borderColor: true
  },
  borderBottom: {
    borderBottomWidth: true,
    borderBottomStyle: true,
    borderBottomColor: true
  },
  borderLeft: {
    borderLeftWidth: true,
    borderLeftStyle: true,
    borderLeftColor: true
  },
  borderRight: {
    borderRightWidth: true,
    borderRightStyle: true,
    borderRightColor: true
  },
  borderTop: {
    borderTopWidth: true,
    borderTopStyle: true,
    borderTopColor: true
  },
  font: {
    fontStyle: true,
    fontVariant: true,
    fontWeight: true,
    fontSize: true,
    lineHeight: true,
    fontFamily: true
  }
};

var CSSProperty = {
  isUnitlessNumber: isUnitlessNumber,
  shorthandPropertyExpansions: shorthandPropertyExpansions
};

module.exports = CSSProperty;

},{}],5:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule CSSPropertyOperations
 * @typechecks static-only
 */

"use strict";

var CSSProperty = _dereq_("./CSSProperty");
var ExecutionEnvironment = _dereq_("./ExecutionEnvironment");

var camelizeStyleName = _dereq_("./camelizeStyleName");
var dangerousStyleValue = _dereq_("./dangerousStyleValue");
var hyphenateStyleName = _dereq_("./hyphenateStyleName");
var memoizeStringOnly = _dereq_("./memoizeStringOnly");
var warning = _dereq_("./warning");

var processStyleName = memoizeStringOnly(function(styleName) {
  return hyphenateStyleName(styleName);
});

var styleFloatAccessor = 'cssFloat';
if (ExecutionEnvironment.canUseDOM) {
  // IE8 only supports accessing cssFloat (standard) as styleFloat
  if (document.documentElement.style.cssFloat === undefined) {
    styleFloatAccessor = 'styleFloat';
  }
}

if ("production" !== "development") {
  var warnedStyleNames = {};

  var warnHyphenatedStyleName = function(name) {
    if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
      return;
    }

    warnedStyleNames[name] = true;
    ("production" !== "development" ? warning(
      false,
      'Unsupported style property ' + name + '. Did you mean ' +
      camelizeStyleName(name) + '?'
    ) : null);
  };
}

/**
 * Operations for dealing with CSS properties.
 */
var CSSPropertyOperations = {

  /**
   * Serializes a mapping of style properties for use as inline styles:
   *
   *   > createMarkupForStyles({width: '200px', height: 0})
   *   "width:200px;height:0;"
   *
   * Undefined values are ignored so that declarative programming is easier.
   * The result should be HTML-escaped before insertion into the DOM.
   *
   * @param {object} styles
   * @return {?string}
   */
  createMarkupForStyles: function(styles) {
    var serialized = '';
    for (var styleName in styles) {
      if (!styles.hasOwnProperty(styleName)) {
        continue;
      }
      if ("production" !== "development") {
        if (styleName.indexOf('-') > -1) {
          warnHyphenatedStyleName(styleName);
        }
      }
      var styleValue = styles[styleName];
      if (styleValue != null) {
        serialized += processStyleName(styleName) + ':';
        serialized += dangerousStyleValue(styleName, styleValue) + ';';
      }
    }
    return serialized || null;
  },

  /**
   * Sets the value for multiple styles on a node.  If a value is specified as
   * '' (empty string), the corresponding style property will be unset.
   *
   * @param {DOMElement} node
   * @param {object} styles
   */
  setValueForStyles: function(node, styles) {
    var style = node.style;
    for (var styleName in styles) {
      if (!styles.hasOwnProperty(styleName)) {
        continue;
      }
      if ("production" !== "development") {
        if (styleName.indexOf('-') > -1) {
          warnHyphenatedStyleName(styleName);
        }
      }
      var styleValue = dangerousStyleValue(styleName, styles[styleName]);
      if (styleName === 'float') {
        styleName = styleFloatAccessor;
      }
      if (styleValue) {
        style[styleName] = styleValue;
      } else {
        var expansion = CSSProperty.shorthandPropertyExpansions[styleName];
        if (expansion) {
          // Shorthand property that IE8 won't like unsetting, so unset each
          // component to placate it
          for (var individualStyleName in expansion) {
            style[individualStyleName] = '';
          }
        } else {
          style[styleName] = '';
        }
      }
    }
  }

};

module.exports = CSSPropertyOperations;

},{"./CSSProperty":4,"./ExecutionEnvironment":22,"./camelizeStyleName":100,"./dangerousStyleValue":105,"./hyphenateStyleName":124,"./memoizeStringOnly":135,"./warning":145}],6:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule CallbackQueue
 */

"use strict";

var PooledClass = _dereq_("./PooledClass");

var assign = _dereq_("./Object.assign");
var invariant = _dereq_("./invariant");

/**
 * A specialized pseudo-event module to help keep track of components waiting to
 * be notified when their DOM representations are available for use.
 *
 * This implements `PooledClass`, so you should never need to instantiate this.
 * Instead, use `CallbackQueue.getPooled()`.
 *
 * @class ReactMountReady
 * @implements PooledClass
 * @internal
 */
function CallbackQueue() {
  this._callbacks = null;
  this._contexts = null;
}

assign(CallbackQueue.prototype, {

  /**
   * Enqueues a callback to be invoked when `notifyAll` is invoked.
   *
   * @param {function} callback Invoked when `notifyAll` is invoked.
   * @param {?object} context Context to call `callback` with.
   * @internal
   */
  enqueue: function(callback, context) {
    this._callbacks = this._callbacks || [];
    this._contexts = this._contexts || [];
    this._callbacks.push(callback);
    this._contexts.push(context);
  },

  /**
   * Invokes all enqueued callbacks and clears the queue. This is invoked after
   * the DOM representation of a component has been created or updated.
   *
   * @internal
   */
  notifyAll: function() {
    var callbacks = this._callbacks;
    var contexts = this._contexts;
    if (callbacks) {
      ("production" !== "development" ? invariant(
        callbacks.length === contexts.length,
        "Mismatched list of contexts in callback queue"
      ) : invariant(callbacks.length === contexts.length));
      this._callbacks = null;
      this._contexts = null;
      for (var i = 0, l = callbacks.length; i < l; i++) {
        callbacks[i].call(contexts[i]);
      }
      callbacks.length = 0;
      contexts.length = 0;
    }
  },

  /**
   * Resets the internal queue.
   *
   * @internal
   */
  reset: function() {
    this._callbacks = null;
    this._contexts = null;
  },

  /**
   * `PooledClass` looks for this.
   */
  destructor: function() {
    this.reset();
  }

});

PooledClass.addPoolingTo(CallbackQueue);

module.exports = CallbackQueue;

},{"./Object.assign":27,"./PooledClass":28,"./invariant":126}],7:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ChangeEventPlugin
 */

"use strict";

var EventConstants = _dereq_("./EventConstants");
var EventPluginHub = _dereq_("./EventPluginHub");
var EventPropagators = _dereq_("./EventPropagators");
var ExecutionEnvironment = _dereq_("./ExecutionEnvironment");
var ReactUpdates = _dereq_("./ReactUpdates");
var SyntheticEvent = _dereq_("./SyntheticEvent");

var isEventSupported = _dereq_("./isEventSupported");
var isTextInputElement = _dereq_("./isTextInputElement");
var keyOf = _dereq_("./keyOf");

var topLevelTypes = EventConstants.topLevelTypes;

var eventTypes = {
  change: {
    phasedRegistrationNames: {
      bubbled: keyOf({onChange: null}),
      captured: keyOf({onChangeCapture: null})
    },
    dependencies: [
      topLevelTypes.topBlur,
      topLevelTypes.topChange,
      topLevelTypes.topClick,
      topLevelTypes.topFocus,
      topLevelTypes.topInput,
      topLevelTypes.topKeyDown,
      topLevelTypes.topKeyUp,
      topLevelTypes.topSelectionChange
    ]
  }
};

/**
 * For IE shims
 */
var activeElement = null;
var activeElementID = null;
var activeElementValue = null;
var activeElementValueProp = null;

/**
 * SECTION: handle `change` event
 */
function shouldUseChangeEvent(elem) {
  return (
    elem.nodeName === 'SELECT' ||
    (elem.nodeName === 'INPUT' && elem.type === 'file')
  );
}

var doesChangeEventBubble = false;
if (ExecutionEnvironment.canUseDOM) {
  // See `handleChange` comment below
  doesChangeEventBubble = isEventSupported('change') && (
    !('documentMode' in document) || document.documentMode > 8
  );
}

function manualDispatchChangeEvent(nativeEvent) {
  var event = SyntheticEvent.getPooled(
    eventTypes.change,
    activeElementID,
    nativeEvent
  );
  EventPropagators.accumulateTwoPhaseDispatches(event);

  // If change and propertychange bubbled, we'd just bind to it like all the
  // other events and have it go through ReactBrowserEventEmitter. Since it
  // doesn't, we manually listen for the events and so we have to enqueue and
  // process the abstract event manually.
  //
  // Batching is necessary here in order to ensure that all event handlers run
  // before the next rerender (including event handlers attached to ancestor
  // elements instead of directly on the input). Without this, controlled
  // components don't work properly in conjunction with event bubbling because
  // the component is rerendered and the value reverted before all the event
  // handlers can run. See https://github.com/facebook/react/issues/708.
  ReactUpdates.batchedUpdates(runEventInBatch, event);
}

function runEventInBatch(event) {
  EventPluginHub.enqueueEvents(event);
  EventPluginHub.processEventQueue();
}

function startWatchingForChangeEventIE8(target, targetID) {
  activeElement = target;
  activeElementID = targetID;
  activeElement.attachEvent('onchange', manualDispatchChangeEvent);
}

function stopWatchingForChangeEventIE8() {
  if (!activeElement) {
    return;
  }
  activeElement.detachEvent('onchange', manualDispatchChangeEvent);
  activeElement = null;
  activeElementID = null;
}

function getTargetIDForChangeEvent(
    topLevelType,
    topLevelTarget,
    topLevelTargetID) {
  if (topLevelType === topLevelTypes.topChange) {
    return topLevelTargetID;
  }
}
function handleEventsForChangeEventIE8(
    topLevelType,
    topLevelTarget,
    topLevelTargetID) {
  if (topLevelType === topLevelTypes.topFocus) {
    // stopWatching() should be a noop here but we call it just in case we
    // missed a blur event somehow.
    stopWatchingForChangeEventIE8();
    startWatchingForChangeEventIE8(topLevelTarget, topLevelTargetID);
  } else if (topLevelType === topLevelTypes.topBlur) {
    stopWatchingForChangeEventIE8();
  }
}


/**
 * SECTION: handle `input` event
 */
var isInputEventSupported = false;
if (ExecutionEnvironment.canUseDOM) {
  // IE9 claims to support the input event but fails to trigger it when
  // deleting text, so we ignore its input events
  isInputEventSupported = isEventSupported('input') && (
    !('documentMode' in document) || document.documentMode > 9
  );
}

/**
 * (For old IE.) Replacement getter/setter for the `value` property that gets
 * set on the active element.
 */
var newValueProp =  {
  get: function() {
    return activeElementValueProp.get.call(this);
  },
  set: function(val) {
    // Cast to a string so we can do equality checks.
    activeElementValue = '' + val;
    activeElementValueProp.set.call(this, val);
  }
};

/**
 * (For old IE.) Starts tracking propertychange events on the passed-in element
 * and override the value property so that we can distinguish user events from
 * value changes in JS.
 */
function startWatchingForValueChange(target, targetID) {
  activeElement = target;
  activeElementID = targetID;
  activeElementValue = target.value;
  activeElementValueProp = Object.getOwnPropertyDescriptor(
    target.constructor.prototype,
    'value'
  );

  Object.defineProperty(activeElement, 'value', newValueProp);
  activeElement.attachEvent('onpropertychange', handlePropertyChange);
}

/**
 * (For old IE.) Removes the event listeners from the currently-tracked element,
 * if any exists.
 */
function stopWatchingForValueChange() {
  if (!activeElement) {
    return;
  }

  // delete restores the original property definition
  delete activeElement.value;
  activeElement.detachEvent('onpropertychange', handlePropertyChange);

  activeElement = null;
  activeElementID = null;
  activeElementValue = null;
  activeElementValueProp = null;
}

/**
 * (For old IE.) Handles a propertychange event, sending a `change` event if
 * the value of the active element has changed.
 */
function handlePropertyChange(nativeEvent) {
  if (nativeEvent.propertyName !== 'value') {
    return;
  }
  var value = nativeEvent.srcElement.value;
  if (value === activeElementValue) {
    return;
  }
  activeElementValue = value;

  manualDispatchChangeEvent(nativeEvent);
}

/**
 * If a `change` event should be fired, returns the target's ID.
 */
function getTargetIDForInputEvent(
    topLevelType,
    topLevelTarget,
    topLevelTargetID) {
  if (topLevelType === topLevelTypes.topInput) {
    // In modern browsers (i.e., not IE8 or IE9), the input event is exactly
    // what we want so fall through here and trigger an abstract event
    return topLevelTargetID;
  }
}

// For IE8 and IE9.
function handleEventsForInputEventIE(
    topLevelType,
    topLevelTarget,
    topLevelTargetID) {
  if (topLevelType === topLevelTypes.topFocus) {
    // In IE8, we can capture almost all .value changes by adding a
    // propertychange handler and looking for events with propertyName
    // equal to 'value'
    // In IE9, propertychange fires for most input events but is buggy and
    // doesn't fire when text is deleted, but conveniently, selectionchange
    // appears to fire in all of the remaining cases so we catch those and
    // forward the event if the value has changed
    // In either case, we don't want to call the event handler if the value
    // is changed from JS so we redefine a setter for `.value` that updates
    // our activeElementValue variable, allowing us to ignore those changes
    //
    // stopWatching() should be a noop here but we call it just in case we
    // missed a blur event somehow.
    stopWatchingForValueChange();
    startWatchingForValueChange(topLevelTarget, topLevelTargetID);
  } else if (topLevelType === topLevelTypes.topBlur) {
    stopWatchingForValueChange();
  }
}

// For IE8 and IE9.
function getTargetIDForInputEventIE(
    topLevelType,
    topLevelTarget,
    topLevelTargetID) {
  if (topLevelType === topLevelTypes.topSelectionChange ||
      topLevelType === topLevelTypes.topKeyUp ||
      topLevelType === topLevelTypes.topKeyDown) {
    // On the selectionchange event, the target is just document which isn't
    // helpful for us so just check activeElement instead.
    //
    // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
    // propertychange on the first input event after setting `value` from a
    // script and fires only keydown, keypress, keyup. Catching keyup usually
    // gets it and catching keydown lets us fire an event for the first
    // keystroke if user does a key repeat (it'll be a little delayed: right
    // before the second keystroke). Other input methods (e.g., paste) seem to
    // fire selectionchange normally.
    if (activeElement && activeElement.value !== activeElementValue) {
      activeElementValue = activeElement.value;
      return activeElementID;
    }
  }
}


/**
 * SECTION: handle `click` event
 */
function shouldUseClickEvent(elem) {
  // Use the `click` event to detect changes to checkbox and radio inputs.
  // This approach works across all browsers, whereas `change` does not fire
  // until `blur` in IE8.
  return (
    elem.nodeName === 'INPUT' &&
    (elem.type === 'checkbox' || elem.type === 'radio')
  );
}

function getTargetIDForClickEvent(
    topLevelType,
    topLevelTarget,
    topLevelTargetID) {
  if (topLevelType === topLevelTypes.topClick) {
    return topLevelTargetID;
  }
}

/**
 * This plugin creates an `onChange` event that normalizes change events
 * across form elements. This event fires at a time when it's possible to
 * change the element's value without seeing a flicker.
 *
 * Supported elements are:
 * - input (see `isTextInputElement`)
 * - textarea
 * - select
 */
var ChangeEventPlugin = {

  eventTypes: eventTypes,

  /**
   * @param {string} topLevelType Record from `EventConstants`.
   * @param {DOMEventTarget} topLevelTarget The listening component root node.
   * @param {string} topLevelTargetID ID of `topLevelTarget`.
   * @param {object} nativeEvent Native browser event.
   * @return {*} An accumulation of synthetic events.
   * @see {EventPluginHub.extractEvents}
   */
  extractEvents: function(
      topLevelType,
      topLevelTarget,
      topLevelTargetID,
      nativeEvent) {

    var getTargetIDFunc, handleEventFunc;
    if (shouldUseChangeEvent(topLevelTarget)) {
      if (doesChangeEventBubble) {
        getTargetIDFunc = getTargetIDForChangeEvent;
      } else {
        handleEventFunc = handleEventsForChangeEventIE8;
      }
    } else if (isTextInputElement(topLevelTarget)) {
      if (isInputEventSupported) {
        getTargetIDFunc = getTargetIDForInputEvent;
      } else {
        getTargetIDFunc = getTargetIDForInputEventIE;
        handleEventFunc = handleEventsForInputEventIE;
      }
    } else if (shouldUseClickEvent(topLevelTarget)) {
      getTargetIDFunc = getTargetIDForClickEvent;
    }

    if (getTargetIDFunc) {
      var targetID = getTargetIDFunc(
        topLevelType,
        topLevelTarget,
        topLevelTargetID
      );
      if (targetID) {
        var event = SyntheticEvent.getPooled(
          eventTypes.change,
          targetID,
          nativeEvent
        );
        EventPropagators.accumulateTwoPhaseDispatches(event);
        return event;
      }
    }

    if (handleEventFunc) {
      handleEventFunc(
        topLevelType,
        topLevelTarget,
        topLevelTargetID
      );
    }
  }

};

module.exports = ChangeEventPlugin;

},{"./EventConstants":16,"./EventPluginHub":18,"./EventPropagators":21,"./ExecutionEnvironment":22,"./ReactUpdates":79,"./SyntheticEvent":87,"./isEventSupported":127,"./isTextInputElement":129,"./keyOf":133}],8:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ClientReactRootIndex
 * @typechecks
 */

"use strict";

var nextReactRootIndex = 0;

var ClientReactRootIndex = {
  createReactRootIndex: function() {
    return nextReactRootIndex++;
  }
};

module.exports = ClientReactRootIndex;

},{}],9:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule CompositionEventPlugin
 * @typechecks static-only
 */

"use strict";

var EventConstants = _dereq_("./EventConstants");
var EventPropagators = _dereq_("./EventPropagators");
var ExecutionEnvironment = _dereq_("./ExecutionEnvironment");
var ReactInputSelection = _dereq_("./ReactInputSelection");
var SyntheticCompositionEvent = _dereq_("./SyntheticCompositionEvent");

var getTextContentAccessor = _dereq_("./getTextContentAccessor");
var keyOf = _dereq_("./keyOf");

var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
var START_KEYCODE = 229;

var useCompositionEvent = (
  ExecutionEnvironment.canUseDOM &&
  'CompositionEvent' in window
);

// In IE9+, we have access to composition events, but the data supplied
// by the native compositionend event may be incorrect. In Korean, for example,
// the compositionend event contains only one character regardless of
// how many characters have been composed since compositionstart.
// We therefore use the fallback data while still using the native
// events as triggers.
var useFallbackData = (
  !useCompositionEvent ||
  (
    'documentMode' in document &&
    document.documentMode > 8 &&
    document.documentMode <= 11
  )
);

var topLevelTypes = EventConstants.topLevelTypes;
var currentComposition = null;

// Events and their corresponding property names.
var eventTypes = {
  compositionEnd: {
    phasedRegistrationNames: {
      bubbled: keyOf({onCompositionEnd: null}),
      captured: keyOf({onCompositionEndCapture: null})
    },
    dependencies: [
      topLevelTypes.topBlur,
      topLevelTypes.topCompositionEnd,
      topLevelTypes.topKeyDown,
      topLevelTypes.topKeyPress,
      topLevelTypes.topKeyUp,
      topLevelTypes.topMouseDown
    ]
  },
  compositionStart: {
    phasedRegistrationNames: {
      bubbled: keyOf({onCompositionStart: null}),
      captured: keyOf({onCompositionStartCapture: null})
    },
    dependencies: [
      topLevelTypes.topBlur,
      topLevelTypes.topCompositionStart,
      topLevelTypes.topKeyDown,
      topLevelTypes.topKeyPress,
      topLevelTypes.topKeyUp,
      topLevelTypes.topMouseDown
    ]
  },
  compositionUpdate: {
    phasedRegistrationNames: {
      bubbled: keyOf({onCompositionUpdate: null}),
      captured: keyOf({onCompositionUpdateCapture: null})
    },
    dependencies: [
      topLevelTypes.topBlur,
      topLevelTypes.topCompositionUpdate,
      topLevelTypes.topKeyDown,
      topLevelTypes.topKeyPress,
      topLevelTypes.topKeyUp,
      topLevelTypes.topMouseDown
    ]
  }
};

/**
 * Translate native top level events into event types.
 *
 * @param {string} topLevelType
 * @return {object}
 */
function getCompositionEventType(topLevelType) {
  switch (topLevelType) {
    case topLevelTypes.topCompositionStart:
      return eventTypes.compositionStart;
    case topLevelTypes.topCompositionEnd:
      return eventTypes.compositionEnd;
    case topLevelTypes.topCompositionUpdate:
      return eventTypes.compositionUpdate;
  }
}

/**
 * Does our fallback best-guess model think this event signifies that
 * composition has begun?
 *
 * @param {string} topLevelType
 * @param {object} nativeEvent
 * @return {boolean}
 */
function isFallbackStart(topLevelType, nativeEvent) {
  return (
    topLevelType === topLevelTypes.topKeyDown &&
    nativeEvent.keyCode === START_KEYCODE
  );
}

/**
 * Does our fallback mode think that this event is the end of composition?
 *
 * @param {string} topLevelType
 * @param {object} nativeEvent
 * @return {boolean}
 */
function isFallbackEnd(topLevelType, nativeEvent) {
  switch (topLevelType) {
    case topLevelTypes.topKeyUp:
      // Command keys insert or clear IME input.
      return (END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1);
    case topLevelTypes.topKeyDown:
      // Expect IME keyCode on each keydown. If we get any other
      // code we must have exited earlier.
      return (nativeEvent.keyCode !== START_KEYCODE);
    case topLevelTypes.topKeyPress:
    case topLevelTypes.topMouseDown:
    case topLevelTypes.topBlur:
      // Events are not possible without cancelling IME.
      return true;
    default:
      return false;
  }
}

/**
 * Helper class stores information about selection and document state
 * so we can figure out what changed at a later date.
 *
 * @param {DOMEventTarget} root
 */
function FallbackCompositionState(root) {
  this.root = root;
  this.startSelection = ReactInputSelection.getSelection(root);
  this.startValue = this.getText();
}

/**
 * Get current text of input.
 *
 * @return {string}
 */
FallbackCompositionState.prototype.getText = function() {
  return this.root.value || this.root[getTextContentAccessor()];
};

/**
 * Text that has changed since the start of composition.
 *
 * @return {string}
 */
FallbackCompositionState.prototype.getData = function() {
  var endValue = this.getText();
  var prefixLength = this.startSelection.start;
  var suffixLength = this.startValue.length - this.startSelection.end;

  return endValue.substr(
    prefixLength,
    endValue.length - suffixLength - prefixLength
  );
};

/**
 * This plugin creates `onCompositionStart`, `onCompositionUpdate` and
 * `onCompositionEnd` events on inputs, textareas and contentEditable
 * nodes.
 */
var CompositionEventPlugin = {

  eventTypes: eventTypes,

  /**
   * @param {string} topLevelType Record from `EventConstants`.
   * @param {DOMEventTarget} topLevelTarget The listening component root node.
   * @param {string} topLevelTargetID ID of `topLevelTarget`.
   * @param {object} nativeEvent Native browser event.
   * @return {*} An accumulation of synthetic events.
   * @see {EventPluginHub.extractEvents}
   */
  extractEvents: function(
      topLevelType,
      topLevelTarget,
      topLevelTargetID,
      nativeEvent) {

    var eventType;
    var data;

    if (useCompositionEvent) {
      eventType = getCompositionEventType(topLevelType);
    } else if (!currentComposition) {
      if (isFallbackStart(topLevelType, nativeEvent)) {
        eventType = eventTypes.compositionStart;
      }
    } else if (isFallbackEnd(topLevelType, nativeEvent)) {
      eventType = eventTypes.compositionEnd;
    }

    if (useFallbackData) {
      // The current composition is stored statically and must not be
      // overwritten while composition continues.
      if (!currentComposition && eventType === eventTypes.compositionStart) {
        currentComposition = new FallbackCompositionState(topLevelTarget);
      } else if (eventType === eventTypes.compositionEnd) {
        if (currentComposition) {
          data = currentComposition.getData();
          currentComposition = null;
        }
      }
    }

    if (eventType) {
      var event = SyntheticCompositionEvent.getPooled(
        eventType,
        topLevelTargetID,
        nativeEvent
      );
      if (data) {
        // Inject data generated from fallback path into the synthetic event.
        // This matches the property of native CompositionEventInterface.
        event.data = data;
      }
      EventPropagators.accumulateTwoPhaseDispatches(event);
      return event;
    }
  }
};

module.exports = CompositionEventPlugin;

},{"./EventConstants":16,"./EventPropagators":21,"./ExecutionEnvironment":22,"./ReactInputSelection":59,"./SyntheticCompositionEvent":85,"./getTextContentAccessor":121,"./keyOf":133}],10:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule DOMChildrenOperations
 * @typechecks static-only
 */

"use strict";

var Danger = _dereq_("./Danger");
var ReactMultiChildUpdateTypes = _dereq_("./ReactMultiChildUpdateTypes");

var getTextContentAccessor = _dereq_("./getTextContentAccessor");
var invariant = _dereq_("./invariant");

/**
 * The DOM property to use when setting text content.
 *
 * @type {string}
 * @private
 */
var textContentAccessor = getTextContentAccessor();

/**
 * Inserts `childNode` as a child of `parentNode` at the `index`.
 *
 * @param {DOMElement} parentNode Parent node in which to insert.
 * @param {DOMElement} childNode Child node to insert.
 * @param {number} index Index at which to insert the child.
 * @internal
 */
function insertChildAt(parentNode, childNode, index) {
  // By exploiting arrays returning `undefined` for an undefined index, we can
  // rely exclusively on `insertBefore(node, null)` instead of also using
  // `appendChild(node)`. However, using `undefined` is not allowed by all
  // browsers so we must replace it with `null`.
  parentNode.insertBefore(
    childNode,
    parentNode.childNodes[index] || null
  );
}

var updateTextContent;
if (textContentAccessor === 'textContent') {
  /**
   * Sets the text content of `node` to `text`.
   *
   * @param {DOMElement} node Node to change
   * @param {string} text New text content
   */
  updateTextContent = function(node, text) {
    node.textContent = text;
  };
} else {
  /**
   * Sets the text content of `node` to `text`.
   *
   * @param {DOMElement} node Node to change
   * @param {string} text New text content
   */
  updateTextContent = function(node, text) {
    // In order to preserve newlines correctly, we can't use .innerText to set
    // the contents (see #1080), so we empty the element then append a text node
    while (node.firstChild) {
      node.removeChild(node.firstChild);
    }
    if (text) {
      var doc = node.ownerDocument || document;
      node.appendChild(doc.createTextNode(text));
    }
  };
}

/**
 * Operations for updating with DOM children.
 */
var DOMChildrenOperations = {

  dangerouslyReplaceNodeWithMarkup: Danger.dangerouslyReplaceNodeWithMarkup,

  updateTextContent: updateTextContent,

  /**
   * Updates a component's children by processing a series of updates. The
   * update configurations are each expected to have a `parentNode` property.
   *
   * @param {array<object>} updates List of update configurations.
   * @param {array<string>} markupList List of markup strings.
   * @internal
   */
  processUpdates: function(updates, markupList) {
    var update;
    // Mapping from parent IDs to initial child orderings.
    var initialChildren = null;
    // List of children that will be moved or removed.
    var updatedChildren = null;

    for (var i = 0; update = updates[i]; i++) {
      if (update.type === ReactMultiChildUpdateTypes.MOVE_EXISTING ||
          update.type === ReactMultiChildUpdateTypes.REMOVE_NODE) {
        var updatedIndex = update.fromIndex;
        var updatedChild = update.parentNode.childNodes[updatedIndex];
        var parentID = update.parentID;

        ("production" !== "development" ? invariant(
          updatedChild,
          'processUpdates(): Unable to find child %s of element. This ' +
          'probably means the DOM was unexpectedly mutated (e.g., by the ' +
          'browser), usually due to forgetting a <tbody> when using tables, ' +
          'nesting tags like <form>, <p>, or <a>, or using non-SVG elements '+
          'in an <svg> parent. Try inspecting the child nodes of the element ' +
          'with React ID `%s`.',
          updatedIndex,
          parentID
        ) : invariant(updatedChild));

        initialChildren = initialChildren || {};
        initialChildren[parentID] = initialChildren[parentID] || [];
        initialChildren[parentID][updatedIndex] = updatedChild;

        updatedChildren = updatedChildren || [];
        updatedChildren.push(updatedChild);
      }
    }

    var renderedMarkup = Danger.dangerouslyRenderMarkup(markupList);

    // Remove updated children first so that `toIndex` is consistent.
    if (updatedChildren) {
      for (var j = 0; j < updatedChildren.length; j++) {
        updatedChildren[j].parentNode.removeChild(updatedChildren[j]);
      }
    }

    for (var k = 0; update = updates[k]; k++) {
      switch (update.type) {
        case ReactMultiChildUpdateTypes.INSERT_MARKUP:
          insertChildAt(
            update.parentNode,
            renderedMarkup[update.markupIndex],
            update.toIndex
          );
          break;
        case ReactMultiChildUpdateTypes.MOVE_EXISTING:
          insertChildAt(
            update.parentNode,
            initialChildren[update.parentID][update.fromIndex],
            update.toIndex
          );
          break;
        case ReactMultiChildUpdateTypes.TEXT_CONTENT:
          updateTextContent(
            update.parentNode,
            update.textContent
          );
          break;
        case ReactMultiChildUpdateTypes.REMOVE_NODE:
          // Already removed by the for-loop above.
          break;
      }
    }
  }

};

module.exports = DOMChildrenOperations;

},{"./Danger":13,"./ReactMultiChildUpdateTypes":65,"./getTextContentAccessor":121,"./invariant":126}],11:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule DOMProperty
 * @typechecks static-only
 */

/*jslint bitwise: true */

"use strict";

var invariant = _dereq_("./invariant");

function checkMask(value, bitmask) {
  return (value & bitmask) === bitmask;
}

var DOMPropertyInjection = {
  /**
   * Mapping from normalized, camelcased property names to a configuration that
   * specifies how the associated DOM property should be accessed or rendered.
   */
  MUST_USE_ATTRIBUTE: 0x1,
  MUST_USE_PROPERTY: 0x2,
  HAS_SIDE_EFFECTS: 0x4,
  HAS_BOOLEAN_VALUE: 0x8,
  HAS_NUMERIC_VALUE: 0x10,
  HAS_POSITIVE_NUMERIC_VALUE: 0x20 | 0x10,
  HAS_OVERLOADED_BOOLEAN_VALUE: 0x40,

  /**
   * Inject some specialized knowledge about the DOM. This takes a config object
   * with the following properties:
   *
   * isCustomAttribute: function that given an attribute name will return true
   * if it can be inserted into the DOM verbatim. Useful for data-* or aria-*
   * attributes where it's impossible to enumerate all of the possible
   * attribute names,
   *
   * Properties: object mapping DOM property name to one of the
   * DOMPropertyInjection constants or null. If your attribute isn't in here,
   * it won't get written to the DOM.
   *
   * DOMAttributeNames: object mapping React attribute name to the DOM
   * attribute name. Attribute names not specified use the **lowercase**
   * normalized name.
   *
   * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.
   * Property names not specified use the normalized name.
   *
   * DOMMutationMethods: Properties that require special mutation methods. If
   * `value` is undefined, the mutation method should unset the property.
   *
   * @param {object} domPropertyConfig the config as described above.
   */
  injectDOMPropertyConfig: function(domPropertyConfig) {
    var Properties = domPropertyConfig.Properties || {};
    var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
    var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};
    var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};

    if (domPropertyConfig.isCustomAttribute) {
      DOMProperty._isCustomAttributeFunctions.push(
        domPropertyConfig.isCustomAttribute
      );
    }

    for (var propName in Properties) {
      ("production" !== "development" ? invariant(
        !DOMProperty.isStandardName.hasOwnProperty(propName),
        'injectDOMPropertyConfig(...): You\'re trying to inject DOM property ' +
        '\'%s\' which has already been injected. You may be accidentally ' +
        'injecting the same DOM property config twice, or you may be ' +
        'injecting two configs that have conflicting property names.',
        propName
      ) : invariant(!DOMProperty.isStandardName.hasOwnProperty(propName)));

      DOMProperty.isStandardName[propName] = true;

      var lowerCased = propName.toLowerCase();
      DOMProperty.getPossibleStandardName[lowerCased] = propName;

      if (DOMAttributeNames.hasOwnProperty(propName)) {
        var attributeName = DOMAttributeNames[propName];
        DOMProperty.getPossibleStandardName[attributeName] = propName;
        DOMProperty.getAttributeName[propName] = attributeName;
      } else {
        DOMProperty.getAttributeName[propName] = lowerCased;
      }

      DOMProperty.getPropertyName[propName] =
        DOMPropertyNames.hasOwnProperty(propName) ?
          DOMPropertyNames[propName] :
          propName;

      if (DOMMutationMethods.hasOwnProperty(propName)) {
        DOMProperty.getMutationMethod[propName] = DOMMutationMethods[propName];
      } else {
        DOMProperty.getMutationMethod[propName] = null;
      }

      var propConfig = Properties[propName];
      DOMProperty.mustUseAttribute[propName] =
        checkMask(propConfig, DOMPropertyInjection.MUST_USE_ATTRIBUTE);
      DOMProperty.mustUseProperty[propName] =
        checkMask(propConfig, DOMPropertyInjection.MUST_USE_PROPERTY);
      DOMProperty.hasSideEffects[propName] =
        checkMask(propConfig, DOMPropertyInjection.HAS_SIDE_EFFECTS);
      DOMProperty.hasBooleanValue[propName] =
        checkMask(propConfig, DOMPropertyInjection.HAS_BOOLEAN_VALUE);
      DOMProperty.hasNumericValue[propName] =
        checkMask(propConfig, DOMPropertyInjection.HAS_NUMERIC_VALUE);
      DOMProperty.hasPositiveNumericValue[propName] =
        checkMask(propConfig, DOMPropertyInjection.HAS_POSITIVE_NUMERIC_VALUE);
      DOMProperty.hasOverloadedBooleanValue[propName] =
        checkMask(propConfig, DOMPropertyInjection.HAS_OVERLOADED_BOOLEAN_VALUE);

      ("production" !== "development" ? invariant(
        !DOMProperty.mustUseAttribute[propName] ||
          !DOMProperty.mustUseProperty[propName],
        'DOMProperty: Cannot require using both attribute and property: %s',
        propName
      ) : invariant(!DOMProperty.mustUseAttribute[propName] ||
        !DOMProperty.mustUseProperty[propName]));
      ("production" !== "development" ? invariant(
        DOMProperty.mustUseProperty[propName] ||
          !DOMProperty.hasSideEffects[propName],
        'DOMProperty: Properties that have side effects must use property: %s',
        propName
      ) : invariant(DOMProperty.mustUseProperty[propName] ||
        !DOMProperty.hasSideEffects[propName]));
      ("production" !== "development" ? invariant(
        !!DOMProperty.hasBooleanValue[propName] +
          !!DOMProperty.hasNumericValue[propName] +
          !!DOMProperty.hasOverloadedBooleanValue[propName] <= 1,
        'DOMProperty: Value can be one of boolean, overloaded boolean, or ' +
        'numeric value, but not a combination: %s',
        propName
      ) : invariant(!!DOMProperty.hasBooleanValue[propName] +
        !!DOMProperty.hasNumericValue[propName] +
        !!DOMProperty.hasOverloadedBooleanValue[propName] <= 1));
    }
  }
};
var defaultValueCache = {};

/**
 * DOMProperty exports lookup objects that can be used like functions:
 *
 *   > DOMProperty.isValid['id']
 *   true
 *   > DOMProperty.isValid['foobar']
 *   undefined
 *
 * Although this may be confusing, it performs better in general.
 *
 * @see http://jsperf.com/key-exists
 * @see http://jsperf.com/key-missing
 */
var DOMProperty = {

  ID_ATTRIBUTE_NAME: 'data-reactid',

  /**
   * Checks whether a property name is a standard property.
   * @type {Object}
   */
  isStandardName: {},

  /**
   * Mapping from lowercase property names to the properly cased version, used
   * to warn in the case of missing properties.
   * @type {Object}
   */
  getPossibleStandardName: {},

  /**
   * Mapping from normalized names to attribute names that differ. Attribute
   * names are used when rendering markup or with `*Attribute()`.
   * @type {Object}
   */
  getAttributeName: {},

  /**
   * Mapping from normalized names to properties on DOM node instances.
   * (This includes properties that mutate due to external factors.)
   * @type {Object}
   */
  getPropertyName: {},

  /**
   * Mapping from normalized names to mutation methods. This will only exist if
   * mutation cannot be set simply by the property or `setAttribute()`.
   * @type {Object}
   */
  getMutationMethod: {},

  /**
   * Whether the property must be accessed and mutated as an object property.
   * @type {Object}
   */
  mustUseAttribute: {},

  /**
   * Whether the property must be accessed and mutated using `*Attribute()`.
   * (This includes anything that fails `<propName> in <element>`.)
   * @type {Object}
   */
  mustUseProperty: {},

  /**
   * Whether or not setting a value causes side effects such as triggering
   * resources to be loaded or text selection changes. We must ensure that
   * the value is only set if it has changed.
   * @type {Object}
   */
  hasSideEffects: {},

  /**
   * Whether the property should be removed when set to a falsey value.
   * @type {Object}
   */
  hasBooleanValue: {},

  /**
   * Whether the property must be numeric or parse as a
   * numeric and should be removed when set to a falsey value.
   * @type {Object}
   */
  hasNumericValue: {},

  /**
   * Whether the property must be positive numeric or parse as a positive
   * numeric and should be removed when set to a falsey value.
   * @type {Object}
   */
  hasPositiveNumericValue: {},

  /**
   * Whether the property can be used as a flag as well as with a value. Removed
   * when strictly equal to false; present without a value when strictly equal
   * to true; present with a value otherwise.
   * @type {Object}
   */
  hasOverloadedBooleanValue: {},

  /**
   * All of the isCustomAttribute() functions that have been injected.
   */
  _isCustomAttributeFunctions: [],

  /**
   * Checks whether a property name is a custom attribute.
   * @method
   */
  isCustomAttribute: function(attributeName) {
    for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {
      var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];
      if (isCustomAttributeFn(attributeName)) {
        return true;
      }
    }
    return false;
  },

  /**
   * Returns the default property value for a DOM property (i.e., not an
   * attribute). Most default values are '' or false, but not all. Worse yet,
   * some (in particular, `type`) vary depending on the type of element.
   *
   * TODO: Is it better to grab all the possible properties when creating an
   * element to avoid having to create the same element twice?
   */
  getDefaultValueForProperty: function(nodeName, prop) {
    var nodeDefaults = defaultValueCache[nodeName];
    var testElement;
    if (!nodeDefaults) {
      defaultValueCache[nodeName] = nodeDefaults = {};
    }
    if (!(prop in nodeDefaults)) {
      testElement = document.createElement(nodeName);
      nodeDefaults[prop] = testElement[prop];
    }
    return nodeDefaults[prop];
  },

  injection: DOMPropertyInjection
};

module.exports = DOMProperty;

},{"./invariant":126}],12:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule DOMPropertyOperations
 * @typechecks static-only
 */

"use strict";

var DOMProperty = _dereq_("./DOMProperty");

var escapeTextForBrowser = _dereq_("./escapeTextForBrowser");
var memoizeStringOnly = _dereq_("./memoizeStringOnly");
var warning = _dereq_("./warning");

function shouldIgnoreValue(name, value) {
  return value == null ||
    (DOMProperty.hasBooleanValue[name] && !value) ||
    (DOMProperty.hasNumericValue[name] && isNaN(value)) ||
    (DOMProperty.hasPositiveNumericValue[name] && (value < 1)) ||
    (DOMProperty.hasOverloadedBooleanValue[name] && value === false);
}

var processAttributeNameAndPrefix = memoizeStringOnly(function(name) {
  return escapeTextForBrowser(name) + '="';
});

if ("production" !== "development") {
  var reactProps = {
    children: true,
    dangerouslySetInnerHTML: true,
    key: true,
    ref: true
  };
  var warnedProperties = {};

  var warnUnknownProperty = function(name) {
    if (reactProps.hasOwnProperty(name) && reactProps[name] ||
        warnedProperties.hasOwnProperty(name) && warnedProperties[name]) {
      return;
    }

    warnedProperties[name] = true;
    var lowerCasedName = name.toLowerCase();

    // data-* attributes should be lowercase; suggest the lowercase version
    var standardName = (
      DOMProperty.isCustomAttribute(lowerCasedName) ?
        lowerCasedName :
      DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ?
        DOMProperty.getPossibleStandardName[lowerCasedName] :
        null
    );

    // For now, only warn when we have a suggested correction. This prevents
    // logging too much when using transferPropsTo.
    ("production" !== "development" ? warning(
      standardName == null,
      'Unknown DOM property ' + name + '. Did you mean ' + standardName + '?'
    ) : null);

  };
}

/**
 * Operations for dealing with DOM properties.
 */
var DOMPropertyOperations = {

  /**
   * Creates markup for the ID property.
   *
   * @param {string} id Unescaped ID.
   * @return {string} Markup string.
   */
  createMarkupForID: function(id) {
    return processAttributeNameAndPrefix(DOMProperty.ID_ATTRIBUTE_NAME) +
      escapeTextForBrowser(id) + '"';
  },

  /**
   * Creates markup for a property.
   *
   * @param {string} name
   * @param {*} value
   * @return {?string} Markup string, or null if the property was invalid.
   */
  createMarkupForProperty: function(name, value) {
    if (DOMProperty.isStandardName.hasOwnProperty(name) &&
        DOMProperty.isStandardName[name]) {
      if (shouldIgnoreValue(name, value)) {
        return '';
      }
      var attributeName = DOMProperty.getAttributeName[name];
      if (DOMProperty.hasBooleanValue[name] ||
          (DOMProperty.hasOverloadedBooleanValue[name] && value === true)) {
        return escapeTextForBrowser(attributeName);
      }
      return processAttributeNameAndPrefix(attributeName) +
        escapeTextForBrowser(value) + '"';
    } else if (DOMProperty.isCustomAttribute(name)) {
      if (value == null) {
        return '';
      }
      return processAttributeNameAndPrefix(name) +
        escapeTextForBrowser(value) + '"';
    } else if ("production" !== "development") {
      warnUnknownProperty(name);
    }
    return null;
  },

  /**
   * Sets the value for a property on a node.
   *
   * @param {DOMElement} node
   * @param {string} name
   * @param {*} value
   */
  setValueForProperty: function(node, name, value) {
    if (DOMProperty.isStandardName.hasOwnProperty(name) &&
        DOMProperty.isStandardName[name]) {
      var mutationMethod = DOMProperty.getMutationMethod[name];
      if (mutationMethod) {
        mutationMethod(node, value);
      } else if (shouldIgnoreValue(name, value)) {
        this.deleteValueForProperty(node, name);
      } else if (DOMProperty.mustUseAttribute[name]) {
        // `setAttribute` with objects becomes only `[object]` in IE8/9,
        // ('' + value) makes it output the correct toString()-value.
        node.setAttribute(DOMProperty.getAttributeName[name], '' + value);
      } else {
        var propName = DOMProperty.getPropertyName[name];
        // Must explicitly cast values for HAS_SIDE_EFFECTS-properties to the
        // property type before comparing; only `value` does and is string.
        if (!DOMProperty.hasSideEffects[name] ||
            ('' + node[propName]) !== ('' + value)) {
          // Contrary to `setAttribute`, object properties are properly
          // `toString`ed by IE8/9.
          node[propName] = value;
        }
      }
    } else if (DOMProperty.isCustomAttribute(name)) {
      if (value == null) {
        node.removeAttribute(name);
      } else {
        node.setAttribute(name, '' + value);
      }
    } else if ("production" !== "development") {
      warnUnknownProperty(name);
    }
  },

  /**
   * Deletes the value for a property on a node.
   *
   * @param {DOMElement} node
   * @param {string} name
   */
  deleteValueForProperty: function(node, name) {
    if (DOMProperty.isStandardName.hasOwnProperty(name) &&
        DOMProperty.isStandardName[name]) {
      var mutationMethod = DOMProperty.getMutationMethod[name];
      if (mutationMethod) {
        mutationMethod(node, undefined);
      } else if (DOMProperty.mustUseAttribute[name]) {
        node.removeAttribute(DOMProperty.getAttributeName[name]);
      } else {
        var propName = DOMProperty.getPropertyName[name];
        var defaultValue = DOMProperty.getDefaultValueForProperty(
          node.nodeName,
          propName
        );
        if (!DOMProperty.hasSideEffects[name] ||
            ('' + node[propName]) !== defaultValue) {
          node[propName] = defaultValue;
        }
      }
    } else if (DOMProperty.isCustomAttribute(name)) {
      node.removeAttribute(name);
    } else if ("production" !== "development") {
      warnUnknownProperty(name);
    }
  }

};

module.exports = DOMPropertyOperations;

},{"./DOMProperty":11,"./escapeTextForBrowser":109,"./memoizeStringOnly":135,"./warning":145}],13:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule Danger
 * @typechecks static-only
 */

/*jslint evil: true, sub: true */

"use strict";

var ExecutionEnvironment = _dereq_("./ExecutionEnvironment");

var createNodesFromMarkup = _dereq_("./createNodesFromMarkup");
var emptyFunction = _dereq_("./emptyFunction");
var getMarkupWrap = _dereq_("./getMarkupWrap");
var invariant = _dereq_("./invariant");

var OPEN_TAG_NAME_EXP = /^(<[^ \/>]+)/;
var RESULT_INDEX_ATTR = 'data-danger-index';

/**
 * Extracts the `nodeName` from a string of markup.
 *
 * NOTE: Extracting the `nodeName` does not require a regular expression match
 * because we make assumptions about React-generated markup (i.e. there are no
 * spaces surrounding the opening tag and there is at least one attribute).
 *
 * @param {string} markup String of markup.
 * @return {string} Node name of the supplied markup.
 * @see http://jsperf.com/extract-nodename
 */
function getNodeName(markup) {
  return markup.substring(1, markup.indexOf(' '));
}

var Danger = {

  /**
   * Renders markup into an array of nodes. The markup is expected to render
   * into a list of root nodes. Also, the length of `resultList` and
   * `markupList` should be the same.
   *
   * @param {array<string>} markupList List of markup strings to render.
   * @return {array<DOMElement>} List of rendered nodes.
   * @internal
   */
  dangerouslyRenderMarkup: function(markupList) {
    ("production" !== "development" ? invariant(
      ExecutionEnvironment.canUseDOM,
      'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' +
      'thread. Make sure `window` and `document` are available globally ' +
      'before requiring React when unit testing or use ' +
      'React.renderToString for server rendering.'
    ) : invariant(ExecutionEnvironment.canUseDOM));
    var nodeName;
    var markupByNodeName = {};
    // Group markup by `nodeName` if a wrap is necessary, else by '*'.
    for (var i = 0; i < markupList.length; i++) {
      ("production" !== "development" ? invariant(
        markupList[i],
        'dangerouslyRenderMarkup(...): Missing markup.'
      ) : invariant(markupList[i]));
      nodeName = getNodeName(markupList[i]);
      nodeName = getMarkupWrap(nodeName) ? nodeName : '*';
      markupByNodeName[nodeName] = markupByNodeName[nodeName] || [];
      markupByNodeName[nodeName][i] = markupList[i];
    }
    var resultList = [];
    var resultListAssignmentCount = 0;
    for (nodeName in markupByNodeName) {
      if (!markupByNodeName.hasOwnProperty(nodeName)) {
        continue;
      }
      var markupListByNodeName = markupByNodeName[nodeName];

      // This for-in loop skips the holes of the sparse array. The order of
      // iteration should follow the order of assignment, which happens to match
      // numerical index order, but we don't rely on that.
      for (var resultIndex in markupListByNodeName) {
        if (markupListByNodeName.hasOwnProperty(resultIndex)) {
          var markup = markupListByNodeName[resultIndex];

          // Push the requested markup with an additional RESULT_INDEX_ATTR
          // attribute.  If the markup does not start with a < character, it
          // will be discarded below (with an appropriate console.error).
          markupListByNodeName[resultIndex] = markup.replace(
            OPEN_TAG_NAME_EXP,
            // This index will be parsed back out below.
            '$1 ' + RESULT_INDEX_ATTR + '="' + resultIndex + '" '
          );
        }
      }

      // Render each group of markup with similar wrapping `nodeName`.
      var renderNodes = createNodesFromMarkup(
        markupListByNodeName.join(''),
        emptyFunction // Do nothing special with <script> tags.
      );

      for (i = 0; i < renderNodes.length; ++i) {
        var renderNode = renderNodes[i];
        if (renderNode.hasAttribute &&
            renderNode.hasAttribute(RESULT_INDEX_ATTR)) {

          resultIndex = +renderNode.getAttribute(RESULT_INDEX_ATTR);
          renderNode.removeAttribute(RESULT_INDEX_ATTR);

          ("production" !== "development" ? invariant(
            !resultList.hasOwnProperty(resultIndex),
            'Danger: Assigning to an already-occupied result index.'
          ) : invariant(!resultList.hasOwnProperty(resultIndex)));

          resultList[resultIndex] = renderNode;

          // This should match resultList.length and markupList.length when
          // we're done.
          resultListAssignmentCount += 1;

        } else if ("production" !== "development") {
          console.error(
            "Danger: Discarding unexpected node:",
            renderNode
          );
        }
      }
    }

    // Although resultList was populated out of order, it should now be a dense
    // array.
    ("production" !== "development" ? invariant(
      resultListAssignmentCount === resultList.length,
      'Danger: Did not assign to every index of resultList.'
    ) : invariant(resultListAssignmentCount === resultList.length));

    ("production" !== "development" ? invariant(
      resultList.length === markupList.length,
      'Danger: Expected markup to render %s nodes, but rendered %s.',
      markupList.length,
      resultList.length
    ) : invariant(resultList.length === markupList.length));

    return resultList;
  },

  /**
   * Replaces a node with a string of markup at its current position within its
   * parent. The markup must render into a single root node.
   *
   * @param {DOMElement} oldChild Child node to replace.
   * @param {string} markup Markup to render in place of the child node.
   * @internal
   */
  dangerouslyReplaceNodeWithMarkup: function(oldChild, markup) {
    ("production" !== "development" ? invariant(
      ExecutionEnvironment.canUseDOM,
      'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a ' +
      'worker thread. Make sure `window` and `document` are available ' +
      'globally before requiring React when unit testing or use ' +
      'React.renderToString for server rendering.'
    ) : invariant(ExecutionEnvironment.canUseDOM));
    ("production" !== "development" ? invariant(markup, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : invariant(markup));
    ("production" !== "development" ? invariant(
      oldChild.tagName.toLowerCase() !== 'html',
      'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the ' +
      '<html> node. This is because browser quirks make this unreliable ' +
      'and/or slow. If you want to render to the root you must use ' +
      'server rendering. See renderComponentToString().'
    ) : invariant(oldChild.tagName.toLowerCase() !== 'html'));

    var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
    oldChild.parentNode.replaceChild(newChild, oldChild);
  }

};

module.exports = Danger;

},{"./ExecutionEnvironment":22,"./createNodesFromMarkup":104,"./emptyFunction":107,"./getMarkupWrap":118,"./invariant":126}],14:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule DefaultEventPluginOrder
 */

"use strict";

 var keyOf = _dereq_("./keyOf");

/**
 * Module that is injectable into `EventPluginHub`, that specifies a
 * deterministic ordering of `EventPlugin`s. A convenient way to reason about
 * plugins, without having to package every one of them. This is better than
 * having plugins be ordered in the same order that they are injected because
 * that ordering would be influenced by the packaging order.
 * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that
 * preventing default on events is convenient in `SimpleEventPlugin` handlers.
 */
var DefaultEventPluginOrder = [
  keyOf({ResponderEventPlugin: null}),
  keyOf({SimpleEventPlugin: null}),
  keyOf({TapEventPlugin: null}),
  keyOf({EnterLeaveEventPlugin: null}),
  keyOf({ChangeEventPlugin: null}),
  keyOf({SelectEventPlugin: null}),
  keyOf({CompositionEventPlugin: null}),
  keyOf({BeforeInputEventPlugin: null}),
  keyOf({AnalyticsEventPlugin: null}),
  keyOf({MobileSafariClickEventPlugin: null})
];

module.exports = DefaultEventPluginOrder;

},{"./keyOf":133}],15:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule EnterLeaveEventPlugin
 * @typechecks static-only
 */

"use strict";

var EventConstants = _dereq_("./EventConstants");
var EventPropagators = _dereq_("./EventPropagators");
var SyntheticMouseEvent = _dereq_("./SyntheticMouseEvent");

var ReactMount = _dereq_("./ReactMount");
var keyOf = _dereq_("./keyOf");

var topLevelTypes = EventConstants.topLevelTypes;
var getFirstReactDOM = ReactMount.getFirstReactDOM;

var eventTypes = {
  mouseEnter: {
    registrationName: keyOf({onMouseEnter: null}),
    dependencies: [
      topLevelTypes.topMouseOut,
      topLevelTypes.topMouseOver
    ]
  },
  mouseLeave: {
    registrationName: keyOf({onMouseLeave: null}),
    dependencies: [
      topLevelTypes.topMouseOut,
      topLevelTypes.topMouseOver
    ]
  }
};

var extractedEvents = [null, null];

var EnterLeaveEventPlugin = {

  eventTypes: eventTypes,

  /**
   * For almost every interaction we care about, there will be both a top-level
   * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
   * we do not extract duplicate events. However, moving the mouse into the
   * browser from outside will not fire a `mouseout` event. In this case, we use
   * the `mouseover` top-level event.
   *
   * @param {string} topLevelType Record from `EventConstants`.
   * @param {DOMEventTarget} topLevelTarget The listening component root node.
   * @param {string} topLevelTargetID ID of `topLevelTarget`.
   * @param {object} nativeEvent Native browser event.
   * @return {*} An accumulation of synthetic events.
   * @see {EventPluginHub.extractEvents}
   */
  extractEvents: function(
      topLevelType,
      topLevelTarget,
      topLevelTargetID,
      nativeEvent) {
    if (topLevelType === topLevelTypes.topMouseOver &&
        (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
      return null;
    }
    if (topLevelType !== topLevelTypes.topMouseOut &&
        topLevelType !== topLevelTypes.topMouseOver) {
      // Must not be a mouse in or mouse out - ignoring.
      return null;
    }

    var win;
    if (topLevelTarget.window === topLevelTarget) {
      // `topLevelTarget` is probably a window object.
      win = topLevelTarget;
    } else {
      // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
      var doc = topLevelTarget.ownerDocument;
      if (doc) {
        win = doc.defaultView || doc.parentWindow;
      } else {
        win = window;
      }
    }

    var from, to;
    if (topLevelType === topLevelTypes.topMouseOut) {
      from = topLevelTarget;
      to =
        getFirstReactDOM(nativeEvent.relatedTarget || nativeEvent.toElement) ||
        win;
    } else {
      from = win;
      to = topLevelTarget;
    }

    if (from === to) {
      // Nothing pertains to our managed components.
      return null;
    }

    var fromID = from ? ReactMount.getID(from) : '';
    var toID = to ? ReactMount.getID(to) : '';

    var leave = SyntheticMouseEvent.getPooled(
      eventTypes.mouseLeave,
      fromID,
      nativeEvent
    );
    leave.type = 'mouseleave';
    leave.target = from;
    leave.relatedTarget = to;

    var enter = SyntheticMouseEvent.getPooled(
      eventTypes.mouseEnter,
      toID,
      nativeEvent
    );
    enter.type = 'mouseenter';
    enter.target = to;
    enter.relatedTarget = from;

    EventPropagators.accumulateEnterLeaveDispatches(leave, enter, fromID, toID);

    extractedEvents[0] = leave;
    extractedEvents[1] = enter;

    return extractedEvents;
  }

};

module.exports = EnterLeaveEventPlugin;

},{"./EventConstants":16,"./EventPropagators":21,"./ReactMount":63,"./SyntheticMouseEvent":91,"./keyOf":133}],16:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule EventConstants
 */

"use strict";

var keyMirror = _dereq_("./keyMirror");

var PropagationPhases = keyMirror({bubbled: null, captured: null});

/**
 * Types of raw signals from the browser caught at the top level.
 */
var topLevelTypes = keyMirror({
  topBlur: null,
  topChange: null,
  topClick: null,
  topCompositionEnd: null,
  topCompositionStart: null,
  topCompositionUpdate: null,
  topContextMenu: null,
  topCopy: null,
  topCut: null,
  topDoubleClick: null,
  topDrag: null,
  topDragEnd: null,
  topDragEnter: null,
  topDragExit: null,
  topDragLeave: null,
  topDragOver: null,
  topDragStart: null,
  topDrop: null,
  topError: null,
  topFocus: null,
  topInput: null,
  topKeyDown: null,
  topKeyPress: null,
  topKeyUp: null,
  topLoad: null,
  topMouseDown: null,
  topMouseMove: null,
  topMouseOut: null,
  topMouseOver: null,
  topMouseUp: null,
  topPaste: null,
  topReset: null,
  topScroll: null,
  topSelectionChange: null,
  topSubmit: null,
  topTextInput: null,
  topTouchCancel: null,
  topTouchEnd: null,
  topTouchMove: null,
  topTouchStart: null,
  topWheel: null
});

var EventConstants = {
  topLevelTypes: topLevelTypes,
  PropagationPhases: PropagationPhases
};

module.exports = EventConstants;

},{"./keyMirror":132}],17:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014 Facebook, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * @providesModule EventListener
 * @typechecks
 */

var emptyFunction = _dereq_("./emptyFunction");

/**
 * Upstream version of event listener. Does not take into account specific
 * nature of platform.
 */
var EventListener = {
  /**
   * Listen to DOM events during the bubble phase.
   *
   * @param {DOMEventTarget} target DOM element to register listener on.
   * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
   * @param {function} callback Callback function.
   * @return {object} Object with a `remove` method.
   */
  listen: function(target, eventType, callback) {
    if (target.addEventListener) {
      target.addEventListener(eventType, callback, false);
      return {
        remove: function() {
          target.removeEventListener(eventType, callback, false);
        }
      };
    } else if (target.attachEvent) {
      target.attachEvent('on' + eventType, callback);
      return {
        remove: function() {
          target.detachEvent('on' + eventType, callback);
        }
      };
    }
  },

  /**
   * Listen to DOM events during the capture phase.
   *
   * @param {DOMEventTarget} target DOM element to register listener on.
   * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
   * @param {function} callback Callback function.
   * @return {object} Object with a `remove` method.
   */
  capture: function(target, eventType, callback) {
    if (!target.addEventListener) {
      if ("production" !== "development") {
        console.error(
          'Attempted to listen to events during the capture phase on a ' +
          'browser that does not support the capture phase. Your application ' +
          'will not receive some events.'
        );
      }
      return {
        remove: emptyFunction
      };
    } else {
      target.addEventListener(eventType, callback, true);
      return {
        remove: function() {
          target.removeEventListener(eventType, callback, true);
        }
      };
    }
  },

  registerDefault: function() {}
};

module.exports = EventListener;

},{"./emptyFunction":107}],18:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule EventPluginHub
 */

"use strict";

var EventPluginRegistry = _dereq_("./EventPluginRegistry");
var EventPluginUtils = _dereq_("./EventPluginUtils");

var accumulateInto = _dereq_("./accumulateInto");
var forEachAccumulated = _dereq_("./forEachAccumulated");
var invariant = _dereq_("./invariant");

/**
 * Internal store for event listeners
 */
var listenerBank = {};

/**
 * Internal queue of events that have accumulated their dispatches and are
 * waiting to have their dispatches executed.
 */
var eventQueue = null;

/**
 * Dispatches an event and releases it back into the pool, unless persistent.
 *
 * @param {?object} event Synthetic event to be dispatched.
 * @private
 */
var executeDispatchesAndRelease = function(event) {
  if (event) {
    var executeDispatch = EventPluginUtils.executeDispatch;
    // Plugins can provide custom behavior when dispatching events.
    var PluginModule = EventPluginRegistry.getPluginModuleForEvent(event);
    if (PluginModule && PluginModule.executeDispatch) {
      executeDispatch = PluginModule.executeDispatch;
    }
    EventPluginUtils.executeDispatchesInOrder(event, executeDispatch);

    if (!event.isPersistent()) {
      event.constructor.release(event);
    }
  }
};

/**
 * - `InstanceHandle`: [required] Module that performs logical traversals of DOM
 *   hierarchy given ids of the logical DOM elements involved.
 */
var InstanceHandle = null;

function validateInstanceHandle() {
  var invalid = !InstanceHandle||
    !InstanceHandle.traverseTwoPhase ||
    !InstanceHandle.traverseEnterLeave;
  if (invalid) {
    throw new Error('InstanceHandle not injected before use!');
  }
}

/**
 * This is a unified interface for event plugins to be installed and configured.
 *
 * Event plugins can implement the following properties:
 *
 *   `extractEvents` {function(string, DOMEventTarget, string, object): *}
 *     Required. When a top-level event is fired, this method is expected to
 *     extract synthetic events that will in turn be queued and dispatched.
 *
 *   `eventTypes` {object}
 *     Optional, plugins that fire events must publish a mapping of registration
 *     names that are used to register listeners. Values of this mapping must
 *     be objects that contain `registrationName` or `phasedRegistrationNames`.
 *
 *   `executeDispatch` {function(object, function, string)}
 *     Optional, allows plugins to override how an event gets dispatched. By
 *     default, the listener is simply invoked.
 *
 * Each plugin that is injected into `EventsPluginHub` is immediately operable.
 *
 * @public
 */
var EventPluginHub = {

  /**
   * Methods for injecting dependencies.
   */
  injection: {

    /**
     * @param {object} InjectedMount
     * @public
     */
    injectMount: EventPluginUtils.injection.injectMount,

    /**
     * @param {object} InjectedInstanceHandle
     * @public
     */
    injectInstanceHandle: function(InjectedInstanceHandle) {
      InstanceHandle = InjectedInstanceHandle;
      if ("production" !== "development") {
        validateInstanceHandle();
      }
    },

    getInstanceHandle: function() {
      if ("production" !== "development") {
        validateInstanceHandle();
      }
      return InstanceHandle;
    },

    /**
     * @param {array} InjectedEventPluginOrder
     * @public
     */
    injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,

    /**
     * @param {object} injectedNamesToPlugins Map from names to plugin modules.
     */
    injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName

  },

  eventNameDispatchConfigs: EventPluginRegistry.eventNameDispatchConfigs,

  registrationNameModules: EventPluginRegistry.registrationNameModules,

  /**
   * Stores `listener` at `listenerBank[registrationName][id]`. Is idempotent.
   *
   * @param {string} id ID of the DOM element.
   * @param {string} registrationName Name of listener (e.g. `onClick`).
   * @param {?function} listener The callback to store.
   */
  putListener: function(id, registrationName, listener) {
    ("production" !== "development" ? invariant(
      !listener || typeof listener === 'function',
      'Expected %s listener to be a function, instead got type %s',
      registrationName, typeof listener
    ) : invariant(!listener || typeof listener === 'function'));

    var bankForRegistrationName =
      listenerBank[registrationName] || (listenerBank[registrationName] = {});
    bankForRegistrationName[id] = listener;
  },

  /**
   * @param {string} id ID of the DOM element.
   * @param {string} registrationName Name of listener (e.g. `onClick`).
   * @return {?function} The stored callback.
   */
  getListener: function(id, registrationName) {
    var bankForRegistrationName = listenerBank[registrationName];
    return bankForRegistrationName && bankForRegistrationName[id];
  },

  /**
   * Deletes a listener from the registration bank.
   *
   * @param {string} id ID of the DOM element.
   * @param {string} registrationName Name of listener (e.g. `onClick`).
   */
  deleteListener: function(id, registrationName) {
    var bankForRegistrationName = listenerBank[registrationName];
    if (bankForRegistrationName) {
      delete bankForRegistrationName[id];
    }
  },

  /**
   * Deletes all listeners for the DOM element with the supplied ID.
   *
   * @param {string} id ID of the DOM element.
   */
  deleteAllListeners: function(id) {
    for (var registrationName in listenerBank) {
      delete listenerBank[registrationName][id];
    }
  },

  /**
   * Allows registered plugins an opportunity to extract events from top-level
   * native browser events.
   *
   * @param {string} topLevelType Record from `EventConstants`.
   * @param {DOMEventTarget} topLevelTarget The listening component root node.
   * @param {string} topLevelTargetID ID of `topLevelTarget`.
   * @param {object} nativeEvent Native browser event.
   * @return {*} An accumulation of synthetic events.
   * @internal
   */
  extractEvents: function(
      topLevelType,
      topLevelTarget,
      topLevelTargetID,
      nativeEvent) {
    var events;
    var plugins = EventPluginRegistry.plugins;
    for (var i = 0, l = plugins.length; i < l; i++) {
      // Not every plugin in the ordering may be loaded at runtime.
      var possiblePlugin = plugins[i];
      if (possiblePlugin) {
        var extractedEvents = possiblePlugin.extractEvents(
          topLevelType,
          topLevelTarget,
          topLevelTargetID,
          nativeEvent
        );
        if (extractedEvents) {
          events = accumulateInto(events, extractedEvents);
        }
      }
    }
    return events;
  },

  /**
   * Enqueues a synthetic event that should be dispatched when
   * `processEventQueue` is invoked.
   *
   * @param {*} events An accumulation of synthetic events.
   * @internal
   */
  enqueueEvents: function(events) {
    if (events) {
      eventQueue = accumulateInto(eventQueue, events);
    }
  },

  /**
   * Dispatches all synthetic events on the event queue.
   *
   * @internal
   */
  processEventQueue: function() {
    // Set `eventQueue` to null before processing it so that we can tell if more
    // events get enqueued while processing.
    var processingEventQueue = eventQueue;
    eventQueue = null;
    forEachAccumulated(processingEventQueue, executeDispatchesAndRelease);
    ("production" !== "development" ? invariant(
      !eventQueue,
      'processEventQueue(): Additional events were enqueued while processing ' +
      'an event queue. Support for this has not yet been implemented.'
    ) : invariant(!eventQueue));
  },

  /**
   * These are needed for tests only. Do not use!
   */
  __purge: function() {
    listenerBank = {};
  },

  __getListenerBank: function() {
    return listenerBank;
  }

};

module.exports = EventPluginHub;

},{"./EventPluginRegistry":19,"./EventPluginUtils":20,"./accumulateInto":97,"./forEachAccumulated":112,"./invariant":126}],19:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule EventPluginRegistry
 * @typechecks static-only
 */

"use strict";

var invariant = _dereq_("./invariant");

/**
 * Injectable ordering of event plugins.
 */
var EventPluginOrder = null;

/**
 * Injectable mapping from names to event plugin modules.
 */
var namesToPlugins = {};

/**
 * Recomputes the plugin list using the injected plugins and plugin ordering.
 *
 * @private
 */
function recomputePluginOrdering() {
  if (!EventPluginOrder) {
    // Wait until an `EventPluginOrder` is injected.
    return;
  }
  for (var pluginName in namesToPlugins) {
    var PluginModule = namesToPlugins[pluginName];
    var pluginIndex = EventPluginOrder.indexOf(pluginName);
    ("production" !== "development" ? invariant(
      pluginIndex > -1,
      'EventPluginRegistry: Cannot inject event plugins that do not exist in ' +
      'the plugin ordering, `%s`.',
      pluginName
    ) : invariant(pluginIndex > -1));
    if (EventPluginRegistry.plugins[pluginIndex]) {
      continue;
    }
    ("production" !== "development" ? invariant(
      PluginModule.extractEvents,
      'EventPluginRegistry: Event plugins must implement an `extractEvents` ' +
      'method, but `%s` does not.',
      pluginName
    ) : invariant(PluginModule.extractEvents));
    EventPluginRegistry.plugins[pluginIndex] = PluginModule;
    var publishedEvents = PluginModule.eventTypes;
    for (var eventName in publishedEvents) {
      ("production" !== "development" ? invariant(
        publishEventForPlugin(
          publishedEvents[eventName],
          PluginModule,
          eventName
        ),
        'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.',
        eventName,
        pluginName
      ) : invariant(publishEventForPlugin(
        publishedEvents[eventName],
        PluginModule,
        eventName
      )));
    }
  }
}

/**
 * Publishes an event so that it can be dispatched by the supplied plugin.
 *
 * @param {object} dispatchConfig Dispatch configuration for the event.
 * @param {object} PluginModule Plugin publishing the event.
 * @return {boolean} True if the event was successfully published.
 * @private
 */
function publishEventForPlugin(dispatchConfig, PluginModule, eventName) {
  ("production" !== "development" ? invariant(
    !EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName),
    'EventPluginHub: More than one plugin attempted to publish the same ' +
    'event name, `%s`.',
    eventName
  ) : invariant(!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName)));
  EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;

  var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
  if (phasedRegistrationNames) {
    for (var phaseName in phasedRegistrationNames) {
      if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
        var phasedRegistrationName = phasedRegistrationNames[phaseName];
        publishRegistrationName(
          phasedRegistrationName,
          PluginModule,
          eventName
        );
      }
    }
    return true;
  } else if (dispatchConfig.registrationName) {
    publishRegistrationName(
      dispatchConfig.registrationName,
      PluginModule,
      eventName
    );
    return true;
  }
  return false;
}

/**
 * Publishes a registration name that is used to identify dispatched events and
 * can be used with `EventPluginHub.putListener` to register listeners.
 *
 * @param {string} registrationName Registration name to add.
 * @param {object} PluginModule Plugin publishing the event.
 * @private
 */
function publishRegistrationName(registrationName, PluginModule, eventName) {
  ("production" !== "development" ? invariant(
    !EventPluginRegistry.registrationNameModules[registrationName],
    'EventPluginHub: More than one plugin attempted to publish the same ' +
    'registration name, `%s`.',
    registrationName
  ) : invariant(!EventPluginRegistry.registrationNameModules[registrationName]));
  EventPluginRegistry.registrationNameModules[registrationName] = PluginModule;
  EventPluginRegistry.registrationNameDependencies[registrationName] =
    PluginModule.eventTypes[eventName].dependencies;
}

/**
 * Registers plugins so that they can extract and dispatch events.
 *
 * @see {EventPluginHub}
 */
var EventPluginRegistry = {

  /**
   * Ordered list of injected plugins.
   */
  plugins: [],

  /**
   * Mapping from event name to dispatch config
   */
  eventNameDispatchConfigs: {},

  /**
   * Mapping from registration name to plugin module
   */
  registrationNameModules: {},

  /**
   * Mapping from registration name to event name
   */
  registrationNameDependencies: {},

  /**
   * Injects an ordering of plugins (by plugin name). This allows the ordering
   * to be decoupled from injection of the actual plugins so that ordering is
   * always deterministic regardless of packaging, on-the-fly injection, etc.
   *
   * @param {array} InjectedEventPluginOrder
   * @internal
   * @see {EventPluginHub.injection.injectEventPluginOrder}
   */
  injectEventPluginOrder: function(InjectedEventPluginOrder) {
    ("production" !== "development" ? invariant(
      !EventPluginOrder,
      'EventPluginRegistry: Cannot inject event plugin ordering more than ' +
      'once. You are likely trying to load more than one copy of React.'
    ) : invariant(!EventPluginOrder));
    // Clone the ordering so it cannot be dynamically mutated.
    EventPluginOrder = Array.prototype.slice.call(InjectedEventPluginOrder);
    recomputePluginOrdering();
  },

  /**
   * Injects plugins to be used by `EventPluginHub`. The plugin names must be
   * in the ordering injected by `injectEventPluginOrder`.
   *
   * Plugins can be injected as part of page initialization or on-the-fly.
   *
   * @param {object} injectedNamesToPlugins Map from names to plugin modules.
   * @internal
   * @see {EventPluginHub.injection.injectEventPluginsByName}
   */
  injectEventPluginsByName: function(injectedNamesToPlugins) {
    var isOrderingDirty = false;
    for (var pluginName in injectedNamesToPlugins) {
      if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
        continue;
      }
      var PluginModule = injectedNamesToPlugins[pluginName];
      if (!namesToPlugins.hasOwnProperty(pluginName) ||
          namesToPlugins[pluginName] !== PluginModule) {
        ("production" !== "development" ? invariant(
          !namesToPlugins[pluginName],
          'EventPluginRegistry: Cannot inject two different event plugins ' +
          'using the same name, `%s`.',
          pluginName
        ) : invariant(!namesToPlugins[pluginName]));
        namesToPlugins[pluginName] = PluginModule;
        isOrderingDirty = true;
      }
    }
    if (isOrderingDirty) {
      recomputePluginOrdering();
    }
  },

  /**
   * Looks up the plugin for the supplied event.
   *
   * @param {object} event A synthetic event.
   * @return {?object} The plugin that created the supplied event.
   * @internal
   */
  getPluginModuleForEvent: function(event) {
    var dispatchConfig = event.dispatchConfig;
    if (dispatchConfig.registrationName) {
      return EventPluginRegistry.registrationNameModules[
        dispatchConfig.registrationName
      ] || null;
    }
    for (var phase in dispatchConfig.phasedRegistrationNames) {
      if (!dispatchConfig.phasedRegistrationNames.hasOwnProperty(phase)) {
        continue;
      }
      var PluginModule = EventPluginRegistry.registrationNameModules[
        dispatchConfig.phasedRegistrationNames[phase]
      ];
      if (PluginModule) {
        return PluginModule;
      }
    }
    return null;
  },

  /**
   * Exposed for unit testing.
   * @private
   */
  _resetEventPlugins: function() {
    EventPluginOrder = null;
    for (var pluginName in namesToPlugins) {
      if (namesToPlugins.hasOwnProperty(pluginName)) {
        delete namesToPlugins[pluginName];
      }
    }
    EventPluginRegistry.plugins.length = 0;

    var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;
    for (var eventName in eventNameDispatchConfigs) {
      if (eventNameDispatchConfigs.hasOwnProperty(eventName)) {
        delete eventNameDispatchConfigs[eventName];
      }
    }

    var registrationNameModules = EventPluginRegistry.registrationNameModules;
    for (var registrationName in registrationNameModules) {
      if (registrationNameModules.hasOwnProperty(registrationName)) {
        delete registrationNameModules[registrationName];
      }
    }
  }

};

module.exports = EventPluginRegistry;

},{"./invariant":126}],20:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule EventPluginUtils
 */

"use strict";

var EventConstants = _dereq_("./EventConstants");

var invariant = _dereq_("./invariant");

/**
 * Injected dependencies:
 */

/**
 * - `Mount`: [required] Module that can convert between React dom IDs and
 *   actual node references.
 */
var injection = {
  Mount: null,
  injectMount: function(InjectedMount) {
    injection.Mount = InjectedMount;
    if ("production" !== "development") {
      ("production" !== "development" ? invariant(
        InjectedMount && InjectedMount.getNode,
        'EventPluginUtils.injection.injectMount(...): Injected Mount module ' +
        'is missing getNode.'
      ) : invariant(InjectedMount && InjectedMount.getNode));
    }
  }
};

var topLevelTypes = EventConstants.topLevelTypes;

function isEndish(topLevelType) {
  return topLevelType === topLevelTypes.topMouseUp ||
         topLevelType === topLevelTypes.topTouchEnd ||
         topLevelType === topLevelTypes.topTouchCancel;
}

function isMoveish(topLevelType) {
  return topLevelType === topLevelTypes.topMouseMove ||
         topLevelType === topLevelTypes.topTouchMove;
}
function isStartish(topLevelType) {
  return topLevelType === topLevelTypes.topMouseDown ||
         topLevelType === topLevelTypes.topTouchStart;
}


var validateEventDispatches;
if ("production" !== "development") {
  validateEventDispatches = function(event) {
    var dispatchListeners = event._dispatchListeners;
    var dispatchIDs = event._dispatchIDs;

    var listenersIsArr = Array.isArray(dispatchListeners);
    var idsIsArr = Array.isArray(dispatchIDs);
    var IDsLen = idsIsArr ? dispatchIDs.length : dispatchIDs ? 1 : 0;
    var listenersLen = listenersIsArr ?
      dispatchListeners.length :
      dispatchListeners ? 1 : 0;

    ("production" !== "development" ? invariant(
      idsIsArr === listenersIsArr && IDsLen === listenersLen,
      'EventPluginUtils: Invalid `event`.'
    ) : invariant(idsIsArr === listenersIsArr && IDsLen === listenersLen));
  };
}

/**
 * Invokes `cb(event, listener, id)`. Avoids using call if no scope is
 * provided. The `(listener,id)` pair effectively forms the "dispatch" but are
 * kept separate to conserve memory.
 */
function forEachEventDispatch(event, cb) {
  var dispatchListeners = event._dispatchListeners;
  var dispatchIDs = event._dispatchIDs;
  if ("production" !== "development") {
    validateEventDispatches(event);
  }
  if (Array.isArray(dispatchListeners)) {
    for (var i = 0; i < dispatchListeners.length; i++) {
      if (event.isPropagationStopped()) {
        break;
      }
      // Listeners and IDs are two parallel arrays that are always in sync.
      cb(event, dispatchListeners[i], dispatchIDs[i]);
    }
  } else if (dispatchListeners) {
    cb(event, dispatchListeners, dispatchIDs);
  }
}

/**
 * Default implementation of PluginModule.executeDispatch().
 * @param {SyntheticEvent} SyntheticEvent to handle
 * @param {function} Application-level callback
 * @param {string} domID DOM id to pass to the callback.
 */
function executeDispatch(event, listener, domID) {
  event.currentTarget = injection.Mount.getNode(domID);
  var returnValue = listener(event, domID);
  event.currentTarget = null;
  return returnValue;
}

/**
 * Standard/simple iteration through an event's collected dispatches.
 */
function executeDispatchesInOrder(event, executeDispatch) {
  forEachEventDispatch(event, executeDispatch);
  event._dispatchListeners = null;
  event._dispatchIDs = null;
}

/**
 * Standard/simple iteration through an event's collected dispatches, but stops
 * at the first dispatch execution returning true, and returns that id.
 *
 * @return id of the first dispatch execution who's listener returns true, or
 * null if no listener returned true.
 */
function executeDispatchesInOrderStopAtTrueImpl(event) {
  var dispatchListeners = event._dispatchListeners;
  var dispatchIDs = event._dispatchIDs;
  if ("production" !== "development") {
    validateEventDispatches(event);
  }
  if (Array.isArray(dispatchListeners)) {
    for (var i = 0; i < dispatchListeners.length; i++) {
      if (event.isPropagationStopped()) {
        break;
      }
      // Listeners and IDs are two parallel arrays that are always in sync.
      if (dispatchListeners[i](event, dispatchIDs[i])) {
        return dispatchIDs[i];
      }
    }
  } else if (dispatchListeners) {
    if (dispatchListeners(event, dispatchIDs)) {
      return dispatchIDs;
    }
  }
  return null;
}

/**
 * @see executeDispatchesInOrderStopAtTrueImpl
 */
function executeDispatchesInOrderStopAtTrue(event) {
  var ret = executeDispatchesInOrderStopAtTrueImpl(event);
  event._dispatchIDs = null;
  event._dispatchListeners = null;
  return ret;
}

/**
 * Execution of a "direct" dispatch - there must be at most one dispatch
 * accumulated on the event or it is considered an error. It doesn't really make
 * sense for an event with multiple dispatches (bubbled) to keep track of the
 * return values at each dispatch execution, but it does tend to make sense when
 * dealing with "direct" dispatches.
 *
 * @return The return value of executing the single dispatch.
 */
function executeDirectDispatch(event) {
  if ("production" !== "development") {
    validateEventDispatches(event);
  }
  var dispatchListener = event._dispatchListeners;
  var dispatchID = event._dispatchIDs;
  ("production" !== "development" ? invariant(
    !Array.isArray(dispatchListener),
    'executeDirectDispatch(...): Invalid `event`.'
  ) : invariant(!Array.isArray(dispatchListener)));
  var res = dispatchListener ?
    dispatchListener(event, dispatchID) :
    null;
  event._dispatchListeners = null;
  event._dispatchIDs = null;
  return res;
}

/**
 * @param {SyntheticEvent} event
 * @return {bool} True iff number of dispatches accumulated is greater than 0.
 */
function hasDispatches(event) {
  return !!event._dispatchListeners;
}

/**
 * General utilities that are useful in creating custom Event Plugins.
 */
var EventPluginUtils = {
  isEndish: isEndish,
  isMoveish: isMoveish,
  isStartish: isStartish,

  executeDirectDispatch: executeDirectDispatch,
  executeDispatch: executeDispatch,
  executeDispatchesInOrder: executeDispatchesInOrder,
  executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
  hasDispatches: hasDispatches,
  injection: injection,
  useTouchEvents: false
};

module.exports = EventPluginUtils;

},{"./EventConstants":16,"./invariant":126}],21:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule EventPropagators
 */

"use strict";

var EventConstants = _dereq_("./EventConstants");
var EventPluginHub = _dereq_("./EventPluginHub");

var accumulateInto = _dereq_("./accumulateInto");
var forEachAccumulated = _dereq_("./forEachAccumulated");

var PropagationPhases = EventConstants.PropagationPhases;
var getListener = EventPluginHub.getListener;

/**
 * Some event types have a notion of different registration names for different
 * "phases" of propagation. This finds listeners by a given phase.
 */
function listenerAtPhase(id, event, propagationPhase) {
  var registrationName =
    event.dispatchConfig.phasedRegistrationNames[propagationPhase];
  return getListener(id, registrationName);
}

/**
 * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
 * here, allows us to not have to bind or create functions for each event.
 * Mutating the event's members allows us to not have to create a wrapping
 * "dispatch" object that pairs the event with the listener.
 */
function accumulateDirectionalDispatches(domID, upwards, event) {
  if ("production" !== "development") {
    if (!domID) {
      throw new Error('Dispatching id must not be null');
    }
  }
  var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;
  var listener = listenerAtPhase(domID, event, phase);
  if (listener) {
    event._dispatchListeners =
      accumulateInto(event._dispatchListeners, listener);
    event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);
  }
}

/**
 * Collect dispatches (must be entirely collected before dispatching - see unit
 * tests). Lazily allocate the array to conserve memory.  We must loop through
 * each event and perform the traversal for each one. We can not perform a
 * single traversal for the entire collection of events because each event may
 * have a different target.
 */
function accumulateTwoPhaseDispatchesSingle(event) {
  if (event && event.dispatchConfig.phasedRegistrationNames) {
    EventPluginHub.injection.getInstanceHandle().traverseTwoPhase(
      event.dispatchMarker,
      accumulateDirectionalDispatches,
      event
    );
  }
}


/**
 * Accumulates without regard to direction, does not look for phased
 * registration names. Same as `accumulateDirectDispatchesSingle` but without
 * requiring that the `dispatchMarker` be the same as the dispatched ID.
 */
function accumulateDispatches(id, ignoredDirection, event) {
  if (event && event.dispatchConfig.registrationName) {
    var registrationName = event.dispatchConfig.registrationName;
    var listener = getListener(id, registrationName);
    if (listener) {
      event._dispatchListeners =
        accumulateInto(event._dispatchListeners, listener);
      event._dispatchIDs = accumulateInto(event._dispatchIDs, id);
    }
  }
}

/**
 * Accumulates dispatches on an `SyntheticEvent`, but only for the
 * `dispatchMarker`.
 * @param {SyntheticEvent} event
 */
function accumulateDirectDispatchesSingle(event) {
  if (event && event.dispatchConfig.registrationName) {
    accumulateDispatches(event.dispatchMarker, null, event);
  }
}

function accumulateTwoPhaseDispatches(events) {
  forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
}

function accumulateEnterLeaveDispatches(leave, enter, fromID, toID) {
  EventPluginHub.injection.getInstanceHandle().traverseEnterLeave(
    fromID,
    toID,
    accumulateDispatches,
    leave,
    enter
  );
}


function accumulateDirectDispatches(events) {
  forEachAccumulated(events, accumulateDirectDispatchesSingle);
}



/**
 * A small set of propagation patterns, each of which will accept a small amount
 * of information, and generate a set of "dispatch ready event objects" - which
 * are sets of events that have already been annotated with a set of dispatched
 * listener functions/ids. The API is designed this way to discourage these
 * propagation strategies from actually executing the dispatches, since we
 * always want to collect the entire set of dispatches before executing event a
 * single one.
 *
 * @constructor EventPropagators
 */
var EventPropagators = {
  accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
  accumulateDirectDispatches: accumulateDirectDispatches,
  accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
};

module.exports = EventPropagators;

},{"./EventConstants":16,"./EventPluginHub":18,"./accumulateInto":97,"./forEachAccumulated":112}],22:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ExecutionEnvironment
 */

/*jslint evil: true */

"use strict";

var canUseDOM = !!(
  typeof window !== 'undefined' &&
  window.document &&
  window.document.createElement
);

/**
 * Simple, lightweight module assisting with the detection and context of
 * Worker. Helps avoid circular dependencies and allows code to reason about
 * whether or not they are in a Worker, even if they never include the main
 * `ReactWorker` dependency.
 */
var ExecutionEnvironment = {

  canUseDOM: canUseDOM,

  canUseWorkers: typeof Worker !== 'undefined',

  canUseEventListeners:
    canUseDOM && !!(window.addEventListener || window.attachEvent),

  canUseViewport: canUseDOM && !!window.screen,

  isInWorker: !canUseDOM // For now, this is true - might change in the future.

};

module.exports = ExecutionEnvironment;

},{}],23:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule HTMLDOMPropertyConfig
 */

/*jslint bitwise: true*/

"use strict";

var DOMProperty = _dereq_("./DOMProperty");
var ExecutionEnvironment = _dereq_("./ExecutionEnvironment");

var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE;
var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
var HAS_SIDE_EFFECTS = DOMProperty.injection.HAS_SIDE_EFFECTS;
var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;
var HAS_POSITIVE_NUMERIC_VALUE =
  DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
var HAS_OVERLOADED_BOOLEAN_VALUE =
  DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;

var hasSVG;
if (ExecutionEnvironment.canUseDOM) {
  var implementation = document.implementation;
  hasSVG = (
    implementation &&
    implementation.hasFeature &&
    implementation.hasFeature(
      'http://www.w3.org/TR/SVG11/feature#BasicStructure',
      '1.1'
    )
  );
}


var HTMLDOMPropertyConfig = {
  isCustomAttribute: RegExp.prototype.test.bind(
    /^(data|aria)-[a-z_][a-z\d_.\-]*$/
  ),
  Properties: {
    /**
     * Standard Properties
     */
    accept: null,
    acceptCharset: null,
    accessKey: null,
    action: null,
    allowFullScreen: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
    allowTransparency: MUST_USE_ATTRIBUTE,
    alt: null,
    async: HAS_BOOLEAN_VALUE,
    autoComplete: null,
    // autoFocus is polyfilled/normalized by AutoFocusMixin
    // autoFocus: HAS_BOOLEAN_VALUE,
    autoPlay: HAS_BOOLEAN_VALUE,
    cellPadding: null,
    cellSpacing: null,
    charSet: MUST_USE_ATTRIBUTE,
    checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
    classID: MUST_USE_ATTRIBUTE,
    // To set className on SVG elements, it's necessary to use .setAttribute;
    // this works on HTML elements too in all browsers except IE8. Conveniently,
    // IE8 doesn't support SVG and so we can simply use the attribute in
    // browsers that support SVG and the property in browsers that don't,
    // regardless of whether the element is HTML or SVG.
    className: hasSVG ? MUST_USE_ATTRIBUTE : MUST_USE_PROPERTY,
    cols: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,
    colSpan: null,
    content: null,
    contentEditable: null,
    contextMenu: MUST_USE_ATTRIBUTE,
    controls: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
    coords: null,
    crossOrigin: null,
    data: null, // For `<object />` acts as `src`.
    dateTime: MUST_USE_ATTRIBUTE,
    defer: HAS_BOOLEAN_VALUE,
    dir: null,
    disabled: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
    download: HAS_OVERLOADED_BOOLEAN_VALUE,
    draggable: null,
    encType: null,
    form: MUST_USE_ATTRIBUTE,
    formAction: MUST_USE_ATTRIBUTE,
    formEncType: MUST_USE_ATTRIBUTE,
    formMethod: MUST_USE_ATTRIBUTE,
    formNoValidate: HAS_BOOLEAN_VALUE,
    formTarget: MUST_USE_ATTRIBUTE,
    frameBorder: MUST_USE_ATTRIBUTE,
    height: MUST_USE_ATTRIBUTE,
    hidden: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
    href: null,
    hrefLang: null,
    htmlFor: null,
    httpEquiv: null,
    icon: null,
    id: MUST_USE_PROPERTY,
    label: null,
    lang: null,
    list: MUST_USE_ATTRIBUTE,
    loop: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
    manifest: MUST_USE_ATTRIBUTE,
    marginHeight: null,
    marginWidth: null,
    max: null,
    maxLength: MUST_USE_ATTRIBUTE,
    media: MUST_USE_ATTRIBUTE,
    mediaGroup: null,
    method: null,
    min: null,
    multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
    muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
    name: null,
    noValidate: HAS_BOOLEAN_VALUE,
    open: null,
    pattern: null,
    placeholder: null,
    poster: null,
    preload: null,
    radioGroup: null,
    readOnly: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
    rel: null,
    required: HAS_BOOLEAN_VALUE,
    role: MUST_USE_ATTRIBUTE,
    rows: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,
    rowSpan: null,
    sandbox: null,
    scope: null,
    scrolling: null,
    seamless: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
    selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
    shape: null,
    size: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,
    sizes: MUST_USE_ATTRIBUTE,
    span: HAS_POSITIVE_NUMERIC_VALUE,
    spellCheck: null,
    src: null,
    srcDoc: MUST_USE_PROPERTY,
    srcSet: MUST_USE_ATTRIBUTE,
    start: HAS_NUMERIC_VALUE,
    step: null,
    style: null,
    tabIndex: null,
    target: null,
    title: null,
    type: null,
    useMap: null,
    value: MUST_USE_PROPERTY | HAS_SIDE_EFFECTS,
    width: MUST_USE_ATTRIBUTE,
    wmode: MUST_USE_ATTRIBUTE,

    /**
     * Non-standard Properties
     */
    autoCapitalize: null, // Supported in Mobile Safari for keyboard hints
    autoCorrect: null, // Supported in Mobile Safari for keyboard hints
    itemProp: MUST_USE_ATTRIBUTE, // Microdata: http://schema.org/docs/gs.html
    itemScope: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, // Microdata: http://schema.org/docs/gs.html
    itemType: MUST_USE_ATTRIBUTE, // Microdata: http://schema.org/docs/gs.html
    property: null // Supports OG in meta tags
  },
  DOMAttributeNames: {
    acceptCharset: 'accept-charset',
    className: 'class',
    htmlFor: 'for',
    httpEquiv: 'http-equiv'
  },
  DOMPropertyNames: {
    autoCapitalize: 'autocapitalize',
    autoComplete: 'autocomplete',
    autoCorrect: 'autocorrect',
    autoFocus: 'autofocus',
    autoPlay: 'autoplay',
    encType: 'enctype',
    hrefLang: 'hreflang',
    radioGroup: 'radiogroup',
    spellCheck: 'spellcheck',
    srcDoc: 'srcdoc',
    srcSet: 'srcset'
  }
};

module.exports = HTMLDOMPropertyConfig;

},{"./DOMProperty":11,"./ExecutionEnvironment":22}],24:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule LinkedValueUtils
 * @typechecks static-only
 */

"use strict";

var ReactPropTypes = _dereq_("./ReactPropTypes");

var invariant = _dereq_("./invariant");

var hasReadOnlyValue = {
  'button': true,
  'checkbox': true,
  'image': true,
  'hidden': true,
  'radio': true,
  'reset': true,
  'submit': true
};

function _assertSingleLink(input) {
  ("production" !== "development" ? invariant(
    input.props.checkedLink == null || input.props.valueLink == null,
    'Cannot provide a checkedLink and a valueLink. If you want to use ' +
    'checkedLink, you probably don\'t want to use valueLink and vice versa.'
  ) : invariant(input.props.checkedLink == null || input.props.valueLink == null));
}
function _assertValueLink(input) {
  _assertSingleLink(input);
  ("production" !== "development" ? invariant(
    input.props.value == null && input.props.onChange == null,
    'Cannot provide a valueLink and a value or onChange event. If you want ' +
    'to use value or onChange, you probably don\'t want to use valueLink.'
  ) : invariant(input.props.value == null && input.props.onChange == null));
}

function _assertCheckedLink(input) {
  _assertSingleLink(input);
  ("production" !== "development" ? invariant(
    input.props.checked == null && input.props.onChange == null,
    'Cannot provide a checkedLink and a checked property or onChange event. ' +
    'If you want to use checked or onChange, you probably don\'t want to ' +
    'use checkedLink'
  ) : invariant(input.props.checked == null && input.props.onChange == null));
}

/**
 * @param {SyntheticEvent} e change event to handle
 */
function _handleLinkedValueChange(e) {
  /*jshint validthis:true */
  this.props.valueLink.requestChange(e.target.value);
}

/**
  * @param {SyntheticEvent} e change event to handle
  */
function _handleLinkedCheckChange(e) {
  /*jshint validthis:true */
  this.props.checkedLink.requestChange(e.target.checked);
}

/**
 * Provide a linked `value` attribute for controlled forms. You should not use
 * this outside of the ReactDOM controlled form components.
 */
var LinkedValueUtils = {
  Mixin: {
    propTypes: {
      value: function(props, propName, componentName) {
        if (!props[propName] ||
            hasReadOnlyValue[props.type] ||
            props.onChange ||
            props.readOnly ||
            props.disabled) {
          return;
        }
        return new Error(
          'You provided a `value` prop to a form field without an ' +
          '`onChange` handler. This will render a read-only field. If ' +
          'the field should be mutable use `defaultValue`. Otherwise, ' +
          'set either `onChange` or `readOnly`.'
        );
      },
      checked: function(props, propName, componentName) {
        if (!props[propName] ||
            props.onChange ||
            props.readOnly ||
            props.disabled) {
          return;
        }
        return new Error(
          'You provided a `checked` prop to a form field without an ' +
          '`onChange` handler. This will render a read-only field. If ' +
          'the field should be mutable use `defaultChecked`. Otherwise, ' +
          'set either `onChange` or `readOnly`.'
        );
      },
      onChange: ReactPropTypes.func
    }
  },

  /**
   * @param {ReactComponent} input Form component
   * @return {*} current value of the input either from value prop or link.
   */
  getValue: function(input) {
    if (input.props.valueLink) {
      _assertValueLink(input);
      return input.props.valueLink.value;
    }
    return input.props.value;
  },

  /**
   * @param {ReactComponent} input Form component
   * @return {*} current checked status of the input either from checked prop
   *             or link.
   */
  getChecked: function(input) {
    if (input.props.checkedLink) {
      _assertCheckedLink(input);
      return input.props.checkedLink.value;
    }
    return input.props.checked;
  },

  /**
   * @param {ReactComponent} input Form component
   * @return {function} change callback either from onChange prop or link.
   */
  getOnChange: function(input) {
    if (input.props.valueLink) {
      _assertValueLink(input);
      return _handleLinkedValueChange;
    } else if (input.props.checkedLink) {
      _assertCheckedLink(input);
      return _handleLinkedCheckChange;
    }
    return input.props.onChange;
  }
};

module.exports = LinkedValueUtils;

},{"./ReactPropTypes":72,"./invariant":126}],25:[function(_dereq_,module,exports){
/**
 * Copyright 2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule LocalEventTrapMixin
 */

"use strict";

var ReactBrowserEventEmitter = _dereq_("./ReactBrowserEventEmitter");

var accumulateInto = _dereq_("./accumulateInto");
var forEachAccumulated = _dereq_("./forEachAccumulated");
var invariant = _dereq_("./invariant");

function remove(event) {
  event.remove();
}

var LocalEventTrapMixin = {
  trapBubbledEvent:function(topLevelType, handlerBaseName) {
    ("production" !== "development" ? invariant(this.isMounted(), 'Must be mounted to trap events') : invariant(this.isMounted()));
    var listener = ReactBrowserEventEmitter.trapBubbledEvent(
      topLevelType,
      handlerBaseName,
      this.getDOMNode()
    );
    this._localEventListeners =
      accumulateInto(this._localEventListeners, listener);
  },

  // trapCapturedEvent would look nearly identical. We don't implement that
  // method because it isn't currently needed.

  componentWillUnmount:function() {
    if (this._localEventListeners) {
      forEachAccumulated(this._localEventListeners, remove);
    }
  }
};

module.exports = LocalEventTrapMixin;

},{"./ReactBrowserEventEmitter":30,"./accumulateInto":97,"./forEachAccumulated":112,"./invariant":126}],26:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule MobileSafariClickEventPlugin
 * @typechecks static-only
 */

"use strict";

var EventConstants = _dereq_("./EventConstants");

var emptyFunction = _dereq_("./emptyFunction");

var topLevelTypes = EventConstants.topLevelTypes;

/**
 * Mobile Safari does not fire properly bubble click events on non-interactive
 * elements, which means delegated click listeners do not fire. The workaround
 * for this bug involves attaching an empty click listener on the target node.
 *
 * This particular plugin works around the bug by attaching an empty click
 * listener on `touchstart` (which does fire on every element).
 */
var MobileSafariClickEventPlugin = {

  eventTypes: null,

  /**
   * @param {string} topLevelType Record from `EventConstants`.
   * @param {DOMEventTarget} topLevelTarget The listening component root node.
   * @param {string} topLevelTargetID ID of `topLevelTarget`.
   * @param {object} nativeEvent Native browser event.
   * @return {*} An accumulation of synthetic events.
   * @see {EventPluginHub.extractEvents}
   */
  extractEvents: function(
      topLevelType,
      topLevelTarget,
      topLevelTargetID,
      nativeEvent) {
    if (topLevelType === topLevelTypes.topTouchStart) {
      var target = nativeEvent.target;
      if (target && !target.onclick) {
        target.onclick = emptyFunction;
      }
    }
  }

};

module.exports = MobileSafariClickEventPlugin;

},{"./EventConstants":16,"./emptyFunction":107}],27:[function(_dereq_,module,exports){
/**
 * Copyright 2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule Object.assign
 */

// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign

function assign(target, sources) {
  if (target == null) {
    throw new TypeError('Object.assign target cannot be null or undefined');
  }

  var to = Object(target);
  var hasOwnProperty = Object.prototype.hasOwnProperty;

  for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) {
    var nextSource = arguments[nextIndex];
    if (nextSource == null) {
      continue;
    }

    var from = Object(nextSource);

    // We don't currently support accessors nor proxies. Therefore this
    // copy cannot throw. If we ever supported this then we must handle
    // exceptions and side-effects. We don't support symbols so they won't
    // be transferred.

    for (var key in from) {
      if (hasOwnProperty.call(from, key)) {
        to[key] = from[key];
      }
    }
  }

  return to;
};

module.exports = assign;

},{}],28:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule PooledClass
 */

"use strict";

var invariant = _dereq_("./invariant");

/**
 * Static poolers. Several custom versions for each potential number of
 * arguments. A completely generic pooler is easy to implement, but would
 * require accessing the `arguments` object. In each of these, `this` refers to
 * the Class itself, not an instance. If any others are needed, simply add them
 * here, or in their own files.
 */
var oneArgumentPooler = function(copyFieldsFrom) {
  var Klass = this;
  if (Klass.instancePool.length) {
    var instance = Klass.instancePool.pop();
    Klass.call(instance, copyFieldsFrom);
    return instance;
  } else {
    return new Klass(copyFieldsFrom);
  }
};

var twoArgumentPooler = function(a1, a2) {
  var Klass = this;
  if (Klass.instancePool.length) {
    var instance = Klass.instancePool.pop();
    Klass.call(instance, a1, a2);
    return instance;
  } else {
    return new Klass(a1, a2);
  }
};

var threeArgumentPooler = function(a1, a2, a3) {
  var Klass = this;
  if (Klass.instancePool.length) {
    var instance = Klass.instancePool.pop();
    Klass.call(instance, a1, a2, a3);
    return instance;
  } else {
    return new Klass(a1, a2, a3);
  }
};

var fiveArgumentPooler = function(a1, a2, a3, a4, a5) {
  var Klass = this;
  if (Klass.instancePool.length) {
    var instance = Klass.instancePool.pop();
    Klass.call(instance, a1, a2, a3, a4, a5);
    return instance;
  } else {
    return new Klass(a1, a2, a3, a4, a5);
  }
};

var standardReleaser = function(instance) {
  var Klass = this;
  ("production" !== "development" ? invariant(
    instance instanceof Klass,
    'Trying to release an instance into a pool of a different type.'
  ) : invariant(instance instanceof Klass));
  if (instance.destructor) {
    instance.destructor();
  }
  if (Klass.instancePool.length < Klass.poolSize) {
    Klass.instancePool.push(instance);
  }
};

var DEFAULT_POOL_SIZE = 10;
var DEFAULT_POOLER = oneArgumentPooler;

/**
 * Augments `CopyConstructor` to be a poolable class, augmenting only the class
 * itself (statically) not adding any prototypical fields. Any CopyConstructor
 * you give this may have a `poolSize` property, and will look for a
 * prototypical `destructor` on instances (optional).
 *
 * @param {Function} CopyConstructor Constructor that can be used to reset.
 * @param {Function} pooler Customizable pooler.
 */
var addPoolingTo = function(CopyConstructor, pooler) {
  var NewKlass = CopyConstructor;
  NewKlass.instancePool = [];
  NewKlass.getPooled = pooler || DEFAULT_POOLER;
  if (!NewKlass.poolSize) {
    NewKlass.poolSize = DEFAULT_POOL_SIZE;
  }
  NewKlass.release = standardReleaser;
  return NewKlass;
};

var PooledClass = {
  addPoolingTo: addPoolingTo,
  oneArgumentPooler: oneArgumentPooler,
  twoArgumentPooler: twoArgumentPooler,
  threeArgumentPooler: threeArgumentPooler,
  fiveArgumentPooler: fiveArgumentPooler
};

module.exports = PooledClass;

},{"./invariant":126}],29:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactBrowserComponentMixin
 */

"use strict";

var ReactEmptyComponent = _dereq_("./ReactEmptyComponent");
var ReactMount = _dereq_("./ReactMount");

var invariant = _dereq_("./invariant");

var ReactBrowserComponentMixin = {
  /**
   * Returns the DOM node rendered by this component.
   *
   * @return {DOMElement} The root node of this component.
   * @final
   * @protected
   */
  getDOMNode: function() {
    ("production" !== "development" ? invariant(
      this.isMounted(),
      'getDOMNode(): A component must be mounted to have a DOM node.'
    ) : invariant(this.isMounted()));
    if (ReactEmptyComponent.isNullComponentID(this._rootNodeID)) {
      return null;
    }
    return ReactMount.getNode(this._rootNodeID);
  }
};

module.exports = ReactBrowserComponentMixin;

},{"./ReactEmptyComponent":54,"./ReactMount":63,"./invariant":126}],30:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactBrowserEventEmitter
 * @typechecks static-only
 */

"use strict";

var EventConstants = _dereq_("./EventConstants");
var EventPluginHub = _dereq_("./EventPluginHub");
var EventPluginRegistry = _dereq_("./EventPluginRegistry");
var ReactEventEmitterMixin = _dereq_("./ReactEventEmitterMixin");
var ViewportMetrics = _dereq_("./ViewportMetrics");

var assign = _dereq_("./Object.assign");
var isEventSupported = _dereq_("./isEventSupported");

/**
 * Summary of `ReactBrowserEventEmitter` event handling:
 *
 *  - Top-level delegation is used to trap most native browser events. This
 *    may only occur in the main thread and is the responsibility of
 *    ReactEventListener, which is injected and can therefore support pluggable
 *    event sources. This is the only work that occurs in the main thread.
 *
 *  - We normalize and de-duplicate events to account for browser quirks. This
 *    may be done in the worker thread.
 *
 *  - Forward these native events (with the associated top-level type used to
 *    trap it) to `EventPluginHub`, which in turn will ask plugins if they want
 *    to extract any synthetic events.
 *
 *  - The `EventPluginHub` will then process each event by annotating them with
 *    "dispatches", a sequence of listeners and IDs that care about that event.
 *
 *  - The `EventPluginHub` then dispatches the events.
 *
 * Overview of React and the event system:
 *
 * +------------+    .
 * |    DOM     |    .
 * +------------+    .
 *       |           .
 *       v           .
 * +------------+    .
 * | ReactEvent |    .
 * |  Listener  |    .
 * +------------+    .                         +-----------+
 *       |           .               +--------+|SimpleEvent|
 *       |           .               |         |Plugin     |
 * +-----|------+    .               v         +-----------+
 * |     |      |    .    +--------------+                    +------------+
 * |     +-----------.--->|EventPluginHub|                    |    Event   |
 * |            |    .    |              |     +-----------+  | Propagators|
 * | ReactEvent |    .    |              |     |TapEvent   |  |------------|
 * |  Emitter   |    .    |              |<---+|Plugin     |  |other plugin|
 * |            |    .    |              |     +-----------+  |  utilities |
 * |     +-----------.--->|              |                    +------------+
 * |     |      |    .    +--------------+
 * +-----|------+    .                ^        +-----------+
 *       |           .                |        |Enter/Leave|
 *       +           .                +-------+|Plugin     |
 * +-------------+   .                         +-----------+
 * | application |   .
 * |-------------|   .
 * |             |   .
 * |             |   .
 * +-------------+   .
 *                   .
 *    React Core     .  General Purpose Event Plugin System
 */

var alreadyListeningTo = {};
var isMonitoringScrollValue = false;
var reactTopListenersCounter = 0;

// For events like 'submit' which don't consistently bubble (which we trap at a
// lower node than `document`), binding at `document` would cause duplicate
// events so we don't include them here
var topEventMapping = {
  topBlur: 'blur',
  topChange: 'change',
  topClick: 'click',
  topCompositionEnd: 'compositionend',
  topCompositionStart: 'compositionstart',
  topCompositionUpdate: 'compositionupdate',
  topContextMenu: 'contextmenu',
  topCopy: 'copy',
  topCut: 'cut',
  topDoubleClick: 'dblclick',
  topDrag: 'drag',
  topDragEnd: 'dragend',
  topDragEnter: 'dragenter',
  topDragExit: 'dragexit',
  topDragLeave: 'dragleave',
  topDragOver: 'dragover',
  topDragStart: 'dragstart',
  topDrop: 'drop',
  topFocus: 'focus',
  topInput: 'input',
  topKeyDown: 'keydown',
  topKeyPress: 'keypress',
  topKeyUp: 'keyup',
  topMouseDown: 'mousedown',
  topMouseMove: 'mousemove',
  topMouseOut: 'mouseout',
  topMouseOver: 'mouseover',
  topMouseUp: 'mouseup',
  topPaste: 'paste',
  topScroll: 'scroll',
  topSelectionChange: 'selectionchange',
  topTextInput: 'textInput',
  topTouchCancel: 'touchcancel',
  topTouchEnd: 'touchend',
  topTouchMove: 'touchmove',
  topTouchStart: 'touchstart',
  topWheel: 'wheel'
};

/**
 * To ensure no conflicts with other potential React instances on the page
 */
var topListenersIDKey = "_reactListenersID" + String(Math.random()).slice(2);

function getListeningForDocument(mountAt) {
  // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`
  // directly.
  if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
    mountAt[topListenersIDKey] = reactTopListenersCounter++;
    alreadyListeningTo[mountAt[topListenersIDKey]] = {};
  }
  return alreadyListeningTo[mountAt[topListenersIDKey]];
}

/**
 * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For
 * example:
 *
 *   ReactBrowserEventEmitter.putListener('myID', 'onClick', myFunction);
 *
 * This would allocate a "registration" of `('onClick', myFunction)` on 'myID'.
 *
 * @internal
 */
var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, {

  /**
   * Injectable event backend
   */
  ReactEventListener: null,

  injection: {
    /**
     * @param {object} ReactEventListener
     */
    injectReactEventListener: function(ReactEventListener) {
      ReactEventListener.setHandleTopLevel(
        ReactBrowserEventEmitter.handleTopLevel
      );
      ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;
    }
  },

  /**
   * Sets whether or not any created callbacks should be enabled.
   *
   * @param {boolean} enabled True if callbacks should be enabled.
   */
  setEnabled: function(enabled) {
    if (ReactBrowserEventEmitter.ReactEventListener) {
      ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);
    }
  },

  /**
   * @return {boolean} True if callbacks are enabled.
   */
  isEnabled: function() {
    return !!(
      ReactBrowserEventEmitter.ReactEventListener &&
      ReactBrowserEventEmitter.ReactEventListener.isEnabled()
    );
  },

  /**
   * We listen for bubbled touch events on the document object.
   *
   * Firefox v8.01 (and possibly others) exhibited strange behavior when
   * mounting `onmousemove` events at some node that was not the document
   * element. The symptoms were that if your mouse is not moving over something
   * contained within that mount point (for example on the background) the
   * top-level listeners for `onmousemove` won't be called. However, if you
   * register the `mousemove` on the document object, then it will of course
   * catch all `mousemove`s. This along with iOS quirks, justifies restricting
   * top-level listeners to the document object only, at least for these
   * movement types of events and possibly all events.
   *
   * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
   *
   * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
   * they bubble to document.
   *
   * @param {string} registrationName Name of listener (e.g. `onClick`).
   * @param {object} contentDocumentHandle Document which owns the container
   */
  listenTo: function(registrationName, contentDocumentHandle) {
    var mountAt = contentDocumentHandle;
    var isListening = getListeningForDocument(mountAt);
    var dependencies = EventPluginRegistry.
      registrationNameDependencies[registrationName];

    var topLevelTypes = EventConstants.topLevelTypes;
    for (var i = 0, l = dependencies.length; i < l; i++) {
      var dependency = dependencies[i];
      if (!(
            isListening.hasOwnProperty(dependency) &&
            isListening[dependency]
          )) {
        if (dependency === topLevelTypes.topWheel) {
          if (isEventSupported('wheel')) {
            ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(
              topLevelTypes.topWheel,
              'wheel',
              mountAt
            );
          } else if (isEventSupported('mousewheel')) {
            ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(
              topLevelTypes.topWheel,
              'mousewheel',
              mountAt
            );
          } else {
            // Firefox needs to capture a different mouse scroll event.
            // @see http://www.quirksmode.org/dom/events/tests/scroll.html
            ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(
              topLevelTypes.topWheel,
              'DOMMouseScroll',
              mountAt
            );
          }
        } else if (dependency === topLevelTypes.topScroll) {

          if (isEventSupported('scroll', true)) {
            ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(
              topLevelTypes.topScroll,
              'scroll',
              mountAt
            );
          } else {
            ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(
              topLevelTypes.topScroll,
              'scroll',
              ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE
            );
          }
        } else if (dependency === topLevelTypes.topFocus ||
            dependency === topLevelTypes.topBlur) {

          if (isEventSupported('focus', true)) {
            ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(
              topLevelTypes.topFocus,
              'focus',
              mountAt
            );
            ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(
              topLevelTypes.topBlur,
              'blur',
              mountAt
            );
          } else if (isEventSupported('focusin')) {
            // IE has `focusin` and `focusout` events which bubble.
            // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html
            ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(
              topLevelTypes.topFocus,
              'focusin',
              mountAt
            );
            ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(
              topLevelTypes.topBlur,
              'focusout',
              mountAt
            );
          }

          // to make sure blur and focus event listeners are only attached once
          isListening[topLevelTypes.topBlur] = true;
          isListening[topLevelTypes.topFocus] = true;
        } else if (topEventMapping.hasOwnProperty(dependency)) {
          ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(
            dependency,
            topEventMapping[dependency],
            mountAt
          );
        }

        isListening[dependency] = true;
      }
    }
  },

  trapBubbledEvent: function(topLevelType, handlerBaseName, handle) {
    return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(
      topLevelType,
      handlerBaseName,
      handle
    );
  },

  trapCapturedEvent: function(topLevelType, handlerBaseName, handle) {
    return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(
      topLevelType,
      handlerBaseName,
      handle
    );
  },

  /**
   * Listens to window scroll and resize events. We cache scroll values so that
   * application code can access them without triggering reflows.
   *
   * NOTE: Scroll events do not bubble.
   *
   * @see http://www.quirksmode.org/dom/events/scroll.html
   */
  ensureScrollValueMonitoring: function(){
    if (!isMonitoringScrollValue) {
      var refresh = ViewportMetrics.refreshScrollValues;
      ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);
      isMonitoringScrollValue = true;
    }
  },

  eventNameDispatchConfigs: EventPluginHub.eventNameDispatchConfigs,

  registrationNameModules: EventPluginHub.registrationNameModules,

  putListener: EventPluginHub.putListener,

  getListener: EventPluginHub.getListener,

  deleteListener: EventPluginHub.deleteListener,

  deleteAllListeners: EventPluginHub.deleteAllListeners

});

module.exports = ReactBrowserEventEmitter;

},{"./EventConstants":16,"./EventPluginHub":18,"./EventPluginRegistry":19,"./Object.assign":27,"./ReactEventEmitterMixin":56,"./ViewportMetrics":96,"./isEventSupported":127}],31:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactChildren
 */

"use strict";

var PooledClass = _dereq_("./PooledClass");

var traverseAllChildren = _dereq_("./traverseAllChildren");
var warning = _dereq_("./warning");

var twoArgumentPooler = PooledClass.twoArgumentPooler;
var threeArgumentPooler = PooledClass.threeArgumentPooler;

/**
 * PooledClass representing the bookkeeping associated with performing a child
 * traversal. Allows avoiding binding callbacks.
 *
 * @constructor ForEachBookKeeping
 * @param {!function} forEachFunction Function to perform traversal with.
 * @param {?*} forEachContext Context to perform context with.
 */
function ForEachBookKeeping(forEachFunction, forEachContext) {
  this.forEachFunction = forEachFunction;
  this.forEachContext = forEachContext;
}
PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);

function forEachSingleChild(traverseContext, child, name, i) {
  var forEachBookKeeping = traverseContext;
  forEachBookKeeping.forEachFunction.call(
    forEachBookKeeping.forEachContext, child, i);
}

/**
 * Iterates through children that are typically specified as `props.children`.
 *
 * The provided forEachFunc(child, index) will be called for each
 * leaf child.
 *
 * @param {?*} children Children tree container.
 * @param {function(*, int)} forEachFunc.
 * @param {*} forEachContext Context for forEachContext.
 */
function forEachChildren(children, forEachFunc, forEachContext) {
  if (children == null) {
    return children;
  }

  var traverseContext =
    ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
  traverseAllChildren(children, forEachSingleChild, traverseContext);
  ForEachBookKeeping.release(traverseContext);
}

/**
 * PooledClass representing the bookkeeping associated with performing a child
 * mapping. Allows avoiding binding callbacks.
 *
 * @constructor MapBookKeeping
 * @param {!*} mapResult Object containing the ordered map of results.
 * @param {!function} mapFunction Function to perform mapping with.
 * @param {?*} mapContext Context to perform mapping with.
 */
function MapBookKeeping(mapResult, mapFunction, mapContext) {
  this.mapResult = mapResult;
  this.mapFunction = mapFunction;
  this.mapContext = mapContext;
}
PooledClass.addPoolingTo(MapBookKeeping, threeArgumentPooler);

function mapSingleChildIntoContext(traverseContext, child, name, i) {
  var mapBookKeeping = traverseContext;
  var mapResult = mapBookKeeping.mapResult;

  var keyUnique = !mapResult.hasOwnProperty(name);
  ("production" !== "development" ? warning(
    keyUnique,
    'ReactChildren.map(...): Encountered two children with the same key, ' +
    '`%s`. Child keys must be unique; when two children share a key, only ' +
    'the first child will be used.',
    name
  ) : null);

  if (keyUnique) {
    var mappedChild =
      mapBookKeeping.mapFunction.call(mapBookKeeping.mapContext, child, i);
    mapResult[name] = mappedChild;
  }
}

/**
 * Maps children that are typically specified as `props.children`.
 *
 * The provided mapFunction(child, key, index) will be called for each
 * leaf child.
 *
 * TODO: This may likely break any calls to `ReactChildren.map` that were
 * previously relying on the fact that we guarded against null children.
 *
 * @param {?*} children Children tree container.
 * @param {function(*, int)} mapFunction.
 * @param {*} mapContext Context for mapFunction.
 * @return {object} Object containing the ordered map of results.
 */
function mapChildren(children, func, context) {
  if (children == null) {
    return children;
  }

  var mapResult = {};
  var traverseContext = MapBookKeeping.getPooled(mapResult, func, context);
  traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
  MapBookKeeping.release(traverseContext);
  return mapResult;
}

function forEachSingleChildDummy(traverseContext, child, name, i) {
  return null;
}

/**
 * Count the number of children that are typically specified as
 * `props.children`.
 *
 * @param {?*} children Children tree container.
 * @return {number} The number of children.
 */
function countChildren(children, context) {
  return traverseAllChildren(children, forEachSingleChildDummy, null);
}

var ReactChildren = {
  forEach: forEachChildren,
  map: mapChildren,
  count: countChildren
};

module.exports = ReactChildren;

},{"./PooledClass":28,"./traverseAllChildren":144,"./warning":145}],32:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactComponent
 */

"use strict";

var ReactElement = _dereq_("./ReactElement");
var ReactOwner = _dereq_("./ReactOwner");
var ReactUpdates = _dereq_("./ReactUpdates");

var assign = _dereq_("./Object.assign");
var invariant = _dereq_("./invariant");
var keyMirror = _dereq_("./keyMirror");

/**
 * Every React component is in one of these life cycles.
 */
var ComponentLifeCycle = keyMirror({
  /**
   * Mounted components have a DOM node representation and are capable of
   * receiving new props.
   */
  MOUNTED: null,
  /**
   * Unmounted components are inactive and cannot receive new props.
   */
  UNMOUNTED: null
});

var injected = false;

/**
 * Optionally injectable environment dependent cleanup hook. (server vs.
 * browser etc). Example: A browser system caches DOM nodes based on component
 * ID and must remove that cache entry when this instance is unmounted.
 *
 * @private
 */
var unmountIDFromEnvironment = null;

/**
 * The "image" of a component tree, is the platform specific (typically
 * serialized) data that represents a tree of lower level UI building blocks.
 * On the web, this "image" is HTML markup which describes a construction of
 * low level `div` and `span` nodes. Other platforms may have different
 * encoding of this "image". This must be injected.
 *
 * @private
 */
var mountImageIntoNode = null;

/**
 * Components are the basic units of composition in React.
 *
 * Every component accepts a set of keyed input parameters known as "props" that
 * are initialized by the constructor. Once a component is mounted, the props
 * can be mutated using `setProps` or `replaceProps`.
 *
 * Every component is capable of the following operations:
 *
 *   `mountComponent`
 *     Initializes the component, renders markup, and registers event listeners.
 *
 *   `receiveComponent`
 *     Updates the rendered DOM nodes to match the given component.
 *
 *   `unmountComponent`
 *     Releases any resources allocated by this component.
 *
 * Components can also be "owned" by other components. Being owned by another
 * component means being constructed by that component. This is different from
 * being the child of a component, which means having a DOM representation that
 * is a child of the DOM representation of that component.
 *
 * @class ReactComponent
 */
var ReactComponent = {

  injection: {
    injectEnvironment: function(ReactComponentEnvironment) {
      ("production" !== "development" ? invariant(
        !injected,
        'ReactComponent: injectEnvironment() can only be called once.'
      ) : invariant(!injected));
      mountImageIntoNode = ReactComponentEnvironment.mountImageIntoNode;
      unmountIDFromEnvironment =
        ReactComponentEnvironment.unmountIDFromEnvironment;
      ReactComponent.BackendIDOperations =
        ReactComponentEnvironment.BackendIDOperations;
      injected = true;
    }
  },

  /**
   * @internal
   */
  LifeCycle: ComponentLifeCycle,

  /**
   * Injected module that provides ability to mutate individual properties.
   * Injected into the base class because many different subclasses need access
   * to this.
   *
   * @internal
   */
  BackendIDOperations: null,

  /**
   * Base functionality for every ReactComponent constructor. Mixed into the
   * `ReactComponent` prototype, but exposed statically for easy access.
   *
   * @lends {ReactComponent.prototype}
   */
  Mixin: {

    /**
     * Checks whether or not this component is mounted.
     *
     * @return {boolean} True if mounted, false otherwise.
     * @final
     * @protected
     */
    isMounted: function() {
      return this._lifeCycleState === ComponentLifeCycle.MOUNTED;
    },

    /**
     * Sets a subset of the props.
     *
     * @param {object} partialProps Subset of the next props.
     * @param {?function} callback Called after props are updated.
     * @final
     * @public
     */
    setProps: function(partialProps, callback) {
      // Merge with the pending element if it exists, otherwise with existing
      // element props.
      var element = this._pendingElement || this._currentElement;
      this.replaceProps(
        assign({}, element.props, partialProps),
        callback
      );
    },

    /**
     * Replaces all of the props.
     *
     * @param {object} props New props.
     * @param {?function} callback Called after props are updated.
     * @final
     * @public
     */
    replaceProps: function(props, callback) {
      ("production" !== "development" ? invariant(
        this.isMounted(),
        'replaceProps(...): Can only update a mounted component.'
      ) : invariant(this.isMounted()));
      ("production" !== "development" ? invariant(
        this._mountDepth === 0,
        'replaceProps(...): You called `setProps` or `replaceProps` on a ' +
        'component with a parent. This is an anti-pattern since props will ' +
        'get reactively updated when rendered. Instead, change the owner\'s ' +
        '`render` method to pass the correct value as props to the component ' +
        'where it is created.'
      ) : invariant(this._mountDepth === 0));
      // This is a deoptimized path. We optimize for always having a element.
      // This creates an extra internal element.
      this._pendingElement = ReactElement.cloneAndReplaceProps(
        this._pendingElement || this._currentElement,
        props
      );
      ReactUpdates.enqueueUpdate(this, callback);
    },

    /**
     * Schedule a partial update to the props. Only used for internal testing.
     *
     * @param {object} partialProps Subset of the next props.
     * @param {?function} callback Called after props are updated.
     * @final
     * @internal
     */
    _setPropsInternal: function(partialProps, callback) {
      // This is a deoptimized path. We optimize for always having a element.
      // This creates an extra internal element.
      var element = this._pendingElement || this._currentElement;
      this._pendingElement = ReactElement.cloneAndReplaceProps(
        element,
        assign({}, element.props, partialProps)
      );
      ReactUpdates.enqueueUpdate(this, callback);
    },

    /**
     * Base constructor for all React components.
     *
     * Subclasses that override this method should make sure to invoke
     * `ReactComponent.Mixin.construct.call(this, ...)`.
     *
     * @param {ReactElement} element
     * @internal
     */
    construct: function(element) {
      // This is the public exposed props object after it has been processed
      // with default props. The element's props represents the true internal
      // state of the props.
      this.props = element.props;
      // Record the component responsible for creating this component.
      // This is accessible through the element but we maintain an extra
      // field for compatibility with devtools and as a way to make an
      // incremental update. TODO: Consider deprecating this field.
      this._owner = element._owner;

      // All components start unmounted.
      this._lifeCycleState = ComponentLifeCycle.UNMOUNTED;

      // See ReactUpdates.
      this._pendingCallbacks = null;

      // We keep the old element and a reference to the pending element
      // to track updates.
      this._currentElement = element;
      this._pendingElement = null;
    },

    /**
     * Initializes the component, renders markup, and registers event listeners.
     *
     * NOTE: This does not insert any nodes into the DOM.
     *
     * Subclasses that override this method should make sure to invoke
     * `ReactComponent.Mixin.mountComponent.call(this, ...)`.
     *
     * @param {string} rootID DOM ID of the root node.
     * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
     * @param {number} mountDepth number of components in the owner hierarchy.
     * @return {?string} Rendered markup to be inserted into the DOM.
     * @internal
     */
    mountComponent: function(rootID, transaction, mountDepth) {
      ("production" !== "development" ? invariant(
        !this.isMounted(),
        'mountComponent(%s, ...): Can only mount an unmounted component. ' +
        'Make sure to avoid storing components between renders or reusing a ' +
        'single component instance in multiple places.',
        rootID
      ) : invariant(!this.isMounted()));
      var ref = this._currentElement.ref;
      if (ref != null) {
        var owner = this._currentElement._owner;
        ReactOwner.addComponentAsRefTo(this, ref, owner);
      }
      this._rootNodeID = rootID;
      this._lifeCycleState = ComponentLifeCycle.MOUNTED;
      this._mountDepth = mountDepth;
      // Effectively: return '';
    },

    /**
     * Releases any resources allocated by `mountComponent`.
     *
     * NOTE: This does not remove any nodes from the DOM.
     *
     * Subclasses that override this method should make sure to invoke
     * `ReactComponent.Mixin.unmountComponent.call(this)`.
     *
     * @internal
     */
    unmountComponent: function() {
      ("production" !== "development" ? invariant(
        this.isMounted(),
        'unmountComponent(): Can only unmount a mounted component.'
      ) : invariant(this.isMounted()));
      var ref = this._currentElement.ref;
      if (ref != null) {
        ReactOwner.removeComponentAsRefFrom(this, ref, this._owner);
      }
      unmountIDFromEnvironment(this._rootNodeID);
      this._rootNodeID = null;
      this._lifeCycleState = ComponentLifeCycle.UNMOUNTED;
    },

    /**
     * Given a new instance of this component, updates the rendered DOM nodes
     * as if that instance was rendered instead.
     *
     * Subclasses that override this method should make sure to invoke
     * `ReactComponent.Mixin.receiveComponent.call(this, ...)`.
     *
     * @param {object} nextComponent Next set of properties.
     * @param {ReactReconcileTransaction} transaction
     * @internal
     */
    receiveComponent: function(nextElement, transaction) {
      ("production" !== "development" ? invariant(
        this.isMounted(),
        'receiveComponent(...): Can only update a mounted component.'
      ) : invariant(this.isMounted()));
      this._pendingElement = nextElement;
      this.performUpdateIfNecessary(transaction);
    },

    /**
     * If `_pendingElement` is set, update the component.
     *
     * @param {ReactReconcileTransaction} transaction
     * @internal
     */
    performUpdateIfNecessary: function(transaction) {
      if (this._pendingElement == null) {
        return;
      }
      var prevElement = this._currentElement;
      var nextElement = this._pendingElement;
      this._currentElement = nextElement;
      this.props = nextElement.props;
      this._owner = nextElement._owner;
      this._pendingElement = null;
      this.updateComponent(transaction, prevElement);
    },

    /**
     * Updates the component's currently mounted representation.
     *
     * @param {ReactReconcileTransaction} transaction
     * @param {object} prevElement
     * @internal
     */
    updateComponent: function(transaction, prevElement) {
      var nextElement = this._currentElement;

      // If either the owner or a `ref` has changed, make sure the newest owner
      // has stored a reference to `this`, and the previous owner (if different)
      // has forgotten the reference to `this`. We use the element instead
      // of the public this.props because the post processing cannot determine
      // a ref. The ref conceptually lives on the element.

      // TODO: Should this even be possible? The owner cannot change because
      // it's forbidden by shouldUpdateReactComponent. The ref can change
      // if you swap the keys of but not the refs. Reconsider where this check
      // is made. It probably belongs where the key checking and
      // instantiateReactComponent is done.

      if (nextElement._owner !== prevElement._owner ||
          nextElement.ref !== prevElement.ref) {
        if (prevElement.ref != null) {
          ReactOwner.removeComponentAsRefFrom(
            this, prevElement.ref, prevElement._owner
          );
        }
        // Correct, even if the owner is the same, and only the ref has changed.
        if (nextElement.ref != null) {
          ReactOwner.addComponentAsRefTo(
            this,
            nextElement.ref,
            nextElement._owner
          );
        }
      }
    },

    /**
     * Mounts this component and inserts it into the DOM.
     *
     * @param {string} rootID DOM ID of the root node.
     * @param {DOMElement} container DOM element to mount into.
     * @param {boolean} shouldReuseMarkup If true, do not insert markup
     * @final
     * @internal
     * @see {ReactMount.render}
     */
    mountComponentIntoNode: function(rootID, container, shouldReuseMarkup) {
      var transaction = ReactUpdates.ReactReconcileTransaction.getPooled();
      transaction.perform(
        this._mountComponentIntoNode,
        this,
        rootID,
        container,
        transaction,
        shouldReuseMarkup
      );
      ReactUpdates.ReactReconcileTransaction.release(transaction);
    },

    /**
     * @param {string} rootID DOM ID of the root node.
     * @param {DOMElement} container DOM element to mount into.
     * @param {ReactReconcileTransaction} transaction
     * @param {boolean} shouldReuseMarkup If true, do not insert markup
     * @final
     * @private
     */
    _mountComponentIntoNode: function(
        rootID,
        container,
        transaction,
        shouldReuseMarkup) {
      var markup = this.mountComponent(rootID, transaction, 0);
      mountImageIntoNode(markup, container, shouldReuseMarkup);
    },

    /**
     * Checks if this component is owned by the supplied `owner` component.
     *
     * @param {ReactComponent} owner Component to check.
     * @return {boolean} True if `owners` owns this component.
     * @final
     * @internal
     */
    isOwnedBy: function(owner) {
      return this._owner === owner;
    },

    /**
     * Gets another component, that shares the same owner as this one, by ref.
     *
     * @param {string} ref of a sibling Component.
     * @return {?ReactComponent} the actual sibling Component.
     * @final
     * @internal
     */
    getSiblingByRef: function(ref) {
      var owner = this._owner;
      if (!owner || !owner.refs) {
        return null;
      }
      return owner.refs[ref];
    }
  }
};

module.exports = ReactComponent;

},{"./Object.assign":27,"./ReactElement":52,"./ReactOwner":67,"./ReactUpdates":79,"./invariant":126,"./keyMirror":132}],33:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactComponentBrowserEnvironment
 */

/*jslint evil: true */

"use strict";

var ReactDOMIDOperations = _dereq_("./ReactDOMIDOperations");
var ReactMarkupChecksum = _dereq_("./ReactMarkupChecksum");
var ReactMount = _dereq_("./ReactMount");
var ReactPerf = _dereq_("./ReactPerf");
var ReactReconcileTransaction = _dereq_("./ReactReconcileTransaction");

var getReactRootElementInContainer = _dereq_("./getReactRootElementInContainer");
var invariant = _dereq_("./invariant");
var setInnerHTML = _dereq_("./setInnerHTML");


var ELEMENT_NODE_TYPE = 1;
var DOC_NODE_TYPE = 9;


/**
 * Abstracts away all functionality of `ReactComponent` requires knowledge of
 * the browser context.
 */
var ReactComponentBrowserEnvironment = {
  ReactReconcileTransaction: ReactReconcileTransaction,

  BackendIDOperations: ReactDOMIDOperations,

  /**
   * If a particular environment requires that some resources be cleaned up,
   * specify this in the injected Mixin. In the DOM, we would likely want to
   * purge any cached node ID lookups.
   *
   * @private
   */
  unmountIDFromEnvironment: function(rootNodeID) {
    ReactMount.purgeID(rootNodeID);
  },

  /**
   * @param {string} markup Markup string to place into the DOM Element.
   * @param {DOMElement} container DOM Element to insert markup into.
   * @param {boolean} shouldReuseMarkup Should reuse the existing markup in the
   * container if possible.
   */
  mountImageIntoNode: ReactPerf.measure(
    'ReactComponentBrowserEnvironment',
    'mountImageIntoNode',
    function(markup, container, shouldReuseMarkup) {
      ("production" !== "development" ? invariant(
        container && (
          container.nodeType === ELEMENT_NODE_TYPE ||
            container.nodeType === DOC_NODE_TYPE
        ),
        'mountComponentIntoNode(...): Target container is not valid.'
      ) : invariant(container && (
        container.nodeType === ELEMENT_NODE_TYPE ||
          container.nodeType === DOC_NODE_TYPE
      )));

      if (shouldReuseMarkup) {
        if (ReactMarkupChecksum.canReuseMarkup(
          markup,
          getReactRootElementInContainer(container))) {
          return;
        } else {
          ("production" !== "development" ? invariant(
            container.nodeType !== DOC_NODE_TYPE,
            'You\'re trying to render a component to the document using ' +
            'server rendering but the checksum was invalid. This usually ' +
            'means you rendered a different component type or props on ' +
            'the client from the one on the server, or your render() ' +
            'methods are impure. React cannot handle this case due to ' +
            'cross-browser quirks by rendering at the document root. You ' +
            'should look for environment dependent code in your components ' +
            'and ensure the props are the same client and server side.'
          ) : invariant(container.nodeType !== DOC_NODE_TYPE));

          if ("production" !== "development") {
            console.warn(
              'React attempted to use reuse markup in a container but the ' +
              'checksum was invalid. This generally means that you are ' +
              'using server rendering and the markup generated on the ' +
              'server was not what the client was expecting. React injected ' +
              'new markup to compensate which works but you have lost many ' +
              'of the benefits of server rendering. Instead, figure out ' +
              'why the markup being generated is different on the client ' +
              'or server.'
            );
          }
        }
      }

      ("production" !== "development" ? invariant(
        container.nodeType !== DOC_NODE_TYPE,
        'You\'re trying to render a component to the document but ' +
          'you didn\'t use server rendering. We can\'t do this ' +
          'without using server rendering due to cross-browser quirks. ' +
          'See renderComponentToString() for server rendering.'
      ) : invariant(container.nodeType !== DOC_NODE_TYPE));

      setInnerHTML(container, markup);
    }
  )
};

module.exports = ReactComponentBrowserEnvironment;

},{"./ReactDOMIDOperations":41,"./ReactMarkupChecksum":62,"./ReactMount":63,"./ReactPerf":68,"./ReactReconcileTransaction":74,"./getReactRootElementInContainer":120,"./invariant":126,"./setInnerHTML":140}],34:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactCompositeComponent
 */

"use strict";

var ReactComponent = _dereq_("./ReactComponent");
var ReactContext = _dereq_("./ReactContext");
var ReactCurrentOwner = _dereq_("./ReactCurrentOwner");
var ReactElement = _dereq_("./ReactElement");
var ReactElementValidator = _dereq_("./ReactElementValidator");
var ReactEmptyComponent = _dereq_("./ReactEmptyComponent");
var ReactErrorUtils = _dereq_("./ReactErrorUtils");
var ReactLegacyElement = _dereq_("./ReactLegacyElement");
var ReactOwner = _dereq_("./ReactOwner");
var ReactPerf = _dereq_("./ReactPerf");
var ReactPropTransferer = _dereq_("./ReactPropTransferer");
var ReactPropTypeLocations = _dereq_("./ReactPropTypeLocations");
var ReactPropTypeLocationNames = _dereq_("./ReactPropTypeLocationNames");
var ReactUpdates = _dereq_("./ReactUpdates");

var assign = _dereq_("./Object.assign");
var instantiateReactComponent = _dereq_("./instantiateReactComponent");
var invariant = _dereq_("./invariant");
var keyMirror = _dereq_("./keyMirror");
var keyOf = _dereq_("./keyOf");
var monitorCodeUse = _dereq_("./monitorCodeUse");
var mapObject = _dereq_("./mapObject");
var shouldUpdateReactComponent = _dereq_("./shouldUpdateReactComponent");
var warning = _dereq_("./warning");

var MIXINS_KEY = keyOf({mixins: null});

/**
 * Policies that describe methods in `ReactCompositeComponentInterface`.
 */
var SpecPolicy = keyMirror({
  /**
   * These methods may be defined only once by the class specification or mixin.
   */
  DEFINE_ONCE: null,
  /**
   * These methods may be defined by both the class specification and mixins.
   * Subsequent definitions will be chained. These methods must return void.
   */
  DEFINE_MANY: null,
  /**
   * These methods are overriding the base ReactCompositeComponent class.
   */
  OVERRIDE_BASE: null,
  /**
   * These methods are similar to DEFINE_MANY, except we assume they return
   * objects. We try to merge the keys of the return values of all the mixed in
   * functions. If there is a key conflict we throw.
   */
  DEFINE_MANY_MERGED: null
});


var injectedMixins = [];

/**
 * Composite components are higher-level components that compose other composite
 * or native components.
 *
 * To create a new type of `ReactCompositeComponent`, pass a specification of
 * your new class to `React.createClass`. The only requirement of your class
 * specification is that you implement a `render` method.
 *
 *   var MyComponent = React.createClass({
 *     render: function() {
 *       return <div>Hello World</div>;
 *     }
 *   });
 *
 * The class specification supports a specific protocol of methods that have
 * special meaning (e.g. `render`). See `ReactCompositeComponentInterface` for
 * more the comprehensive protocol. Any other properties and methods in the
 * class specification will available on the prototype.
 *
 * @interface ReactCompositeComponentInterface
 * @internal
 */
var ReactCompositeComponentInterface = {

  /**
   * An array of Mixin objects to include when defining your component.
   *
   * @type {array}
   * @optional
   */
  mixins: SpecPolicy.DEFINE_MANY,

  /**
   * An object containing properties and methods that should be defined on
   * the component's constructor instead of its prototype (static methods).
   *
   * @type {object}
   * @optional
   */
  statics: SpecPolicy.DEFINE_MANY,

  /**
   * Definition of prop types for this component.
   *
   * @type {object}
   * @optional
   */
  propTypes: SpecPolicy.DEFINE_MANY,

  /**
   * Definition of context types for this component.
   *
   * @type {object}
   * @optional
   */
  contextTypes: SpecPolicy.DEFINE_MANY,

  /**
   * Definition of context types this component sets for its children.
   *
   * @type {object}
   * @optional
   */
  childContextTypes: SpecPolicy.DEFINE_MANY,

  // ==== Definition methods ====

  /**
   * Invoked when the component is mounted. Values in the mapping will be set on
   * `this.props` if that prop is not specified (i.e. using an `in` check).
   *
   * This method is invoked before `getInitialState` and therefore cannot rely
   * on `this.state` or use `this.setState`.
   *
   * @return {object}
   * @optional
   */
  getDefaultProps: SpecPolicy.DEFINE_MANY_MERGED,

  /**
   * Invoked once before the component is mounted. The return value will be used
   * as the initial value of `this.state`.
   *
   *   getInitialState: function() {
   *     return {
   *       isOn: false,
   *       fooBaz: new BazFoo()
   *     }
   *   }
   *
   * @return {object}
   * @optional
   */
  getInitialState: SpecPolicy.DEFINE_MANY_MERGED,

  /**
   * @return {object}
   * @optional
   */
  getChildContext: SpecPolicy.DEFINE_MANY_MERGED,

  /**
   * Uses props from `this.props` and state from `this.state` to render the
   * structure of the component.
   *
   * No guarantees are made about when or how often this method is invoked, so
   * it must not have side effects.
   *
   *   render: function() {
   *     var name = this.props.name;
   *     return <div>Hello, {name}!</div>;
   *   }
   *
   * @return {ReactComponent}
   * @nosideeffects
   * @required
   */
  render: SpecPolicy.DEFINE_ONCE,



  // ==== Delegate methods ====

  /**
   * Invoked when the component is initially created and about to be mounted.
   * This may have side effects, but any external subscriptions or data created
   * by this method must be cleaned up in `componentWillUnmount`.
   *
   * @optional
   */
  componentWillMount: SpecPolicy.DEFINE_MANY,

  /**
   * Invoked when the component has been mounted and has a DOM representation.
   * However, there is no guarantee that the DOM node is in the document.
   *
   * Use this as an opportunity to operate on the DOM when the component has
   * been mounted (initialized and rendered) for the first time.
   *
   * @param {DOMElement} rootNode DOM element representing the component.
   * @optional
   */
  componentDidMount: SpecPolicy.DEFINE_MANY,

  /**
   * Invoked before the component receives new props.
   *
   * Use this as an opportunity to react to a prop transition by updating the
   * state using `this.setState`. Current props are accessed via `this.props`.
   *
   *   componentWillReceiveProps: function(nextProps, nextContext) {
   *     this.setState({
   *       likesIncreasing: nextProps.likeCount > this.props.likeCount
   *     });
   *   }
   *
   * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
   * transition may cause a state change, but the opposite is not true. If you
   * need it, you are probably looking for `componentWillUpdate`.
   *
   * @param {object} nextProps
   * @optional
   */
  componentWillReceiveProps: SpecPolicy.DEFINE_MANY,

  /**
   * Invoked while deciding if the component should be updated as a result of
   * receiving new props, state and/or context.
   *
   * Use this as an opportunity to `return false` when you're certain that the
   * transition to the new props/state/context will not require a component
   * update.
   *
   *   shouldComponentUpdate: function(nextProps, nextState, nextContext) {
   *     return !equal(nextProps, this.props) ||
   *       !equal(nextState, this.state) ||
   *       !equal(nextContext, this.context);
   *   }
   *
   * @param {object} nextProps
   * @param {?object} nextState
   * @param {?object} nextContext
   * @return {boolean} True if the component should update.
   * @optional
   */
  shouldComponentUpdate: SpecPolicy.DEFINE_ONCE,

  /**
   * Invoked when the component is about to update due to a transition from
   * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
   * and `nextContext`.
   *
   * Use this as an opportunity to perform preparation before an update occurs.
   *
   * NOTE: You **cannot** use `this.setState()` in this method.
   *
   * @param {object} nextProps
   * @param {?object} nextState
   * @param {?object} nextContext
   * @param {ReactReconcileTransaction} transaction
   * @optional
   */
  componentWillUpdate: SpecPolicy.DEFINE_MANY,

  /**
   * Invoked when the component's DOM representation has been updated.
   *
   * Use this as an opportunity to operate on the DOM when the component has
   * been updated.
   *
   * @param {object} prevProps
   * @param {?object} prevState
   * @param {?object} prevContext
   * @param {DOMElement} rootNode DOM element representing the component.
   * @optional
   */
  componentDidUpdate: SpecPolicy.DEFINE_MANY,

  /**
   * Invoked when the component is about to be removed from its parent and have
   * its DOM representation destroyed.
   *
   * Use this as an opportunity to deallocate any external resources.
   *
   * NOTE: There is no `componentDidUnmount` since your component will have been
   * destroyed by that point.
   *
   * @optional
   */
  componentWillUnmount: SpecPolicy.DEFINE_MANY,



  // ==== Advanced methods ====

  /**
   * Updates the component's currently mounted DOM representation.
   *
   * By default, this implements React's rendering and reconciliation algorithm.
   * Sophisticated clients may wish to override this.
   *
   * @param {ReactReconcileTransaction} transaction
   * @internal
   * @overridable
   */
  updateComponent: SpecPolicy.OVERRIDE_BASE

};

/**
 * Mapping from class specification keys to special processing functions.
 *
 * Although these are declared like instance properties in the specification
 * when defining classes using `React.createClass`, they are actually static
 * and are accessible on the constructor instead of the prototype. Despite
 * being static, they must be defined outside of the "statics" key under
 * which all other static methods are defined.
 */
var RESERVED_SPEC_KEYS = {
  displayName: function(Constructor, displayName) {
    Constructor.displayName = displayName;
  },
  mixins: function(Constructor, mixins) {
    if (mixins) {
      for (var i = 0; i < mixins.length; i++) {
        mixSpecIntoComponent(Constructor, mixins[i]);
      }
    }
  },
  childContextTypes: function(Constructor, childContextTypes) {
    validateTypeDef(
      Constructor,
      childContextTypes,
      ReactPropTypeLocations.childContext
    );
    Constructor.childContextTypes = assign(
      {},
      Constructor.childContextTypes,
      childContextTypes
    );
  },
  contextTypes: function(Constructor, contextTypes) {
    validateTypeDef(
      Constructor,
      contextTypes,
      ReactPropTypeLocations.context
    );
    Constructor.contextTypes = assign(
      {},
      Constructor.contextTypes,
      contextTypes
    );
  },
  /**
   * Special case getDefaultProps which should move into statics but requires
   * automatic merging.
   */
  getDefaultProps: function(Constructor, getDefaultProps) {
    if (Constructor.getDefaultProps) {
      Constructor.getDefaultProps = createMergedResultFunction(
        Constructor.getDefaultProps,
        getDefaultProps
      );
    } else {
      Constructor.getDefaultProps = getDefaultProps;
    }
  },
  propTypes: function(Constructor, propTypes) {
    validateTypeDef(
      Constructor,
      propTypes,
      ReactPropTypeLocations.prop
    );
    Constructor.propTypes = assign(
      {},
      Constructor.propTypes,
      propTypes
    );
  },
  statics: function(Constructor, statics) {
    mixStaticSpecIntoComponent(Constructor, statics);
  }
};

function getDeclarationErrorAddendum(component) {
  var owner = component._owner || null;
  if (owner && owner.constructor && owner.constructor.displayName) {
    return ' Check the render method of `' + owner.constructor.displayName +
      '`.';
  }
  return '';
}

function validateTypeDef(Constructor, typeDef, location) {
  for (var propName in typeDef) {
    if (typeDef.hasOwnProperty(propName)) {
      ("production" !== "development" ? invariant(
        typeof typeDef[propName] == 'function',
        '%s: %s type `%s` is invalid; it must be a function, usually from ' +
        'React.PropTypes.',
        Constructor.displayName || 'ReactCompositeComponent',
        ReactPropTypeLocationNames[location],
        propName
      ) : invariant(typeof typeDef[propName] == 'function'));
    }
  }
}

function validateMethodOverride(proto, name) {
  var specPolicy = ReactCompositeComponentInterface.hasOwnProperty(name) ?
    ReactCompositeComponentInterface[name] :
    null;

  // Disallow overriding of base class methods unless explicitly allowed.
  if (ReactCompositeComponentMixin.hasOwnProperty(name)) {
    ("production" !== "development" ? invariant(
      specPolicy === SpecPolicy.OVERRIDE_BASE,
      'ReactCompositeComponentInterface: You are attempting to override ' +
      '`%s` from your class specification. Ensure that your method names ' +
      'do not overlap with React methods.',
      name
    ) : invariant(specPolicy === SpecPolicy.OVERRIDE_BASE));
  }

  // Disallow defining methods more than once unless explicitly allowed.
  if (proto.hasOwnProperty(name)) {
    ("production" !== "development" ? invariant(
      specPolicy === SpecPolicy.DEFINE_MANY ||
      specPolicy === SpecPolicy.DEFINE_MANY_MERGED,
      'ReactCompositeComponentInterface: You are attempting to define ' +
      '`%s` on your component more than once. This conflict may be due ' +
      'to a mixin.',
      name
    ) : invariant(specPolicy === SpecPolicy.DEFINE_MANY ||
    specPolicy === SpecPolicy.DEFINE_MANY_MERGED));
  }
}

function validateLifeCycleOnReplaceState(instance) {
  var compositeLifeCycleState = instance._compositeLifeCycleState;
  ("production" !== "development" ? invariant(
    instance.isMounted() ||
      compositeLifeCycleState === CompositeLifeCycle.MOUNTING,
    'replaceState(...): Can only update a mounted or mounting component.'
  ) : invariant(instance.isMounted() ||
    compositeLifeCycleState === CompositeLifeCycle.MOUNTING));
  ("production" !== "development" ? invariant(
    ReactCurrentOwner.current == null,
    'replaceState(...): Cannot update during an existing state transition ' +
    '(such as within `render`). Render methods should be a pure function ' +
    'of props and state.'
  ) : invariant(ReactCurrentOwner.current == null));
  ("production" !== "development" ? invariant(compositeLifeCycleState !== CompositeLifeCycle.UNMOUNTING,
    'replaceState(...): Cannot update while unmounting component. This ' +
    'usually means you called setState() on an unmounted component.'
  ) : invariant(compositeLifeCycleState !== CompositeLifeCycle.UNMOUNTING));
}

/**
 * Mixin helper which handles policy validation and reserved
 * specification keys when building `ReactCompositeComponent` classses.
 */
function mixSpecIntoComponent(Constructor, spec) {
  if (!spec) {
    return;
  }

  ("production" !== "development" ? invariant(
    !ReactLegacyElement.isValidFactory(spec),
    'ReactCompositeComponent: You\'re attempting to ' +
    'use a component class as a mixin. Instead, just use a regular object.'
  ) : invariant(!ReactLegacyElement.isValidFactory(spec)));
  ("production" !== "development" ? invariant(
    !ReactElement.isValidElement(spec),
    'ReactCompositeComponent: You\'re attempting to ' +
    'use a component as a mixin. Instead, just use a regular object.'
  ) : invariant(!ReactElement.isValidElement(spec)));

  var proto = Constructor.prototype;

  // By handling mixins before any other properties, we ensure the same
  // chaining order is applied to methods with DEFINE_MANY policy, whether
  // mixins are listed before or after these methods in the spec.
  if (spec.hasOwnProperty(MIXINS_KEY)) {
    RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
  }

  for (var name in spec) {
    if (!spec.hasOwnProperty(name)) {
      continue;
    }

    if (name === MIXINS_KEY) {
      // We have already handled mixins in a special case above
      continue;
    }

    var property = spec[name];
    validateMethodOverride(proto, name);

    if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
      RESERVED_SPEC_KEYS[name](Constructor, property);
    } else {
      // Setup methods on prototype:
      // The following member methods should not be automatically bound:
      // 1. Expected ReactCompositeComponent methods (in the "interface").
      // 2. Overridden methods (that were mixed in).
      var isCompositeComponentMethod =
        ReactCompositeComponentInterface.hasOwnProperty(name);
      var isAlreadyDefined = proto.hasOwnProperty(name);
      var markedDontBind = property && property.__reactDontBind;
      var isFunction = typeof property === 'function';
      var shouldAutoBind =
        isFunction &&
        !isCompositeComponentMethod &&
        !isAlreadyDefined &&
        !markedDontBind;

      if (shouldAutoBind) {
        if (!proto.__reactAutoBindMap) {
          proto.__reactAutoBindMap = {};
        }
        proto.__reactAutoBindMap[name] = property;
        proto[name] = property;
      } else {
        if (isAlreadyDefined) {
          var specPolicy = ReactCompositeComponentInterface[name];

          // These cases should already be caught by validateMethodOverride
          ("production" !== "development" ? invariant(
            isCompositeComponentMethod && (
              specPolicy === SpecPolicy.DEFINE_MANY_MERGED ||
              specPolicy === SpecPolicy.DEFINE_MANY
            ),
            'ReactCompositeComponent: Unexpected spec policy %s for key %s ' +
            'when mixing in component specs.',
            specPolicy,
            name
          ) : invariant(isCompositeComponentMethod && (
            specPolicy === SpecPolicy.DEFINE_MANY_MERGED ||
            specPolicy === SpecPolicy.DEFINE_MANY
          )));

          // For methods which are defined more than once, call the existing
          // methods before calling the new property, merging if appropriate.
          if (specPolicy === SpecPolicy.DEFINE_MANY_MERGED) {
            proto[name] = createMergedResultFunction(proto[name], property);
          } else if (specPolicy === SpecPolicy.DEFINE_MANY) {
            proto[name] = createChainedFunction(proto[name], property);
          }
        } else {
          proto[name] = property;
          if ("production" !== "development") {
            // Add verbose displayName to the function, which helps when looking
            // at profiling tools.
            if (typeof property === 'function' && spec.displayName) {
              proto[name].displayName = spec.displayName + '_' + name;
            }
          }
        }
      }
    }
  }
}

function mixStaticSpecIntoComponent(Constructor, statics) {
  if (!statics) {
    return;
  }
  for (var name in statics) {
    var property = statics[name];
    if (!statics.hasOwnProperty(name)) {
      continue;
    }

    var isReserved = name in RESERVED_SPEC_KEYS;
    ("production" !== "development" ? invariant(
      !isReserved,
      'ReactCompositeComponent: You are attempting to define a reserved ' +
      'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' +
      'as an instance property instead; it will still be accessible on the ' +
      'constructor.',
      name
    ) : invariant(!isReserved));

    var isInherited = name in Constructor;
    ("production" !== "development" ? invariant(
      !isInherited,
      'ReactCompositeComponent: You are attempting to define ' +
      '`%s` on your component more than once. This conflict may be ' +
      'due to a mixin.',
      name
    ) : invariant(!isInherited));
    Constructor[name] = property;
  }
}

/**
 * Merge two objects, but throw if both contain the same key.
 *
 * @param {object} one The first object, which is mutated.
 * @param {object} two The second object
 * @return {object} one after it has been mutated to contain everything in two.
 */
function mergeObjectsWithNoDuplicateKeys(one, two) {
  ("production" !== "development" ? invariant(
    one && two && typeof one === 'object' && typeof two === 'object',
    'mergeObjectsWithNoDuplicateKeys(): Cannot merge non-objects'
  ) : invariant(one && two && typeof one === 'object' && typeof two === 'object'));

  mapObject(two, function(value, key) {
    ("production" !== "development" ? invariant(
      one[key] === undefined,
      'mergeObjectsWithNoDuplicateKeys(): ' +
      'Tried to merge two objects with the same key: `%s`. This conflict ' +
      'may be due to a mixin; in particular, this may be caused by two ' +
      'getInitialState() or getDefaultProps() methods returning objects ' +
      'with clashing keys.',
      key
    ) : invariant(one[key] === undefined));
    one[key] = value;
  });
  return one;
}

/**
 * Creates a function that invokes two functions and merges their return values.
 *
 * @param {function} one Function to invoke first.
 * @param {function} two Function to invoke second.
 * @return {function} Function that invokes the two argument functions.
 * @private
 */
function createMergedResultFunction(one, two) {
  return function mergedResult() {
    var a = one.apply(this, arguments);
    var b = two.apply(this, arguments);
    if (a == null) {
      return b;
    } else if (b == null) {
      return a;
    }
    return mergeObjectsWithNoDuplicateKeys(a, b);
  };
}

/**
 * Creates a function that invokes two functions and ignores their return vales.
 *
 * @param {function} one Function to invoke first.
 * @param {function} two Function to invoke second.
 * @return {function} Function that invokes the two argument functions.
 * @private
 */
function createChainedFunction(one, two) {
  return function chainedFunction() {
    one.apply(this, arguments);
    two.apply(this, arguments);
  };
}

/**
 * `ReactCompositeComponent` maintains an auxiliary life cycle state in
 * `this._compositeLifeCycleState` (which can be null).
 *
 * This is different from the life cycle state maintained by `ReactComponent` in
 * `this._lifeCycleState`. The following diagram shows how the states overlap in
 * time. There are times when the CompositeLifeCycle is null - at those times it
 * is only meaningful to look at ComponentLifeCycle alone.
 *
 * Top Row: ReactComponent.ComponentLifeCycle
 * Low Row: ReactComponent.CompositeLifeCycle
 *
 * +-------+---------------------------------+--------+
 * |  UN   |             MOUNTED             |   UN   |
 * |MOUNTED|                                 | MOUNTED|
 * +-------+---------------------------------+--------+
 * |       ^--------+   +-------+   +--------^        |
 * |       |        |   |       |   |        |        |
 * |    0--|MOUNTING|-0-|RECEIVE|-0-|   UN   |--->0   |
 * |       |        |   |PROPS  |   |MOUNTING|        |
 * |       |        |   |       |   |        |        |
 * |       |        |   |       |   |        |        |
 * |       +--------+   +-------+   +--------+        |
 * |       |                                 |        |
 * +-------+---------------------------------+--------+
 */
var CompositeLifeCycle = keyMirror({
  /**
   * Components in the process of being mounted respond to state changes
   * differently.
   */
  MOUNTING: null,
  /**
   * Components in the process of being unmounted are guarded against state
   * changes.
   */
  UNMOUNTING: null,
  /**
   * Components that are mounted and receiving new props respond to state
   * changes differently.
   */
  RECEIVING_PROPS: null
});

/**
 * @lends {ReactCompositeComponent.prototype}
 */
var ReactCompositeComponentMixin = {

  /**
   * Base constructor for all composite component.
   *
   * @param {ReactElement} element
   * @final
   * @internal
   */
  construct: function(element) {
    // Children can be either an array or more than one argument
    ReactComponent.Mixin.construct.apply(this, arguments);
    ReactOwner.Mixin.construct.apply(this, arguments);

    this.state = null;
    this._pendingState = null;

    // This is the public post-processed context. The real context and pending
    // context lives on the element.
    this.context = null;

    this._compositeLifeCycleState = null;
  },

  /**
   * Checks whether or not this composite component is mounted.
   * @return {boolean} True if mounted, false otherwise.
   * @protected
   * @final
   */
  isMounted: function() {
    return ReactComponent.Mixin.isMounted.call(this) &&
      this._compositeLifeCycleState !== CompositeLifeCycle.MOUNTING;
  },

  /**
   * Initializes the component, renders markup, and registers event listeners.
   *
   * @param {string} rootID DOM ID of the root node.
   * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
   * @param {number} mountDepth number of components in the owner hierarchy
   * @return {?string} Rendered markup to be inserted into the DOM.
   * @final
   * @internal
   */
  mountComponent: ReactPerf.measure(
    'ReactCompositeComponent',
    'mountComponent',
    function(rootID, transaction, mountDepth) {
      ReactComponent.Mixin.mountComponent.call(
        this,
        rootID,
        transaction,
        mountDepth
      );
      this._compositeLifeCycleState = CompositeLifeCycle.MOUNTING;

      if (this.__reactAutoBindMap) {
        this._bindAutoBindMethods();
      }

      this.context = this._processContext(this._currentElement._context);
      this.props = this._processProps(this.props);

      this.state = this.getInitialState ? this.getInitialState() : null;
      ("production" !== "development" ? invariant(
        typeof this.state === 'object' && !Array.isArray(this.state),
        '%s.getInitialState(): must return an object or null',
        this.constructor.displayName || 'ReactCompositeComponent'
      ) : invariant(typeof this.state === 'object' && !Array.isArray(this.state)));

      this._pendingState = null;
      this._pendingForceUpdate = false;

      if (this.componentWillMount) {
        this.componentWillMount();
        // When mounting, calls to `setState` by `componentWillMount` will set
        // `this._pendingState` without triggering a re-render.
        if (this._pendingState) {
          this.state = this._pendingState;
          this._pendingState = null;
        }
      }

      this._renderedComponent = instantiateReactComponent(
        this._renderValidatedComponent(),
        this._currentElement.type // The wrapping type
      );

      // Done with mounting, `setState` will now trigger UI changes.
      this._compositeLifeCycleState = null;
      var markup = this._renderedComponent.mountComponent(
        rootID,
        transaction,
        mountDepth + 1
      );
      if (this.componentDidMount) {
        transaction.getReactMountReady().enqueue(this.componentDidMount, this);
      }
      return markup;
    }
  ),

  /**
   * Releases any resources allocated by `mountComponent`.
   *
   * @final
   * @internal
   */
  unmountComponent: function() {
    this._compositeLifeCycleState = CompositeLifeCycle.UNMOUNTING;
    if (this.componentWillUnmount) {
      this.componentWillUnmount();
    }
    this._compositeLifeCycleState = null;

    this._renderedComponent.unmountComponent();
    this._renderedComponent = null;

    ReactComponent.Mixin.unmountComponent.call(this);

    // Some existing components rely on this.props even after they've been
    // destroyed (in event handlers).
    // TODO: this.props = null;
    // TODO: this.state = null;
  },

  /**
   * Sets a subset of the state. Always use this or `replaceState` to mutate
   * state. You should treat `this.state` as immutable.
   *
   * There is no guarantee that `this.state` will be immediately updated, so
   * accessing `this.state` after calling this method may return the old value.
   *
   * There is no guarantee that calls to `setState` will run synchronously,
   * as they may eventually be batched together.  You can provide an optional
   * callback that will be executed when the call to setState is actually
   * completed.
   *
   * @param {object} partialState Next partial state to be merged with state.
   * @param {?function} callback Called after state is updated.
   * @final
   * @protected
   */
  setState: function(partialState, callback) {
    ("production" !== "development" ? invariant(
      typeof partialState === 'object' || partialState == null,
      'setState(...): takes an object of state variables to update.'
    ) : invariant(typeof partialState === 'object' || partialState == null));
    if ("production" !== "development"){
      ("production" !== "development" ? warning(
        partialState != null,
        'setState(...): You passed an undefined or null state object; ' +
        'instead, use forceUpdate().'
      ) : null);
    }
    // Merge with `_pendingState` if it exists, otherwise with existing state.
    this.replaceState(
      assign({}, this._pendingState || this.state, partialState),
      callback
    );
  },

  /**
   * Replaces all of the state. Always use this or `setState` to mutate state.
   * You should treat `this.state` as immutable.
   *
   * There is no guarantee that `this.state` will be immediately updated, so
   * accessing `this.state` after calling this method may return the old value.
   *
   * @param {object} completeState Next state.
   * @param {?function} callback Called after state is updated.
   * @final
   * @protected
   */
  replaceState: function(completeState, callback) {
    validateLifeCycleOnReplaceState(this);
    this._pendingState = completeState;
    if (this._compositeLifeCycleState !== CompositeLifeCycle.MOUNTING) {
      // If we're in a componentWillMount handler, don't enqueue a rerender
      // because ReactUpdates assumes we're in a browser context (which is wrong
      // for server rendering) and we're about to do a render anyway.
      // TODO: The callback here is ignored when setState is called from
      // componentWillMount. Either fix it or disallow doing so completely in
      // favor of getInitialState.
      ReactUpdates.enqueueUpdate(this, callback);
    }
  },

  /**
   * Filters the context object to only contain keys specified in
   * `contextTypes`, and asserts that they are valid.
   *
   * @param {object} context
   * @return {?object}
   * @private
   */
  _processContext: function(context) {
    var maskedContext = null;
    var contextTypes = this.constructor.contextTypes;
    if (contextTypes) {
      maskedContext = {};
      for (var contextName in contextTypes) {
        maskedContext[contextName] = context[contextName];
      }
      if ("production" !== "development") {
        this._checkPropTypes(
          contextTypes,
          maskedContext,
          ReactPropTypeLocations.context
        );
      }
    }
    return maskedContext;
  },

  /**
   * @param {object} currentContext
   * @return {object}
   * @private
   */
  _processChildContext: function(currentContext) {
    var childContext = this.getChildContext && this.getChildContext();
    var displayName = this.constructor.displayName || 'ReactCompositeComponent';
    if (childContext) {
      ("production" !== "development" ? invariant(
        typeof this.constructor.childContextTypes === 'object',
        '%s.getChildContext(): childContextTypes must be defined in order to ' +
        'use getChildContext().',
        displayName
      ) : invariant(typeof this.constructor.childContextTypes === 'object'));
      if ("production" !== "development") {
        this._checkPropTypes(
          this.constructor.childContextTypes,
          childContext,
          ReactPropTypeLocations.childContext
        );
      }
      for (var name in childContext) {
        ("production" !== "development" ? invariant(
          name in this.constructor.childContextTypes,
          '%s.getChildContext(): key "%s" is not defined in childContextTypes.',
          displayName,
          name
        ) : invariant(name in this.constructor.childContextTypes));
      }
      return assign({}, currentContext, childContext);
    }
    return currentContext;
  },

  /**
   * Processes props by setting default values for unspecified props and
   * asserting that the props are valid. Does not mutate its argument; returns
   * a new props object with defaults merged in.
   *
   * @param {object} newProps
   * @return {object}
   * @private
   */
  _processProps: function(newProps) {
    if ("production" !== "development") {
      var propTypes = this.constructor.propTypes;
      if (propTypes) {
        this._checkPropTypes(propTypes, newProps, ReactPropTypeLocations.prop);
      }
    }
    return newProps;
  },

  /**
   * Assert that the props are valid
   *
   * @param {object} propTypes Map of prop name to a ReactPropType
   * @param {object} props
   * @param {string} location e.g. "prop", "context", "child context"
   * @private
   */
  _checkPropTypes: function(propTypes, props, location) {
    // TODO: Stop validating prop types here and only use the element
    // validation.
    var componentName = this.constructor.displayName;
    for (var propName in propTypes) {
      if (propTypes.hasOwnProperty(propName)) {
        var error =
          propTypes[propName](props, propName, componentName, location);
        if (error instanceof Error) {
          // We may want to extend this logic for similar errors in
          // renderComponent calls, so I'm abstracting it away into
          // a function to minimize refactoring in the future
          var addendum = getDeclarationErrorAddendum(this);
          ("production" !== "development" ? warning(false, error.message + addendum) : null);
        }
      }
    }
  },

  /**
   * If any of `_pendingElement`, `_pendingState`, or `_pendingForceUpdate`
   * is set, update the component.
   *
   * @param {ReactReconcileTransaction} transaction
   * @internal
   */
  performUpdateIfNecessary: function(transaction) {
    var compositeLifeCycleState = this._compositeLifeCycleState;
    // Do not trigger a state transition if we are in the middle of mounting or
    // receiving props because both of those will already be doing this.
    if (compositeLifeCycleState === CompositeLifeCycle.MOUNTING ||
        compositeLifeCycleState === CompositeLifeCycle.RECEIVING_PROPS) {
      return;
    }

    if (this._pendingElement == null &&
        this._pendingState == null &&
        !this._pendingForceUpdate) {
      return;
    }

    var nextContext = this.context;
    var nextProps = this.props;
    var nextElement = this._currentElement;
    if (this._pendingElement != null) {
      nextElement = this._pendingElement;
      nextContext = this._processContext(nextElement._context);
      nextProps = this._processProps(nextElement.props);
      this._pendingElement = null;

      this._compositeLifeCycleState = CompositeLifeCycle.RECEIVING_PROPS;
      if (this.componentWillReceiveProps) {
        this.componentWillReceiveProps(nextProps, nextContext);
      }
    }

    this._compositeLifeCycleState = null;

    var nextState = this._pendingState || this.state;
    this._pendingState = null;

    var shouldUpdate =
      this._pendingForceUpdate ||
      !this.shouldComponentUpdate ||
      this.shouldComponentUpdate(nextProps, nextState, nextContext);

    if ("production" !== "development") {
      if (typeof shouldUpdate === "undefined") {
        console.warn(
          (this.constructor.displayName || 'ReactCompositeComponent') +
          '.shouldComponentUpdate(): Returned undefined instead of a ' +
          'boolean value. Make sure to return true or false.'
        );
      }
    }

    if (shouldUpdate) {
      this._pendingForceUpdate = false;
      // Will set `this.props`, `this.state` and `this.context`.
      this._performComponentUpdate(
        nextElement,
        nextProps,
        nextState,
        nextContext,
        transaction
      );
    } else {
      // If it's determined that a component should not update, we still want
      // to set props and state.
      this._currentElement = nextElement;
      this.props = nextProps;
      this.state = nextState;
      this.context = nextContext;

      // Owner cannot change because shouldUpdateReactComponent doesn't allow
      // it. TODO: Remove this._owner completely.
      this._owner = nextElement._owner;
    }
  },

  /**
   * Merges new props and state, notifies delegate methods of update and
   * performs update.
   *
   * @param {ReactElement} nextElement Next element
   * @param {object} nextProps Next public object to set as properties.
   * @param {?object} nextState Next object to set as state.
   * @param {?object} nextContext Next public object to set as context.
   * @param {ReactReconcileTransaction} transaction
   * @private
   */
  _performComponentUpdate: function(
    nextElement,
    nextProps,
    nextState,
    nextContext,
    transaction
  ) {
    var prevElement = this._currentElement;
    var prevProps = this.props;
    var prevState = this.state;
    var prevContext = this.context;

    if (this.componentWillUpdate) {
      this.componentWillUpdate(nextProps, nextState, nextContext);
    }

    this._currentElement = nextElement;
    this.props = nextProps;
    this.state = nextState;
    this.context = nextContext;

    // Owner cannot change because shouldUpdateReactComponent doesn't allow
    // it. TODO: Remove this._owner completely.
    this._owner = nextElement._owner;

    this.updateComponent(
      transaction,
      prevElement
    );

    if (this.componentDidUpdate) {
      transaction.getReactMountReady().enqueue(
        this.componentDidUpdate.bind(this, prevProps, prevState, prevContext),
        this
      );
    }
  },

  receiveComponent: function(nextElement, transaction) {
    if (nextElement === this._currentElement &&
        nextElement._owner != null) {
      // Since elements are immutable after the owner is rendered,
      // we can do a cheap identity compare here to determine if this is a
      // superfluous reconcile. It's possible for state to be mutable but such
      // change should trigger an update of the owner which would recreate
      // the element. We explicitly check for the existence of an owner since
      // it's possible for a element created outside a composite to be
      // deeply mutated and reused.
      return;
    }

    ReactComponent.Mixin.receiveComponent.call(
      this,
      nextElement,
      transaction
    );
  },

  /**
   * Updates the component's currently mounted DOM representation.
   *
   * By default, this implements React's rendering and reconciliation algorithm.
   * Sophisticated clients may wish to override this.
   *
   * @param {ReactReconcileTransaction} transaction
   * @param {ReactElement} prevElement
   * @internal
   * @overridable
   */
  updateComponent: ReactPerf.measure(
    'ReactCompositeComponent',
    'updateComponent',
    function(transaction, prevParentElement) {
      ReactComponent.Mixin.updateComponent.call(
        this,
        transaction,
        prevParentElement
      );

      var prevComponentInstance = this._renderedComponent;
      var prevElement = prevComponentInstance._currentElement;
      var nextElement = this._renderValidatedComponent();
      if (shouldUpdateReactComponent(prevElement, nextElement)) {
        prevComponentInstance.receiveComponent(nextElement, transaction);
      } else {
        // These two IDs are actually the same! But nothing should rely on that.
        var thisID = this._rootNodeID;
        var prevComponentID = prevComponentInstance._rootNodeID;
        prevComponentInstance.unmountComponent();
        this._renderedComponent = instantiateReactComponent(
          nextElement,
          this._currentElement.type
        );
        var nextMarkup = this._renderedComponent.mountComponent(
          thisID,
          transaction,
          this._mountDepth + 1
        );
        ReactComponent.BackendIDOperations.dangerouslyReplaceNodeWithMarkupByID(
          prevComponentID,
          nextMarkup
        );
      }
    }
  ),

  /**
   * Forces an update. This should only be invoked when it is known with
   * certainty that we are **not** in a DOM transaction.
   *
   * You may want to call this when you know that some deeper aspect of the
   * component's state has changed but `setState` was not called.
   *
   * This will not invoke `shouldUpdateComponent`, but it will invoke
   * `componentWillUpdate` and `componentDidUpdate`.
   *
   * @param {?function} callback Called after update is complete.
   * @final
   * @protected
   */
  forceUpdate: function(callback) {
    var compositeLifeCycleState = this._compositeLifeCycleState;
    ("production" !== "development" ? invariant(
      this.isMounted() ||
        compositeLifeCycleState === CompositeLifeCycle.MOUNTING,
      'forceUpdate(...): Can only force an update on mounted or mounting ' +
        'components.'
    ) : invariant(this.isMounted() ||
      compositeLifeCycleState === CompositeLifeCycle.MOUNTING));
    ("production" !== "development" ? invariant(
      compositeLifeCycleState !== CompositeLifeCycle.UNMOUNTING &&
      ReactCurrentOwner.current == null,
      'forceUpdate(...): Cannot force an update while unmounting component ' +
      'or within a `render` function.'
    ) : invariant(compositeLifeCycleState !== CompositeLifeCycle.UNMOUNTING &&
    ReactCurrentOwner.current == null));
    this._pendingForceUpdate = true;
    ReactUpdates.enqueueUpdate(this, callback);
  },

  /**
   * @private
   */
  _renderValidatedComponent: ReactPerf.measure(
    'ReactCompositeComponent',
    '_renderValidatedComponent',
    function() {
      var renderedComponent;
      var previousContext = ReactContext.current;
      ReactContext.current = this._processChildContext(
        this._currentElement._context
      );
      ReactCurrentOwner.current = this;
      try {
        renderedComponent = this.render();
        if (renderedComponent === null || renderedComponent === false) {
          renderedComponent = ReactEmptyComponent.getEmptyComponent();
          ReactEmptyComponent.registerNullComponentID(this._rootNodeID);
        } else {
          ReactEmptyComponent.deregisterNullComponentID(this._rootNodeID);
        }
      } finally {
        ReactContext.current = previousContext;
        ReactCurrentOwner.current = null;
      }
      ("production" !== "development" ? invariant(
        ReactElement.isValidElement(renderedComponent),
        '%s.render(): A valid ReactComponent must be returned. You may have ' +
          'returned undefined, an array or some other invalid object.',
        this.constructor.displayName || 'ReactCompositeComponent'
      ) : invariant(ReactElement.isValidElement(renderedComponent)));
      return renderedComponent;
    }
  ),

  /**
   * @private
   */
  _bindAutoBindMethods: function() {
    for (var autoBindKey in this.__reactAutoBindMap) {
      if (!this.__reactAutoBindMap.hasOwnProperty(autoBindKey)) {
        continue;
      }
      var method = this.__reactAutoBindMap[autoBindKey];
      this[autoBindKey] = this._bindAutoBindMethod(ReactErrorUtils.guard(
        method,
        this.constructor.displayName + '.' + autoBindKey
      ));
    }
  },

  /**
   * Binds a method to the component.
   *
   * @param {function} method Method to be bound.
   * @private
   */
  _bindAutoBindMethod: function(method) {
    var component = this;
    var boundMethod = method.bind(component);
    if ("production" !== "development") {
      boundMethod.__reactBoundContext = component;
      boundMethod.__reactBoundMethod = method;
      boundMethod.__reactBoundArguments = null;
      var componentName = component.constructor.displayName;
      var _bind = boundMethod.bind;
      boundMethod.bind = function(newThis ) {for (var args=[],$__0=1,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]);
        // User is trying to bind() an autobound method; we effectively will
        // ignore the value of "this" that the user is trying to use, so
        // let's warn.
        if (newThis !== component && newThis !== null) {
          monitorCodeUse('react_bind_warning', { component: componentName });
          console.warn(
            'bind(): React component methods may only be bound to the ' +
            'component instance. See ' + componentName
          );
        } else if (!args.length) {
          monitorCodeUse('react_bind_warning', { component: componentName });
          console.warn(
            'bind(): You are binding a component method to the component. ' +
            'React does this for you automatically in a high-performance ' +
            'way, so you can safely remove this call. See ' + componentName
          );
          return boundMethod;
        }
        var reboundMethod = _bind.apply(boundMethod, arguments);
        reboundMethod.__reactBoundContext = component;
        reboundMethod.__reactBoundMethod = method;
        reboundMethod.__reactBoundArguments = args;
        return reboundMethod;
      };
    }
    return boundMethod;
  }
};

var ReactCompositeComponentBase = function() {};
assign(
  ReactCompositeComponentBase.prototype,
  ReactComponent.Mixin,
  ReactOwner.Mixin,
  ReactPropTransferer.Mixin,
  ReactCompositeComponentMixin
);

/**
 * Module for creating composite components.
 *
 * @class ReactCompositeComponent
 * @extends ReactComponent
 * @extends ReactOwner
 * @extends ReactPropTransferer
 */
var ReactCompositeComponent = {

  LifeCycle: CompositeLifeCycle,

  Base: ReactCompositeComponentBase,

  /**
   * Creates a composite component class given a class specification.
   *
   * @param {object} spec Class specification (which must define `render`).
   * @return {function} Component constructor function.
   * @public
   */
  createClass: function(spec) {
    var Constructor = function(props) {
      // This constructor is overridden by mocks. The argument is used
      // by mocks to assert on what gets mounted. This will later be used
      // by the stand-alone class implementation.
    };
    Constructor.prototype = new ReactCompositeComponentBase();
    Constructor.prototype.constructor = Constructor;

    injectedMixins.forEach(
      mixSpecIntoComponent.bind(null, Constructor)
    );

    mixSpecIntoComponent(Constructor, spec);

    // Initialize the defaultProps property after all mixins have been merged
    if (Constructor.getDefaultProps) {
      Constructor.defaultProps = Constructor.getDefaultProps();
    }

    ("production" !== "development" ? invariant(
      Constructor.prototype.render,
      'createClass(...): Class specification must implement a `render` method.'
    ) : invariant(Constructor.prototype.render));

    if ("production" !== "development") {
      if (Constructor.prototype.componentShouldUpdate) {
        monitorCodeUse(
          'react_component_should_update_warning',
          { component: spec.displayName }
        );
        console.warn(
          (spec.displayName || 'A component') + ' has a method called ' +
          'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +
          'The name is phrased as a question because the function is ' +
          'expected to return a value.'
         );
      }
    }

    // Reduce time spent doing lookups by setting these on the prototype.
    for (var methodName in ReactCompositeComponentInterface) {
      if (!Constructor.prototype[methodName]) {
        Constructor.prototype[methodName] = null;
      }
    }

    if ("production" !== "development") {
      return ReactLegacyElement.wrapFactory(
        ReactElementValidator.createFactory(Constructor)
      );
    }
    return ReactLegacyElement.wrapFactory(
      ReactElement.createFactory(Constructor)
    );
  },

  injection: {
    injectMixin: function(mixin) {
      injectedMixins.push(mixin);
    }
  }
};

module.exports = ReactCompositeComponent;

},{"./Object.assign":27,"./ReactComponent":32,"./ReactContext":35,"./ReactCurrentOwner":36,"./ReactElement":52,"./ReactElementValidator":53,"./ReactEmptyComponent":54,"./ReactErrorUtils":55,"./ReactLegacyElement":61,"./ReactOwner":67,"./ReactPerf":68,"./ReactPropTransferer":69,"./ReactPropTypeLocationNames":70,"./ReactPropTypeLocations":71,"./ReactUpdates":79,"./instantiateReactComponent":125,"./invariant":126,"./keyMirror":132,"./keyOf":133,"./mapObject":134,"./monitorCodeUse":136,"./shouldUpdateReactComponent":142,"./warning":145}],35:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactContext
 */

"use strict";

var assign = _dereq_("./Object.assign");

/**
 * Keeps track of the current context.
 *
 * The context is automatically passed down the component ownership hierarchy
 * and is accessible via `this.context` on ReactCompositeComponents.
 */
var ReactContext = {

  /**
   * @internal
   * @type {object}
   */
  current: {},

  /**
   * Temporarily extends the current context while executing scopedCallback.
   *
   * A typical use case might look like
   *
   *  render: function() {
   *    var children = ReactContext.withContext({foo: 'foo'}, () => (
   *
   *    ));
   *    return <div>{children}</div>;
   *  }
   *
   * @param {object} newContext New context to merge into the existing context
   * @param {function} scopedCallback Callback to run with the new context
   * @return {ReactComponent|array<ReactComponent>}
   */
  withContext: function(newContext, scopedCallback) {
    var result;
    var previousContext = ReactContext.current;
    ReactContext.current = assign({}, previousContext, newContext);
    try {
      result = scopedCallback();
    } finally {
      ReactContext.current = previousContext;
    }
    return result;
  }

};

module.exports = ReactContext;

},{"./Object.assign":27}],36:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactCurrentOwner
 */

"use strict";

/**
 * Keeps track of the current owner.
 *
 * The current owner is the component who should own any components that are
 * currently being constructed.
 *
 * The depth indicate how many composite components are above this render level.
 */
var ReactCurrentOwner = {

  /**
   * @internal
   * @type {ReactComponent}
   */
  current: null

};

module.exports = ReactCurrentOwner;

},{}],37:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactDOM
 * @typechecks static-only
 */

"use strict";

var ReactElement = _dereq_("./ReactElement");
var ReactElementValidator = _dereq_("./ReactElementValidator");
var ReactLegacyElement = _dereq_("./ReactLegacyElement");

var mapObject = _dereq_("./mapObject");

/**
 * Create a factory that creates HTML tag elements.
 *
 * @param {string} tag Tag name (e.g. `div`).
 * @private
 */
function createDOMFactory(tag) {
  if ("production" !== "development") {
    return ReactLegacyElement.markNonLegacyFactory(
      ReactElementValidator.createFactory(tag)
    );
  }
  return ReactLegacyElement.markNonLegacyFactory(
    ReactElement.createFactory(tag)
  );
}

/**
 * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.
 * This is also accessible via `React.DOM`.
 *
 * @public
 */
var ReactDOM = mapObject({
  a: 'a',
  abbr: 'abbr',
  address: 'address',
  area: 'area',
  article: 'article',
  aside: 'aside',
  audio: 'audio',
  b: 'b',
  base: 'base',
  bdi: 'bdi',
  bdo: 'bdo',
  big: 'big',
  blockquote: 'blockquote',
  body: 'body',
  br: 'br',
  button: 'button',
  canvas: 'canvas',
  caption: 'caption',
  cite: 'cite',
  code: 'code',
  col: 'col',
  colgroup: 'colgroup',
  data: 'data',
  datalist: 'datalist',
  dd: 'dd',
  del: 'del',
  details: 'details',
  dfn: 'dfn',
  dialog: 'dialog',
  div: 'div',
  dl: 'dl',
  dt: 'dt',
  em: 'em',
  embed: 'embed',
  fieldset: 'fieldset',
  figcaption: 'figcaption',
  figure: 'figure',
  footer: 'footer',
  form: 'form',
  h1: 'h1',
  h2: 'h2',
  h3: 'h3',
  h4: 'h4',
  h5: 'h5',
  h6: 'h6',
  head: 'head',
  header: 'header',
  hr: 'hr',
  html: 'html',
  i: 'i',
  iframe: 'iframe',
  img: 'img',
  input: 'input',
  ins: 'ins',
  kbd: 'kbd',
  keygen: 'keygen',
  label: 'label',
  legend: 'legend',
  li: 'li',
  link: 'link',
  main: 'main',
  map: 'map',
  mark: 'mark',
  menu: 'menu',
  menuitem: 'menuitem',
  meta: 'meta',
  meter: 'meter',
  nav: 'nav',
  noscript: 'noscript',
  object: 'object',
  ol: 'ol',
  optgroup: 'optgroup',
  option: 'option',
  output: 'output',
  p: 'p',
  param: 'param',
  picture: 'picture',
  pre: 'pre',
  progress: 'progress',
  q: 'q',
  rp: 'rp',
  rt: 'rt',
  ruby: 'ruby',
  s: 's',
  samp: 'samp',
  script: 'script',
  section: 'section',
  select: 'select',
  small: 'small',
  source: 'source',
  span: 'span',
  strong: 'strong',
  style: 'style',
  sub: 'sub',
  summary: 'summary',
  sup: 'sup',
  table: 'table',
  tbody: 'tbody',
  td: 'td',
  textarea: 'textarea',
  tfoot: 'tfoot',
  th: 'th',
  thead: 'thead',
  time: 'time',
  title: 'title',
  tr: 'tr',
  track: 'track',
  u: 'u',
  ul: 'ul',
  'var': 'var',
  video: 'video',
  wbr: 'wbr',

  // SVG
  circle: 'circle',
  defs: 'defs',
  ellipse: 'ellipse',
  g: 'g',
  line: 'line',
  linearGradient: 'linearGradient',
  mask: 'mask',
  path: 'path',
  pattern: 'pattern',
  polygon: 'polygon',
  polyline: 'polyline',
  radialGradient: 'radialGradient',
  rect: 'rect',
  stop: 'stop',
  svg: 'svg',
  text: 'text',
  tspan: 'tspan'

}, createDOMFactory);

module.exports = ReactDOM;

},{"./ReactElement":52,"./ReactElementValidator":53,"./ReactLegacyElement":61,"./mapObject":134}],38:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactDOMButton
 */

"use strict";

var AutoFocusMixin = _dereq_("./AutoFocusMixin");
var ReactBrowserComponentMixin = _dereq_("./ReactBrowserComponentMixin");
var ReactCompositeComponent = _dereq_("./ReactCompositeComponent");
var ReactElement = _dereq_("./ReactElement");
var ReactDOM = _dereq_("./ReactDOM");

var keyMirror = _dereq_("./keyMirror");

// Store a reference to the <button> `ReactDOMComponent`. TODO: use string
var button = ReactElement.createFactory(ReactDOM.button.type);

var mouseListenerNames = keyMirror({
  onClick: true,
  onDoubleClick: true,
  onMouseDown: true,
  onMouseMove: true,
  onMouseUp: true,
  onClickCapture: true,
  onDoubleClickCapture: true,
  onMouseDownCapture: true,
  onMouseMoveCapture: true,
  onMouseUpCapture: true
});

/**
 * Implements a <button> native component that does not receive mouse events
 * when `disabled` is set.
 */
var ReactDOMButton = ReactCompositeComponent.createClass({
  displayName: 'ReactDOMButton',

  mixins: [AutoFocusMixin, ReactBrowserComponentMixin],

  render: function() {
    var props = {};

    // Copy the props; except the mouse listeners if we're disabled
    for (var key in this.props) {
      if (this.props.hasOwnProperty(key) &&
          (!this.props.disabled || !mouseListenerNames[key])) {
        props[key] = this.props[key];
      }
    }

    return button(props, this.props.children);
  }

});

module.exports = ReactDOMButton;

},{"./AutoFocusMixin":2,"./ReactBrowserComponentMixin":29,"./ReactCompositeComponent":34,"./ReactDOM":37,"./ReactElement":52,"./keyMirror":132}],39:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactDOMComponent
 * @typechecks static-only
 */

"use strict";

var CSSPropertyOperations = _dereq_("./CSSPropertyOperations");
var DOMProperty = _dereq_("./DOMProperty");
var DOMPropertyOperations = _dereq_("./DOMPropertyOperations");
var ReactBrowserComponentMixin = _dereq_("./ReactBrowserComponentMixin");
var ReactComponent = _dereq_("./ReactComponent");
var ReactBrowserEventEmitter = _dereq_("./ReactBrowserEventEmitter");
var ReactMount = _dereq_("./ReactMount");
var ReactMultiChild = _dereq_("./ReactMultiChild");
var ReactPerf = _dereq_("./ReactPerf");

var assign = _dereq_("./Object.assign");
var escapeTextForBrowser = _dereq_("./escapeTextForBrowser");
var invariant = _dereq_("./invariant");
var isEventSupported = _dereq_("./isEventSupported");
var keyOf = _dereq_("./keyOf");
var monitorCodeUse = _dereq_("./monitorCodeUse");

var deleteListener = ReactBrowserEventEmitter.deleteListener;
var listenTo = ReactBrowserEventEmitter.listenTo;
var registrationNameModules = ReactBrowserEventEmitter.registrationNameModules;

// For quickly matching children type, to test if can be treated as content.
var CONTENT_TYPES = {'string': true, 'number': true};

var STYLE = keyOf({style: null});

var ELEMENT_NODE_TYPE = 1;

/**
 * @param {?object} props
 */
function assertValidProps(props) {
  if (!props) {
    return;
  }
  // Note the use of `==` which checks for null or undefined.
  ("production" !== "development" ? invariant(
    props.children == null || props.dangerouslySetInnerHTML == null,
    'Can only set one of `children` or `props.dangerouslySetInnerHTML`.'
  ) : invariant(props.children == null || props.dangerouslySetInnerHTML == null));
  if ("production" !== "development") {
    if (props.contentEditable && props.children != null) {
      console.warn(
        'A component is `contentEditable` and contains `children` managed by ' +
        'React. It is now your responsibility to guarantee that none of those '+
        'nodes are unexpectedly modified or duplicated. This is probably not ' +
        'intentional.'
      );
    }
  }
  ("production" !== "development" ? invariant(
    props.style == null || typeof props.style === 'object',
    'The `style` prop expects a mapping from style properties to values, ' +
    'not a string.'
  ) : invariant(props.style == null || typeof props.style === 'object'));
}

function putListener(id, registrationName, listener, transaction) {
  if ("production" !== "development") {
    // IE8 has no API for event capturing and the `onScroll` event doesn't
    // bubble.
    if (registrationName === 'onScroll' &&
        !isEventSupported('scroll', true)) {
      monitorCodeUse('react_no_scroll_event');
      console.warn('This browser doesn\'t support the `onScroll` event');
    }
  }
  var container = ReactMount.findReactContainerForID(id);
  if (container) {
    var doc = container.nodeType === ELEMENT_NODE_TYPE ?
      container.ownerDocument :
      container;
    listenTo(registrationName, doc);
  }
  transaction.getPutListenerQueue().enqueuePutListener(
    id,
    registrationName,
    listener
  );
}

// For HTML, certain tags should omit their close tag. We keep a whitelist for
// those special cased tags.

var omittedCloseTags = {
  'area': true,
  'base': true,
  'br': true,
  'col': true,
  'embed': true,
  'hr': true,
  'img': true,
  'input': true,
  'keygen': true,
  'link': true,
  'meta': true,
  'param': true,
  'source': true,
  'track': true,
  'wbr': true
  // NOTE: menuitem's close tag should be omitted, but that causes problems.
};

// We accept any tag to be rendered but since this gets injected into abitrary
// HTML, we want to make sure that it's a safe tag.
// http://www.w3.org/TR/REC-xml/#NT-Name

var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset
var validatedTagCache = {};
var hasOwnProperty = {}.hasOwnProperty;

function validateDangerousTag(tag) {
  if (!hasOwnProperty.call(validatedTagCache, tag)) {
    ("production" !== "development" ? invariant(VALID_TAG_REGEX.test(tag), 'Invalid tag: %s', tag) : invariant(VALID_TAG_REGEX.test(tag)));
    validatedTagCache[tag] = true;
  }
}

/**
 * Creates a new React class that is idempotent and capable of containing other
 * React components. It accepts event listeners and DOM properties that are
 * valid according to `DOMProperty`.
 *
 *  - Event listeners: `onClick`, `onMouseDown`, etc.
 *  - DOM properties: `className`, `name`, `title`, etc.
 *
 * The `style` property functions differently from the DOM API. It accepts an
 * object mapping of style properties to values.
 *
 * @constructor ReactDOMComponent
 * @extends ReactComponent
 * @extends ReactMultiChild
 */
function ReactDOMComponent(tag) {
  validateDangerousTag(tag);
  this._tag = tag;
  this.tagName = tag.toUpperCase();
}

ReactDOMComponent.displayName = 'ReactDOMComponent';

ReactDOMComponent.Mixin = {

  /**
   * Generates root tag markup then recurses. This method has side effects and
   * is not idempotent.
   *
   * @internal
   * @param {string} rootID The root DOM ID for this node.
   * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
   * @param {number} mountDepth number of components in the owner hierarchy
   * @return {string} The computed markup.
   */
  mountComponent: ReactPerf.measure(
    'ReactDOMComponent',
    'mountComponent',
    function(rootID, transaction, mountDepth) {
      ReactComponent.Mixin.mountComponent.call(
        this,
        rootID,
        transaction,
        mountDepth
      );
      assertValidProps(this.props);
      var closeTag = omittedCloseTags[this._tag] ? '' : '</' + this._tag + '>';
      return (
        this._createOpenTagMarkupAndPutListeners(transaction) +
        this._createContentMarkup(transaction) +
        closeTag
      );
    }
  ),

  /**
   * Creates markup for the open tag and all attributes.
   *
   * This method has side effects because events get registered.
   *
   * Iterating over object properties is faster than iterating over arrays.
   * @see http://jsperf.com/obj-vs-arr-iteration
   *
   * @private
   * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
   * @return {string} Markup of opening tag.
   */
  _createOpenTagMarkupAndPutListeners: function(transaction) {
    var props = this.props;
    var ret = '<' + this._tag;

    for (var propKey in props) {
      if (!props.hasOwnProperty(propKey)) {
        continue;
      }
      var propValue = props[propKey];
      if (propValue == null) {
        continue;
      }
      if (registrationNameModules.hasOwnProperty(propKey)) {
        putListener(this._rootNodeID, propKey, propValue, transaction);
      } else {
        if (propKey === STYLE) {
          if (propValue) {
            propValue = props.style = assign({}, props.style);
          }
          propValue = CSSPropertyOperations.createMarkupForStyles(propValue);
        }
        var markup =
          DOMPropertyOperations.createMarkupForProperty(propKey, propValue);
        if (markup) {
          ret += ' ' + markup;
        }
      }
    }

    // For static pages, no need to put React ID and checksum. Saves lots of
    // bytes.
    if (transaction.renderToStaticMarkup) {
      return ret + '>';
    }

    var markupForID = DOMPropertyOperations.createMarkupForID(this._rootNodeID);
    return ret + ' ' + markupForID + '>';
  },

  /**
   * Creates markup for the content between the tags.
   *
   * @private
   * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
   * @return {string} Content markup.
   */
  _createContentMarkup: function(transaction) {
    // Intentional use of != to avoid catching zero/false.
    var innerHTML = this.props.dangerouslySetInnerHTML;
    if (innerHTML != null) {
      if (innerHTML.__html != null) {
        return innerHTML.__html;
      }
    } else {
      var contentToUse =
        CONTENT_TYPES[typeof this.props.children] ? this.props.children : null;
      var childrenToUse = contentToUse != null ? null : this.props.children;
      if (contentToUse != null) {
        return escapeTextForBrowser(contentToUse);
      } else if (childrenToUse != null) {
        var mountImages = this.mountChildren(
          childrenToUse,
          transaction
        );
        return mountImages.join('');
      }
    }
    return '';
  },

  receiveComponent: function(nextElement, transaction) {
    if (nextElement === this._currentElement &&
        nextElement._owner != null) {
      // Since elements are immutable after the owner is rendered,
      // we can do a cheap identity compare here to determine if this is a
      // superfluous reconcile. It's possible for state to be mutable but such
      // change should trigger an update of the owner which would recreate
      // the element. We explicitly check for the existence of an owner since
      // it's possible for a element created outside a composite to be
      // deeply mutated and reused.
      return;
    }

    ReactComponent.Mixin.receiveComponent.call(
      this,
      nextElement,
      transaction
    );
  },

  /**
   * Updates a native DOM component after it has already been allocated and
   * attached to the DOM. Reconciles the root DOM node, then recurses.
   *
   * @param {ReactReconcileTransaction} transaction
   * @param {ReactElement} prevElement
   * @internal
   * @overridable
   */
  updateComponent: ReactPerf.measure(
    'ReactDOMComponent',
    'updateComponent',
    function(transaction, prevElement) {
      assertValidProps(this._currentElement.props);
      ReactComponent.Mixin.updateComponent.call(
        this,
        transaction,
        prevElement
      );
      this._updateDOMProperties(prevElement.props, transaction);
      this._updateDOMChildren(prevElement.props, transaction);
    }
  ),

  /**
   * Reconciles the properties by detecting differences in property values and
   * updating the DOM as necessary. This function is probably the single most
   * critical path for performance optimization.
   *
   * TODO: Benchmark whether checking for changed values in memory actually
   *       improves performance (especially statically positioned elements).
   * TODO: Benchmark the effects of putting this at the top since 99% of props
   *       do not change for a given reconciliation.
   * TODO: Benchmark areas that can be improved with caching.
   *
   * @private
   * @param {object} lastProps
   * @param {ReactReconcileTransaction} transaction
   */
  _updateDOMProperties: function(lastProps, transaction) {
    var nextProps = this.props;
    var propKey;
    var styleName;
    var styleUpdates;
    for (propKey in lastProps) {
      if (nextProps.hasOwnProperty(propKey) ||
         !lastProps.hasOwnProperty(propKey)) {
        continue;
      }
      if (propKey === STYLE) {
        var lastStyle = lastProps[propKey];
        for (styleName in lastStyle) {
          if (lastStyle.hasOwnProperty(styleName)) {
            styleUpdates = styleUpdates || {};
            styleUpdates[styleName] = '';
          }
        }
      } else if (registrationNameModules.hasOwnProperty(propKey)) {
        deleteListener(this._rootNodeID, propKey);
      } else if (
          DOMProperty.isStandardName[propKey] ||
          DOMProperty.isCustomAttribute(propKey)) {
        ReactComponent.BackendIDOperations.deletePropertyByID(
          this._rootNodeID,
          propKey
        );
      }
    }
    for (propKey in nextProps) {
      var nextProp = nextProps[propKey];
      var lastProp = lastProps[propKey];
      if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp) {
        continue;
      }
      if (propKey === STYLE) {
        if (nextProp) {
          nextProp = nextProps.style = assign({}, nextProp);
        }
        if (lastProp) {
          // Unset styles on `lastProp` but not on `nextProp`.
          for (styleName in lastProp) {
            if (lastProp.hasOwnProperty(styleName) &&
                (!nextProp || !nextProp.hasOwnProperty(styleName))) {
              styleUpdates = styleUpdates || {};
              styleUpdates[styleName] = '';
            }
          }
          // Update styles that changed since `lastProp`.
          for (styleName in nextProp) {
            if (nextProp.hasOwnProperty(styleName) &&
                lastProp[styleName] !== nextProp[styleName]) {
              styleUpdates = styleUpdates || {};
              styleUpdates[styleName] = nextProp[styleName];
            }
          }
        } else {
          // Relies on `updateStylesByID` not mutating `styleUpdates`.
          styleUpdates = nextProp;
        }
      } else if (registrationNameModules.hasOwnProperty(propKey)) {
        putListener(this._rootNodeID, propKey, nextProp, transaction);
      } else if (
          DOMProperty.isStandardName[propKey] ||
          DOMProperty.isCustomAttribute(propKey)) {
        ReactComponent.BackendIDOperations.updatePropertyByID(
          this._rootNodeID,
          propKey,
          nextProp
        );
      }
    }
    if (styleUpdates) {
      ReactComponent.BackendIDOperations.updateStylesByID(
        this._rootNodeID,
        styleUpdates
      );
    }
  },

  /**
   * Reconciles the children with the various properties that affect the
   * children content.
   *
   * @param {object} lastProps
   * @param {ReactReconcileTransaction} transaction
   */
  _updateDOMChildren: function(lastProps, transaction) {
    var nextProps = this.props;

    var lastContent =
      CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null;
    var nextContent =
      CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null;

    var lastHtml =
      lastProps.dangerouslySetInnerHTML &&
      lastProps.dangerouslySetInnerHTML.__html;
    var nextHtml =
      nextProps.dangerouslySetInnerHTML &&
      nextProps.dangerouslySetInnerHTML.__html;

    // Note the use of `!=` which checks for null or undefined.
    var lastChildren = lastContent != null ? null : lastProps.children;
    var nextChildren = nextContent != null ? null : nextProps.children;

    // If we're switching from children to content/html or vice versa, remove
    // the old content
    var lastHasContentOrHtml = lastContent != null || lastHtml != null;
    var nextHasContentOrHtml = nextContent != null || nextHtml != null;
    if (lastChildren != null && nextChildren == null) {
      this.updateChildren(null, transaction);
    } else if (lastHasContentOrHtml && !nextHasContentOrHtml) {
      this.updateTextContent('');
    }

    if (nextContent != null) {
      if (lastContent !== nextContent) {
        this.updateTextContent('' + nextContent);
      }
    } else if (nextHtml != null) {
      if (lastHtml !== nextHtml) {
        ReactComponent.BackendIDOperations.updateInnerHTMLByID(
          this._rootNodeID,
          nextHtml
        );
      }
    } else if (nextChildren != null) {
      this.updateChildren(nextChildren, transaction);
    }
  },

  /**
   * Destroys all event registrations for this instance. Does not remove from
   * the DOM. That must be done by the parent.
   *
   * @internal
   */
  unmountComponent: function() {
    this.unmountChildren();
    ReactBrowserEventEmitter.deleteAllListeners(this._rootNodeID);
    ReactComponent.Mixin.unmountComponent.call(this);
  }

};

assign(
  ReactDOMComponent.prototype,
  ReactComponent.Mixin,
  ReactDOMComponent.Mixin,
  ReactMultiChild.Mixin,
  ReactBrowserComponentMixin
);

module.exports = ReactDOMComponent;

},{"./CSSPropertyOperations":5,"./DOMProperty":11,"./DOMPropertyOperations":12,"./Object.assign":27,"./ReactBrowserComponentMixin":29,"./ReactBrowserEventEmitter":30,"./ReactComponent":32,"./ReactMount":63,"./ReactMultiChild":64,"./ReactPerf":68,"./escapeTextForBrowser":109,"./invariant":126,"./isEventSupported":127,"./keyOf":133,"./monitorCodeUse":136}],40:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactDOMForm
 */

"use strict";

var EventConstants = _dereq_("./EventConstants");
var LocalEventTrapMixin = _dereq_("./LocalEventTrapMixin");
var ReactBrowserComponentMixin = _dereq_("./ReactBrowserComponentMixin");
var ReactCompositeComponent = _dereq_("./ReactCompositeComponent");
var ReactElement = _dereq_("./ReactElement");
var ReactDOM = _dereq_("./ReactDOM");

// Store a reference to the <form> `ReactDOMComponent`. TODO: use string
var form = ReactElement.createFactory(ReactDOM.form.type);

/**
 * Since onSubmit doesn't bubble OR capture on the top level in IE8, we need
 * to capture it on the <form> element itself. There are lots of hacks we could
 * do to accomplish this, but the most reliable is to make <form> a
 * composite component and use `componentDidMount` to attach the event handlers.
 */
var ReactDOMForm = ReactCompositeComponent.createClass({
  displayName: 'ReactDOMForm',

  mixins: [ReactBrowserComponentMixin, LocalEventTrapMixin],

  render: function() {
    // TODO: Instead of using `ReactDOM` directly, we should use JSX. However,
    // `jshint` fails to parse JSX so in order for linting to work in the open
    // source repo, we need to just use `ReactDOM.form`.
    return form(this.props);
  },

  componentDidMount: function() {
    this.trapBubbledEvent(EventConstants.topLevelTypes.topReset, 'reset');
    this.trapBubbledEvent(EventConstants.topLevelTypes.topSubmit, 'submit');
  }
});

module.exports = ReactDOMForm;

},{"./EventConstants":16,"./LocalEventTrapMixin":25,"./ReactBrowserComponentMixin":29,"./ReactCompositeComponent":34,"./ReactDOM":37,"./ReactElement":52}],41:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactDOMIDOperations
 * @typechecks static-only
 */

/*jslint evil: true */

"use strict";

var CSSPropertyOperations = _dereq_("./CSSPropertyOperations");
var DOMChildrenOperations = _dereq_("./DOMChildrenOperations");
var DOMPropertyOperations = _dereq_("./DOMPropertyOperations");
var ReactMount = _dereq_("./ReactMount");
var ReactPerf = _dereq_("./ReactPerf");

var invariant = _dereq_("./invariant");
var setInnerHTML = _dereq_("./setInnerHTML");

/**
 * Errors for properties that should not be updated with `updatePropertyById()`.
 *
 * @type {object}
 * @private
 */
var INVALID_PROPERTY_ERRORS = {
  dangerouslySetInnerHTML:
    '`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.',
  style: '`style` must be set using `updateStylesByID()`.'
};

/**
 * Operations used to process updates to DOM nodes. This is made injectable via
 * `ReactComponent.BackendIDOperations`.
 */
var ReactDOMIDOperations = {

  /**
   * Updates a DOM node with new property values. This should only be used to
   * update DOM properties in `DOMProperty`.
   *
   * @param {string} id ID of the node to update.
   * @param {string} name A valid property name, see `DOMProperty`.
   * @param {*} value New value of the property.
   * @internal
   */
  updatePropertyByID: ReactPerf.measure(
    'ReactDOMIDOperations',
    'updatePropertyByID',
    function(id, name, value) {
      var node = ReactMount.getNode(id);
      ("production" !== "development" ? invariant(
        !INVALID_PROPERTY_ERRORS.hasOwnProperty(name),
        'updatePropertyByID(...): %s',
        INVALID_PROPERTY_ERRORS[name]
      ) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name)));

      // If we're updating to null or undefined, we should remove the property
      // from the DOM node instead of inadvertantly setting to a string. This
      // brings us in line with the same behavior we have on initial render.
      if (value != null) {
        DOMPropertyOperations.setValueForProperty(node, name, value);
      } else {
        DOMPropertyOperations.deleteValueForProperty(node, name);
      }
    }
  ),

  /**
   * Updates a DOM node to remove a property. This should only be used to remove
   * DOM properties in `DOMProperty`.
   *
   * @param {string} id ID of the node to update.
   * @param {string} name A property name to remove, see `DOMProperty`.
   * @internal
   */
  deletePropertyByID: ReactPerf.measure(
    'ReactDOMIDOperations',
    'deletePropertyByID',
    function(id, name, value) {
      var node = ReactMount.getNode(id);
      ("production" !== "development" ? invariant(
        !INVALID_PROPERTY_ERRORS.hasOwnProperty(name),
        'updatePropertyByID(...): %s',
        INVALID_PROPERTY_ERRORS[name]
      ) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name)));
      DOMPropertyOperations.deleteValueForProperty(node, name, value);
    }
  ),

  /**
   * Updates a DOM node with new style values. If a value is specified as '',
   * the corresponding style property will be unset.
   *
   * @param {string} id ID of the node to update.
   * @param {object} styles Mapping from styles to values.
   * @internal
   */
  updateStylesByID: ReactPerf.measure(
    'ReactDOMIDOperations',
    'updateStylesByID',
    function(id, styles) {
      var node = ReactMount.getNode(id);
      CSSPropertyOperations.setValueForStyles(node, styles);
    }
  ),

  /**
   * Updates a DOM node's innerHTML.
   *
   * @param {string} id ID of the node to update.
   * @param {string} html An HTML string.
   * @internal
   */
  updateInnerHTMLByID: ReactPerf.measure(
    'ReactDOMIDOperations',
    'updateInnerHTMLByID',
    function(id, html) {
      var node = ReactMount.getNode(id);
      setInnerHTML(node, html);
    }
  ),

  /**
   * Updates a DOM node's text content set by `props.content`.
   *
   * @param {string} id ID of the node to update.
   * @param {string} content Text content.
   * @internal
   */
  updateTextContentByID: ReactPerf.measure(
    'ReactDOMIDOperations',
    'updateTextContentByID',
    function(id, content) {
      var node = ReactMount.getNode(id);
      DOMChildrenOperations.updateTextContent(node, content);
    }
  ),

  /**
   * Replaces a DOM node that exists in the document with markup.
   *
   * @param {string} id ID of child to be replaced.
   * @param {string} markup Dangerous markup to inject in place of child.
   * @internal
   * @see {Danger.dangerouslyReplaceNodeWithMarkup}
   */
  dangerouslyReplaceNodeWithMarkupByID: ReactPerf.measure(
    'ReactDOMIDOperations',
    'dangerouslyReplaceNodeWithMarkupByID',
    function(id, markup) {
      var node = ReactMount.getNode(id);
      DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup(node, markup);
    }
  ),

  /**
   * Updates a component's children by processing a series of updates.
   *
   * @param {array<object>} updates List of update configurations.
   * @param {array<string>} markup List of markup strings.
   * @internal
   */
  dangerouslyProcessChildrenUpdates: ReactPerf.measure(
    'ReactDOMIDOperations',
    'dangerouslyProcessChildrenUpdates',
    function(updates, markup) {
      for (var i = 0; i < updates.length; i++) {
        updates[i].parentNode = ReactMount.getNode(updates[i].parentID);
      }
      DOMChildrenOperations.processUpdates(updates, markup);
    }
  )
};

module.exports = ReactDOMIDOperations;

},{"./CSSPropertyOperations":5,"./DOMChildrenOperations":10,"./DOMPropertyOperations":12,"./ReactMount":63,"./ReactPerf":68,"./invariant":126,"./setInnerHTML":140}],42:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactDOMImg
 */

"use strict";

var EventConstants = _dereq_("./EventConstants");
var LocalEventTrapMixin = _dereq_("./LocalEventTrapMixin");
var ReactBrowserComponentMixin = _dereq_("./ReactBrowserComponentMixin");
var ReactCompositeComponent = _dereq_("./ReactCompositeComponent");
var ReactElement = _dereq_("./ReactElement");
var ReactDOM = _dereq_("./ReactDOM");

// Store a reference to the <img> `ReactDOMComponent`. TODO: use string
var img = ReactElement.createFactory(ReactDOM.img.type);

/**
 * Since onLoad doesn't bubble OR capture on the top level in IE8, we need to
 * capture it on the <img> element itself. There are lots of hacks we could do
 * to accomplish this, but the most reliable is to make <img> a composite
 * component and use `componentDidMount` to attach the event handlers.
 */
var ReactDOMImg = ReactCompositeComponent.createClass({
  displayName: 'ReactDOMImg',
  tagName: 'IMG',

  mixins: [ReactBrowserComponentMixin, LocalEventTrapMixin],

  render: function() {
    return img(this.props);
  },

  componentDidMount: function() {
    this.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load');
    this.trapBubbledEvent(EventConstants.topLevelTypes.topError, 'error');
  }
});

module.exports = ReactDOMImg;

},{"./EventConstants":16,"./LocalEventTrapMixin":25,"./ReactBrowserComponentMixin":29,"./ReactCompositeComponent":34,"./ReactDOM":37,"./ReactElement":52}],43:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactDOMInput
 */

"use strict";

var AutoFocusMixin = _dereq_("./AutoFocusMixin");
var DOMPropertyOperations = _dereq_("./DOMPropertyOperations");
var LinkedValueUtils = _dereq_("./LinkedValueUtils");
var ReactBrowserComponentMixin = _dereq_("./ReactBrowserComponentMixin");
var ReactCompositeComponent = _dereq_("./ReactCompositeComponent");
var ReactElement = _dereq_("./ReactElement");
var ReactDOM = _dereq_("./ReactDOM");
var ReactMount = _dereq_("./ReactMount");
var ReactUpdates = _dereq_("./ReactUpdates");

var assign = _dereq_("./Object.assign");
var invariant = _dereq_("./invariant");

// Store a reference to the <input> `ReactDOMComponent`. TODO: use string
var input = ReactElement.createFactory(ReactDOM.input.type);

var instancesByReactID = {};

function forceUpdateIfMounted() {
  /*jshint validthis:true */
  if (this.isMounted()) {
    this.forceUpdate();
  }
}

/**
 * Implements an <input> native component that allows setting these optional
 * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
 *
 * If `checked` or `value` are not supplied (or null/undefined), user actions
 * that affect the checked state or value will trigger updates to the element.
 *
 * If they are supplied (and not null/undefined), the rendered element will not
 * trigger updates to the element. Instead, the props must change in order for
 * the rendered element to be updated.
 *
 * The rendered element will be initialized as unchecked (or `defaultChecked`)
 * with an empty value (or `defaultValue`).
 *
 * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
 */
var ReactDOMInput = ReactCompositeComponent.createClass({
  displayName: 'ReactDOMInput',

  mixins: [AutoFocusMixin, LinkedValueUtils.Mixin, ReactBrowserComponentMixin],

  getInitialState: function() {
    var defaultValue = this.props.defaultValue;
    return {
      initialChecked: this.props.defaultChecked || false,
      initialValue: defaultValue != null ? defaultValue : null
    };
  },

  render: function() {
    // Clone `this.props` so we don't mutate the input.
    var props = assign({}, this.props);

    props.defaultChecked = null;
    props.defaultValue = null;

    var value = LinkedValueUtils.getValue(this);
    props.value = value != null ? value : this.state.initialValue;

    var checked = LinkedValueUtils.getChecked(this);
    props.checked = checked != null ? checked : this.state.initialChecked;

    props.onChange = this._handleChange;

    return input(props, this.props.children);
  },

  componentDidMount: function() {
    var id = ReactMount.getID(this.getDOMNode());
    instancesByReactID[id] = this;
  },

  componentWillUnmount: function() {
    var rootNode = this.getDOMNode();
    var id = ReactMount.getID(rootNode);
    delete instancesByReactID[id];
  },

  componentDidUpdate: function(prevProps, prevState, prevContext) {
    var rootNode = this.getDOMNode();
    if (this.props.checked != null) {
      DOMPropertyOperations.setValueForProperty(
        rootNode,
        'checked',
        this.props.checked || false
      );
    }

    var value = LinkedValueUtils.getValue(this);
    if (value != null) {
      // Cast `value` to a string to ensure the value is set correctly. While
      // browsers typically do this as necessary, jsdom doesn't.
      DOMPropertyOperations.setValueForProperty(rootNode, 'value', '' + value);
    }
  },

  _handleChange: function(event) {
    var returnValue;
    var onChange = LinkedValueUtils.getOnChange(this);
    if (onChange) {
      returnValue = onChange.call(this, event);
    }
    // Here we use asap to wait until all updates have propagated, which
    // is important when using controlled components within layers:
    // https://github.com/facebook/react/issues/1698
    ReactUpdates.asap(forceUpdateIfMounted, this);

    var name = this.props.name;
    if (this.props.type === 'radio' && name != null) {
      var rootNode = this.getDOMNode();
      var queryRoot = rootNode;

      while (queryRoot.parentNode) {
        queryRoot = queryRoot.parentNode;
      }

      // If `rootNode.form` was non-null, then we could try `form.elements`,
      // but that sometimes behaves strangely in IE8. We could also try using
      // `form.getElementsByName`, but that will only return direct children
      // and won't include inputs that use the HTML5 `form=` attribute. Since
      // the input might not even be in a form, let's just use the global
      // `querySelectorAll` to ensure we don't miss anything.
      var group = queryRoot.querySelectorAll(
        'input[name=' + JSON.stringify('' + name) + '][type="radio"]');

      for (var i = 0, groupLen = group.length; i < groupLen; i++) {
        var otherNode = group[i];
        if (otherNode === rootNode ||
            otherNode.form !== rootNode.form) {
          continue;
        }
        var otherID = ReactMount.getID(otherNode);
        ("production" !== "development" ? invariant(
          otherID,
          'ReactDOMInput: Mixing React and non-React radio inputs with the ' +
          'same `name` is not supported.'
        ) : invariant(otherID));
        var otherInstance = instancesByReactID[otherID];
        ("production" !== "development" ? invariant(
          otherInstance,
          'ReactDOMInput: Unknown radio button ID %s.',
          otherID
        ) : invariant(otherInstance));
        // If this is a controlled radio button group, forcing the input that
        // was previously checked to update will cause it to be come re-checked
        // as appropriate.
        ReactUpdates.asap(forceUpdateIfMounted, otherInstance);
      }
    }

    return returnValue;
  }

});

module.exports = ReactDOMInput;

},{"./AutoFocusMixin":2,"./DOMPropertyOperations":12,"./LinkedValueUtils":24,"./Object.assign":27,"./ReactBrowserComponentMixin":29,"./ReactCompositeComponent":34,"./ReactDOM":37,"./ReactElement":52,"./ReactMount":63,"./ReactUpdates":79,"./invariant":126}],44:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactDOMOption
 */

"use strict";

var ReactBrowserComponentMixin = _dereq_("./ReactBrowserComponentMixin");
var ReactCompositeComponent = _dereq_("./ReactCompositeComponent");
var ReactElement = _dereq_("./ReactElement");
var ReactDOM = _dereq_("./ReactDOM");

var warning = _dereq_("./warning");

// Store a reference to the <option> `ReactDOMComponent`. TODO: use string
var option = ReactElement.createFactory(ReactDOM.option.type);

/**
 * Implements an <option> native component that warns when `selected` is set.
 */
var ReactDOMOption = ReactCompositeComponent.createClass({
  displayName: 'ReactDOMOption',

  mixins: [ReactBrowserComponentMixin],

  componentWillMount: function() {
    // TODO (yungsters): Remove support for `selected` in <option>.
    if ("production" !== "development") {
      ("production" !== "development" ? warning(
        this.props.selected == null,
        'Use the `defaultValue` or `value` props on <select> instead of ' +
        'setting `selected` on <option>.'
      ) : null);
    }
  },

  render: function() {
    return option(this.props, this.props.children);
  }

});

module.exports = ReactDOMOption;

},{"./ReactBrowserComponentMixin":29,"./ReactCompositeComponent":34,"./ReactDOM":37,"./ReactElement":52,"./warning":145}],45:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactDOMSelect
 */

"use strict";

var AutoFocusMixin = _dereq_("./AutoFocusMixin");
var LinkedValueUtils = _dereq_("./LinkedValueUtils");
var ReactBrowserComponentMixin = _dereq_("./ReactBrowserComponentMixin");
var ReactCompositeComponent = _dereq_("./ReactCompositeComponent");
var ReactElement = _dereq_("./ReactElement");
var ReactDOM = _dereq_("./ReactDOM");
var ReactUpdates = _dereq_("./ReactUpdates");

var assign = _dereq_("./Object.assign");

// Store a reference to the <select> `ReactDOMComponent`. TODO: use string
var select = ReactElement.createFactory(ReactDOM.select.type);

function updateWithPendingValueIfMounted() {
  /*jshint validthis:true */
  if (this.isMounted()) {
    this.setState({value: this._pendingValue});
    this._pendingValue = 0;
  }
}

/**
 * Validation function for `value` and `defaultValue`.
 * @private
 */
function selectValueType(props, propName, componentName) {
  if (props[propName] == null) {
    return;
  }
  if (props.multiple) {
    if (!Array.isArray(props[propName])) {
      return new Error(
        ("The `" + propName + "` prop supplied to <select> must be an array if ") +
        ("`multiple` is true.")
      );
    }
  } else {
    if (Array.isArray(props[propName])) {
      return new Error(
        ("The `" + propName + "` prop supplied to <select> must be a scalar ") +
        ("value if `multiple` is false.")
      );
    }
  }
}

/**
 * If `value` is supplied, updates <option> elements on mount and update.
 * @param {ReactComponent} component Instance of ReactDOMSelect
 * @param {?*} propValue For uncontrolled components, null/undefined. For
 * controlled components, a string (or with `multiple`, a list of strings).
 * @private
 */
function updateOptions(component, propValue) {
  var multiple = component.props.multiple;
  var value = propValue != null ? propValue : component.state.value;
  var options = component.getDOMNode().options;
  var selectedValue, i, l;
  if (multiple) {
    selectedValue = {};
    for (i = 0, l = value.length; i < l; ++i) {
      selectedValue['' + value[i]] = true;
    }
  } else {
    selectedValue = '' + value;
  }
  for (i = 0, l = options.length; i < l; i++) {
    var selected = multiple ?
      selectedValue.hasOwnProperty(options[i].value) :
      options[i].value === selectedValue;

    if (selected !== options[i].selected) {
      options[i].selected = selected;
    }
  }
}

/**
 * Implements a <select> native component that allows optionally setting the
 * props `value` and `defaultValue`. If `multiple` is false, the prop must be a
 * string. If `multiple` is true, the prop must be an array of strings.
 *
 * If `value` is not supplied (or null/undefined), user actions that change the
 * selected option will trigger updates to the rendered options.
 *
 * If it is supplied (and not null/undefined), the rendered options will not
 * update in response to user actions. Instead, the `value` prop must change in
 * order for the rendered options to update.
 *
 * If `defaultValue` is provided, any options with the supplied values will be
 * selected.
 */
var ReactDOMSelect = ReactCompositeComponent.createClass({
  displayName: 'ReactDOMSelect',

  mixins: [AutoFocusMixin, LinkedValueUtils.Mixin, ReactBrowserComponentMixin],

  propTypes: {
    defaultValue: selectValueType,
    value: selectValueType
  },

  getInitialState: function() {
    return {value: this.props.defaultValue || (this.props.multiple ? [] : '')};
  },

  componentWillMount: function() {
    this._pendingValue = null;
  },

  componentWillReceiveProps: function(nextProps) {
    if (!this.props.multiple && nextProps.multiple) {
      this.setState({value: [this.state.value]});
    } else if (this.props.multiple && !nextProps.multiple) {
      this.setState({value: this.state.value[0]});
    }
  },

  render: function() {
    // Clone `this.props` so we don't mutate the input.
    var props = assign({}, this.props);

    props.onChange = this._handleChange;
    props.value = null;

    return select(props, this.props.children);
  },

  componentDidMount: function() {
    updateOptions(this, LinkedValueUtils.getValue(this));
  },

  componentDidUpdate: function(prevProps) {
    var value = LinkedValueUtils.getValue(this);
    var prevMultiple = !!prevProps.multiple;
    var multiple = !!this.props.multiple;
    if (value != null || prevMultiple !== multiple) {
      updateOptions(this, value);
    }
  },

  _handleChange: function(event) {
    var returnValue;
    var onChange = LinkedValueUtils.getOnChange(this);
    if (onChange) {
      returnValue = onChange.call(this, event);
    }

    var selectedValue;
    if (this.props.multiple) {
      selectedValue = [];
      var options = event.target.options;
      for (var i = 0, l = options.length; i < l; i++) {
        if (options[i].selected) {
          selectedValue.push(options[i].value);
        }
      }
    } else {
      selectedValue = event.target.value;
    }

    this._pendingValue = selectedValue;
    ReactUpdates.asap(updateWithPendingValueIfMounted, this);
    return returnValue;
  }

});

module.exports = ReactDOMSelect;

},{"./AutoFocusMixin":2,"./LinkedValueUtils":24,"./Object.assign":27,"./ReactBrowserComponentMixin":29,"./ReactCompositeComponent":34,"./ReactDOM":37,"./ReactElement":52,"./ReactUpdates":79}],46:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactDOMSelection
 */

"use strict";

var ExecutionEnvironment = _dereq_("./ExecutionEnvironment");

var getNodeForCharacterOffset = _dereq_("./getNodeForCharacterOffset");
var getTextContentAccessor = _dereq_("./getTextContentAccessor");

/**
 * While `isCollapsed` is available on the Selection object and `collapsed`
 * is available on the Range object, IE11 sometimes gets them wrong.
 * If the anchor/focus nodes and offsets are the same, the range is collapsed.
 */
function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) {
  return anchorNode === focusNode && anchorOffset === focusOffset;
}

/**
 * Get the appropriate anchor and focus node/offset pairs for IE.
 *
 * The catch here is that IE's selection API doesn't provide information
 * about whether the selection is forward or backward, so we have to
 * behave as though it's always forward.
 *
 * IE text differs from modern selection in that it behaves as though
 * block elements end with a new line. This means character offsets will
 * differ between the two APIs.
 *
 * @param {DOMElement} node
 * @return {object}
 */
function getIEOffsets(node) {
  var selection = document.selection;
  var selectedRange = selection.createRange();
  var selectedLength = selectedRange.text.length;

  // Duplicate selection so we can move range without breaking user selection.
  var fromStart = selectedRange.duplicate();
  fromStart.moveToElementText(node);
  fromStart.setEndPoint('EndToStart', selectedRange);

  var startOffset = fromStart.text.length;
  var endOffset = startOffset + selectedLength;

  return {
    start: startOffset,
    end: endOffset
  };
}

/**
 * @param {DOMElement} node
 * @return {?object}
 */
function getModernOffsets(node) {
  var selection = window.getSelection && window.getSelection();

  if (!selection || selection.rangeCount === 0) {
    return null;
  }

  var anchorNode = selection.anchorNode;
  var anchorOffset = selection.anchorOffset;
  var focusNode = selection.focusNode;
  var focusOffset = selection.focusOffset;

  var currentRange = selection.getRangeAt(0);

  // If the node and offset values are the same, the selection is collapsed.
  // `Selection.isCollapsed` is available natively, but IE sometimes gets
  // this value wrong.
  var isSelectionCollapsed = isCollapsed(
    selection.anchorNode,
    selection.anchorOffset,
    selection.focusNode,
    selection.focusOffset
  );

  var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length;

  var tempRange = currentRange.cloneRange();
  tempRange.selectNodeContents(node);
  tempRange.setEnd(currentRange.startContainer, currentRange.startOffset);

  var isTempRangeCollapsed = isCollapsed(
    tempRange.startContainer,
    tempRange.startOffset,
    tempRange.endContainer,
    tempRange.endOffset
  );

  var start = isTempRangeCollapsed ? 0 : tempRange.toString().length;
  var end = start + rangeLength;

  // Detect whether the selection is backward.
  var detectionRange = document.createRange();
  detectionRange.setStart(anchorNode, anchorOffset);
  detectionRange.setEnd(focusNode, focusOffset);
  var isBackward = detectionRange.collapsed;

  return {
    start: isBackward ? end : start,
    end: isBackward ? start : end
  };
}

/**
 * @param {DOMElement|DOMTextNode} node
 * @param {object} offsets
 */
function setIEOffsets(node, offsets) {
  var range = document.selection.createRange().duplicate();
  var start, end;

  if (typeof offsets.end === 'undefined') {
    start = offsets.start;
    end = start;
  } else if (offsets.start > offsets.end) {
    start = offsets.end;
    end = offsets.start;
  } else {
    start = offsets.start;
    end = offsets.end;
  }

  range.moveToElementText(node);
  range.moveStart('character', start);
  range.setEndPoint('EndToStart', range);
  range.moveEnd('character', end - start);
  range.select();
}

/**
 * In modern non-IE browsers, we can support both forward and backward
 * selections.
 *
 * Note: IE10+ supports the Selection object, but it does not support
 * the `extend` method, which means that even in modern IE, it's not possible
 * to programatically create a backward selection. Thus, for all IE
 * versions, we use the old IE API to create our selections.
 *
 * @param {DOMElement|DOMTextNode} node
 * @param {object} offsets
 */
function setModernOffsets(node, offsets) {
  if (!window.getSelection) {
    return;
  }

  var selection = window.getSelection();
  var length = node[getTextContentAccessor()].length;
  var start = Math.min(offsets.start, length);
  var end = typeof offsets.end === 'undefined' ?
            start : Math.min(offsets.end, length);

  // IE 11 uses modern selection, but doesn't support the extend method.
  // Flip backward selections, so we can set with a single range.
  if (!selection.extend && start > end) {
    var temp = end;
    end = start;
    start = temp;
  }

  var startMarker = getNodeForCharacterOffset(node, start);
  var endMarker = getNodeForCharacterOffset(node, end);

  if (startMarker && endMarker) {
    var range = document.createRange();
    range.setStart(startMarker.node, startMarker.offset);
    selection.removeAllRanges();

    if (start > end) {
      selection.addRange(range);
      selection.extend(endMarker.node, endMarker.offset);
    } else {
      range.setEnd(endMarker.node, endMarker.offset);
      selection.addRange(range);
    }
  }
}

var useIEOffsets = ExecutionEnvironment.canUseDOM && document.selection;

var ReactDOMSelection = {
  /**
   * @param {DOMElement} node
   */
  getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets,

  /**
   * @param {DOMElement|DOMTextNode} node
   * @param {object} offsets
   */
  setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets
};

module.exports = ReactDOMSelection;

},{"./ExecutionEnvironment":22,"./getNodeForCharacterOffset":119,"./getTextContentAccessor":121}],47:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactDOMTextarea
 */

"use strict";

var AutoFocusMixin = _dereq_("./AutoFocusMixin");
var DOMPropertyOperations = _dereq_("./DOMPropertyOperations");
var LinkedValueUtils = _dereq_("./LinkedValueUtils");
var ReactBrowserComponentMixin = _dereq_("./ReactBrowserComponentMixin");
var ReactCompositeComponent = _dereq_("./ReactCompositeComponent");
var ReactElement = _dereq_("./ReactElement");
var ReactDOM = _dereq_("./ReactDOM");
var ReactUpdates = _dereq_("./ReactUpdates");

var assign = _dereq_("./Object.assign");
var invariant = _dereq_("./invariant");

var warning = _dereq_("./warning");

// Store a reference to the <textarea> `ReactDOMComponent`. TODO: use string
var textarea = ReactElement.createFactory(ReactDOM.textarea.type);

function forceUpdateIfMounted() {
  /*jshint validthis:true */
  if (this.isMounted()) {
    this.forceUpdate();
  }
}

/**
 * Implements a <textarea> native component that allows setting `value`, and
 * `defaultValue`. This differs from the traditional DOM API because value is
 * usually set as PCDATA children.
 *
 * If `value` is not supplied (or null/undefined), user actions that affect the
 * value will trigger updates to the element.
 *
 * If `value` is supplied (and not null/undefined), the rendered element will
 * not trigger updates to the element. Instead, the `value` prop must change in
 * order for the rendered element to be updated.
 *
 * The rendered element will be initialized with an empty value, the prop
 * `defaultValue` if specified, or the children content (deprecated).
 */
var ReactDOMTextarea = ReactCompositeComponent.createClass({
  displayName: 'ReactDOMTextarea',

  mixins: [AutoFocusMixin, LinkedValueUtils.Mixin, ReactBrowserComponentMixin],

  getInitialState: function() {
    var defaultValue = this.props.defaultValue;
    // TODO (yungsters): Remove support for children content in <textarea>.
    var children = this.props.children;
    if (children != null) {
      if ("production" !== "development") {
        ("production" !== "development" ? warning(
          false,
          'Use the `defaultValue` or `value` props instead of setting ' +
          'children on <textarea>.'
        ) : null);
      }
      ("production" !== "development" ? invariant(
        defaultValue == null,
        'If you supply `defaultValue` on a <textarea>, do not pass children.'
      ) : invariant(defaultValue == null));
      if (Array.isArray(children)) {
        ("production" !== "development" ? invariant(
          children.length <= 1,
          '<textarea> can only have at most one child.'
        ) : invariant(children.length <= 1));
        children = children[0];
      }

      defaultValue = '' + children;
    }
    if (defaultValue == null) {
      defaultValue = '';
    }
    var value = LinkedValueUtils.getValue(this);
    return {
      // We save the initial value so that `ReactDOMComponent` doesn't update
      // `textContent` (unnecessary since we update value).
      // The initial value can be a boolean or object so that's why it's
      // forced to be a string.
      initialValue: '' + (value != null ? value : defaultValue)
    };
  },

  render: function() {
    // Clone `this.props` so we don't mutate the input.
    var props = assign({}, this.props);

    ("production" !== "development" ? invariant(
      props.dangerouslySetInnerHTML == null,
      '`dangerouslySetInnerHTML` does not make sense on <textarea>.'
    ) : invariant(props.dangerouslySetInnerHTML == null));

    props.defaultValue = null;
    props.value = null;
    props.onChange = this._handleChange;

    // Always set children to the same thing. In IE9, the selection range will
    // get reset if `textContent` is mutated.
    return textarea(props, this.state.initialValue);
  },

  componentDidUpdate: function(prevProps, prevState, prevContext) {
    var value = LinkedValueUtils.getValue(this);
    if (value != null) {
      var rootNode = this.getDOMNode();
      // Cast `value` to a string to ensure the value is set correctly. While
      // browsers typically do this as necessary, jsdom doesn't.
      DOMPropertyOperations.setValueForProperty(rootNode, 'value', '' + value);
    }
  },

  _handleChange: function(event) {
    var returnValue;
    var onChange = LinkedValueUtils.getOnChange(this);
    if (onChange) {
      returnValue = onChange.call(this, event);
    }
    ReactUpdates.asap(forceUpdateIfMounted, this);
    return returnValue;
  }

});

module.exports = ReactDOMTextarea;

},{"./AutoFocusMixin":2,"./DOMPropertyOperations":12,"./LinkedValueUtils":24,"./Object.assign":27,"./ReactBrowserComponentMixin":29,"./ReactCompositeComponent":34,"./ReactDOM":37,"./ReactElement":52,"./ReactUpdates":79,"./invariant":126,"./warning":145}],48:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactDefaultBatchingStrategy
 */

"use strict";

var ReactUpdates = _dereq_("./ReactUpdates");
var Transaction = _dereq_("./Transaction");

var assign = _dereq_("./Object.assign");
var emptyFunction = _dereq_("./emptyFunction");

var RESET_BATCHED_UPDATES = {
  initialize: emptyFunction,
  close: function() {
    ReactDefaultBatchingStrategy.isBatchingUpdates = false;
  }
};

var FLUSH_BATCHED_UPDATES = {
  initialize: emptyFunction,
  close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)
};

var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES];

function ReactDefaultBatchingStrategyTransaction() {
  this.reinitializeTransaction();
}

assign(
  ReactDefaultBatchingStrategyTransaction.prototype,
  Transaction.Mixin,
  {
    getTransactionWrappers: function() {
      return TRANSACTION_WRAPPERS;
    }
  }
);

var transaction = new ReactDefaultBatchingStrategyTransaction();

var ReactDefaultBatchingStrategy = {
  isBatchingUpdates: false,

  /**
   * Call the provided function in a context within which calls to `setState`
   * and friends are batched such that components aren't updated unnecessarily.
   */
  batchedUpdates: function(callback, a, b) {
    var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates;

    ReactDefaultBatchingStrategy.isBatchingUpdates = true;

    // The code is written this way to avoid extra allocations
    if (alreadyBatchingUpdates) {
      callback(a, b);
    } else {
      transaction.perform(callback, null, a, b);
    }
  }
};

module.exports = ReactDefaultBatchingStrategy;

},{"./Object.assign":27,"./ReactUpdates":79,"./Transaction":95,"./emptyFunction":107}],49:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactDefaultInjection
 */

"use strict";

var BeforeInputEventPlugin = _dereq_("./BeforeInputEventPlugin");
var ChangeEventPlugin = _dereq_("./ChangeEventPlugin");
var ClientReactRootIndex = _dereq_("./ClientReactRootIndex");
var CompositionEventPlugin = _dereq_("./CompositionEventPlugin");
var DefaultEventPluginOrder = _dereq_("./DefaultEventPluginOrder");
var EnterLeaveEventPlugin = _dereq_("./EnterLeaveEventPlugin");
var ExecutionEnvironment = _dereq_("./ExecutionEnvironment");
var HTMLDOMPropertyConfig = _dereq_("./HTMLDOMPropertyConfig");
var MobileSafariClickEventPlugin = _dereq_("./MobileSafariClickEventPlugin");
var ReactBrowserComponentMixin = _dereq_("./ReactBrowserComponentMixin");
var ReactComponentBrowserEnvironment =
  _dereq_("./ReactComponentBrowserEnvironment");
var ReactDefaultBatchingStrategy = _dereq_("./ReactDefaultBatchingStrategy");
var ReactDOMComponent = _dereq_("./ReactDOMComponent");
var ReactDOMButton = _dereq_("./ReactDOMButton");
var ReactDOMForm = _dereq_("./ReactDOMForm");
var ReactDOMImg = _dereq_("./ReactDOMImg");
var ReactDOMInput = _dereq_("./ReactDOMInput");
var ReactDOMOption = _dereq_("./ReactDOMOption");
var ReactDOMSelect = _dereq_("./ReactDOMSelect");
var ReactDOMTextarea = _dereq_("./ReactDOMTextarea");
var ReactEventListener = _dereq_("./ReactEventListener");
var ReactInjection = _dereq_("./ReactInjection");
var ReactInstanceHandles = _dereq_("./ReactInstanceHandles");
var ReactMount = _dereq_("./ReactMount");
var SelectEventPlugin = _dereq_("./SelectEventPlugin");
var ServerReactRootIndex = _dereq_("./ServerReactRootIndex");
var SimpleEventPlugin = _dereq_("./SimpleEventPlugin");
var SVGDOMPropertyConfig = _dereq_("./SVGDOMPropertyConfig");

var createFullPageComponent = _dereq_("./createFullPageComponent");

function inject() {
  ReactInjection.EventEmitter.injectReactEventListener(
    ReactEventListener
  );

  /**
   * Inject modules for resolving DOM hierarchy and plugin ordering.
   */
  ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);
  ReactInjection.EventPluginHub.injectInstanceHandle(ReactInstanceHandles);
  ReactInjection.EventPluginHub.injectMount(ReactMount);

  /**
   * Some important event plugins included by default (without having to require
   * them).
   */
  ReactInjection.EventPluginHub.injectEventPluginsByName({
    SimpleEventPlugin: SimpleEventPlugin,
    EnterLeaveEventPlugin: EnterLeaveEventPlugin,
    ChangeEventPlugin: ChangeEventPlugin,
    CompositionEventPlugin: CompositionEventPlugin,
    MobileSafariClickEventPlugin: MobileSafariClickEventPlugin,
    SelectEventPlugin: SelectEventPlugin,
    BeforeInputEventPlugin: BeforeInputEventPlugin
  });

  ReactInjection.NativeComponent.injectGenericComponentClass(
    ReactDOMComponent
  );

  ReactInjection.NativeComponent.injectComponentClasses({
    'button': ReactDOMButton,
    'form': ReactDOMForm,
    'img': ReactDOMImg,
    'input': ReactDOMInput,
    'option': ReactDOMOption,
    'select': ReactDOMSelect,
    'textarea': ReactDOMTextarea,

    'html': createFullPageComponent('html'),
    'head': createFullPageComponent('head'),
    'body': createFullPageComponent('body')
  });

  // This needs to happen after createFullPageComponent() otherwise the mixin
  // gets double injected.
  ReactInjection.CompositeComponent.injectMixin(ReactBrowserComponentMixin);

  ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);
  ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);

  ReactInjection.EmptyComponent.injectEmptyComponent('noscript');

  ReactInjection.Updates.injectReconcileTransaction(
    ReactComponentBrowserEnvironment.ReactReconcileTransaction
  );
  ReactInjection.Updates.injectBatchingStrategy(
    ReactDefaultBatchingStrategy
  );

  ReactInjection.RootIndex.injectCreateReactRootIndex(
    ExecutionEnvironment.canUseDOM ?
      ClientReactRootIndex.createReactRootIndex :
      ServerReactRootIndex.createReactRootIndex
  );

  ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);

  if ("production" !== "development") {
    var url = (ExecutionEnvironment.canUseDOM && window.location.href) || '';
    if ((/[?&]react_perf\b/).test(url)) {
      var ReactDefaultPerf = _dereq_("./ReactDefaultPerf");
      ReactDefaultPerf.start();
    }
  }
}

module.exports = {
  inject: inject
};

},{"./BeforeInputEventPlugin":3,"./ChangeEventPlugin":7,"./ClientReactRootIndex":8,"./CompositionEventPlugin":9,"./DefaultEventPluginOrder":14,"./EnterLeaveEventPlugin":15,"./ExecutionEnvironment":22,"./HTMLDOMPropertyConfig":23,"./MobileSafariClickEventPlugin":26,"./ReactBrowserComponentMixin":29,"./ReactComponentBrowserEnvironment":33,"./ReactDOMButton":38,"./ReactDOMComponent":39,"./ReactDOMForm":40,"./ReactDOMImg":42,"./ReactDOMInput":43,"./ReactDOMOption":44,"./ReactDOMSelect":45,"./ReactDOMTextarea":47,"./ReactDefaultBatchingStrategy":48,"./ReactDefaultPerf":50,"./ReactEventListener":57,"./ReactInjection":58,"./ReactInstanceHandles":60,"./ReactMount":63,"./SVGDOMPropertyConfig":80,"./SelectEventPlugin":81,"./ServerReactRootIndex":82,"./SimpleEventPlugin":83,"./createFullPageComponent":103}],50:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactDefaultPerf
 * @typechecks static-only
 */

"use strict";

var DOMProperty = _dereq_("./DOMProperty");
var ReactDefaultPerfAnalysis = _dereq_("./ReactDefaultPerfAnalysis");
var ReactMount = _dereq_("./ReactMount");
var ReactPerf = _dereq_("./ReactPerf");

var performanceNow = _dereq_("./performanceNow");

function roundFloat(val) {
  return Math.floor(val * 100) / 100;
}

function addValue(obj, key, val) {
  obj[key] = (obj[key] || 0) + val;
}

var ReactDefaultPerf = {
  _allMeasurements: [], // last item in the list is the current one
  _mountStack: [0],
  _injected: false,

  start: function() {
    if (!ReactDefaultPerf._injected) {
      ReactPerf.injection.injectMeasure(ReactDefaultPerf.measure);
    }

    ReactDefaultPerf._allMeasurements.length = 0;
    ReactPerf.enableMeasure = true;
  },

  stop: function() {
    ReactPerf.enableMeasure = false;
  },

  getLastMeasurements: function() {
    return ReactDefaultPerf._allMeasurements;
  },

  printExclusive: function(measurements) {
    measurements = measurements || ReactDefaultPerf._allMeasurements;
    var summary = ReactDefaultPerfAnalysis.getExclusiveSummary(measurements);
    console.table(summary.map(function(item) {
      return {
        'Component class name': item.componentName,
        'Total inclusive time (ms)': roundFloat(item.inclusive),
        'Exclusive mount time (ms)': roundFloat(item.exclusive),
        'Exclusive render time (ms)': roundFloat(item.render),
        'Mount time per instance (ms)': roundFloat(item.exclusive / item.count),
        'Render time per instance (ms)': roundFloat(item.render / item.count),
        'Instances': item.count
      };
    }));
    // TODO: ReactDefaultPerfAnalysis.getTotalTime() does not return the correct
    // number.
  },

  printInclusive: function(measurements) {
    measurements = measurements || ReactDefaultPerf._allMeasurements;
    var summary = ReactDefaultPerfAnalysis.getInclusiveSummary(measurements);
    console.table(summary.map(function(item) {
      return {
        'Owner > component': item.componentName,
        'Inclusive time (ms)': roundFloat(item.time),
        'Instances': item.count
      };
    }));
    console.log(
      'Total time:',
      ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms'
    );
  },

  getMeasurementsSummaryMap: function(measurements) {
    var summary = ReactDefaultPerfAnalysis.getInclusiveSummary(
      measurements,
      true
    );
    return summary.map(function(item) {
      return {
        'Owner > component': item.componentName,
        'Wasted time (ms)': item.time,
        'Instances': item.count
      };
    });
  },

  printWasted: function(measurements) {
    measurements = measurements || ReactDefaultPerf._allMeasurements;
    console.table(ReactDefaultPerf.getMeasurementsSummaryMap(measurements));
    console.log(
      'Total time:',
      ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms'
    );
  },

  printDOM: function(measurements) {
    measurements = measurements || ReactDefaultPerf._allMeasurements;
    var summary = ReactDefaultPerfAnalysis.getDOMSummary(measurements);
    console.table(summary.map(function(item) {
      var result = {};
      result[DOMProperty.ID_ATTRIBUTE_NAME] = item.id;
      result['type'] = item.type;
      result['args'] = JSON.stringify(item.args);
      return result;
    }));
    console.log(
      'Total time:',
      ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms'
    );
  },

  _recordWrite: function(id, fnName, totalTime, args) {
    // TODO: totalTime isn't that useful since it doesn't count paints/reflows
    var writes =
      ReactDefaultPerf
        ._allMeasurements[ReactDefaultPerf._allMeasurements.length - 1]
        .writes;
    writes[id] = writes[id] || [];
    writes[id].push({
      type: fnName,
      time: totalTime,
      args: args
    });
  },

  measure: function(moduleName, fnName, func) {
    return function() {for (var args=[],$__0=0,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]);
      var totalTime;
      var rv;
      var start;

      if (fnName === '_renderNewRootComponent' ||
          fnName === 'flushBatchedUpdates') {
        // A "measurement" is a set of metrics recorded for each flush. We want
        // to group the metrics for a given flush together so we can look at the
        // components that rendered and the DOM operations that actually
        // happened to determine the amount of "wasted work" performed.
        ReactDefaultPerf._allMeasurements.push({
          exclusive: {},
          inclusive: {},
          render: {},
          counts: {},
          writes: {},
          displayNames: {},
          totalTime: 0
        });
        start = performanceNow();
        rv = func.apply(this, args);
        ReactDefaultPerf._allMeasurements[
          ReactDefaultPerf._allMeasurements.length - 1
        ].totalTime = performanceNow() - start;
        return rv;
      } else if (moduleName === 'ReactDOMIDOperations' ||
        moduleName === 'ReactComponentBrowserEnvironment') {
        start = performanceNow();
        rv = func.apply(this, args);
        totalTime = performanceNow() - start;

        if (fnName === 'mountImageIntoNode') {
          var mountID = ReactMount.getID(args[1]);
          ReactDefaultPerf._recordWrite(mountID, fnName, totalTime, args[0]);
        } else if (fnName === 'dangerouslyProcessChildrenUpdates') {
          // special format
          args[0].forEach(function(update) {
            var writeArgs = {};
            if (update.fromIndex !== null) {
              writeArgs.fromIndex = update.fromIndex;
            }
            if (update.toIndex !== null) {
              writeArgs.toIndex = update.toIndex;
            }
            if (update.textContent !== null) {
              writeArgs.textContent = update.textContent;
            }
            if (update.markupIndex !== null) {
              writeArgs.markup = args[1][update.markupIndex];
            }
            ReactDefaultPerf._recordWrite(
              update.parentID,
              update.type,
              totalTime,
              writeArgs
            );
          });
        } else {
          // basic format
          ReactDefaultPerf._recordWrite(
            args[0],
            fnName,
            totalTime,
            Array.prototype.slice.call(args, 1)
          );
        }
        return rv;
      } else if (moduleName === 'ReactCompositeComponent' && (
        fnName === 'mountComponent' ||
        fnName === 'updateComponent' || // TODO: receiveComponent()?
        fnName === '_renderValidatedComponent')) {

        var rootNodeID = fnName === 'mountComponent' ?
          args[0] :
          this._rootNodeID;
        var isRender = fnName === '_renderValidatedComponent';
        var isMount = fnName === 'mountComponent';

        var mountStack = ReactDefaultPerf._mountStack;
        var entry = ReactDefaultPerf._allMeasurements[
          ReactDefaultPerf._allMeasurements.length - 1
        ];

        if (isRender) {
          addValue(entry.counts, rootNodeID, 1);
        } else if (isMount) {
          mountStack.push(0);
        }

        start = performanceNow();
        rv = func.apply(this, args);
        totalTime = performanceNow() - start;

        if (isRender) {
          addValue(entry.render, rootNodeID, totalTime);
        } else if (isMount) {
          var subMountTime = mountStack.pop();
          mountStack[mountStack.length - 1] += totalTime;
          addValue(entry.exclusive, rootNodeID, totalTime - subMountTime);
          addValue(entry.inclusive, rootNodeID, totalTime);
        } else {
          addValue(entry.inclusive, rootNodeID, totalTime);
        }

        entry.displayNames[rootNodeID] = {
          current: this.constructor.displayName,
          owner: this._owner ? this._owner.constructor.displayName : '<root>'
        };

        return rv;
      } else {
        return func.apply(this, args);
      }
    };
  }
};

module.exports = ReactDefaultPerf;

},{"./DOMProperty":11,"./ReactDefaultPerfAnalysis":51,"./ReactMount":63,"./ReactPerf":68,"./performanceNow":139}],51:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactDefaultPerfAnalysis
 */

var assign = _dereq_("./Object.assign");

// Don't try to save users less than 1.2ms (a number I made up)
var DONT_CARE_THRESHOLD = 1.2;
var DOM_OPERATION_TYPES = {
  'mountImageIntoNode': 'set innerHTML',
  INSERT_MARKUP: 'set innerHTML',
  MOVE_EXISTING: 'move',
  REMOVE_NODE: 'remove',
  TEXT_CONTENT: 'set textContent',
  'updatePropertyByID': 'update attribute',
  'deletePropertyByID': 'delete attribute',
  'updateStylesByID': 'update styles',
  'updateInnerHTMLByID': 'set innerHTML',
  'dangerouslyReplaceNodeWithMarkupByID': 'replace'
};

function getTotalTime(measurements) {
  // TODO: return number of DOM ops? could be misleading.
  // TODO: measure dropped frames after reconcile?
  // TODO: log total time of each reconcile and the top-level component
  // class that triggered it.
  var totalTime = 0;
  for (var i = 0; i < measurements.length; i++) {
    var measurement = measurements[i];
    totalTime += measurement.totalTime;
  }
  return totalTime;
}

function getDOMSummary(measurements) {
  var items = [];
  for (var i = 0; i < measurements.length; i++) {
    var measurement = measurements[i];
    var id;

    for (id in measurement.writes) {
      measurement.writes[id].forEach(function(write) {
        items.push({
          id: id,
          type: DOM_OPERATION_TYPES[write.type] || write.type,
          args: write.args
        });
      });
    }
  }
  return items;
}

function getExclusiveSummary(measurements) {
  var candidates = {};
  var displayName;

  for (var i = 0; i < measurements.length; i++) {
    var measurement = measurements[i];
    var allIDs = assign(
      {},
      measurement.exclusive,
      measurement.inclusive
    );

    for (var id in allIDs) {
      displayName = measurement.displayNames[id].current;

      candidates[displayName] = candidates[displayName] || {
        componentName: displayName,
        inclusive: 0,
        exclusive: 0,
        render: 0,
        count: 0
      };
      if (measurement.render[id]) {
        candidates[displayName].render += measurement.render[id];
      }
      if (measurement.exclusive[id]) {
        candidates[displayName].exclusive += measurement.exclusive[id];
      }
      if (measurement.inclusive[id]) {
        candidates[displayName].inclusive += measurement.inclusive[id];
      }
      if (measurement.counts[id]) {
        candidates[displayName].count += measurement.counts[id];
      }
    }
  }

  // Now make a sorted array with the results.
  var arr = [];
  for (displayName in candidates) {
    if (candidates[displayName].exclusive >= DONT_CARE_THRESHOLD) {
      arr.push(candidates[displayName]);
    }
  }

  arr.sort(function(a, b) {
    return b.exclusive - a.exclusive;
  });

  return arr;
}

function getInclusiveSummary(measurements, onlyClean) {
  var candidates = {};
  var inclusiveKey;

  for (var i = 0; i < measurements.length; i++) {
    var measurement = measurements[i];
    var allIDs = assign(
      {},
      measurement.exclusive,
      measurement.inclusive
    );
    var cleanComponents;

    if (onlyClean) {
      cleanComponents = getUnchangedComponents(measurement);
    }

    for (var id in allIDs) {
      if (onlyClean && !cleanComponents[id]) {
        continue;
      }

      var displayName = measurement.displayNames[id];

      // Inclusive time is not useful for many components without knowing where
      // they are instantiated. So we aggregate inclusive time with both the
      // owner and current displayName as the key.
      inclusiveKey = displayName.owner + ' > ' + displayName.current;

      candidates[inclusiveKey] = candidates[inclusiveKey] || {
        componentName: inclusiveKey,
        time: 0,
        count: 0
      };

      if (measurement.inclusive[id]) {
        candidates[inclusiveKey].time += measurement.inclusive[id];
      }
      if (measurement.counts[id]) {
        candidates[inclusiveKey].count += measurement.counts[id];
      }
    }
  }

  // Now make a sorted array with the results.
  var arr = [];
  for (inclusiveKey in candidates) {
    if (candidates[inclusiveKey].time >= DONT_CARE_THRESHOLD) {
      arr.push(candidates[inclusiveKey]);
    }
  }

  arr.sort(function(a, b) {
    return b.time - a.time;
  });

  return arr;
}

function getUnchangedComponents(measurement) {
  // For a given reconcile, look at which components did not actually
  // render anything to the DOM and return a mapping of their ID to
  // the amount of time it took to render the entire subtree.
  var cleanComponents = {};
  var dirtyLeafIDs = Object.keys(measurement.writes);
  var allIDs = assign({}, measurement.exclusive, measurement.inclusive);

  for (var id in allIDs) {
    var isDirty = false;
    // For each component that rendered, see if a component that triggered
    // a DOM op is in its subtree.
    for (var i = 0; i < dirtyLeafIDs.length; i++) {
      if (dirtyLeafIDs[i].indexOf(id) === 0) {
        isDirty = true;
        break;
      }
    }
    if (!isDirty && measurement.counts[id] > 0) {
      cleanComponents[id] = true;
    }
  }
  return cleanComponents;
}

var ReactDefaultPerfAnalysis = {
  getExclusiveSummary: getExclusiveSummary,
  getInclusiveSummary: getInclusiveSummary,
  getDOMSummary: getDOMSummary,
  getTotalTime: getTotalTime
};

module.exports = ReactDefaultPerfAnalysis;

},{"./Object.assign":27}],52:[function(_dereq_,module,exports){
/**
 * Copyright 2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactElement
 */

"use strict";

var ReactContext = _dereq_("./ReactContext");
var ReactCurrentOwner = _dereq_("./ReactCurrentOwner");

var warning = _dereq_("./warning");

var RESERVED_PROPS = {
  key: true,
  ref: true
};

/**
 * Warn for mutations.
 *
 * @internal
 * @param {object} object
 * @param {string} key
 */
function defineWarningProperty(object, key) {
  Object.defineProperty(object, key, {

    configurable: false,
    enumerable: true,

    get: function() {
      if (!this._store) {
        return null;
      }
      return this._store[key];
    },

    set: function(value) {
      ("production" !== "development" ? warning(
        false,
        'Don\'t set the ' + key + ' property of the component. ' +
        'Mutate the existing props object instead.'
      ) : null);
      this._store[key] = value;
    }

  });
}

/**
 * This is updated to true if the membrane is successfully created.
 */
var useMutationMembrane = false;

/**
 * Warn for mutations.
 *
 * @internal
 * @param {object} element
 */
function defineMutationMembrane(prototype) {
  try {
    var pseudoFrozenProperties = {
      props: true
    };
    for (var key in pseudoFrozenProperties) {
      defineWarningProperty(prototype, key);
    }
    useMutationMembrane = true;
  } catch (x) {
    // IE will fail on defineProperty
  }
}

/**
 * Base constructor for all React elements. This is only used to make this
 * work with a dynamic instanceof check. Nothing should live on this prototype.
 *
 * @param {*} type
 * @param {string|object} ref
 * @param {*} key
 * @param {*} props
 * @internal
 */
var ReactElement = function(type, key, ref, owner, context, props) {
  // Built-in properties that belong on the element
  this.type = type;
  this.key = key;
  this.ref = ref;

  // Record the component responsible for creating this element.
  this._owner = owner;

  // TODO: Deprecate withContext, and then the context becomes accessible
  // through the owner.
  this._context = context;

  if ("production" !== "development") {
    // The validation flag and props are currently mutative. We put them on
    // an external backing store so that we can freeze the whole object.
    // This can be replaced with a WeakMap once they are implemented in
    // commonly used development environments.
    this._store = { validated: false, props: props };

    // We're not allowed to set props directly on the object so we early
    // return and rely on the prototype membrane to forward to the backing
    // store.
    if (useMutationMembrane) {
      Object.freeze(this);
      return;
    }
  }

  this.props = props;
};

// We intentionally don't expose the function on the constructor property.
// ReactElement should be indistinguishable from a plain object.
ReactElement.prototype = {
  _isReactElement: true
};

if ("production" !== "development") {
  defineMutationMembrane(ReactElement.prototype);
}

ReactElement.createElement = function(type, config, children) {
  var propName;

  // Reserved names are extracted
  var props = {};

  var key = null;
  var ref = null;

  if (config != null) {
    ref = config.ref === undefined ? null : config.ref;
    if ("production" !== "development") {
      ("production" !== "development" ? warning(
        config.key !== null,
        'createElement(...): Encountered component with a `key` of null. In ' +
        'a future version, this will be treated as equivalent to the string ' +
        '\'null\'; instead, provide an explicit key or use undefined.'
      ) : null);
    }
    // TODO: Change this back to `config.key === undefined`
    key = config.key == null ? null : '' + config.key;
    // Remaining properties are added to a new props object
    for (propName in config) {
      if (config.hasOwnProperty(propName) &&
          !RESERVED_PROPS.hasOwnProperty(propName)) {
        props[propName] = config[propName];
      }
    }
  }

  // Children can be more than one argument, and those are transferred onto
  // the newly allocated props object.
  var childrenLength = arguments.length - 2;
  if (childrenLength === 1) {
    props.children = children;
  } else if (childrenLength > 1) {
    var childArray = Array(childrenLength);
    for (var i = 0; i < childrenLength; i++) {
      childArray[i] = arguments[i + 2];
    }
    props.children = childArray;
  }

  // Resolve default props
  if (type && type.defaultProps) {
    var defaultProps = type.defaultProps;
    for (propName in defaultProps) {
      if (typeof props[propName] === 'undefined') {
        props[propName] = defaultProps[propName];
      }
    }
  }

  return new ReactElement(
    type,
    key,
    ref,
    ReactCurrentOwner.current,
    ReactContext.current,
    props
  );
};

ReactElement.createFactory = function(type) {
  var factory = ReactElement.createElement.bind(null, type);
  // Expose the type on the factory and the prototype so that it can be
  // easily accessed on elements. E.g. <Foo />.type === Foo.type.
  // This should not be named `constructor` since this may not be the function
  // that created the element, and it may not even be a constructor.
  factory.type = type;
  return factory;
};

ReactElement.cloneAndReplaceProps = function(oldElement, newProps) {
  var newElement = new ReactElement(
    oldElement.type,
    oldElement.key,
    oldElement.ref,
    oldElement._owner,
    oldElement._context,
    newProps
  );

  if ("production" !== "development") {
    // If the key on the original is valid, then the clone is valid
    newElement._store.validated = oldElement._store.validated;
  }
  return newElement;
};

/**
 * @param {?object} object
 * @return {boolean} True if `object` is a valid component.
 * @final
 */
ReactElement.isValidElement = function(object) {
  // ReactTestUtils is often used outside of beforeEach where as React is
  // within it. This leads to two different instances of React on the same
  // page. To identify a element from a different React instance we use
  // a flag instead of an instanceof check.
  var isElement = !!(object && object._isReactElement);
  // if (isElement && !(object instanceof ReactElement)) {
  // This is an indicator that you're using multiple versions of React at the
  // same time. This will screw with ownership and stuff. Fix it, please.
  // TODO: We could possibly warn here.
  // }
  return isElement;
};

module.exports = ReactElement;

},{"./ReactContext":35,"./ReactCurrentOwner":36,"./warning":145}],53:[function(_dereq_,module,exports){
/**
 * Copyright 2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactElementValidator
 */

/**
 * ReactElementValidator provides a wrapper around a element factory
 * which validates the props passed to the element. This is intended to be
 * used only in DEV and could be replaced by a static type checker for languages
 * that support it.
 */

"use strict";

var ReactElement = _dereq_("./ReactElement");
var ReactPropTypeLocations = _dereq_("./ReactPropTypeLocations");
var ReactCurrentOwner = _dereq_("./ReactCurrentOwner");

var monitorCodeUse = _dereq_("./monitorCodeUse");
var warning = _dereq_("./warning");

/**
 * Warn if there's no key explicitly set on dynamic arrays of children or
 * object keys are not valid. This allows us to keep track of children between
 * updates.
 */
var ownerHasKeyUseWarning = {
  'react_key_warning': {},
  'react_numeric_key_warning': {}
};
var ownerHasMonitoredObjectMap = {};

var loggedTypeFailures = {};

var NUMERIC_PROPERTY_REGEX = /^\d+$/;

/**
 * Gets the current owner's displayName for use in warnings.
 *
 * @internal
 * @return {?string} Display name or undefined
 */
function getCurrentOwnerDisplayName() {
  var current = ReactCurrentOwner.current;
  return current && current.constructor.displayName || undefined;
}

/**
 * Warn if the component doesn't have an explicit key assigned to it.
 * This component is in an array. The array could grow and shrink or be
 * reordered. All children that haven't already been validated are required to
 * have a "key" property assigned to it.
 *
 * @internal
 * @param {ReactComponent} component Component that requires a key.
 * @param {*} parentType component's parent's type.
 */
function validateExplicitKey(component, parentType) {
  if (component._store.validated || component.key != null) {
    return;
  }
  component._store.validated = true;

  warnAndMonitorForKeyUse(
    'react_key_warning',
    'Each child in an array should have a unique "key" prop.',
    component,
    parentType
  );
}

/**
 * Warn if the key is being defined as an object property but has an incorrect
 * value.
 *
 * @internal
 * @param {string} name Property name of the key.
 * @param {ReactComponent} component Component that requires a key.
 * @param {*} parentType component's parent's type.
 */
function validatePropertyKey(name, component, parentType) {
  if (!NUMERIC_PROPERTY_REGEX.test(name)) {
    return;
  }
  warnAndMonitorForKeyUse(
    'react_numeric_key_warning',
    'Child objects should have non-numeric keys so ordering is preserved.',
    component,
    parentType
  );
}

/**
 * Shared warning and monitoring code for the key warnings.
 *
 * @internal
 * @param {string} warningID The id used when logging.
 * @param {string} message The base warning that gets output.
 * @param {ReactComponent} component Component that requires a key.
 * @param {*} parentType component's parent's type.
 */
function warnAndMonitorForKeyUse(warningID, message, component, parentType) {
  var ownerName = getCurrentOwnerDisplayName();
  var parentName = parentType.displayName;

  var useName = ownerName || parentName;
  var memoizer = ownerHasKeyUseWarning[warningID];
  if (memoizer.hasOwnProperty(useName)) {
    return;
  }
  memoizer[useName] = true;

  message += ownerName ?
    (" Check the render method of " + ownerName + ".") :
    (" Check the renderComponent call using <" + parentName + ">.");

  // Usually the current owner is the offender, but if it accepts children as a
  // property, it may be the creator of the child that's responsible for
  // assigning it a key.
  var childOwnerName = null;
  if (component._owner && component._owner !== ReactCurrentOwner.current) {
    // Name of the component that originally created this child.
    childOwnerName = component._owner.constructor.displayName;

    message += (" It was passed a child from " + childOwnerName + ".");
  }

  message += ' See http://fb.me/react-warning-keys for more information.';
  monitorCodeUse(warningID, {
    component: useName,
    componentOwner: childOwnerName
  });
  console.warn(message);
}

/**
 * Log that we're using an object map. We're considering deprecating this
 * feature and replace it with proper Map and ImmutableMap data structures.
 *
 * @internal
 */
function monitorUseOfObjectMap() {
  var currentName = getCurrentOwnerDisplayName() || '';
  if (ownerHasMonitoredObjectMap.hasOwnProperty(currentName)) {
    return;
  }
  ownerHasMonitoredObjectMap[currentName] = true;
  monitorCodeUse('react_object_map_children');
}

/**
 * Ensure that every component either is passed in a static location, in an
 * array with an explicit keys property defined, or in an object literal
 * with valid key property.
 *
 * @internal
 * @param {*} component Statically passed child of any type.
 * @param {*} parentType component's parent's type.
 * @return {boolean}
 */
function validateChildKeys(component, parentType) {
  if (Array.isArray(component)) {
    for (var i = 0; i < component.length; i++) {
      var child = component[i];
      if (ReactElement.isValidElement(child)) {
        validateExplicitKey(child, parentType);
      }
    }
  } else if (ReactElement.isValidElement(component)) {
    // This component was passed in a valid location.
    component._store.validated = true;
  } else if (component && typeof component === 'object') {
    monitorUseOfObjectMap();
    for (var name in component) {
      validatePropertyKey(name, component[name], parentType);
    }
  }
}

/**
 * Assert that the props are valid
 *
 * @param {string} componentName Name of the component for error messages.
 * @param {object} propTypes Map of prop name to a ReactPropType
 * @param {object} props
 * @param {string} location e.g. "prop", "context", "child context"
 * @private
 */
function checkPropTypes(componentName, propTypes, props, location) {
  for (var propName in propTypes) {
    if (propTypes.hasOwnProperty(propName)) {
      var error;
      // Prop type validation may throw. In case they do, we don't want to
      // fail the render phase where it didn't fail before. So we log it.
      // After these have been cleaned up, we'll let them throw.
      try {
        error = propTypes[propName](props, propName, componentName, location);
      } catch (ex) {
        error = ex;
      }
      if (error instanceof Error && !(error.message in loggedTypeFailures)) {
        // Only monitor this failure once because there tends to be a lot of the
        // same error.
        loggedTypeFailures[error.message] = true;
        // This will soon use the warning module
        monitorCodeUse(
          'react_failed_descriptor_type_check',
          { message: error.message }
        );
      }
    }
  }
}

var ReactElementValidator = {

  createElement: function(type, props, children) {
    // We warn in this case but don't throw. We expect the element creation to
    // succeed and there will likely be errors in render.
    ("production" !== "development" ? warning(
      type != null,
      'React.createElement: type should not be null or undefined. It should ' +
        'be a string (for DOM elements) or a ReactClass (for composite ' +
        'components).'
    ) : null);

    var element = ReactElement.createElement.apply(this, arguments);

    // The result can be nullish if a mock or a custom function is used.
    // TODO: Drop this when these are no longer allowed as the type argument.
    if (element == null) {
      return element;
    }

    for (var i = 2; i < arguments.length; i++) {
      validateChildKeys(arguments[i], type);
    }

    if (type) {
      var name = type.displayName;
      if (type.propTypes) {
        checkPropTypes(
          name,
          type.propTypes,
          element.props,
          ReactPropTypeLocations.prop
        );
      }
      if (type.contextTypes) {
        checkPropTypes(
          name,
          type.contextTypes,
          element._context,
          ReactPropTypeLocations.context
        );
      }
    }
    return element;
  },

  createFactory: function(type) {
    var validatedFactory = ReactElementValidator.createElement.bind(
      null,
      type
    );
    validatedFactory.type = type;
    return validatedFactory;
  }

};

module.exports = ReactElementValidator;

},{"./ReactCurrentOwner":36,"./ReactElement":52,"./ReactPropTypeLocations":71,"./monitorCodeUse":136,"./warning":145}],54:[function(_dereq_,module,exports){
/**
 * Copyright 2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactEmptyComponent
 */

"use strict";

var ReactElement = _dereq_("./ReactElement");

var invariant = _dereq_("./invariant");

var component;
// This registry keeps track of the React IDs of the components that rendered to
// `null` (in reality a placeholder such as `noscript`)
var nullComponentIdsRegistry = {};

var ReactEmptyComponentInjection = {
  injectEmptyComponent: function(emptyComponent) {
    component = ReactElement.createFactory(emptyComponent);
  }
};

/**
 * @return {ReactComponent} component The injected empty component.
 */
function getEmptyComponent() {
  ("production" !== "development" ? invariant(
    component,
    'Trying to return null from a render, but no null placeholder component ' +
    'was injected.'
  ) : invariant(component));
  return component();
}

/**
 * Mark the component as having rendered to null.
 * @param {string} id Component's `_rootNodeID`.
 */
function registerNullComponentID(id) {
  nullComponentIdsRegistry[id] = true;
}

/**
 * Unmark the component as having rendered to null: it renders to something now.
 * @param {string} id Component's `_rootNodeID`.
 */
function deregisterNullComponentID(id) {
  delete nullComponentIdsRegistry[id];
}

/**
 * @param {string} id Component's `_rootNodeID`.
 * @return {boolean} True if the component is rendered to null.
 */
function isNullComponentID(id) {
  return nullComponentIdsRegistry[id];
}

var ReactEmptyComponent = {
  deregisterNullComponentID: deregisterNullComponentID,
  getEmptyComponent: getEmptyComponent,
  injection: ReactEmptyComponentInjection,
  isNullComponentID: isNullComponentID,
  registerNullComponentID: registerNullComponentID
};

module.exports = ReactEmptyComponent;

},{"./ReactElement":52,"./invariant":126}],55:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactErrorUtils
 * @typechecks
 */

"use strict";

var ReactErrorUtils = {
  /**
   * Creates a guarded version of a function. This is supposed to make debugging
   * of event handlers easier. To aid debugging with the browser's debugger,
   * this currently simply returns the original function.
   *
   * @param {function} func Function to be executed
   * @param {string} name The name of the guard
   * @return {function}
   */
  guard: function(func, name) {
    return func;
  }
};

module.exports = ReactErrorUtils;

},{}],56:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactEventEmitterMixin
 */

"use strict";

var EventPluginHub = _dereq_("./EventPluginHub");

function runEventQueueInBatch(events) {
  EventPluginHub.enqueueEvents(events);
  EventPluginHub.processEventQueue();
}

var ReactEventEmitterMixin = {

  /**
   * Streams a fired top-level event to `EventPluginHub` where plugins have the
   * opportunity to create `ReactEvent`s to be dispatched.
   *
   * @param {string} topLevelType Record from `EventConstants`.
   * @param {object} topLevelTarget The listening component root node.
   * @param {string} topLevelTargetID ID of `topLevelTarget`.
   * @param {object} nativeEvent Native environment event.
   */
  handleTopLevel: function(
      topLevelType,
      topLevelTarget,
      topLevelTargetID,
      nativeEvent) {
    var events = EventPluginHub.extractEvents(
      topLevelType,
      topLevelTarget,
      topLevelTargetID,
      nativeEvent
    );

    runEventQueueInBatch(events);
  }
};

module.exports = ReactEventEmitterMixin;

},{"./EventPluginHub":18}],57:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactEventListener
 * @typechecks static-only
 */

"use strict";

var EventListener = _dereq_("./EventListener");
var ExecutionEnvironment = _dereq_("./ExecutionEnvironment");
var PooledClass = _dereq_("./PooledClass");
var ReactInstanceHandles = _dereq_("./ReactInstanceHandles");
var ReactMount = _dereq_("./ReactMount");
var ReactUpdates = _dereq_("./ReactUpdates");

var assign = _dereq_("./Object.assign");
var getEventTarget = _dereq_("./getEventTarget");
var getUnboundedScrollPosition = _dereq_("./getUnboundedScrollPosition");

/**
 * Finds the parent React component of `node`.
 *
 * @param {*} node
 * @return {?DOMEventTarget} Parent container, or `null` if the specified node
 *                           is not nested.
 */
function findParent(node) {
  // TODO: It may be a good idea to cache this to prevent unnecessary DOM
  // traversal, but caching is difficult to do correctly without using a
  // mutation observer to listen for all DOM changes.
  var nodeID = ReactMount.getID(node);
  var rootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);
  var container = ReactMount.findReactContainerForID(rootID);
  var parent = ReactMount.getFirstReactDOM(container);
  return parent;
}

// Used to store ancestor hierarchy in top level callback
function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) {
  this.topLevelType = topLevelType;
  this.nativeEvent = nativeEvent;
  this.ancestors = [];
}
assign(TopLevelCallbackBookKeeping.prototype, {
  destructor: function() {
    this.topLevelType = null;
    this.nativeEvent = null;
    this.ancestors.length = 0;
  }
});
PooledClass.addPoolingTo(
  TopLevelCallbackBookKeeping,
  PooledClass.twoArgumentPooler
);

function handleTopLevelImpl(bookKeeping) {
  var topLevelTarget = ReactMount.getFirstReactDOM(
    getEventTarget(bookKeeping.nativeEvent)
  ) || window;

  // Loop through the hierarchy, in case there's any nested components.
  // It's important that we build the array of ancestors before calling any
  // event handlers, because event handlers can modify the DOM, leading to
  // inconsistencies with ReactMount's node cache. See #1105.
  var ancestor = topLevelTarget;
  while (ancestor) {
    bookKeeping.ancestors.push(ancestor);
    ancestor = findParent(ancestor);
  }

  for (var i = 0, l = bookKeeping.ancestors.length; i < l; i++) {
    topLevelTarget = bookKeeping.ancestors[i];
    var topLevelTargetID = ReactMount.getID(topLevelTarget) || '';
    ReactEventListener._handleTopLevel(
      bookKeeping.topLevelType,
      topLevelTarget,
      topLevelTargetID,
      bookKeeping.nativeEvent
    );
  }
}

function scrollValueMonitor(cb) {
  var scrollPosition = getUnboundedScrollPosition(window);
  cb(scrollPosition);
}

var ReactEventListener = {
  _enabled: true,
  _handleTopLevel: null,

  WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null,

  setHandleTopLevel: function(handleTopLevel) {
    ReactEventListener._handleTopLevel = handleTopLevel;
  },

  setEnabled: function(enabled) {
    ReactEventListener._enabled = !!enabled;
  },

  isEnabled: function() {
    return ReactEventListener._enabled;
  },


  /**
   * Traps top-level events by using event bubbling.
   *
   * @param {string} topLevelType Record from `EventConstants`.
   * @param {string} handlerBaseName Event name (e.g. "click").
   * @param {object} handle Element on which to attach listener.
   * @return {object} An object with a remove function which will forcefully
   *                  remove the listener.
   * @internal
   */
  trapBubbledEvent: function(topLevelType, handlerBaseName, handle) {
    var element = handle;
    if (!element) {
      return;
    }
    return EventListener.listen(
      element,
      handlerBaseName,
      ReactEventListener.dispatchEvent.bind(null, topLevelType)
    );
  },

  /**
   * Traps a top-level event by using event capturing.
   *
   * @param {string} topLevelType Record from `EventConstants`.
   * @param {string} handlerBaseName Event name (e.g. "click").
   * @param {object} handle Element on which to attach listener.
   * @return {object} An object with a remove function which will forcefully
   *                  remove the listener.
   * @internal
   */
  trapCapturedEvent: function(topLevelType, handlerBaseName, handle) {
    var element = handle;
    if (!element) {
      return;
    }
    return EventListener.capture(
      element,
      handlerBaseName,
      ReactEventListener.dispatchEvent.bind(null, topLevelType)
    );
  },

  monitorScrollValue: function(refresh) {
    var callback = scrollValueMonitor.bind(null, refresh);
    EventListener.listen(window, 'scroll', callback);
    EventListener.listen(window, 'resize', callback);
  },

  dispatchEvent: function(topLevelType, nativeEvent) {
    if (!ReactEventListener._enabled) {
      return;
    }

    var bookKeeping = TopLevelCallbackBookKeeping.getPooled(
      topLevelType,
      nativeEvent
    );
    try {
      // Event queue being processed in the same cycle allows
      // `preventDefault`.
      ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping);
    } finally {
      TopLevelCallbackBookKeeping.release(bookKeeping);
    }
  }
};

module.exports = ReactEventListener;

},{"./EventListener":17,"./ExecutionEnvironment":22,"./Object.assign":27,"./PooledClass":28,"./ReactInstanceHandles":60,"./ReactMount":63,"./ReactUpdates":79,"./getEventTarget":117,"./getUnboundedScrollPosition":122}],58:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactInjection
 */

"use strict";

var DOMProperty = _dereq_("./DOMProperty");
var EventPluginHub = _dereq_("./EventPluginHub");
var ReactComponent = _dereq_("./ReactComponent");
var ReactCompositeComponent = _dereq_("./ReactCompositeComponent");
var ReactEmptyComponent = _dereq_("./ReactEmptyComponent");
var ReactBrowserEventEmitter = _dereq_("./ReactBrowserEventEmitter");
var ReactNativeComponent = _dereq_("./ReactNativeComponent");
var ReactPerf = _dereq_("./ReactPerf");
var ReactRootIndex = _dereq_("./ReactRootIndex");
var ReactUpdates = _dereq_("./ReactUpdates");

var ReactInjection = {
  Component: ReactComponent.injection,
  CompositeComponent: ReactCompositeComponent.injection,
  DOMProperty: DOMProperty.injection,
  EmptyComponent: ReactEmptyComponent.injection,
  EventPluginHub: EventPluginHub.injection,
  EventEmitter: ReactBrowserEventEmitter.injection,
  NativeComponent: ReactNativeComponent.injection,
  Perf: ReactPerf.injection,
  RootIndex: ReactRootIndex.injection,
  Updates: ReactUpdates.injection
};

module.exports = ReactInjection;

},{"./DOMProperty":11,"./EventPluginHub":18,"./ReactBrowserEventEmitter":30,"./ReactComponent":32,"./ReactCompositeComponent":34,"./ReactEmptyComponent":54,"./ReactNativeComponent":66,"./ReactPerf":68,"./ReactRootIndex":75,"./ReactUpdates":79}],59:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactInputSelection
 */

"use strict";

var ReactDOMSelection = _dereq_("./ReactDOMSelection");

var containsNode = _dereq_("./containsNode");
var focusNode = _dereq_("./focusNode");
var getActiveElement = _dereq_("./getActiveElement");

function isInDocument(node) {
  return containsNode(document.documentElement, node);
}

/**
 * @ReactInputSelection: React input selection module. Based on Selection.js,
 * but modified to be suitable for react and has a couple of bug fixes (doesn't
 * assume buttons have range selections allowed).
 * Input selection module for React.
 */
var ReactInputSelection = {

  hasSelectionCapabilities: function(elem) {
    return elem && (
      (elem.nodeName === 'INPUT' && elem.type === 'text') ||
      elem.nodeName === 'TEXTAREA' ||
      elem.contentEditable === 'true'
    );
  },

  getSelectionInformation: function() {
    var focusedElem = getActiveElement();
    return {
      focusedElem: focusedElem,
      selectionRange:
          ReactInputSelection.hasSelectionCapabilities(focusedElem) ?
          ReactInputSelection.getSelection(focusedElem) :
          null
    };
  },

  /**
   * @restoreSelection: If any selection information was potentially lost,
   * restore it. This is useful when performing operations that could remove dom
   * nodes and place them back in, resulting in focus being lost.
   */
  restoreSelection: function(priorSelectionInformation) {
    var curFocusedElem = getActiveElement();
    var priorFocusedElem = priorSelectionInformation.focusedElem;
    var priorSelectionRange = priorSelectionInformation.selectionRange;
    if (curFocusedElem !== priorFocusedElem &&
        isInDocument(priorFocusedElem)) {
      if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) {
        ReactInputSelection.setSelection(
          priorFocusedElem,
          priorSelectionRange
        );
      }
      focusNode(priorFocusedElem);
    }
  },

  /**
   * @getSelection: Gets the selection bounds of a focused textarea, input or
   * contentEditable node.
   * -@input: Look up selection bounds of this input
   * -@return {start: selectionStart, end: selectionEnd}
   */
  getSelection: function(input) {
    var selection;

    if ('selectionStart' in input) {
      // Modern browser with input or textarea.
      selection = {
        start: input.selectionStart,
        end: input.selectionEnd
      };
    } else if (document.selection && input.nodeName === 'INPUT') {
      // IE8 input.
      var range = document.selection.createRange();
      // There can only be one selection per document in IE, so it must
      // be in our element.
      if (range.parentElement() === input) {
        selection = {
          start: -range.moveStart('character', -input.value.length),
          end: -range.moveEnd('character', -input.value.length)
        };
      }
    } else {
      // Content editable or old IE textarea.
      selection = ReactDOMSelection.getOffsets(input);
    }

    return selection || {start: 0, end: 0};
  },

  /**
   * @setSelection: Sets the selection bounds of a textarea or input and focuses
   * the input.
   * -@input     Set selection bounds of this input or textarea
   * -@offsets   Object of same form that is returned from get*
   */
  setSelection: function(input, offsets) {
    var start = offsets.start;
    var end = offsets.end;
    if (typeof end === 'undefined') {
      end = start;
    }

    if ('selectionStart' in input) {
      input.selectionStart = start;
      input.selectionEnd = Math.min(end, input.value.length);
    } else if (document.selection && input.nodeName === 'INPUT') {
      var range = input.createTextRange();
      range.collapse(true);
      range.moveStart('character', start);
      range.moveEnd('character', end - start);
      range.select();
    } else {
      ReactDOMSelection.setOffsets(input, offsets);
    }
  }
};

module.exports = ReactInputSelection;

},{"./ReactDOMSelection":46,"./containsNode":101,"./focusNode":111,"./getActiveElement":113}],60:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactInstanceHandles
 * @typechecks static-only
 */

"use strict";

var ReactRootIndex = _dereq_("./ReactRootIndex");

var invariant = _dereq_("./invariant");

var SEPARATOR = '.';
var SEPARATOR_LENGTH = SEPARATOR.length;

/**
 * Maximum depth of traversals before we consider the possibility of a bad ID.
 */
var MAX_TREE_DEPTH = 100;

/**
 * Creates a DOM ID prefix to use when mounting React components.
 *
 * @param {number} index A unique integer
 * @return {string} React root ID.
 * @internal
 */
function getReactRootIDString(index) {
  return SEPARATOR + index.toString(36);
}

/**
 * Checks if a character in the supplied ID is a separator or the end.
 *
 * @param {string} id A React DOM ID.
 * @param {number} index Index of the character to check.
 * @return {boolean} True if the character is a separator or end of the ID.
 * @private
 */
function isBoundary(id, index) {
  return id.charAt(index) === SEPARATOR || index === id.length;
}

/**
 * Checks if the supplied string is a valid React DOM ID.
 *
 * @param {string} id A React DOM ID, maybe.
 * @return {boolean} True if the string is a valid React DOM ID.
 * @private
 */
function isValidID(id) {
  return id === '' || (
    id.charAt(0) === SEPARATOR && id.charAt(id.length - 1) !== SEPARATOR
  );
}

/**
 * Checks if the first ID is an ancestor of or equal to the second ID.
 *
 * @param {string} ancestorID
 * @param {string} descendantID
 * @return {boolean} True if `ancestorID` is an ancestor of `descendantID`.
 * @internal
 */
function isAncestorIDOf(ancestorID, descendantID) {
  return (
    descendantID.indexOf(ancestorID) === 0 &&
    isBoundary(descendantID, ancestorID.length)
  );
}

/**
 * Gets the parent ID of the supplied React DOM ID, `id`.
 *
 * @param {string} id ID of a component.
 * @return {string} ID of the parent, or an empty string.
 * @private
 */
function getParentID(id) {
  return id ? id.substr(0, id.lastIndexOf(SEPARATOR)) : '';
}

/**
 * Gets the next DOM ID on the tree path from the supplied `ancestorID` to the
 * supplied `destinationID`. If they are equal, the ID is returned.
 *
 * @param {string} ancestorID ID of an ancestor node of `destinationID`.
 * @param {string} destinationID ID of the destination node.
 * @return {string} Next ID on the path from `ancestorID` to `destinationID`.
 * @private
 */
function getNextDescendantID(ancestorID, destinationID) {
  ("production" !== "development" ? invariant(
    isValidID(ancestorID) && isValidID(destinationID),
    'getNextDescendantID(%s, %s): Received an invalid React DOM ID.',
    ancestorID,
    destinationID
  ) : invariant(isValidID(ancestorID) && isValidID(destinationID)));
  ("production" !== "development" ? invariant(
    isAncestorIDOf(ancestorID, destinationID),
    'getNextDescendantID(...): React has made an invalid assumption about ' +
    'the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.',
    ancestorID,
    destinationID
  ) : invariant(isAncestorIDOf(ancestorID, destinationID)));
  if (ancestorID === destinationID) {
    return ancestorID;
  }
  // Skip over the ancestor and the immediate separator. Traverse until we hit
  // another separator or we reach the end of `destinationID`.
  var start = ancestorID.length + SEPARATOR_LENGTH;
  for (var i = start; i < destinationID.length; i++) {
    if (isBoundary(destinationID, i)) {
      break;
    }
  }
  return destinationID.substr(0, i);
}

/**
 * Gets the nearest common ancestor ID of two IDs.
 *
 * Using this ID scheme, the nearest common ancestor ID is the longest common
 * prefix of the two IDs that immediately preceded a "marker" in both strings.
 *
 * @param {string} oneID
 * @param {string} twoID
 * @return {string} Nearest common ancestor ID, or the empty string if none.
 * @private
 */
function getFirstCommonAncestorID(oneID, twoID) {
  var minLength = Math.min(oneID.length, twoID.length);
  if (minLength === 0) {
    return '';
  }
  var lastCommonMarkerIndex = 0;
  // Use `<=` to traverse until the "EOL" of the shorter string.
  for (var i = 0; i <= minLength; i++) {
    if (isBoundary(oneID, i) && isBoundary(twoID, i)) {
      lastCommonMarkerIndex = i;
    } else if (oneID.charAt(i) !== twoID.charAt(i)) {
      break;
    }
  }
  var longestCommonID = oneID.substr(0, lastCommonMarkerIndex);
  ("production" !== "development" ? invariant(
    isValidID(longestCommonID),
    'getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s',
    oneID,
    twoID,
    longestCommonID
  ) : invariant(isValidID(longestCommonID)));
  return longestCommonID;
}

/**
 * Traverses the parent path between two IDs (either up or down). The IDs must
 * not be the same, and there must exist a parent path between them. If the
 * callback returns `false`, traversal is stopped.
 *
 * @param {?string} start ID at which to start traversal.
 * @param {?string} stop ID at which to end traversal.
 * @param {function} cb Callback to invoke each ID with.
 * @param {?boolean} skipFirst Whether or not to skip the first node.
 * @param {?boolean} skipLast Whether or not to skip the last node.
 * @private
 */
function traverseParentPath(start, stop, cb, arg, skipFirst, skipLast) {
  start = start || '';
  stop = stop || '';
  ("production" !== "development" ? invariant(
    start !== stop,
    'traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.',
    start
  ) : invariant(start !== stop));
  var traverseUp = isAncestorIDOf(stop, start);
  ("production" !== "development" ? invariant(
    traverseUp || isAncestorIDOf(start, stop),
    'traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do ' +
    'not have a parent path.',
    start,
    stop
  ) : invariant(traverseUp || isAncestorIDOf(start, stop)));
  // Traverse from `start` to `stop` one depth at a time.
  var depth = 0;
  var traverse = traverseUp ? getParentID : getNextDescendantID;
  for (var id = start; /* until break */; id = traverse(id, stop)) {
    var ret;
    if ((!skipFirst || id !== start) && (!skipLast || id !== stop)) {
      ret = cb(id, traverseUp, arg);
    }
    if (ret === false || id === stop) {
      // Only break //after// visiting `stop`.
      break;
    }
    ("production" !== "development" ? invariant(
      depth++ < MAX_TREE_DEPTH,
      'traverseParentPath(%s, %s, ...): Detected an infinite loop while ' +
      'traversing the React DOM ID tree. This may be due to malformed IDs: %s',
      start, stop
    ) : invariant(depth++ < MAX_TREE_DEPTH));
  }
}

/**
 * Manages the IDs assigned to DOM representations of React components. This
 * uses a specific scheme in order to traverse the DOM efficiently (e.g. in
 * order to simulate events).
 *
 * @internal
 */
var ReactInstanceHandles = {

  /**
   * Constructs a React root ID
   * @return {string} A React root ID.
   */
  createReactRootID: function() {
    return getReactRootIDString(ReactRootIndex.createReactRootIndex());
  },

  /**
   * Constructs a React ID by joining a root ID with a name.
   *
   * @param {string} rootID Root ID of a parent component.
   * @param {string} name A component's name (as flattened children).
   * @return {string} A React ID.
   * @internal
   */
  createReactID: function(rootID, name) {
    return rootID + name;
  },

  /**
   * Gets the DOM ID of the React component that is the root of the tree that
   * contains the React component with the supplied DOM ID.
   *
   * @param {string} id DOM ID of a React component.
   * @return {?string} DOM ID of the React component that is the root.
   * @internal
   */
  getReactRootIDFromNodeID: function(id) {
    if (id && id.charAt(0) === SEPARATOR && id.length > 1) {
      var index = id.indexOf(SEPARATOR, 1);
      return index > -1 ? id.substr(0, index) : id;
    }
    return null;
  },

  /**
   * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that
   * should would receive a `mouseEnter` or `mouseLeave` event.
   *
   * NOTE: Does not invoke the callback on the nearest common ancestor because
   * nothing "entered" or "left" that element.
   *
   * @param {string} leaveID ID being left.
   * @param {string} enterID ID being entered.
   * @param {function} cb Callback to invoke on each entered/left ID.
   * @param {*} upArg Argument to invoke the callback with on left IDs.
   * @param {*} downArg Argument to invoke the callback with on entered IDs.
   * @internal
   */
  traverseEnterLeave: function(leaveID, enterID, cb, upArg, downArg) {
    var ancestorID = getFirstCommonAncestorID(leaveID, enterID);
    if (ancestorID !== leaveID) {
      traverseParentPath(leaveID, ancestorID, cb, upArg, false, true);
    }
    if (ancestorID !== enterID) {
      traverseParentPath(ancestorID, enterID, cb, downArg, true, false);
    }
  },

  /**
   * Simulates the traversal of a two-phase, capture/bubble event dispatch.
   *
   * NOTE: This traversal happens on IDs without touching the DOM.
   *
   * @param {string} targetID ID of the target node.
   * @param {function} cb Callback to invoke.
   * @param {*} arg Argument to invoke the callback with.
   * @internal
   */
  traverseTwoPhase: function(targetID, cb, arg) {
    if (targetID) {
      traverseParentPath('', targetID, cb, arg, true, false);
      traverseParentPath(targetID, '', cb, arg, false, true);
    }
  },

  /**
   * Traverse a node ID, calling the supplied `cb` for each ancestor ID. For
   * example, passing `.0.$row-0.1` would result in `cb` getting called
   * with `.0`, `.0.$row-0`, and `.0.$row-0.1`.
   *
   * NOTE: This traversal happens on IDs without touching the DOM.
   *
   * @param {string} targetID ID of the target node.
   * @param {function} cb Callback to invoke.
   * @param {*} arg Argument to invoke the callback with.
   * @internal
   */
  traverseAncestors: function(targetID, cb, arg) {
    traverseParentPath('', targetID, cb, arg, true, false);
  },

  /**
   * Exposed for unit testing.
   * @private
   */
  _getFirstCommonAncestorID: getFirstCommonAncestorID,

  /**
   * Exposed for unit testing.
   * @private
   */
  _getNextDescendantID: getNextDescendantID,

  isAncestorIDOf: isAncestorIDOf,

  SEPARATOR: SEPARATOR

};

module.exports = ReactInstanceHandles;

},{"./ReactRootIndex":75,"./invariant":126}],61:[function(_dereq_,module,exports){
/**
 * Copyright 2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactLegacyElement
 */

"use strict";

var ReactCurrentOwner = _dereq_("./ReactCurrentOwner");

var invariant = _dereq_("./invariant");
var monitorCodeUse = _dereq_("./monitorCodeUse");
var warning = _dereq_("./warning");

var legacyFactoryLogs = {};
function warnForLegacyFactoryCall() {
  if (!ReactLegacyElementFactory._isLegacyCallWarningEnabled) {
    return;
  }
  var owner = ReactCurrentOwner.current;
  var name = owner && owner.constructor ? owner.constructor.displayName : '';
  if (!name) {
    name = 'Something';
  }
  if (legacyFactoryLogs.hasOwnProperty(name)) {
    return;
  }
  legacyFactoryLogs[name] = true;
  ("production" !== "development" ? warning(
    false,
    name + ' is calling a React component directly. ' +
    'Use a factory or JSX instead. See: http://fb.me/react-legacyfactory'
  ) : null);
  monitorCodeUse('react_legacy_factory_call', { version: 3, name: name });
}

function warnForPlainFunctionType(type) {
  var isReactClass =
    type.prototype &&
    typeof type.prototype.mountComponent === 'function' &&
    typeof type.prototype.receiveComponent === 'function';
  if (isReactClass) {
    ("production" !== "development" ? warning(
      false,
      'Did not expect to get a React class here. Use `Component` instead ' +
      'of `Component.type` or `this.constructor`.'
    ) : null);
  } else {
    if (!type._reactWarnedForThisType) {
      try {
        type._reactWarnedForThisType = true;
      } catch (x) {
        // just incase this is a frozen object or some special object
      }
      monitorCodeUse(
        'react_non_component_in_jsx',
        { version: 3, name: type.name }
      );
    }
    ("production" !== "development" ? warning(
      false,
      'This JSX uses a plain function. Only React components are ' +
      'valid in React\'s JSX transform.'
    ) : null);
  }
}

function warnForNonLegacyFactory(type) {
  ("production" !== "development" ? warning(
    false,
    'Do not pass React.DOM.' + type.type + ' to JSX or createFactory. ' +
    'Use the string "' + type.type + '" instead.'
  ) : null);
}

/**
 * Transfer static properties from the source to the target. Functions are
 * rebound to have this reflect the original source.
 */
function proxyStaticMethods(target, source) {
  if (typeof source !== 'function') {
    return;
  }
  for (var key in source) {
    if (source.hasOwnProperty(key)) {
      var value = source[key];
      if (typeof value === 'function') {
        var bound = value.bind(source);
        // Copy any properties defined on the function, such as `isRequired` on
        // a PropTypes validator.
        for (var k in value) {
          if (value.hasOwnProperty(k)) {
            bound[k] = value[k];
          }
        }
        target[key] = bound;
      } else {
        target[key] = value;
      }
    }
  }
}

// We use an object instead of a boolean because booleans are ignored by our
// mocking libraries when these factories gets mocked.
var LEGACY_MARKER = {};
var NON_LEGACY_MARKER = {};

var ReactLegacyElementFactory = {};

ReactLegacyElementFactory.wrapCreateFactory = function(createFactory) {
  var legacyCreateFactory = function(type) {
    if (typeof type !== 'function') {
      // Non-function types cannot be legacy factories
      return createFactory(type);
    }

    if (type.isReactNonLegacyFactory) {
      // This is probably a factory created by ReactDOM we unwrap it to get to
      // the underlying string type. It shouldn't have been passed here so we
      // warn.
      if ("production" !== "development") {
        warnForNonLegacyFactory(type);
      }
      return createFactory(type.type);
    }

    if (type.isReactLegacyFactory) {
      // This is probably a legacy factory created by ReactCompositeComponent.
      // We unwrap it to get to the underlying class.
      return createFactory(type.type);
    }

    if ("production" !== "development") {
      warnForPlainFunctionType(type);
    }

    // Unless it's a legacy factory, then this is probably a plain function,
    // that is expecting to be invoked by JSX. We can just return it as is.
    return type;
  };
  return legacyCreateFactory;
};

ReactLegacyElementFactory.wrapCreateElement = function(createElement) {
  var legacyCreateElement = function(type, props, children) {
    if (typeof type !== 'function') {
      // Non-function types cannot be legacy factories
      return createElement.apply(this, arguments);
    }

    var args;

    if (type.isReactNonLegacyFactory) {
      // This is probably a factory created by ReactDOM we unwrap it to get to
      // the underlying string type. It shouldn't have been passed here so we
      // warn.
      if ("production" !== "development") {
        warnForNonLegacyFactory(type);
      }
      args = Array.prototype.slice.call(arguments, 0);
      args[0] = type.type;
      return createElement.apply(this, args);
    }

    if (type.isReactLegacyFactory) {
      // This is probably a legacy factory created by ReactCompositeComponent.
      // We unwrap it to get to the underlying class.
      if (type._isMockFunction) {
        // If this is a mock function, people will expect it to be called. We
        // will actually call the original mock factory function instead. This
        // future proofs unit testing that assume that these are classes.
        type.type._mockedReactClassConstructor = type;
      }
      args = Array.prototype.slice.call(arguments, 0);
      args[0] = type.type;
      return createElement.apply(this, args);
    }

    if ("production" !== "development") {
      warnForPlainFunctionType(type);
    }

    // This is being called with a plain function we should invoke it
    // immediately as if this was used with legacy JSX.
    return type.apply(null, Array.prototype.slice.call(arguments, 1));
  };
  return legacyCreateElement;
};

ReactLegacyElementFactory.wrapFactory = function(factory) {
  ("production" !== "development" ? invariant(
    typeof factory === 'function',
    'This is suppose to accept a element factory'
  ) : invariant(typeof factory === 'function'));
  var legacyElementFactory = function(config, children) {
    // This factory should not be called when JSX is used. Use JSX instead.
    if ("production" !== "development") {
      warnForLegacyFactoryCall();
    }
    return factory.apply(this, arguments);
  };
  proxyStaticMethods(legacyElementFactory, factory.type);
  legacyElementFactory.isReactLegacyFactory = LEGACY_MARKER;
  legacyElementFactory.type = factory.type;
  return legacyElementFactory;
};

// This is used to mark a factory that will remain. E.g. we're allowed to call
// it as a function. However, you're not suppose to pass it to createElement
// or createFactory, so it will warn you if you do.
ReactLegacyElementFactory.markNonLegacyFactory = function(factory) {
  factory.isReactNonLegacyFactory = NON_LEGACY_MARKER;
  return factory;
};

// Checks if a factory function is actually a legacy factory pretending to
// be a class.
ReactLegacyElementFactory.isValidFactory = function(factory) {
  // TODO: This will be removed and moved into a class validator or something.
  return typeof factory === 'function' &&
    factory.isReactLegacyFactory === LEGACY_MARKER;
};

ReactLegacyElementFactory.isValidClass = function(factory) {
  if ("production" !== "development") {
    ("production" !== "development" ? warning(
      false,
      'isValidClass is deprecated and will be removed in a future release. ' +
      'Use a more specific validator instead.'
    ) : null);
  }
  return ReactLegacyElementFactory.isValidFactory(factory);
};

ReactLegacyElementFactory._isLegacyCallWarningEnabled = true;

module.exports = ReactLegacyElementFactory;

},{"./ReactCurrentOwner":36,"./invariant":126,"./monitorCodeUse":136,"./warning":145}],62:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactMarkupChecksum
 */

"use strict";

var adler32 = _dereq_("./adler32");

var ReactMarkupChecksum = {
  CHECKSUM_ATTR_NAME: 'data-react-checksum',

  /**
   * @param {string} markup Markup string
   * @return {string} Markup string with checksum attribute attached
   */
  addChecksumToMarkup: function(markup) {
    var checksum = adler32(markup);
    return markup.replace(
      '>',
      ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '">'
    );
  },

  /**
   * @param {string} markup to use
   * @param {DOMElement} element root React element
   * @returns {boolean} whether or not the markup is the same
   */
  canReuseMarkup: function(markup, element) {
    var existingChecksum = element.getAttribute(
      ReactMarkupChecksum.CHECKSUM_ATTR_NAME
    );
    existingChecksum = existingChecksum && parseInt(existingChecksum, 10);
    var markupChecksum = adler32(markup);
    return markupChecksum === existingChecksum;
  }
};

module.exports = ReactMarkupChecksum;

},{"./adler32":98}],63:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactMount
 */

"use strict";

var DOMProperty = _dereq_("./DOMProperty");
var ReactBrowserEventEmitter = _dereq_("./ReactBrowserEventEmitter");
var ReactCurrentOwner = _dereq_("./ReactCurrentOwner");
var ReactElement = _dereq_("./ReactElement");
var ReactLegacyElement = _dereq_("./ReactLegacyElement");
var ReactInstanceHandles = _dereq_("./ReactInstanceHandles");
var ReactPerf = _dereq_("./ReactPerf");

var containsNode = _dereq_("./containsNode");
var deprecated = _dereq_("./deprecated");
var getReactRootElementInContainer = _dereq_("./getReactRootElementInContainer");
var instantiateReactComponent = _dereq_("./instantiateReactComponent");
var invariant = _dereq_("./invariant");
var shouldUpdateReactComponent = _dereq_("./shouldUpdateReactComponent");
var warning = _dereq_("./warning");

var createElement = ReactLegacyElement.wrapCreateElement(
  ReactElement.createElement
);

var SEPARATOR = ReactInstanceHandles.SEPARATOR;

var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
var nodeCache = {};

var ELEMENT_NODE_TYPE = 1;
var DOC_NODE_TYPE = 9;

/** Mapping from reactRootID to React component instance. */
var instancesByReactRootID = {};

/** Mapping from reactRootID to `container` nodes. */
var containersByReactRootID = {};

if ("production" !== "development") {
  /** __DEV__-only mapping from reactRootID to root elements. */
  var rootElementsByReactRootID = {};
}

// Used to store breadth-first search state in findComponentRoot.
var findComponentRootReusableArray = [];

/**
 * @param {DOMElement} container DOM element that may contain a React component.
 * @return {?string} A "reactRoot" ID, if a React component is rendered.
 */
function getReactRootID(container) {
  var rootElement = getReactRootElementInContainer(container);
  return rootElement && ReactMount.getID(rootElement);
}

/**
 * Accessing node[ATTR_NAME] or calling getAttribute(ATTR_NAME) on a form
 * element can return its control whose name or ID equals ATTR_NAME. All
 * DOM nodes support `getAttributeNode` but this can also get called on
 * other objects so just return '' if we're given something other than a
 * DOM node (such as window).
 *
 * @param {?DOMElement|DOMWindow|DOMDocument|DOMTextNode} node DOM node.
 * @return {string} ID of the supplied `domNode`.
 */
function getID(node) {
  var id = internalGetID(node);
  if (id) {
    if (nodeCache.hasOwnProperty(id)) {
      var cached = nodeCache[id];
      if (cached !== node) {
        ("production" !== "development" ? invariant(
          !isValid(cached, id),
          'ReactMount: Two valid but unequal nodes with the same `%s`: %s',
          ATTR_NAME, id
        ) : invariant(!isValid(cached, id)));

        nodeCache[id] = node;
      }
    } else {
      nodeCache[id] = node;
    }
  }

  return id;
}

function internalGetID(node) {
  // If node is something like a window, document, or text node, none of
  // which support attributes or a .getAttribute method, gracefully return
  // the empty string, as if the attribute were missing.
  return node && node.getAttribute && node.getAttribute(ATTR_NAME) || '';
}

/**
 * Sets the React-specific ID of the given node.
 *
 * @param {DOMElement} node The DOM node whose ID will be set.
 * @param {string} id The value of the ID attribute.
 */
function setID(node, id) {
  var oldID = internalGetID(node);
  if (oldID !== id) {
    delete nodeCache[oldID];
  }
  node.setAttribute(ATTR_NAME, id);
  nodeCache[id] = node;
}

/**
 * Finds the node with the supplied React-generated DOM ID.
 *
 * @param {string} id A React-generated DOM ID.
 * @return {DOMElement} DOM node with the suppled `id`.
 * @internal
 */
function getNode(id) {
  if (!nodeCache.hasOwnProperty(id) || !isValid(nodeCache[id], id)) {
    nodeCache[id] = ReactMount.findReactNodeByID(id);
  }
  return nodeCache[id];
}

/**
 * A node is "valid" if it is contained by a currently mounted container.
 *
 * This means that the node does not have to be contained by a document in
 * order to be considered valid.
 *
 * @param {?DOMElement} node The candidate DOM node.
 * @param {string} id The expected ID of the node.
 * @return {boolean} Whether the node is contained by a mounted container.
 */
function isValid(node, id) {
  if (node) {
    ("production" !== "development" ? invariant(
      internalGetID(node) === id,
      'ReactMount: Unexpected modification of `%s`',
      ATTR_NAME
    ) : invariant(internalGetID(node) === id));

    var container = ReactMount.findReactContainerForID(id);
    if (container && containsNode(container, node)) {
      return true;
    }
  }

  return false;
}

/**
 * Causes the cache to forget about one React-specific ID.
 *
 * @param {string} id The ID to forget.
 */
function purgeID(id) {
  delete nodeCache[id];
}

var deepestNodeSoFar = null;
function findDeepestCachedAncestorImpl(ancestorID) {
  var ancestor = nodeCache[ancestorID];
  if (ancestor && isValid(ancestor, ancestorID)) {
    deepestNodeSoFar = ancestor;
  } else {
    // This node isn't populated in the cache, so presumably none of its
    // descendants are. Break out of the loop.
    return false;
  }
}

/**
 * Return the deepest cached node whose ID is a prefix of `targetID`.
 */
function findDeepestCachedAncestor(targetID) {
  deepestNodeSoFar = null;
  ReactInstanceHandles.traverseAncestors(
    targetID,
    findDeepestCachedAncestorImpl
  );

  var foundNode = deepestNodeSoFar;
  deepestNodeSoFar = null;
  return foundNode;
}

/**
 * Mounting is the process of initializing a React component by creatings its
 * representative DOM elements and inserting them into a supplied `container`.
 * Any prior content inside `container` is destroyed in the process.
 *
 *   ReactMount.render(
 *     component,
 *     document.getElementById('container')
 *   );
 *
 *   <div id="container">                   <-- Supplied `container`.
 *     <div data-reactid=".3">              <-- Rendered reactRoot of React
 *       // ...                                 component.
 *     </div>
 *   </div>
 *
 * Inside of `container`, the first element rendered is the "reactRoot".
 */
var ReactMount = {
  /** Exposed for debugging purposes **/
  _instancesByReactRootID: instancesByReactRootID,

  /**
   * This is a hook provided to support rendering React components while
   * ensuring that the apparent scroll position of its `container` does not
   * change.
   *
   * @param {DOMElement} container The `container` being rendered into.
   * @param {function} renderCallback This must be called once to do the render.
   */
  scrollMonitor: function(container, renderCallback) {
    renderCallback();
  },

  /**
   * Take a component that's already mounted into the DOM and replace its props
   * @param {ReactComponent} prevComponent component instance already in the DOM
   * @param {ReactComponent} nextComponent component instance to render
   * @param {DOMElement} container container to render into
   * @param {?function} callback function triggered on completion
   */
  _updateRootComponent: function(
      prevComponent,
      nextComponent,
      container,
      callback) {
    var nextProps = nextComponent.props;
    ReactMount.scrollMonitor(container, function() {
      prevComponent.replaceProps(nextProps, callback);
    });

    if ("production" !== "development") {
      // Record the root element in case it later gets transplanted.
      rootElementsByReactRootID[getReactRootID(container)] =
        getReactRootElementInContainer(container);
    }

    return prevComponent;
  },

  /**
   * Register a component into the instance map and starts scroll value
   * monitoring
   * @param {ReactComponent} nextComponent component instance to render
   * @param {DOMElement} container container to render into
   * @return {string} reactRoot ID prefix
   */
  _registerComponent: function(nextComponent, container) {
    ("production" !== "development" ? invariant(
      container && (
        container.nodeType === ELEMENT_NODE_TYPE ||
        container.nodeType === DOC_NODE_TYPE
      ),
      '_registerComponent(...): Target container is not a DOM element.'
    ) : invariant(container && (
      container.nodeType === ELEMENT_NODE_TYPE ||
      container.nodeType === DOC_NODE_TYPE
    )));

    ReactBrowserEventEmitter.ensureScrollValueMonitoring();

    var reactRootID = ReactMount.registerContainer(container);
    instancesByReactRootID[reactRootID] = nextComponent;
    return reactRootID;
  },

  /**
   * Render a new component into the DOM.
   * @param {ReactComponent} nextComponent component instance to render
   * @param {DOMElement} container container to render into
   * @param {boolean} shouldReuseMarkup if we should skip the markup insertion
   * @return {ReactComponent} nextComponent
   */
  _renderNewRootComponent: ReactPerf.measure(
    'ReactMount',
    '_renderNewRootComponent',
    function(
        nextComponent,
        container,
        shouldReuseMarkup) {
      // Various parts of our code (such as ReactCompositeComponent's
      // _renderValidatedComponent) assume that calls to render aren't nested;
      // verify that that's the case.
      ("production" !== "development" ? warning(
        ReactCurrentOwner.current == null,
        '_renderNewRootComponent(): Render methods should be a pure function ' +
        'of props and state; triggering nested component updates from ' +
        'render is not allowed. If necessary, trigger nested updates in ' +
        'componentDidUpdate.'
      ) : null);

      var componentInstance = instantiateReactComponent(nextComponent, null);
      var reactRootID = ReactMount._registerComponent(
        componentInstance,
        container
      );
      componentInstance.mountComponentIntoNode(
        reactRootID,
        container,
        shouldReuseMarkup
      );

      if ("production" !== "development") {
        // Record the root element in case it later gets transplanted.
        rootElementsByReactRootID[reactRootID] =
          getReactRootElementInContainer(container);
      }

      return componentInstance;
    }
  ),

  /**
   * Renders a React component into the DOM in the supplied `container`.
   *
   * If the React component was previously rendered into `container`, this will
   * perform an update on it and only mutate the DOM as necessary to reflect the
   * latest React component.
   *
   * @param {ReactElement} nextElement Component element to render.
   * @param {DOMElement} container DOM element to render into.
   * @param {?function} callback function triggered on completion
   * @return {ReactComponent} Component instance rendered in `container`.
   */
  render: function(nextElement, container, callback) {
    ("production" !== "development" ? invariant(
      ReactElement.isValidElement(nextElement),
      'renderComponent(): Invalid component element.%s',
      (
        typeof nextElement === 'string' ?
          ' Instead of passing an element string, make sure to instantiate ' +
          'it by passing it to React.createElement.' :
        ReactLegacyElement.isValidFactory(nextElement) ?
          ' Instead of passing a component class, make sure to instantiate ' +
          'it by passing it to React.createElement.' :
        // Check if it quacks like a element
        typeof nextElement.props !== "undefined" ?
          ' This may be caused by unintentionally loading two independent ' +
          'copies of React.' :
          ''
      )
    ) : invariant(ReactElement.isValidElement(nextElement)));

    var prevComponent = instancesByReactRootID[getReactRootID(container)];

    if (prevComponent) {
      var prevElement = prevComponent._currentElement;
      if (shouldUpdateReactComponent(prevElement, nextElement)) {
        return ReactMount._updateRootComponent(
          prevComponent,
          nextElement,
          container,
          callback
        );
      } else {
        ReactMount.unmountComponentAtNode(container);
      }
    }

    var reactRootElement = getReactRootElementInContainer(container);
    var containerHasReactMarkup =
      reactRootElement && ReactMount.isRenderedByReact(reactRootElement);

    var shouldReuseMarkup = containerHasReactMarkup && !prevComponent;

    var component = ReactMount._renderNewRootComponent(
      nextElement,
      container,
      shouldReuseMarkup
    );
    callback && callback.call(component);
    return component;
  },

  /**
   * Constructs a component instance of `constructor` with `initialProps` and
   * renders it into the supplied `container`.
   *
   * @param {function} constructor React component constructor.
   * @param {?object} props Initial props of the component instance.
   * @param {DOMElement} container DOM element to render into.
   * @return {ReactComponent} Component instance rendered in `container`.
   */
  constructAndRenderComponent: function(constructor, props, container) {
    var element = createElement(constructor, props);
    return ReactMount.render(element, container);
  },

  /**
   * Constructs a component instance of `constructor` with `initialProps` and
   * renders it into a container node identified by supplied `id`.
   *
   * @param {function} componentConstructor React component constructor
   * @param {?object} props Initial props of the component instance.
   * @param {string} id ID of the DOM element to render into.
   * @return {ReactComponent} Component instance rendered in the container node.
   */
  constructAndRenderComponentByID: function(constructor, props, id) {
    var domNode = document.getElementById(id);
    ("production" !== "development" ? invariant(
      domNode,
      'Tried to get element with id of "%s" but it is not present on the page.',
      id
    ) : invariant(domNode));
    return ReactMount.constructAndRenderComponent(constructor, props, domNode);
  },

  /**
   * Registers a container node into which React components will be rendered.
   * This also creates the "reactRoot" ID that will be assigned to the element
   * rendered within.
   *
   * @param {DOMElement} container DOM element to register as a container.
   * @return {string} The "reactRoot" ID of elements rendered within.
   */
  registerContainer: function(container) {
    var reactRootID = getReactRootID(container);
    if (reactRootID) {
      // If one exists, make sure it is a valid "reactRoot" ID.
      reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(reactRootID);
    }
    if (!reactRootID) {
      // No valid "reactRoot" ID found, create one.
      reactRootID = ReactInstanceHandles.createReactRootID();
    }
    containersByReactRootID[reactRootID] = container;
    return reactRootID;
  },

  /**
   * Unmounts and destroys the React component rendered in the `container`.
   *
   * @param {DOMElement} container DOM element containing a React component.
   * @return {boolean} True if a component was found in and unmounted from
   *                   `container`
   */
  unmountComponentAtNode: function(container) {
    // Various parts of our code (such as ReactCompositeComponent's
    // _renderValidatedComponent) assume that calls to render aren't nested;
    // verify that that's the case. (Strictly speaking, unmounting won't cause a
    // render but we still don't expect to be in a render call here.)
    ("production" !== "development" ? warning(
      ReactCurrentOwner.current == null,
      'unmountComponentAtNode(): Render methods should be a pure function of ' +
      'props and state; triggering nested component updates from render is ' +
      'not allowed. If necessary, trigger nested updates in ' +
      'componentDidUpdate.'
    ) : null);

    var reactRootID = getReactRootID(container);
    var component = instancesByReactRootID[reactRootID];
    if (!component) {
      return false;
    }
    ReactMount.unmountComponentFromNode(component, container);
    delete instancesByReactRootID[reactRootID];
    delete containersByReactRootID[reactRootID];
    if ("production" !== "development") {
      delete rootElementsByReactRootID[reactRootID];
    }
    return true;
  },

  /**
   * Unmounts a component and removes it from the DOM.
   *
   * @param {ReactComponent} instance React component instance.
   * @param {DOMElement} container DOM element to unmount from.
   * @final
   * @internal
   * @see {ReactMount.unmountComponentAtNode}
   */
  unmountComponentFromNode: function(instance, container) {
    instance.unmountComponent();

    if (container.nodeType === DOC_NODE_TYPE) {
      container = container.documentElement;
    }

    // http://jsperf.com/emptying-a-node
    while (container.lastChild) {
      container.removeChild(container.lastChild);
    }
  },

  /**
   * Finds the container DOM element that contains React component to which the
   * supplied DOM `id` belongs.
   *
   * @param {string} id The ID of an element rendered by a React component.
   * @return {?DOMElement} DOM element that contains the `id`.
   */
  findReactContainerForID: function(id) {
    var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(id);
    var container = containersByReactRootID[reactRootID];

    if ("production" !== "development") {
      var rootElement = rootElementsByReactRootID[reactRootID];
      if (rootElement && rootElement.parentNode !== container) {
        ("production" !== "development" ? invariant(
          // Call internalGetID here because getID calls isValid which calls
          // findReactContainerForID (this function).
          internalGetID(rootElement) === reactRootID,
          'ReactMount: Root element ID differed from reactRootID.'
        ) : invariant(// Call internalGetID here because getID calls isValid which calls
        // findReactContainerForID (this function).
        internalGetID(rootElement) === reactRootID));

        var containerChild = container.firstChild;
        if (containerChild &&
            reactRootID === internalGetID(containerChild)) {
          // If the container has a new child with the same ID as the old
          // root element, then rootElementsByReactRootID[reactRootID] is
          // just stale and needs to be updated. The case that deserves a
          // warning is when the container is empty.
          rootElementsByReactRootID[reactRootID] = containerChild;
        } else {
          console.warn(
            'ReactMount: Root element has been removed from its original ' +
            'container. New container:', rootElement.parentNode
          );
        }
      }
    }

    return container;
  },

  /**
   * Finds an element rendered by React with the supplied ID.
   *
   * @param {string} id ID of a DOM node in the React component.
   * @return {DOMElement} Root DOM node of the React component.
   */
  findReactNodeByID: function(id) {
    var reactRoot = ReactMount.findReactContainerForID(id);
    return ReactMount.findComponentRoot(reactRoot, id);
  },

  /**
   * True if the supplied `node` is rendered by React.
   *
   * @param {*} node DOM Element to check.
   * @return {boolean} True if the DOM Element appears to be rendered by React.
   * @internal
   */
  isRenderedByReact: function(node) {
    if (node.nodeType !== 1) {
      // Not a DOMElement, therefore not a React component
      return false;
    }
    var id = ReactMount.getID(node);
    return id ? id.charAt(0) === SEPARATOR : false;
  },

  /**
   * Traverses up the ancestors of the supplied node to find a node that is a
   * DOM representation of a React component.
   *
   * @param {*} node
   * @return {?DOMEventTarget}
   * @internal
   */
  getFirstReactDOM: function(node) {
    var current = node;
    while (current && current.parentNode !== current) {
      if (ReactMount.isRenderedByReact(current)) {
        return current;
      }
      current = current.parentNode;
    }
    return null;
  },

  /**
   * Finds a node with the supplied `targetID` inside of the supplied
   * `ancestorNode`.  Exploits the ID naming scheme to perform the search
   * quickly.
   *
   * @param {DOMEventTarget} ancestorNode Search from this root.
   * @pararm {string} targetID ID of the DOM representation of the component.
   * @return {DOMEventTarget} DOM node with the supplied `targetID`.
   * @internal
   */
  findComponentRoot: function(ancestorNode, targetID) {
    var firstChildren = findComponentRootReusableArray;
    var childIndex = 0;

    var deepestAncestor = findDeepestCachedAncestor(targetID) || ancestorNode;

    firstChildren[0] = deepestAncestor.firstChild;
    firstChildren.length = 1;

    while (childIndex < firstChildren.length) {
      var child = firstChildren[childIndex++];
      var targetChild;

      while (child) {
        var childID = ReactMount.getID(child);
        if (childID) {
          // Even if we find the node we're looking for, we finish looping
          // through its siblings to ensure they're cached so that we don't have
          // to revisit this node again. Otherwise, we make n^2 calls to getID
          // when visiting the many children of a single node in order.

          if (targetID === childID) {
            targetChild = child;
          } else if (ReactInstanceHandles.isAncestorIDOf(childID, targetID)) {
            // If we find a child whose ID is an ancestor of the given ID,
            // then we can be sure that we only want to search the subtree
            // rooted at this child, so we can throw out the rest of the
            // search state.
            firstChildren.length = childIndex = 0;
            firstChildren.push(child.firstChild);
          }

        } else {
          // If this child had no ID, then there's a chance that it was
          // injected automatically by the browser, as when a `<table>`
          // element sprouts an extra `<tbody>` child as a side effect of
          // `.innerHTML` parsing. Optimistically continue down this
          // branch, but not before examining the other siblings.
          firstChildren.push(child.firstChild);
        }

        child = child.nextSibling;
      }

      if (targetChild) {
        // Emptying firstChildren/findComponentRootReusableArray is
        // not necessary for correctness, but it helps the GC reclaim
        // any nodes that were left at the end of the search.
        firstChildren.length = 0;

        return targetChild;
      }
    }

    firstChildren.length = 0;

    ("production" !== "development" ? invariant(
      false,
      'findComponentRoot(..., %s): Unable to find element. This probably ' +
      'means the DOM was unexpectedly mutated (e.g., by the browser), ' +
      'usually due to forgetting a <tbody> when using tables, nesting tags ' +
      'like <form>, <p>, or <a>, or using non-SVG elements in an <svg> ' +
      'parent. ' +
      'Try inspecting the child nodes of the element with React ID `%s`.',
      targetID,
      ReactMount.getID(ancestorNode)
    ) : invariant(false));
  },


  /**
   * React ID utilities.
   */

  getReactRootID: getReactRootID,

  getID: getID,

  setID: setID,

  getNode: getNode,

  purgeID: purgeID
};

// Deprecations (remove for 0.13)
ReactMount.renderComponent = deprecated(
  'ReactMount',
  'renderComponent',
  'render',
  this,
  ReactMount.render
);

module.exports = ReactMount;

},{"./DOMProperty":11,"./ReactBrowserEventEmitter":30,"./ReactCurrentOwner":36,"./ReactElement":52,"./ReactInstanceHandles":60,"./ReactLegacyElement":61,"./ReactPerf":68,"./containsNode":101,"./deprecated":106,"./getReactRootElementInContainer":120,"./instantiateReactComponent":125,"./invariant":126,"./shouldUpdateReactComponent":142,"./warning":145}],64:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactMultiChild
 * @typechecks static-only
 */

"use strict";

var ReactComponent = _dereq_("./ReactComponent");
var ReactMultiChildUpdateTypes = _dereq_("./ReactMultiChildUpdateTypes");

var flattenChildren = _dereq_("./flattenChildren");
var instantiateReactComponent = _dereq_("./instantiateReactComponent");
var shouldUpdateReactComponent = _dereq_("./shouldUpdateReactComponent");

/**
 * Updating children of a component may trigger recursive updates. The depth is
 * used to batch recursive updates to render markup more efficiently.
 *
 * @type {number}
 * @private
 */
var updateDepth = 0;

/**
 * Queue of update configuration objects.
 *
 * Each object has a `type` property that is in `ReactMultiChildUpdateTypes`.
 *
 * @type {array<object>}
 * @private
 */
var updateQueue = [];

/**
 * Queue of markup to be rendered.
 *
 * @type {array<string>}
 * @private
 */
var markupQueue = [];

/**
 * Enqueues markup to be rendered and inserted at a supplied index.
 *
 * @param {string} parentID ID of the parent component.
 * @param {string} markup Markup that renders into an element.
 * @param {number} toIndex Destination index.
 * @private
 */
function enqueueMarkup(parentID, markup, toIndex) {
  // NOTE: Null values reduce hidden classes.
  updateQueue.push({
    parentID: parentID,
    parentNode: null,
    type: ReactMultiChildUpdateTypes.INSERT_MARKUP,
    markupIndex: markupQueue.push(markup) - 1,
    textContent: null,
    fromIndex: null,
    toIndex: toIndex
  });
}

/**
 * Enqueues moving an existing element to another index.
 *
 * @param {string} parentID ID of the parent component.
 * @param {number} fromIndex Source index of the existing element.
 * @param {number} toIndex Destination index of the element.
 * @private
 */
function enqueueMove(parentID, fromIndex, toIndex) {
  // NOTE: Null values reduce hidden classes.
  updateQueue.push({
    parentID: parentID,
    parentNode: null,
    type: ReactMultiChildUpdateTypes.MOVE_EXISTING,
    markupIndex: null,
    textContent: null,
    fromIndex: fromIndex,
    toIndex: toIndex
  });
}

/**
 * Enqueues removing an element at an index.
 *
 * @param {string} parentID ID of the parent component.
 * @param {number} fromIndex Index of the element to remove.
 * @private
 */
function enqueueRemove(parentID, fromIndex) {
  // NOTE: Null values reduce hidden classes.
  updateQueue.push({
    parentID: parentID,
    parentNode: null,
    type: ReactMultiChildUpdateTypes.REMOVE_NODE,
    markupIndex: null,
    textContent: null,
    fromIndex: fromIndex,
    toIndex: null
  });
}

/**
 * Enqueues setting the text content.
 *
 * @param {string} parentID ID of the parent component.
 * @param {string} textContent Text content to set.
 * @private
 */
function enqueueTextContent(parentID, textContent) {
  // NOTE: Null values reduce hidden classes.
  updateQueue.push({
    parentID: parentID,
    parentNode: null,
    type: ReactMultiChildUpdateTypes.TEXT_CONTENT,
    markupIndex: null,
    textContent: textContent,
    fromIndex: null,
    toIndex: null
  });
}

/**
 * Processes any enqueued updates.
 *
 * @private
 */
function processQueue() {
  if (updateQueue.length) {
    ReactComponent.BackendIDOperations.dangerouslyProcessChildrenUpdates(
      updateQueue,
      markupQueue
    );
    clearQueue();
  }
}

/**
 * Clears any enqueued updates.
 *
 * @private
 */
function clearQueue() {
  updateQueue.length = 0;
  markupQueue.length = 0;
}

/**
 * ReactMultiChild are capable of reconciling multiple children.
 *
 * @class ReactMultiChild
 * @internal
 */
var ReactMultiChild = {

  /**
   * Provides common functionality for components that must reconcile multiple
   * children. This is used by `ReactDOMComponent` to mount, update, and
   * unmount child components.
   *
   * @lends {ReactMultiChild.prototype}
   */
  Mixin: {

    /**
     * Generates a "mount image" for each of the supplied children. In the case
     * of `ReactDOMComponent`, a mount image is a string of markup.
     *
     * @param {?object} nestedChildren Nested child maps.
     * @return {array} An array of mounted representations.
     * @internal
     */
    mountChildren: function(nestedChildren, transaction) {
      var children = flattenChildren(nestedChildren);
      var mountImages = [];
      var index = 0;
      this._renderedChildren = children;
      for (var name in children) {
        var child = children[name];
        if (children.hasOwnProperty(name)) {
          // The rendered children must be turned into instances as they're
          // mounted.
          var childInstance = instantiateReactComponent(child, null);
          children[name] = childInstance;
          // Inlined for performance, see `ReactInstanceHandles.createReactID`.
          var rootID = this._rootNodeID + name;
          var mountImage = childInstance.mountComponent(
            rootID,
            transaction,
            this._mountDepth + 1
          );
          childInstance._mountIndex = index;
          mountImages.push(mountImage);
          index++;
        }
      }
      return mountImages;
    },

    /**
     * Replaces any rendered children with a text content string.
     *
     * @param {string} nextContent String of content.
     * @internal
     */
    updateTextContent: function(nextContent) {
      updateDepth++;
      var errorThrown = true;
      try {
        var prevChildren = this._renderedChildren;
        // Remove any rendered children.
        for (var name in prevChildren) {
          if (prevChildren.hasOwnProperty(name)) {
            this._unmountChildByName(prevChildren[name], name);
          }
        }
        // Set new text content.
        this.setTextContent(nextContent);
        errorThrown = false;
      } finally {
        updateDepth--;
        if (!updateDepth) {
          errorThrown ? clearQueue() : processQueue();
        }
      }
    },

    /**
     * Updates the rendered children with new children.
     *
     * @param {?object} nextNestedChildren Nested child maps.
     * @param {ReactReconcileTransaction} transaction
     * @internal
     */
    updateChildren: function(nextNestedChildren, transaction) {
      updateDepth++;
      var errorThrown = true;
      try {
        this._updateChildren(nextNestedChildren, transaction);
        errorThrown = false;
      } finally {
        updateDepth--;
        if (!updateDepth) {
          errorThrown ? clearQueue() : processQueue();
        }
      }
    },

    /**
     * Improve performance by isolating this hot code path from the try/catch
     * block in `updateChildren`.
     *
     * @param {?object} nextNestedChildren Nested child maps.
     * @param {ReactReconcileTransaction} transaction
     * @final
     * @protected
     */
    _updateChildren: function(nextNestedChildren, transaction) {
      var nextChildren = flattenChildren(nextNestedChildren);
      var prevChildren = this._renderedChildren;
      if (!nextChildren && !prevChildren) {
        return;
      }
      var name;
      // `nextIndex` will increment for each child in `nextChildren`, but
      // `lastIndex` will be the last index visited in `prevChildren`.
      var lastIndex = 0;
      var nextIndex = 0;
      for (name in nextChildren) {
        if (!nextChildren.hasOwnProperty(name)) {
          continue;
        }
        var prevChild = prevChildren && prevChildren[name];
        var prevElement = prevChild && prevChild._currentElement;
        var nextElement = nextChildren[name];
        if (shouldUpdateReactComponent(prevElement, nextElement)) {
          this.moveChild(prevChild, nextIndex, lastIndex);
          lastIndex = Math.max(prevChild._mountIndex, lastIndex);
          prevChild.receiveComponent(nextElement, transaction);
          prevChild._mountIndex = nextIndex;
        } else {
          if (prevChild) {
            // Update `lastIndex` before `_mountIndex` gets unset by unmounting.
            lastIndex = Math.max(prevChild._mountIndex, lastIndex);
            this._unmountChildByName(prevChild, name);
          }
          // The child must be instantiated before it's mounted.
          var nextChildInstance = instantiateReactComponent(
            nextElement,
            null
          );
          this._mountChildByNameAtIndex(
            nextChildInstance, name, nextIndex, transaction
          );
        }
        nextIndex++;
      }
      // Remove children that are no longer present.
      for (name in prevChildren) {
        if (prevChildren.hasOwnProperty(name) &&
            !(nextChildren && nextChildren[name])) {
          this._unmountChildByName(prevChildren[name], name);
        }
      }
    },

    /**
     * Unmounts all rendered children. This should be used to clean up children
     * when this component is unmounted.
     *
     * @internal
     */
    unmountChildren: function() {
      var renderedChildren = this._renderedChildren;
      for (var name in renderedChildren) {
        var renderedChild = renderedChildren[name];
        // TODO: When is this not true?
        if (renderedChild.unmountComponent) {
          renderedChild.unmountComponent();
        }
      }
      this._renderedChildren = null;
    },

    /**
     * Moves a child component to the supplied index.
     *
     * @param {ReactComponent} child Component to move.
     * @param {number} toIndex Destination index of the element.
     * @param {number} lastIndex Last index visited of the siblings of `child`.
     * @protected
     */
    moveChild: function(child, toIndex, lastIndex) {
      // If the index of `child` is less than `lastIndex`, then it needs to
      // be moved. Otherwise, we do not need to move it because a child will be
      // inserted or moved before `child`.
      if (child._mountIndex < lastIndex) {
        enqueueMove(this._rootNodeID, child._mountIndex, toIndex);
      }
    },

    /**
     * Creates a child component.
     *
     * @param {ReactComponent} child Component to create.
     * @param {string} mountImage Markup to insert.
     * @protected
     */
    createChild: function(child, mountImage) {
      enqueueMarkup(this._rootNodeID, mountImage, child._mountIndex);
    },

    /**
     * Removes a child component.
     *
     * @param {ReactComponent} child Child to remove.
     * @protected
     */
    removeChild: function(child) {
      enqueueRemove(this._rootNodeID, child._mountIndex);
    },

    /**
     * Sets this text content string.
     *
     * @param {string} textContent Text content to set.
     * @protected
     */
    setTextContent: function(textContent) {
      enqueueTextContent(this._rootNodeID, textContent);
    },

    /**
     * Mounts a child with the supplied name.
     *
     * NOTE: This is part of `updateChildren` and is here for readability.
     *
     * @param {ReactComponent} child Component to mount.
     * @param {string} name Name of the child.
     * @param {number} index Index at which to insert the child.
     * @param {ReactReconcileTransaction} transaction
     * @private
     */
    _mountChildByNameAtIndex: function(child, name, index, transaction) {
      // Inlined for performance, see `ReactInstanceHandles.createReactID`.
      var rootID = this._rootNodeID + name;
      var mountImage = child.mountComponent(
        rootID,
        transaction,
        this._mountDepth + 1
      );
      child._mountIndex = index;
      this.createChild(child, mountImage);
      this._renderedChildren = this._renderedChildren || {};
      this._renderedChildren[name] = child;
    },

    /**
     * Unmounts a rendered child by name.
     *
     * NOTE: This is part of `updateChildren` and is here for readability.
     *
     * @param {ReactComponent} child Component to unmount.
     * @param {string} name Name of the child in `this._renderedChildren`.
     * @private
     */
    _unmountChildByName: function(child, name) {
      this.removeChild(child);
      child._mountIndex = null;
      child.unmountComponent();
      delete this._renderedChildren[name];
    }

  }

};

module.exports = ReactMultiChild;

},{"./ReactComponent":32,"./ReactMultiChildUpdateTypes":65,"./flattenChildren":110,"./instantiateReactComponent":125,"./shouldUpdateReactComponent":142}],65:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactMultiChildUpdateTypes
 */

"use strict";

var keyMirror = _dereq_("./keyMirror");

/**
 * When a component's children are updated, a series of update configuration
 * objects are created in order to batch and serialize the required changes.
 *
 * Enumerates all the possible types of update configurations.
 *
 * @internal
 */
var ReactMultiChildUpdateTypes = keyMirror({
  INSERT_MARKUP: null,
  MOVE_EXISTING: null,
  REMOVE_NODE: null,
  TEXT_CONTENT: null
});

module.exports = ReactMultiChildUpdateTypes;

},{"./keyMirror":132}],66:[function(_dereq_,module,exports){
/**
 * Copyright 2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactNativeComponent
 */

"use strict";

var assign = _dereq_("./Object.assign");
var invariant = _dereq_("./invariant");

var genericComponentClass = null;
// This registry keeps track of wrapper classes around native tags
var tagToComponentClass = {};

var ReactNativeComponentInjection = {
  // This accepts a class that receives the tag string. This is a catch all
  // that can render any kind of tag.
  injectGenericComponentClass: function(componentClass) {
    genericComponentClass = componentClass;
  },
  // This accepts a keyed object with classes as values. Each key represents a
  // tag. That particular tag will use this class instead of the generic one.
  injectComponentClasses: function(componentClasses) {
    assign(tagToComponentClass, componentClasses);
  }
};

/**
 * Create an internal class for a specific tag.
 *
 * @param {string} tag The tag for which to create an internal instance.
 * @param {any} props The props passed to the instance constructor.
 * @return {ReactComponent} component The injected empty component.
 */
function createInstanceForTag(tag, props, parentType) {
  var componentClass = tagToComponentClass[tag];
  if (componentClass == null) {
    ("production" !== "development" ? invariant(
      genericComponentClass,
      'There is no registered component for the tag %s',
      tag
    ) : invariant(genericComponentClass));
    return new genericComponentClass(tag, props);
  }
  if (parentType === tag) {
    // Avoid recursion
    ("production" !== "development" ? invariant(
      genericComponentClass,
      'There is no registered component for the tag %s',
      tag
    ) : invariant(genericComponentClass));
    return new genericComponentClass(tag, props);
  }
  // Unwrap legacy factories
  return new componentClass.type(props);
}

var ReactNativeComponent = {
  createInstanceForTag: createInstanceForTag,
  injection: ReactNativeComponentInjection
};

module.exports = ReactNativeComponent;

},{"./Object.assign":27,"./invariant":126}],67:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactOwner
 */

"use strict";

var emptyObject = _dereq_("./emptyObject");
var invariant = _dereq_("./invariant");

/**
 * ReactOwners are capable of storing references to owned components.
 *
 * All components are capable of //being// referenced by owner components, but
 * only ReactOwner components are capable of //referencing// owned components.
 * The named reference is known as a "ref".
 *
 * Refs are available when mounted and updated during reconciliation.
 *
 *   var MyComponent = React.createClass({
 *     render: function() {
 *       return (
 *         <div onClick={this.handleClick}>
 *           <CustomComponent ref="custom" />
 *         </div>
 *       );
 *     },
 *     handleClick: function() {
 *       this.refs.custom.handleClick();
 *     },
 *     componentDidMount: function() {
 *       this.refs.custom.initialize();
 *     }
 *   });
 *
 * Refs should rarely be used. When refs are used, they should only be done to
 * control data that is not handled by React's data flow.
 *
 * @class ReactOwner
 */
var ReactOwner = {

  /**
   * @param {?object} object
   * @return {boolean} True if `object` is a valid owner.
   * @final
   */
  isValidOwner: function(object) {
    return !!(
      object &&
      typeof object.attachRef === 'function' &&
      typeof object.detachRef === 'function'
    );
  },

  /**
   * Adds a component by ref to an owner component.
   *
   * @param {ReactComponent} component Component to reference.
   * @param {string} ref Name by which to refer to the component.
   * @param {ReactOwner} owner Component on which to record the ref.
   * @final
   * @internal
   */
  addComponentAsRefTo: function(component, ref, owner) {
    ("production" !== "development" ? invariant(
      ReactOwner.isValidOwner(owner),
      'addComponentAsRefTo(...): Only a ReactOwner can have refs. This ' +
      'usually means that you\'re trying to add a ref to a component that ' +
      'doesn\'t have an owner (that is, was not created inside of another ' +
      'component\'s `render` method). Try rendering this component inside of ' +
      'a new top-level component which will hold the ref.'
    ) : invariant(ReactOwner.isValidOwner(owner)));
    owner.attachRef(ref, component);
  },

  /**
   * Removes a component by ref from an owner component.
   *
   * @param {ReactComponent} component Component to dereference.
   * @param {string} ref Name of the ref to remove.
   * @param {ReactOwner} owner Component on which the ref is recorded.
   * @final
   * @internal
   */
  removeComponentAsRefFrom: function(component, ref, owner) {
    ("production" !== "development" ? invariant(
      ReactOwner.isValidOwner(owner),
      'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. This ' +
      'usually means that you\'re trying to remove a ref to a component that ' +
      'doesn\'t have an owner (that is, was not created inside of another ' +
      'component\'s `render` method). Try rendering this component inside of ' +
      'a new top-level component which will hold the ref.'
    ) : invariant(ReactOwner.isValidOwner(owner)));
    // Check that `component` is still the current ref because we do not want to
    // detach the ref if another component stole it.
    if (owner.refs[ref] === component) {
      owner.detachRef(ref);
    }
  },

  /**
   * A ReactComponent must mix this in to have refs.
   *
   * @lends {ReactOwner.prototype}
   */
  Mixin: {

    construct: function() {
      this.refs = emptyObject;
    },

    /**
     * Lazily allocates the refs object and stores `component` as `ref`.
     *
     * @param {string} ref Reference name.
     * @param {component} component Component to store as `ref`.
     * @final
     * @private
     */
    attachRef: function(ref, component) {
      ("production" !== "development" ? invariant(
        component.isOwnedBy(this),
        'attachRef(%s, ...): Only a component\'s owner can store a ref to it.',
        ref
      ) : invariant(component.isOwnedBy(this)));
      var refs = this.refs === emptyObject ? (this.refs = {}) : this.refs;
      refs[ref] = component;
    },

    /**
     * Detaches a reference name.
     *
     * @param {string} ref Name to dereference.
     * @final
     * @private
     */
    detachRef: function(ref) {
      delete this.refs[ref];
    }

  }

};

module.exports = ReactOwner;

},{"./emptyObject":108,"./invariant":126}],68:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactPerf
 * @typechecks static-only
 */

"use strict";

/**
 * ReactPerf is a general AOP system designed to measure performance. This
 * module only has the hooks: see ReactDefaultPerf for the analysis tool.
 */
var ReactPerf = {
  /**
   * Boolean to enable/disable measurement. Set to false by default to prevent
   * accidental logging and perf loss.
   */
  enableMeasure: false,

  /**
   * Holds onto the measure function in use. By default, don't measure
   * anything, but we'll override this if we inject a measure function.
   */
  storedMeasure: _noMeasure,

  /**
   * Use this to wrap methods you want to measure. Zero overhead in production.
   *
   * @param {string} objName
   * @param {string} fnName
   * @param {function} func
   * @return {function}
   */
  measure: function(objName, fnName, func) {
    if ("production" !== "development") {
      var measuredFunc = null;
      var wrapper = function() {
        if (ReactPerf.enableMeasure) {
          if (!measuredFunc) {
            measuredFunc = ReactPerf.storedMeasure(objName, fnName, func);
          }
          return measuredFunc.apply(this, arguments);
        }
        return func.apply(this, arguments);
      };
      wrapper.displayName = objName + '_' + fnName;
      return wrapper;
    }
    return func;
  },

  injection: {
    /**
     * @param {function} measure
     */
    injectMeasure: function(measure) {
      ReactPerf.storedMeasure = measure;
    }
  }
};

/**
 * Simply passes through the measured function, without measuring it.
 *
 * @param {string} objName
 * @param {string} fnName
 * @param {function} func
 * @return {function}
 */
function _noMeasure(objName, fnName, func) {
  return func;
}

module.exports = ReactPerf;

},{}],69:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactPropTransferer
 */

"use strict";

var assign = _dereq_("./Object.assign");
var emptyFunction = _dereq_("./emptyFunction");
var invariant = _dereq_("./invariant");
var joinClasses = _dereq_("./joinClasses");
var warning = _dereq_("./warning");

var didWarn = false;

/**
 * Creates a transfer strategy that will merge prop values using the supplied
 * `mergeStrategy`. If a prop was previously unset, this just sets it.
 *
 * @param {function} mergeStrategy
 * @return {function}
 */
function createTransferStrategy(mergeStrategy) {
  return function(props, key, value) {
    if (!props.hasOwnProperty(key)) {
      props[key] = value;
    } else {
      props[key] = mergeStrategy(props[key], value);
    }
  };
}

var transferStrategyMerge = createTransferStrategy(function(a, b) {
  // `merge` overrides the first object's (`props[key]` above) keys using the
  // second object's (`value`) keys. An object's style's existing `propA` would
  // get overridden. Flip the order here.
  return assign({}, b, a);
});

/**
 * Transfer strategies dictate how props are transferred by `transferPropsTo`.
 * NOTE: if you add any more exceptions to this list you should be sure to
 * update `cloneWithProps()` accordingly.
 */
var TransferStrategies = {
  /**
   * Never transfer `children`.
   */
  children: emptyFunction,
  /**
   * Transfer the `className` prop by merging them.
   */
  className: createTransferStrategy(joinClasses),
  /**
   * Transfer the `style` prop (which is an object) by merging them.
   */
  style: transferStrategyMerge
};

/**
 * Mutates the first argument by transferring the properties from the second
 * argument.
 *
 * @param {object} props
 * @param {object} newProps
 * @return {object}
 */
function transferInto(props, newProps) {
  for (var thisKey in newProps) {
    if (!newProps.hasOwnProperty(thisKey)) {
      continue;
    }

    var transferStrategy = TransferStrategies[thisKey];

    if (transferStrategy && TransferStrategies.hasOwnProperty(thisKey)) {
      transferStrategy(props, thisKey, newProps[thisKey]);
    } else if (!props.hasOwnProperty(thisKey)) {
      props[thisKey] = newProps[thisKey];
    }
  }
  return props;
}

/**
 * ReactPropTransferer are capable of transferring props to another component
 * using a `transferPropsTo` method.
 *
 * @class ReactPropTransferer
 */
var ReactPropTransferer = {

  TransferStrategies: TransferStrategies,

  /**
   * Merge two props objects using TransferStrategies.
   *
   * @param {object} oldProps original props (they take precedence)
   * @param {object} newProps new props to merge in
   * @return {object} a new object containing both sets of props merged.
   */
  mergeProps: function(oldProps, newProps) {
    return transferInto(assign({}, oldProps), newProps);
  },

  /**
   * @lends {ReactPropTransferer.prototype}
   */
  Mixin: {

    /**
     * Transfer props from this component to a target component.
     *
     * Props that do not have an explicit transfer strategy will be transferred
     * only if the target component does not already have the prop set.
     *
     * This is usually used to pass down props to a returned root component.
     *
     * @param {ReactElement} element Component receiving the properties.
     * @return {ReactElement} The supplied `component`.
     * @final
     * @protected
     */
    transferPropsTo: function(element) {
      ("production" !== "development" ? invariant(
        element._owner === this,
        '%s: You can\'t call transferPropsTo() on a component that you ' +
        'don\'t own, %s. This usually means you are calling ' +
        'transferPropsTo() on a component passed in as props or children.',
        this.constructor.displayName,
        typeof element.type === 'string' ?
        element.type :
        element.type.displayName
      ) : invariant(element._owner === this));

      if ("production" !== "development") {
        if (!didWarn) {
          didWarn = true;
          ("production" !== "development" ? warning(
            false,
            'transferPropsTo is deprecated. ' +
            'See http://fb.me/react-transferpropsto for more information.'
          ) : null);
        }
      }

      // Because elements are immutable we have to merge into the existing
      // props object rather than clone it.
      transferInto(element.props, this.props);

      return element;
    }

  }
};

module.exports = ReactPropTransferer;

},{"./Object.assign":27,"./emptyFunction":107,"./invariant":126,"./joinClasses":131,"./warning":145}],70:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactPropTypeLocationNames
 */

"use strict";

var ReactPropTypeLocationNames = {};

if ("production" !== "development") {
  ReactPropTypeLocationNames = {
    prop: 'prop',
    context: 'context',
    childContext: 'child context'
  };
}

module.exports = ReactPropTypeLocationNames;

},{}],71:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactPropTypeLocations
 */

"use strict";

var keyMirror = _dereq_("./keyMirror");

var ReactPropTypeLocations = keyMirror({
  prop: null,
  context: null,
  childContext: null
});

module.exports = ReactPropTypeLocations;

},{"./keyMirror":132}],72:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactPropTypes
 */

"use strict";

var ReactElement = _dereq_("./ReactElement");
var ReactPropTypeLocationNames = _dereq_("./ReactPropTypeLocationNames");

var deprecated = _dereq_("./deprecated");
var emptyFunction = _dereq_("./emptyFunction");

/**
 * Collection of methods that allow declaration and validation of props that are
 * supplied to React components. Example usage:
 *
 *   var Props = require('ReactPropTypes');
 *   var MyArticle = React.createClass({
 *     propTypes: {
 *       // An optional string prop named "description".
 *       description: Props.string,
 *
 *       // A required enum prop named "category".
 *       category: Props.oneOf(['News','Photos']).isRequired,
 *
 *       // A prop named "dialog" that requires an instance of Dialog.
 *       dialog: Props.instanceOf(Dialog).isRequired
 *     },
 *     render: function() { ... }
 *   });
 *
 * A more formal specification of how these methods are used:
 *
 *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
 *   decl := ReactPropTypes.{type}(.isRequired)?
 *
 * Each and every declaration produces a function with the same signature. This
 * allows the creation of custom validation functions. For example:
 *
 *  var MyLink = React.createClass({
 *    propTypes: {
 *      // An optional string or URI prop named "href".
 *      href: function(props, propName, componentName) {
 *        var propValue = props[propName];
 *        if (propValue != null && typeof propValue !== 'string' &&
 *            !(propValue instanceof URI)) {
 *          return new Error(
 *            'Expected a string or an URI for ' + propName + ' in ' +
 *            componentName
 *          );
 *        }
 *      }
 *    },
 *    render: function() {...}
 *  });
 *
 * @internal
 */

var ANONYMOUS = '<<anonymous>>';

var elementTypeChecker = createElementTypeChecker();
var nodeTypeChecker = createNodeChecker();

var ReactPropTypes = {
  array: createPrimitiveTypeChecker('array'),
  bool: createPrimitiveTypeChecker('boolean'),
  func: createPrimitiveTypeChecker('function'),
  number: createPrimitiveTypeChecker('number'),
  object: createPrimitiveTypeChecker('object'),
  string: createPrimitiveTypeChecker('string'),

  any: createAnyTypeChecker(),
  arrayOf: createArrayOfTypeChecker,
  element: elementTypeChecker,
  instanceOf: createInstanceTypeChecker,
  node: nodeTypeChecker,
  objectOf: createObjectOfTypeChecker,
  oneOf: createEnumTypeChecker,
  oneOfType: createUnionTypeChecker,
  shape: createShapeTypeChecker,

  component: deprecated(
    'React.PropTypes',
    'component',
    'element',
    this,
    elementTypeChecker
  ),
  renderable: deprecated(
    'React.PropTypes',
    'renderable',
    'node',
    this,
    nodeTypeChecker
  )
};

function createChainableTypeChecker(validate) {
  function checkType(isRequired, props, propName, componentName, location) {
    componentName = componentName || ANONYMOUS;
    if (props[propName] == null) {
      var locationName = ReactPropTypeLocationNames[location];
      if (isRequired) {
        return new Error(
          ("Required " + locationName + " `" + propName + "` was not specified in ")+
          ("`" + componentName + "`.")
        );
      }
    } else {
      return validate(props, propName, componentName, location);
    }
  }

  var chainedCheckType = checkType.bind(null, false);
  chainedCheckType.isRequired = checkType.bind(null, true);

  return chainedCheckType;
}

function createPrimitiveTypeChecker(expectedType) {
  function validate(props, propName, componentName, location) {
    var propValue = props[propName];
    var propType = getPropType(propValue);
    if (propType !== expectedType) {
      var locationName = ReactPropTypeLocationNames[location];
      // `propValue` being instance of, say, date/regexp, pass the 'object'
      // check, but we can offer a more precise error message here rather than
      // 'of type `object`'.
      var preciseType = getPreciseType(propValue);

      return new Error(
        ("Invalid " + locationName + " `" + propName + "` of type `" + preciseType + "` ") +
        ("supplied to `" + componentName + "`, expected `" + expectedType + "`.")
      );
    }
  }
  return createChainableTypeChecker(validate);
}

function createAnyTypeChecker() {
  return createChainableTypeChecker(emptyFunction.thatReturns());
}

function createArrayOfTypeChecker(typeChecker) {
  function validate(props, propName, componentName, location) {
    var propValue = props[propName];
    if (!Array.isArray(propValue)) {
      var locationName = ReactPropTypeLocationNames[location];
      var propType = getPropType(propValue);
      return new Error(
        ("Invalid " + locationName + " `" + propName + "` of type ") +
        ("`" + propType + "` supplied to `" + componentName + "`, expected an array.")
      );
    }
    for (var i = 0; i < propValue.length; i++) {
      var error = typeChecker(propValue, i, componentName, location);
      if (error instanceof Error) {
        return error;
      }
    }
  }
  return createChainableTypeChecker(validate);
}

function createElementTypeChecker() {
  function validate(props, propName, componentName, location) {
    if (!ReactElement.isValidElement(props[propName])) {
      var locationName = ReactPropTypeLocationNames[location];
      return new Error(
        ("Invalid " + locationName + " `" + propName + "` supplied to ") +
        ("`" + componentName + "`, expected a ReactElement.")
      );
    }
  }
  return createChainableTypeChecker(validate);
}

function createInstanceTypeChecker(expectedClass) {
  function validate(props, propName, componentName, location) {
    if (!(props[propName] instanceof expectedClass)) {
      var locationName = ReactPropTypeLocationNames[location];
      var expectedClassName = expectedClass.name || ANONYMOUS;
      return new Error(
        ("Invalid " + locationName + " `" + propName + "` supplied to ") +
        ("`" + componentName + "`, expected instance of `" + expectedClassName + "`.")
      );
    }
  }
  return createChainableTypeChecker(validate);
}

function createEnumTypeChecker(expectedValues) {
  function validate(props, propName, componentName, location) {
    var propValue = props[propName];
    for (var i = 0; i < expectedValues.length; i++) {
      if (propValue === expectedValues[i]) {
        return;
      }
    }

    var locationName = ReactPropTypeLocationNames[location];
    var valuesString = JSON.stringify(expectedValues);
    return new Error(
      ("Invalid " + locationName + " `" + propName + "` of value `" + propValue + "` ") +
      ("supplied to `" + componentName + "`, expected one of " + valuesString + ".")
    );
  }
  return createChainableTypeChecker(validate);
}

function createObjectOfTypeChecker(typeChecker) {
  function validate(props, propName, componentName, location) {
    var propValue = props[propName];
    var propType = getPropType(propValue);
    if (propType !== 'object') {
      var locationName = ReactPropTypeLocationNames[location];
      return new Error(
        ("Invalid " + locationName + " `" + propName + "` of type ") +
        ("`" + propType + "` supplied to `" + componentName + "`, expected an object.")
      );
    }
    for (var key in propValue) {
      if (propValue.hasOwnProperty(key)) {
        var error = typeChecker(propValue, key, componentName, location);
        if (error instanceof Error) {
          return error;
        }
      }
    }
  }
  return createChainableTypeChecker(validate);
}

function createUnionTypeChecker(arrayOfTypeCheckers) {
  function validate(props, propName, componentName, location) {
    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
      var checker = arrayOfTypeCheckers[i];
      if (checker(props, propName, componentName, location) == null) {
        return;
      }
    }

    var locationName = ReactPropTypeLocationNames[location];
    return new Error(
      ("Invalid " + locationName + " `" + propName + "` supplied to ") +
      ("`" + componentName + "`.")
    );
  }
  return createChainableTypeChecker(validate);
}

function createNodeChecker() {
  function validate(props, propName, componentName, location) {
    if (!isNode(props[propName])) {
      var locationName = ReactPropTypeLocationNames[location];
      return new Error(
        ("Invalid " + locationName + " `" + propName + "` supplied to ") +
        ("`" + componentName + "`, expected a ReactNode.")
      );
    }
  }
  return createChainableTypeChecker(validate);
}

function createShapeTypeChecker(shapeTypes) {
  function validate(props, propName, componentName, location) {
    var propValue = props[propName];
    var propType = getPropType(propValue);
    if (propType !== 'object') {
      var locationName = ReactPropTypeLocationNames[location];
      return new Error(
        ("Invalid " + locationName + " `" + propName + "` of type `" + propType + "` ") +
        ("supplied to `" + componentName + "`, expected `object`.")
      );
    }
    for (var key in shapeTypes) {
      var checker = shapeTypes[key];
      if (!checker) {
        continue;
      }
      var error = checker(propValue, key, componentName, location);
      if (error) {
        return error;
      }
    }
  }
  return createChainableTypeChecker(validate, 'expected `object`');
}

function isNode(propValue) {
  switch(typeof propValue) {
    case 'number':
    case 'string':
      return true;
    case 'boolean':
      return !propValue;
    case 'object':
      if (Array.isArray(propValue)) {
        return propValue.every(isNode);
      }
      if (ReactElement.isValidElement(propValue)) {
        return true;
      }
      for (var k in propValue) {
        if (!isNode(propValue[k])) {
          return false;
        }
      }
      return true;
    default:
      return false;
  }
}

// Equivalent of `typeof` but with special handling for array and regexp.
function getPropType(propValue) {
  var propType = typeof propValue;
  if (Array.isArray(propValue)) {
    return 'array';
  }
  if (propValue instanceof RegExp) {
    // Old webkits (at least until Android 4.0) return 'function' rather than
    // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
    // passes PropTypes.object.
    return 'object';
  }
  return propType;
}

// This handles more types than `getPropType`. Only used for error messages.
// See `createPrimitiveTypeChecker`.
function getPreciseType(propValue) {
  var propType = getPropType(propValue);
  if (propType === 'object') {
    if (propValue instanceof Date) {
      return 'date';
    } else if (propValue instanceof RegExp) {
      return 'regexp';
    }
  }
  return propType;
}

module.exports = ReactPropTypes;

},{"./ReactElement":52,"./ReactPropTypeLocationNames":70,"./deprecated":106,"./emptyFunction":107}],73:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactPutListenerQueue
 */

"use strict";

var PooledClass = _dereq_("./PooledClass");
var ReactBrowserEventEmitter = _dereq_("./ReactBrowserEventEmitter");

var assign = _dereq_("./Object.assign");

function ReactPutListenerQueue() {
  this.listenersToPut = [];
}

assign(ReactPutListenerQueue.prototype, {
  enqueuePutListener: function(rootNodeID, propKey, propValue) {
    this.listenersToPut.push({
      rootNodeID: rootNodeID,
      propKey: propKey,
      propValue: propValue
    });
  },

  putListeners: function() {
    for (var i = 0; i < this.listenersToPut.length; i++) {
      var listenerToPut = this.listenersToPut[i];
      ReactBrowserEventEmitter.putListener(
        listenerToPut.rootNodeID,
        listenerToPut.propKey,
        listenerToPut.propValue
      );
    }
  },

  reset: function() {
    this.listenersToPut.length = 0;
  },

  destructor: function() {
    this.reset();
  }
});

PooledClass.addPoolingTo(ReactPutListenerQueue);

module.exports = ReactPutListenerQueue;

},{"./Object.assign":27,"./PooledClass":28,"./ReactBrowserEventEmitter":30}],74:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactReconcileTransaction
 * @typechecks static-only
 */

"use strict";

var CallbackQueue = _dereq_("./CallbackQueue");
var PooledClass = _dereq_("./PooledClass");
var ReactBrowserEventEmitter = _dereq_("./ReactBrowserEventEmitter");
var ReactInputSelection = _dereq_("./ReactInputSelection");
var ReactPutListenerQueue = _dereq_("./ReactPutListenerQueue");
var Transaction = _dereq_("./Transaction");

var assign = _dereq_("./Object.assign");

/**
 * Ensures that, when possible, the selection range (currently selected text
 * input) is not disturbed by performing the transaction.
 */
var SELECTION_RESTORATION = {
  /**
   * @return {Selection} Selection information.
   */
  initialize: ReactInputSelection.getSelectionInformation,
  /**
   * @param {Selection} sel Selection information returned from `initialize`.
   */
  close: ReactInputSelection.restoreSelection
};

/**
 * Suppresses events (blur/focus) that could be inadvertently dispatched due to
 * high level DOM manipulations (like temporarily removing a text input from the
 * DOM).
 */
var EVENT_SUPPRESSION = {
  /**
   * @return {boolean} The enabled status of `ReactBrowserEventEmitter` before
   * the reconciliation.
   */
  initialize: function() {
    var currentlyEnabled = ReactBrowserEventEmitter.isEnabled();
    ReactBrowserEventEmitter.setEnabled(false);
    return currentlyEnabled;
  },

  /**
   * @param {boolean} previouslyEnabled Enabled status of
   *   `ReactBrowserEventEmitter` before the reconciliation occured. `close`
   *   restores the previous value.
   */
  close: function(previouslyEnabled) {
    ReactBrowserEventEmitter.setEnabled(previouslyEnabled);
  }
};

/**
 * Provides a queue for collecting `componentDidMount` and
 * `componentDidUpdate` callbacks during the the transaction.
 */
var ON_DOM_READY_QUEUEING = {
  /**
   * Initializes the internal `onDOMReady` queue.
   */
  initialize: function() {
    this.reactMountReady.reset();
  },

  /**
   * After DOM is flushed, invoke all registered `onDOMReady` callbacks.
   */
  close: function() {
    this.reactMountReady.notifyAll();
  }
};

var PUT_LISTENER_QUEUEING = {
  initialize: function() {
    this.putListenerQueue.reset();
  },

  close: function() {
    this.putListenerQueue.putListeners();
  }
};

/**
 * Executed within the scope of the `Transaction` instance. Consider these as
 * being member methods, but with an implied ordering while being isolated from
 * each other.
 */
var TRANSACTION_WRAPPERS = [
  PUT_LISTENER_QUEUEING,
  SELECTION_RESTORATION,
  EVENT_SUPPRESSION,
  ON_DOM_READY_QUEUEING
];

/**
 * Currently:
 * - The order that these are listed in the transaction is critical:
 * - Suppresses events.
 * - Restores selection range.
 *
 * Future:
 * - Restore document/overflow scroll positions that were unintentionally
 *   modified via DOM insertions above the top viewport boundary.
 * - Implement/integrate with customized constraint based layout system and keep
 *   track of which dimensions must be remeasured.
 *
 * @class ReactReconcileTransaction
 */
function ReactReconcileTransaction() {
  this.reinitializeTransaction();
  // Only server-side rendering really needs this option (see
  // `ReactServerRendering`), but server-side uses
  // `ReactServerRenderingTransaction` instead. This option is here so that it's
  // accessible and defaults to false when `ReactDOMComponent` and
  // `ReactTextComponent` checks it in `mountComponent`.`
  this.renderToStaticMarkup = false;
  this.reactMountReady = CallbackQueue.getPooled(null);
  this.putListenerQueue = ReactPutListenerQueue.getPooled();
}

var Mixin = {
  /**
   * @see Transaction
   * @abstract
   * @final
   * @return {array<object>} List of operation wrap proceedures.
   *   TODO: convert to array<TransactionWrapper>
   */
  getTransactionWrappers: function() {
    return TRANSACTION_WRAPPERS;
  },

  /**
   * @return {object} The queue to collect `onDOMReady` callbacks with.
   */
  getReactMountReady: function() {
    return this.reactMountReady;
  },

  getPutListenerQueue: function() {
    return this.putListenerQueue;
  },

  /**
   * `PooledClass` looks for this, and will invoke this before allowing this
   * instance to be resused.
   */
  destructor: function() {
    CallbackQueue.release(this.reactMountReady);
    this.reactMountReady = null;

    ReactPutListenerQueue.release(this.putListenerQueue);
    this.putListenerQueue = null;
  }
};


assign(ReactReconcileTransaction.prototype, Transaction.Mixin, Mixin);

PooledClass.addPoolingTo(ReactReconcileTransaction);

module.exports = ReactReconcileTransaction;

},{"./CallbackQueue":6,"./Object.assign":27,"./PooledClass":28,"./ReactBrowserEventEmitter":30,"./ReactInputSelection":59,"./ReactPutListenerQueue":73,"./Transaction":95}],75:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactRootIndex
 * @typechecks
 */

"use strict";

var ReactRootIndexInjection = {
  /**
   * @param {function} _createReactRootIndex
   */
  injectCreateReactRootIndex: function(_createReactRootIndex) {
    ReactRootIndex.createReactRootIndex = _createReactRootIndex;
  }
};

var ReactRootIndex = {
  createReactRootIndex: null,
  injection: ReactRootIndexInjection
};

module.exports = ReactRootIndex;

},{}],76:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @typechecks static-only
 * @providesModule ReactServerRendering
 */
"use strict";

var ReactElement = _dereq_("./ReactElement");
var ReactInstanceHandles = _dereq_("./ReactInstanceHandles");
var ReactMarkupChecksum = _dereq_("./ReactMarkupChecksum");
var ReactServerRenderingTransaction =
  _dereq_("./ReactServerRenderingTransaction");

var instantiateReactComponent = _dereq_("./instantiateReactComponent");
var invariant = _dereq_("./invariant");

/**
 * @param {ReactElement} element
 * @return {string} the HTML markup
 */
function renderToString(element) {
  ("production" !== "development" ? invariant(
    ReactElement.isValidElement(element),
    'renderToString(): You must pass a valid ReactElement.'
  ) : invariant(ReactElement.isValidElement(element)));

  var transaction;
  try {
    var id = ReactInstanceHandles.createReactRootID();
    transaction = ReactServerRenderingTransaction.getPooled(false);

    return transaction.perform(function() {
      var componentInstance = instantiateReactComponent(element, null);
      var markup = componentInstance.mountComponent(id, transaction, 0);
      return ReactMarkupChecksum.addChecksumToMarkup(markup);
    }, null);
  } finally {
    ReactServerRenderingTransaction.release(transaction);
  }
}

/**
 * @param {ReactElement} element
 * @return {string} the HTML markup, without the extra React ID and checksum
 * (for generating static pages)
 */
function renderToStaticMarkup(element) {
  ("production" !== "development" ? invariant(
    ReactElement.isValidElement(element),
    'renderToStaticMarkup(): You must pass a valid ReactElement.'
  ) : invariant(ReactElement.isValidElement(element)));

  var transaction;
  try {
    var id = ReactInstanceHandles.createReactRootID();
    transaction = ReactServerRenderingTransaction.getPooled(true);

    return transaction.perform(function() {
      var componentInstance = instantiateReactComponent(element, null);
      return componentInstance.mountComponent(id, transaction, 0);
    }, null);
  } finally {
    ReactServerRenderingTransaction.release(transaction);
  }
}

module.exports = {
  renderToString: renderToString,
  renderToStaticMarkup: renderToStaticMarkup
};

},{"./ReactElement":52,"./ReactInstanceHandles":60,"./ReactMarkupChecksum":62,"./ReactServerRenderingTransaction":77,"./instantiateReactComponent":125,"./invariant":126}],77:[function(_dereq_,module,exports){
/**
 * Copyright 2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactServerRenderingTransaction
 * @typechecks
 */

"use strict";

var PooledClass = _dereq_("./PooledClass");
var CallbackQueue = _dereq_("./CallbackQueue");
var ReactPutListenerQueue = _dereq_("./ReactPutListenerQueue");
var Transaction = _dereq_("./Transaction");

var assign = _dereq_("./Object.assign");
var emptyFunction = _dereq_("./emptyFunction");

/**
 * Provides a `CallbackQueue` queue for collecting `onDOMReady` callbacks
 * during the performing of the transaction.
 */
var ON_DOM_READY_QUEUEING = {
  /**
   * Initializes the internal `onDOMReady` queue.
   */
  initialize: function() {
    this.reactMountReady.reset();
  },

  close: emptyFunction
};

var PUT_LISTENER_QUEUEING = {
  initialize: function() {
    this.putListenerQueue.reset();
  },

  close: emptyFunction
};

/**
 * Executed within the scope of the `Transaction` instance. Consider these as
 * being member methods, but with an implied ordering while being isolated from
 * each other.
 */
var TRANSACTION_WRAPPERS = [
  PUT_LISTENER_QUEUEING,
  ON_DOM_READY_QUEUEING
];

/**
 * @class ReactServerRenderingTransaction
 * @param {boolean} renderToStaticMarkup
 */
function ReactServerRenderingTransaction(renderToStaticMarkup) {
  this.reinitializeTransaction();
  this.renderToStaticMarkup = renderToStaticMarkup;
  this.reactMountReady = CallbackQueue.getPooled(null);
  this.putListenerQueue = ReactPutListenerQueue.getPooled();
}

var Mixin = {
  /**
   * @see Transaction
   * @abstract
   * @final
   * @return {array} Empty list of operation wrap proceedures.
   */
  getTransactionWrappers: function() {
    return TRANSACTION_WRAPPERS;
  },

  /**
   * @return {object} The queue to collect `onDOMReady` callbacks with.
   */
  getReactMountReady: function() {
    return this.reactMountReady;
  },

  getPutListenerQueue: function() {
    return this.putListenerQueue;
  },

  /**
   * `PooledClass` looks for this, and will invoke this before allowing this
   * instance to be resused.
   */
  destructor: function() {
    CallbackQueue.release(this.reactMountReady);
    this.reactMountReady = null;

    ReactPutListenerQueue.release(this.putListenerQueue);
    this.putListenerQueue = null;
  }
};


assign(
  ReactServerRenderingTransaction.prototype,
  Transaction.Mixin,
  Mixin
);

PooledClass.addPoolingTo(ReactServerRenderingTransaction);

module.exports = ReactServerRenderingTransaction;

},{"./CallbackQueue":6,"./Object.assign":27,"./PooledClass":28,"./ReactPutListenerQueue":73,"./Transaction":95,"./emptyFunction":107}],78:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactTextComponent
 * @typechecks static-only
 */

"use strict";

var DOMPropertyOperations = _dereq_("./DOMPropertyOperations");
var ReactComponent = _dereq_("./ReactComponent");
var ReactElement = _dereq_("./ReactElement");

var assign = _dereq_("./Object.assign");
var escapeTextForBrowser = _dereq_("./escapeTextForBrowser");

/**
 * Text nodes violate a couple assumptions that React makes about components:
 *
 *  - When mounting text into the DOM, adjacent text nodes are merged.
 *  - Text nodes cannot be assigned a React root ID.
 *
 * This component is used to wrap strings in elements so that they can undergo
 * the same reconciliation that is applied to elements.
 *
 * TODO: Investigate representing React components in the DOM with text nodes.
 *
 * @class ReactTextComponent
 * @extends ReactComponent
 * @internal
 */
var ReactTextComponent = function(props) {
  // This constructor and it's argument is currently used by mocks.
};

assign(ReactTextComponent.prototype, ReactComponent.Mixin, {

  /**
   * Creates the markup for this text node. This node is not intended to have
   * any features besides containing text content.
   *
   * @param {string} rootID DOM ID of the root node.
   * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
   * @param {number} mountDepth number of components in the owner hierarchy
   * @return {string} Markup for this text node.
   * @internal
   */
  mountComponent: function(rootID, transaction, mountDepth) {
    ReactComponent.Mixin.mountComponent.call(
      this,
      rootID,
      transaction,
      mountDepth
    );

    var escapedText = escapeTextForBrowser(this.props);

    if (transaction.renderToStaticMarkup) {
      // Normally we'd wrap this in a `span` for the reasons stated above, but
      // since this is a situation where React won't take over (static pages),
      // we can simply return the text as it is.
      return escapedText;
    }

    return (
      '<span ' + DOMPropertyOperations.createMarkupForID(rootID) + '>' +
        escapedText +
      '</span>'
    );
  },

  /**
   * Updates this component by updating the text content.
   *
   * @param {object} nextComponent Contains the next text content.
   * @param {ReactReconcileTransaction} transaction
   * @internal
   */
  receiveComponent: function(nextComponent, transaction) {
    var nextProps = nextComponent.props;
    if (nextProps !== this.props) {
      this.props = nextProps;
      ReactComponent.BackendIDOperations.updateTextContentByID(
        this._rootNodeID,
        nextProps
      );
    }
  }

});

var ReactTextComponentFactory = function(text) {
  // Bypass validation and configuration
  return new ReactElement(ReactTextComponent, null, null, null, null, text);
};

ReactTextComponentFactory.type = ReactTextComponent;

module.exports = ReactTextComponentFactory;

},{"./DOMPropertyOperations":12,"./Object.assign":27,"./ReactComponent":32,"./ReactElement":52,"./escapeTextForBrowser":109}],79:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ReactUpdates
 */

"use strict";

var CallbackQueue = _dereq_("./CallbackQueue");
var PooledClass = _dereq_("./PooledClass");
var ReactCurrentOwner = _dereq_("./ReactCurrentOwner");
var ReactPerf = _dereq_("./ReactPerf");
var Transaction = _dereq_("./Transaction");

var assign = _dereq_("./Object.assign");
var invariant = _dereq_("./invariant");
var warning = _dereq_("./warning");

var dirtyComponents = [];
var asapCallbackQueue = CallbackQueue.getPooled();
var asapEnqueued = false;

var batchingStrategy = null;

function ensureInjected() {
  ("production" !== "development" ? invariant(
    ReactUpdates.ReactReconcileTransaction && batchingStrategy,
    'ReactUpdates: must inject a reconcile transaction class and batching ' +
    'strategy'
  ) : invariant(ReactUpdates.ReactReconcileTransaction && batchingStrategy));
}

var NESTED_UPDATES = {
  initialize: function() {
    this.dirtyComponentsLength = dirtyComponents.length;
  },
  close: function() {
    if (this.dirtyComponentsLength !== dirtyComponents.length) {
      // Additional updates were enqueued by componentDidUpdate handlers or
      // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run
      // these new updates so that if A's componentDidUpdate calls setState on
      // B, B will update before the callback A's updater provided when calling
      // setState.
      dirtyComponents.splice(0, this.dirtyComponentsLength);
      flushBatchedUpdates();
    } else {
      dirtyComponents.length = 0;
    }
  }
};

var UPDATE_QUEUEING = {
  initialize: function() {
    this.callbackQueue.reset();
  },
  close: function() {
    this.callbackQueue.notifyAll();
  }
};

var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];

function ReactUpdatesFlushTransaction() {
  this.reinitializeTransaction();
  this.dirtyComponentsLength = null;
  this.callbackQueue = CallbackQueue.getPooled();
  this.reconcileTransaction =
    ReactUpdates.ReactReconcileTransaction.getPooled();
}

assign(
  ReactUpdatesFlushTransaction.prototype,
  Transaction.Mixin, {
  getTransactionWrappers: function() {
    return TRANSACTION_WRAPPERS;
  },

  destructor: function() {
    this.dirtyComponentsLength = null;
    CallbackQueue.release(this.callbackQueue);
    this.callbackQueue = null;
    ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);
    this.reconcileTransaction = null;
  },

  perform: function(method, scope, a) {
    // Essentially calls `this.reconcileTransaction.perform(method, scope, a)`
    // with this transaction's wrappers around it.
    return Transaction.Mixin.perform.call(
      this,
      this.reconcileTransaction.perform,
      this.reconcileTransaction,
      method,
      scope,
      a
    );
  }
});

PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);

function batchedUpdates(callback, a, b) {
  ensureInjected();
  batchingStrategy.batchedUpdates(callback, a, b);
}

/**
 * Array comparator for ReactComponents by owner depth
 *
 * @param {ReactComponent} c1 first component you're comparing
 * @param {ReactComponent} c2 second component you're comparing
 * @return {number} Return value usable by Array.prototype.sort().
 */
function mountDepthComparator(c1, c2) {
  return c1._mountDepth - c2._mountDepth;
}

function runBatchedUpdates(transaction) {
  var len = transaction.dirtyComponentsLength;
  ("production" !== "development" ? invariant(
    len === dirtyComponents.length,
    'Expected flush transaction\'s stored dirty-components length (%s) to ' +
    'match dirty-components array length (%s).',
    len,
    dirtyComponents.length
  ) : invariant(len === dirtyComponents.length));

  // Since reconciling a component higher in the owner hierarchy usually (not
  // always -- see shouldComponentUpdate()) will reconcile children, reconcile
  // them before their children by sorting the array.
  dirtyComponents.sort(mountDepthComparator);

  for (var i = 0; i < len; i++) {
    // If a component is unmounted before pending changes apply, ignore them
    // TODO: Queue unmounts in the same list to avoid this happening at all
    var component = dirtyComponents[i];
    if (component.isMounted()) {
      // If performUpdateIfNecessary happens to enqueue any new updates, we
      // shouldn't execute the callbacks until the next render happens, so
      // stash the callbacks first
      var callbacks = component._pendingCallbacks;
      component._pendingCallbacks = null;
      component.performUpdateIfNecessary(transaction.reconcileTransaction);

      if (callbacks) {
        for (var j = 0; j < callbacks.length; j++) {
          transaction.callbackQueue.enqueue(
            callbacks[j],
            component
          );
        }
      }
    }
  }
}

var flushBatchedUpdates = ReactPerf.measure(
  'ReactUpdates',
  'flushBatchedUpdates',
  function() {
    // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents
    // array and perform any updates enqueued by mount-ready handlers (i.e.,
    // componentDidUpdate) but we need to check here too in order to catch
    // updates enqueued by setState callbacks and asap calls.
    while (dirtyComponents.length || asapEnqueued) {
      if (dirtyComponents.length) {
        var transaction = ReactUpdatesFlushTransaction.getPooled();
        transaction.perform(runBatchedUpdates, null, transaction);
        ReactUpdatesFlushTransaction.release(transaction);
      }

      if (asapEnqueued) {
        asapEnqueued = false;
        var queue = asapCallbackQueue;
        asapCallbackQueue = CallbackQueue.getPooled();
        queue.notifyAll();
        CallbackQueue.release(queue);
      }
    }
  }
);

/**
 * Mark a component as needing a rerender, adding an optional callback to a
 * list of functions which will be executed once the rerender occurs.
 */
function enqueueUpdate(component, callback) {
  ("production" !== "development" ? invariant(
    !callback || typeof callback === "function",
    'enqueueUpdate(...): You called `setProps`, `replaceProps`, ' +
    '`setState`, `replaceState`, or `forceUpdate` with a callback that ' +
    'isn\'t callable.'
  ) : invariant(!callback || typeof callback === "function"));
  ensureInjected();

  // Various parts of our code (such as ReactCompositeComponent's
  // _renderValidatedComponent) assume that calls to render aren't nested;
  // verify that that's the case. (This is called by each top-level update
  // function, like setProps, setState, forceUpdate, etc.; creation and
  // destruction of top-level components is guarded in ReactMount.)
  ("production" !== "development" ? warning(
    ReactCurrentOwner.current == null,
    'enqueueUpdate(): Render methods should be a pure function of props ' +
    'and state; triggering nested component updates from render is not ' +
    'allowed. If necessary, trigger nested updates in ' +
    'componentDidUpdate.'
  ) : null);

  if (!batchingStrategy.isBatchingUpdates) {
    batchingStrategy.batchedUpdates(enqueueUpdate, component, callback);
    return;
  }

  dirtyComponents.push(component);

  if (callback) {
    if (component._pendingCallbacks) {
      component._pendingCallbacks.push(callback);
    } else {
      component._pendingCallbacks = [callback];
    }
  }
}

/**
 * Enqueue a callback to be run at the end of the current batching cycle. Throws
 * if no updates are currently being performed.
 */
function asap(callback, context) {
  ("production" !== "development" ? invariant(
    batchingStrategy.isBatchingUpdates,
    'ReactUpdates.asap: Can\'t enqueue an asap callback in a context where' +
    'updates are not being batched.'
  ) : invariant(batchingStrategy.isBatchingUpdates));
  asapCallbackQueue.enqueue(callback, context);
  asapEnqueued = true;
}

var ReactUpdatesInjection = {
  injectReconcileTransaction: function(ReconcileTransaction) {
    ("production" !== "development" ? invariant(
      ReconcileTransaction,
      'ReactUpdates: must provide a reconcile transaction class'
    ) : invariant(ReconcileTransaction));
    ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
  },

  injectBatchingStrategy: function(_batchingStrategy) {
    ("production" !== "development" ? invariant(
      _batchingStrategy,
      'ReactUpdates: must provide a batching strategy'
    ) : invariant(_batchingStrategy));
    ("production" !== "development" ? invariant(
      typeof _batchingStrategy.batchedUpdates === 'function',
      'ReactUpdates: must provide a batchedUpdates() function'
    ) : invariant(typeof _batchingStrategy.batchedUpdates === 'function'));
    ("production" !== "development" ? invariant(
      typeof _batchingStrategy.isBatchingUpdates === 'boolean',
      'ReactUpdates: must provide an isBatchingUpdates boolean attribute'
    ) : invariant(typeof _batchingStrategy.isBatchingUpdates === 'boolean'));
    batchingStrategy = _batchingStrategy;
  }
};

var ReactUpdates = {
  /**
   * React references `ReactReconcileTransaction` using this property in order
   * to allow dependency injection.
   *
   * @internal
   */
  ReactReconcileTransaction: null,

  batchedUpdates: batchedUpdates,
  enqueueUpdate: enqueueUpdate,
  flushBatchedUpdates: flushBatchedUpdates,
  injection: ReactUpdatesInjection,
  asap: asap
};

module.exports = ReactUpdates;

},{"./CallbackQueue":6,"./Object.assign":27,"./PooledClass":28,"./ReactCurrentOwner":36,"./ReactPerf":68,"./Transaction":95,"./invariant":126,"./warning":145}],80:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule SVGDOMPropertyConfig
 */

/*jslint bitwise: true*/

"use strict";

var DOMProperty = _dereq_("./DOMProperty");

var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE;

var SVGDOMPropertyConfig = {
  Properties: {
    cx: MUST_USE_ATTRIBUTE,
    cy: MUST_USE_ATTRIBUTE,
    d: MUST_USE_ATTRIBUTE,
    dx: MUST_USE_ATTRIBUTE,
    dy: MUST_USE_ATTRIBUTE,
    fill: MUST_USE_ATTRIBUTE,
    fillOpacity: MUST_USE_ATTRIBUTE,
    fontFamily: MUST_USE_ATTRIBUTE,
    fontSize: MUST_USE_ATTRIBUTE,
    fx: MUST_USE_ATTRIBUTE,
    fy: MUST_USE_ATTRIBUTE,
    gradientTransform: MUST_USE_ATTRIBUTE,
    gradientUnits: MUST_USE_ATTRIBUTE,
    markerEnd: MUST_USE_ATTRIBUTE,
    markerMid: MUST_USE_ATTRIBUTE,
    markerStart: MUST_USE_ATTRIBUTE,
    offset: MUST_USE_ATTRIBUTE,
    opacity: MUST_USE_ATTRIBUTE,
    patternContentUnits: MUST_USE_ATTRIBUTE,
    patternUnits: MUST_USE_ATTRIBUTE,
    points: MUST_USE_ATTRIBUTE,
    preserveAspectRatio: MUST_USE_ATTRIBUTE,
    r: MUST_USE_ATTRIBUTE,
    rx: MUST_USE_ATTRIBUTE,
    ry: MUST_USE_ATTRIBUTE,
    spreadMethod: MUST_USE_ATTRIBUTE,
    stopColor: MUST_USE_ATTRIBUTE,
    stopOpacity: MUST_USE_ATTRIBUTE,
    stroke: MUST_USE_ATTRIBUTE,
    strokeDasharray: MUST_USE_ATTRIBUTE,
    strokeLinecap: MUST_USE_ATTRIBUTE,
    strokeOpacity: MUST_USE_ATTRIBUTE,
    strokeWidth: MUST_USE_ATTRIBUTE,
    textAnchor: MUST_USE_ATTRIBUTE,
    transform: MUST_USE_ATTRIBUTE,
    version: MUST_USE_ATTRIBUTE,
    viewBox: MUST_USE_ATTRIBUTE,
    x1: MUST_USE_ATTRIBUTE,
    x2: MUST_USE_ATTRIBUTE,
    x: MUST_USE_ATTRIBUTE,
    y1: MUST_USE_ATTRIBUTE,
    y2: MUST_USE_ATTRIBUTE,
    y: MUST_USE_ATTRIBUTE
  },
  DOMAttributeNames: {
    fillOpacity: 'fill-opacity',
    fontFamily: 'font-family',
    fontSize: 'font-size',
    gradientTransform: 'gradientTransform',
    gradientUnits: 'gradientUnits',
    markerEnd: 'marker-end',
    markerMid: 'marker-mid',
    markerStart: 'marker-start',
    patternContentUnits: 'patternContentUnits',
    patternUnits: 'patternUnits',
    preserveAspectRatio: 'preserveAspectRatio',
    spreadMethod: 'spreadMethod',
    stopColor: 'stop-color',
    stopOpacity: 'stop-opacity',
    strokeDasharray: 'stroke-dasharray',
    strokeLinecap: 'stroke-linecap',
    strokeOpacity: 'stroke-opacity',
    strokeWidth: 'stroke-width',
    textAnchor: 'text-anchor',
    viewBox: 'viewBox'
  }
};

module.exports = SVGDOMPropertyConfig;

},{"./DOMProperty":11}],81:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule SelectEventPlugin
 */

"use strict";

var EventConstants = _dereq_("./EventConstants");
var EventPropagators = _dereq_("./EventPropagators");
var ReactInputSelection = _dereq_("./ReactInputSelection");
var SyntheticEvent = _dereq_("./SyntheticEvent");

var getActiveElement = _dereq_("./getActiveElement");
var isTextInputElement = _dereq_("./isTextInputElement");
var keyOf = _dereq_("./keyOf");
var shallowEqual = _dereq_("./shallowEqual");

var topLevelTypes = EventConstants.topLevelTypes;

var eventTypes = {
  select: {
    phasedRegistrationNames: {
      bubbled: keyOf({onSelect: null}),
      captured: keyOf({onSelectCapture: null})
    },
    dependencies: [
      topLevelTypes.topBlur,
      topLevelTypes.topContextMenu,
      topLevelTypes.topFocus,
      topLevelTypes.topKeyDown,
      topLevelTypes.topMouseDown,
      topLevelTypes.topMouseUp,
      topLevelTypes.topSelectionChange
    ]
  }
};

var activeElement = null;
var activeElementID = null;
var lastSelection = null;
var mouseDown = false;

/**
 * Get an object which is a unique representation of the current selection.
 *
 * The return value will not be consistent across nodes or browsers, but
 * two identical selections on the same node will return identical objects.
 *
 * @param {DOMElement} node
 * @param {object}
 */
function getSelection(node) {
  if ('selectionStart' in node &&
      ReactInputSelection.hasSelectionCapabilities(node)) {
    return {
      start: node.selectionStart,
      end: node.selectionEnd
    };
  } else if (window.getSelection) {
    var selection = window.getSelection();
    return {
      anchorNode: selection.anchorNode,
      anchorOffset: selection.anchorOffset,
      focusNode: selection.focusNode,
      focusOffset: selection.focusOffset
    };
  } else if (document.selection) {
    var range = document.selection.createRange();
    return {
      parentElement: range.parentElement(),
      text: range.text,
      top: range.boundingTop,
      left: range.boundingLeft
    };
  }
}

/**
 * Poll selection to see whether it's changed.
 *
 * @param {object} nativeEvent
 * @return {?SyntheticEvent}
 */
function constructSelectEvent(nativeEvent) {
  // Ensure we have the right element, and that the user is not dragging a
  // selection (this matches native `select` event behavior). In HTML5, select
  // fires only on input and textarea thus if there's no focused element we
  // won't dispatch.
  if (mouseDown ||
      activeElement == null ||
      activeElement != getActiveElement()) {
    return;
  }

  // Only fire when selection has actually changed.
  var currentSelection = getSelection(activeElement);
  if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
    lastSelection = currentSelection;

    var syntheticEvent = SyntheticEvent.getPooled(
      eventTypes.select,
      activeElementID,
      nativeEvent
    );

    syntheticEvent.type = 'select';
    syntheticEvent.target = activeElement;

    EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent);

    return syntheticEvent;
  }
}

/**
 * This plugin creates an `onSelect` event that normalizes select events
 * across form elements.
 *
 * Supported elements are:
 * - input (see `isTextInputElement`)
 * - textarea
 * - contentEditable
 *
 * This differs from native browser implementations in the following ways:
 * - Fires on contentEditable fields as well as inputs.
 * - Fires for collapsed selection.
 * - Fires after user input.
 */
var SelectEventPlugin = {

  eventTypes: eventTypes,

  /**
   * @param {string} topLevelType Record from `EventConstants`.
   * @param {DOMEventTarget} topLevelTarget The listening component root node.
   * @param {string} topLevelTargetID ID of `topLevelTarget`.
   * @param {object} nativeEvent Native browser event.
   * @return {*} An accumulation of synthetic events.
   * @see {EventPluginHub.extractEvents}
   */
  extractEvents: function(
      topLevelType,
      topLevelTarget,
      topLevelTargetID,
      nativeEvent) {

    switch (topLevelType) {
      // Track the input node that has focus.
      case topLevelTypes.topFocus:
        if (isTextInputElement(topLevelTarget) ||
            topLevelTarget.contentEditable === 'true') {
          activeElement = topLevelTarget;
          activeElementID = topLevelTargetID;
          lastSelection = null;
        }
        break;
      case topLevelTypes.topBlur:
        activeElement = null;
        activeElementID = null;
        lastSelection = null;
        break;

      // Don't fire the event while the user is dragging. This matches the
      // semantics of the native select event.
      case topLevelTypes.topMouseDown:
        mouseDown = true;
        break;
      case topLevelTypes.topContextMenu:
      case topLevelTypes.topMouseUp:
        mouseDown = false;
        return constructSelectEvent(nativeEvent);

      // Chrome and IE fire non-standard event when selection is changed (and
      // sometimes when it hasn't).
      // Firefox doesn't support selectionchange, so check selection status
      // after each key entry. The selection changes after keydown and before
      // keyup, but we check on keydown as well in the case of holding down a
      // key, when multiple keydown events are fired but only one keyup is.
      case topLevelTypes.topSelectionChange:
      case topLevelTypes.topKeyDown:
      case topLevelTypes.topKeyUp:
        return constructSelectEvent(nativeEvent);
    }
  }
};

module.exports = SelectEventPlugin;

},{"./EventConstants":16,"./EventPropagators":21,"./ReactInputSelection":59,"./SyntheticEvent":87,"./getActiveElement":113,"./isTextInputElement":129,"./keyOf":133,"./shallowEqual":141}],82:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ServerReactRootIndex
 * @typechecks
 */

"use strict";

/**
 * Size of the reactRoot ID space. We generate random numbers for React root
 * IDs and if there's a collision the events and DOM update system will
 * get confused. In the future we need a way to generate GUIDs but for
 * now this will work on a smaller scale.
 */
var GLOBAL_MOUNT_POINT_MAX = Math.pow(2, 53);

var ServerReactRootIndex = {
  createReactRootIndex: function() {
    return Math.ceil(Math.random() * GLOBAL_MOUNT_POINT_MAX);
  }
};

module.exports = ServerReactRootIndex;

},{}],83:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule SimpleEventPlugin
 */

"use strict";

var EventConstants = _dereq_("./EventConstants");
var EventPluginUtils = _dereq_("./EventPluginUtils");
var EventPropagators = _dereq_("./EventPropagators");
var SyntheticClipboardEvent = _dereq_("./SyntheticClipboardEvent");
var SyntheticEvent = _dereq_("./SyntheticEvent");
var SyntheticFocusEvent = _dereq_("./SyntheticFocusEvent");
var SyntheticKeyboardEvent = _dereq_("./SyntheticKeyboardEvent");
var SyntheticMouseEvent = _dereq_("./SyntheticMouseEvent");
var SyntheticDragEvent = _dereq_("./SyntheticDragEvent");
var SyntheticTouchEvent = _dereq_("./SyntheticTouchEvent");
var SyntheticUIEvent = _dereq_("./SyntheticUIEvent");
var SyntheticWheelEvent = _dereq_("./SyntheticWheelEvent");

var getEventCharCode = _dereq_("./getEventCharCode");

var invariant = _dereq_("./invariant");
var keyOf = _dereq_("./keyOf");
var warning = _dereq_("./warning");

var topLevelTypes = EventConstants.topLevelTypes;

var eventTypes = {
  blur: {
    phasedRegistrationNames: {
      bubbled: keyOf({onBlur: true}),
      captured: keyOf({onBlurCapture: true})
    }
  },
  click: {
    phasedRegistrationNames: {
      bubbled: keyOf({onClick: true}),
      captured: keyOf({onClickCapture: true})
    }
  },
  contextMenu: {
    phasedRegistrationNames: {
      bubbled: keyOf({onContextMenu: true}),
      captured: keyOf({onContextMenuCapture: true})
    }
  },
  copy: {
    phasedRegistrationNames: {
      bubbled: keyOf({onCopy: true}),
      captured: keyOf({onCopyCapture: true})
    }
  },
  cut: {
    phasedRegistrationNames: {
      bubbled: keyOf({onCut: true}),
      captured: keyOf({onCutCapture: true})
    }
  },
  doubleClick: {
    phasedRegistrationNames: {
      bubbled: keyOf({onDoubleClick: true}),
      captured: keyOf({onDoubleClickCapture: true})
    }
  },
  drag: {
    phasedRegistrationNames: {
      bubbled: keyOf({onDrag: true}),
      captured: keyOf({onDragCapture: true})
    }
  },
  dragEnd: {
    phasedRegistrationNames: {
      bubbled: keyOf({onDragEnd: true}),
      captured: keyOf({onDragEndCapture: true})
    }
  },
  dragEnter: {
    phasedRegistrationNames: {
      bubbled: keyOf({onDragEnter: true}),
      captured: keyOf({onDragEnterCapture: true})
    }
  },
  dragExit: {
    phasedRegistrationNames: {
      bubbled: keyOf({onDragExit: true}),
      captured: keyOf({onDragExitCapture: true})
    }
  },
  dragLeave: {
    phasedRegistrationNames: {
      bubbled: keyOf({onDragLeave: true}),
      captured: keyOf({onDragLeaveCapture: true})
    }
  },
  dragOver: {
    phasedRegistrationNames: {
      bubbled: keyOf({onDragOver: true}),
      captured: keyOf({onDragOverCapture: true})
    }
  },
  dragStart: {
    phasedRegistrationNames: {
      bubbled: keyOf({onDragStart: true}),
      captured: keyOf({onDragStartCapture: true})
    }
  },
  drop: {
    phasedRegistrationNames: {
      bubbled: keyOf({onDrop: true}),
      captured: keyOf({onDropCapture: true})
    }
  },
  focus: {
    phasedRegistrationNames: {
      bubbled: keyOf({onFocus: true}),
      captured: keyOf({onFocusCapture: true})
    }
  },
  input: {
    phasedRegistrationNames: {
      bubbled: keyOf({onInput: true}),
      captured: keyOf({onInputCapture: true})
    }
  },
  keyDown: {
    phasedRegistrationNames: {
      bubbled: keyOf({onKeyDown: true}),
      captured: keyOf({onKeyDownCapture: true})
    }
  },
  keyPress: {
    phasedRegistrationNames: {
      bubbled: keyOf({onKeyPress: true}),
      captured: keyOf({onKeyPressCapture: true})
    }
  },
  keyUp: {
    phasedRegistrationNames: {
      bubbled: keyOf({onKeyUp: true}),
      captured: keyOf({onKeyUpCapture: true})
    }
  },
  load: {
    phasedRegistrationNames: {
      bubbled: keyOf({onLoad: true}),
      captured: keyOf({onLoadCapture: true})
    }
  },
  error: {
    phasedRegistrationNames: {
      bubbled: keyOf({onError: true}),
      captured: keyOf({onErrorCapture: true})
    }
  },
  // Note: We do not allow listening to mouseOver events. Instead, use the
  // onMouseEnter/onMouseLeave created by `EnterLeaveEventPlugin`.
  mouseDown: {
    phasedRegistrationNames: {
      bubbled: keyOf({onMouseDown: true}),
      captured: keyOf({onMouseDownCapture: true})
    }
  },
  mouseMove: {
    phasedRegistrationNames: {
      bubbled: keyOf({onMouseMove: true}),
      captured: keyOf({onMouseMoveCapture: true})
    }
  },
  mouseOut: {
    phasedRegistrationNames: {
      bubbled: keyOf({onMouseOut: true}),
      captured: keyOf({onMouseOutCapture: true})
    }
  },
  mouseOver: {
    phasedRegistrationNames: {
      bubbled: keyOf({onMouseOver: true}),
      captured: keyOf({onMouseOverCapture: true})
    }
  },
  mouseUp: {
    phasedRegistrationNames: {
      bubbled: keyOf({onMouseUp: true}),
      captured: keyOf({onMouseUpCapture: true})
    }
  },
  paste: {
    phasedRegistrationNames: {
      bubbled: keyOf({onPaste: true}),
      captured: keyOf({onPasteCapture: true})
    }
  },
  reset: {
    phasedRegistrationNames: {
      bubbled: keyOf({onReset: true}),
      captured: keyOf({onResetCapture: true})
    }
  },
  scroll: {
    phasedRegistrationNames: {
      bubbled: keyOf({onScroll: true}),
      captured: keyOf({onScrollCapture: true})
    }
  },
  submit: {
    phasedRegistrationNames: {
      bubbled: keyOf({onSubmit: true}),
      captured: keyOf({onSubmitCapture: true})
    }
  },
  touchCancel: {
    phasedRegistrationNames: {
      bubbled: keyOf({onTouchCancel: true}),
      captured: keyOf({onTouchCancelCapture: true})
    }
  },
  touchEnd: {
    phasedRegistrationNames: {
      bubbled: keyOf({onTouchEnd: true}),
      captured: keyOf({onTouchEndCapture: true})
    }
  },
  touchMove: {
    phasedRegistrationNames: {
      bubbled: keyOf({onTouchMove: true}),
      captured: keyOf({onTouchMoveCapture: true})
    }
  },
  touchStart: {
    phasedRegistrationNames: {
      bubbled: keyOf({onTouchStart: true}),
      captured: keyOf({onTouchStartCapture: true})
    }
  },
  wheel: {
    phasedRegistrationNames: {
      bubbled: keyOf({onWheel: true}),
      captured: keyOf({onWheelCapture: true})
    }
  }
};

var topLevelEventsToDispatchConfig = {
  topBlur:        eventTypes.blur,
  topClick:       eventTypes.click,
  topContextMenu: eventTypes.contextMenu,
  topCopy:        eventTypes.copy,
  topCut:         eventTypes.cut,
  topDoubleClick: eventTypes.doubleClick,
  topDrag:        eventTypes.drag,
  topDragEnd:     eventTypes.dragEnd,
  topDragEnter:   eventTypes.dragEnter,
  topDragExit:    eventTypes.dragExit,
  topDragLeave:   eventTypes.dragLeave,
  topDragOver:    eventTypes.dragOver,
  topDragStart:   eventTypes.dragStart,
  topDrop:        eventTypes.drop,
  topError:       eventTypes.error,
  topFocus:       eventTypes.focus,
  topInput:       eventTypes.input,
  topKeyDown:     eventTypes.keyDown,
  topKeyPress:    eventTypes.keyPress,
  topKeyUp:       eventTypes.keyUp,
  topLoad:        eventTypes.load,
  topMouseDown:   eventTypes.mouseDown,
  topMouseMove:   eventTypes.mouseMove,
  topMouseOut:    eventTypes.mouseOut,
  topMouseOver:   eventTypes.mouseOver,
  topMouseUp:     eventTypes.mouseUp,
  topPaste:       eventTypes.paste,
  topReset:       eventTypes.reset,
  topScroll:      eventTypes.scroll,
  topSubmit:      eventTypes.submit,
  topTouchCancel: eventTypes.touchCancel,
  topTouchEnd:    eventTypes.touchEnd,
  topTouchMove:   eventTypes.touchMove,
  topTouchStart:  eventTypes.touchStart,
  topWheel:       eventTypes.wheel
};

for (var topLevelType in topLevelEventsToDispatchConfig) {
  topLevelEventsToDispatchConfig[topLevelType].dependencies = [topLevelType];
}

var SimpleEventPlugin = {

  eventTypes: eventTypes,

  /**
   * Same as the default implementation, except cancels the event when return
   * value is false. This behavior will be disabled in a future release.
   *
   * @param {object} Event to be dispatched.
   * @param {function} Application-level callback.
   * @param {string} domID DOM ID to pass to the callback.
   */
  executeDispatch: function(event, listener, domID) {
    var returnValue = EventPluginUtils.executeDispatch(event, listener, domID);

    ("production" !== "development" ? warning(
      typeof returnValue !== 'boolean',
      'Returning `false` from an event handler is deprecated and will be ' +
      'ignored in a future release. Instead, manually call ' +
      'e.stopPropagation() or e.preventDefault(), as appropriate.'
    ) : null);

    if (returnValue === false) {
      event.stopPropagation();
      event.preventDefault();
    }
  },

  /**
   * @param {string} topLevelType Record from `EventConstants`.
   * @param {DOMEventTarget} topLevelTarget The listening component root node.
   * @param {string} topLevelTargetID ID of `topLevelTarget`.
   * @param {object} nativeEvent Native browser event.
   * @return {*} An accumulation of synthetic events.
   * @see {EventPluginHub.extractEvents}
   */
  extractEvents: function(
      topLevelType,
      topLevelTarget,
      topLevelTargetID,
      nativeEvent) {
    var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];
    if (!dispatchConfig) {
      return null;
    }
    var EventConstructor;
    switch (topLevelType) {
      case topLevelTypes.topInput:
      case topLevelTypes.topLoad:
      case topLevelTypes.topError:
      case topLevelTypes.topReset:
      case topLevelTypes.topSubmit:
        // HTML Events
        // @see http://www.w3.org/TR/html5/index.html#events-0
        EventConstructor = SyntheticEvent;
        break;
      case topLevelTypes.topKeyPress:
        // FireFox creates a keypress event for function keys too. This removes
        // the unwanted keypress events. Enter is however both printable and
        // non-printable. One would expect Tab to be as well (but it isn't).
        if (getEventCharCode(nativeEvent) === 0) {
          return null;
        }
        /* falls through */
      case topLevelTypes.topKeyDown:
      case topLevelTypes.topKeyUp:
        EventConstructor = SyntheticKeyboardEvent;
        break;
      case topLevelTypes.topBlur:
      case topLevelTypes.topFocus:
        EventConstructor = SyntheticFocusEvent;
        break;
      case topLevelTypes.topClick:
        // Firefox creates a click event on right mouse clicks. This removes the
        // unwanted click events.
        if (nativeEvent.button === 2) {
          return null;
        }
        /* falls through */
      case topLevelTypes.topContextMenu:
      case topLevelTypes.topDoubleClick:
      case topLevelTypes.topMouseDown:
      case topLevelTypes.topMouseMove:
      case topLevelTypes.topMouseOut:
      case topLevelTypes.topMouseOver:
      case topLevelTypes.topMouseUp:
        EventConstructor = SyntheticMouseEvent;
        break;
      case topLevelTypes.topDrag:
      case topLevelTypes.topDragEnd:
      case topLevelTypes.topDragEnter:
      case topLevelTypes.topDragExit:
      case topLevelTypes.topDragLeave:
      case topLevelTypes.topDragOver:
      case topLevelTypes.topDragStart:
      case topLevelTypes.topDrop:
        EventConstructor = SyntheticDragEvent;
        break;
      case topLevelTypes.topTouchCancel:
      case topLevelTypes.topTouchEnd:
      case topLevelTypes.topTouchMove:
      case topLevelTypes.topTouchStart:
        EventConstructor = SyntheticTouchEvent;
        break;
      case topLevelTypes.topScroll:
        EventConstructor = SyntheticUIEvent;
        break;
      case topLevelTypes.topWheel:
        EventConstructor = SyntheticWheelEvent;
        break;
      case topLevelTypes.topCopy:
      case topLevelTypes.topCut:
      case topLevelTypes.topPaste:
        EventConstructor = SyntheticClipboardEvent;
        break;
    }
    ("production" !== "development" ? invariant(
      EventConstructor,
      'SimpleEventPlugin: Unhandled event type, `%s`.',
      topLevelType
    ) : invariant(EventConstructor));
    var event = EventConstructor.getPooled(
      dispatchConfig,
      topLevelTargetID,
      nativeEvent
    );
    EventPropagators.accumulateTwoPhaseDispatches(event);
    return event;
  }

};

module.exports = SimpleEventPlugin;

},{"./EventConstants":16,"./EventPluginUtils":20,"./EventPropagators":21,"./SyntheticClipboardEvent":84,"./SyntheticDragEvent":86,"./SyntheticEvent":87,"./SyntheticFocusEvent":88,"./SyntheticKeyboardEvent":90,"./SyntheticMouseEvent":91,"./SyntheticTouchEvent":92,"./SyntheticUIEvent":93,"./SyntheticWheelEvent":94,"./getEventCharCode":114,"./invariant":126,"./keyOf":133,"./warning":145}],84:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule SyntheticClipboardEvent
 * @typechecks static-only
 */

"use strict";

var SyntheticEvent = _dereq_("./SyntheticEvent");

/**
 * @interface Event
 * @see http://www.w3.org/TR/clipboard-apis/
 */
var ClipboardEventInterface = {
  clipboardData: function(event) {
    return (
      'clipboardData' in event ?
        event.clipboardData :
        window.clipboardData
    );
  }
};

/**
 * @param {object} dispatchConfig Configuration used to dispatch this event.
 * @param {string} dispatchMarker Marker identifying the event target.
 * @param {object} nativeEvent Native browser event.
 * @extends {SyntheticUIEvent}
 */
function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent) {
  SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
}

SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);

module.exports = SyntheticClipboardEvent;


},{"./SyntheticEvent":87}],85:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule SyntheticCompositionEvent
 * @typechecks static-only
 */

"use strict";

var SyntheticEvent = _dereq_("./SyntheticEvent");

/**
 * @interface Event
 * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
 */
var CompositionEventInterface = {
  data: null
};

/**
 * @param {object} dispatchConfig Configuration used to dispatch this event.
 * @param {string} dispatchMarker Marker identifying the event target.
 * @param {object} nativeEvent Native browser event.
 * @extends {SyntheticUIEvent}
 */
function SyntheticCompositionEvent(
  dispatchConfig,
  dispatchMarker,
  nativeEvent) {
  SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
}

SyntheticEvent.augmentClass(
  SyntheticCompositionEvent,
  CompositionEventInterface
);

module.exports = SyntheticCompositionEvent;


},{"./SyntheticEvent":87}],86:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule SyntheticDragEvent
 * @typechecks static-only
 */

"use strict";

var SyntheticMouseEvent = _dereq_("./SyntheticMouseEvent");

/**
 * @interface DragEvent
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */
var DragEventInterface = {
  dataTransfer: null
};

/**
 * @param {object} dispatchConfig Configuration used to dispatch this event.
 * @param {string} dispatchMarker Marker identifying the event target.
 * @param {object} nativeEvent Native browser event.
 * @extends {SyntheticUIEvent}
 */
function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent) {
  SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
}

SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface);

module.exports = SyntheticDragEvent;

},{"./SyntheticMouseEvent":91}],87:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule SyntheticEvent
 * @typechecks static-only
 */

"use strict";

var PooledClass = _dereq_("./PooledClass");

var assign = _dereq_("./Object.assign");
var emptyFunction = _dereq_("./emptyFunction");
var getEventTarget = _dereq_("./getEventTarget");

/**
 * @interface Event
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */
var EventInterface = {
  type: null,
  target: getEventTarget,
  // currentTarget is set when dispatching; no use in copying it here
  currentTarget: emptyFunction.thatReturnsNull,
  eventPhase: null,
  bubbles: null,
  cancelable: null,
  timeStamp: function(event) {
    return event.timeStamp || Date.now();
  },
  defaultPrevented: null,
  isTrusted: null
};

/**
 * Synthetic events are dispatched by event plugins, typically in response to a
 * top-level event delegation handler.
 *
 * These systems should generally use pooling to reduce the frequency of garbage
 * collection. The system should check `isPersistent` to determine whether the
 * event should be released into the pool after being dispatched. Users that
 * need a persisted event should invoke `persist`.
 *
 * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
 * normalizing browser quirks. Subclasses do not necessarily have to implement a
 * DOM interface; custom application-specific events can also subclass this.
 *
 * @param {object} dispatchConfig Configuration used to dispatch this event.
 * @param {string} dispatchMarker Marker identifying the event target.
 * @param {object} nativeEvent Native browser event.
 */
function SyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent) {
  this.dispatchConfig = dispatchConfig;
  this.dispatchMarker = dispatchMarker;
  this.nativeEvent = nativeEvent;

  var Interface = this.constructor.Interface;
  for (var propName in Interface) {
    if (!Interface.hasOwnProperty(propName)) {
      continue;
    }
    var normalize = Interface[propName];
    if (normalize) {
      this[propName] = normalize(nativeEvent);
    } else {
      this[propName] = nativeEvent[propName];
    }
  }

  var defaultPrevented = nativeEvent.defaultPrevented != null ?
    nativeEvent.defaultPrevented :
    nativeEvent.returnValue === false;
  if (defaultPrevented) {
    this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
  } else {
    this.isDefaultPrevented = emptyFunction.thatReturnsFalse;
  }
  this.isPropagationStopped = emptyFunction.thatReturnsFalse;
}

assign(SyntheticEvent.prototype, {

  preventDefault: function() {
    this.defaultPrevented = true;
    var event = this.nativeEvent;
    event.preventDefault ? event.preventDefault() : event.returnValue = false;
    this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
  },

  stopPropagation: function() {
    var event = this.nativeEvent;
    event.stopPropagation ? event.stopPropagation() : event.cancelBubble = true;
    this.isPropagationStopped = emptyFunction.thatReturnsTrue;
  },

  /**
   * We release all dispatched `SyntheticEvent`s after each event loop, adding
   * them back into the pool. This allows a way to hold onto a reference that
   * won't be added back into the pool.
   */
  persist: function() {
    this.isPersistent = emptyFunction.thatReturnsTrue;
  },

  /**
   * Checks if this event should be released back into the pool.
   *
   * @return {boolean} True if this should not be released, false otherwise.
   */
  isPersistent: emptyFunction.thatReturnsFalse,

  /**
   * `PooledClass` looks for `destructor` on each instance it releases.
   */
  destructor: function() {
    var Interface = this.constructor.Interface;
    for (var propName in Interface) {
      this[propName] = null;
    }
    this.dispatchConfig = null;
    this.dispatchMarker = null;
    this.nativeEvent = null;
  }

});

SyntheticEvent.Interface = EventInterface;

/**
 * Helper to reduce boilerplate when creating subclasses.
 *
 * @param {function} Class
 * @param {?object} Interface
 */
SyntheticEvent.augmentClass = function(Class, Interface) {
  var Super = this;

  var prototype = Object.create(Super.prototype);
  assign(prototype, Class.prototype);
  Class.prototype = prototype;
  Class.prototype.constructor = Class;

  Class.Interface = assign({}, Super.Interface, Interface);
  Class.augmentClass = Super.augmentClass;

  PooledClass.addPoolingTo(Class, PooledClass.threeArgumentPooler);
};

PooledClass.addPoolingTo(SyntheticEvent, PooledClass.threeArgumentPooler);

module.exports = SyntheticEvent;

},{"./Object.assign":27,"./PooledClass":28,"./emptyFunction":107,"./getEventTarget":117}],88:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule SyntheticFocusEvent
 * @typechecks static-only
 */

"use strict";

var SyntheticUIEvent = _dereq_("./SyntheticUIEvent");

/**
 * @interface FocusEvent
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */
var FocusEventInterface = {
  relatedTarget: null
};

/**
 * @param {object} dispatchConfig Configuration used to dispatch this event.
 * @param {string} dispatchMarker Marker identifying the event target.
 * @param {object} nativeEvent Native browser event.
 * @extends {SyntheticUIEvent}
 */
function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent) {
  SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
}

SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);

module.exports = SyntheticFocusEvent;

},{"./SyntheticUIEvent":93}],89:[function(_dereq_,module,exports){
/**
 * Copyright 2013 Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule SyntheticInputEvent
 * @typechecks static-only
 */

"use strict";

var SyntheticEvent = _dereq_("./SyntheticEvent");

/**
 * @interface Event
 * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
 *      /#events-inputevents
 */
var InputEventInterface = {
  data: null
};

/**
 * @param {object} dispatchConfig Configuration used to dispatch this event.
 * @param {string} dispatchMarker Marker identifying the event target.
 * @param {object} nativeEvent Native browser event.
 * @extends {SyntheticUIEvent}
 */
function SyntheticInputEvent(
  dispatchConfig,
  dispatchMarker,
  nativeEvent) {
  SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
}

SyntheticEvent.augmentClass(
  SyntheticInputEvent,
  InputEventInterface
);

module.exports = SyntheticInputEvent;


},{"./SyntheticEvent":87}],90:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule SyntheticKeyboardEvent
 * @typechecks static-only
 */

"use strict";

var SyntheticUIEvent = _dereq_("./SyntheticUIEvent");

var getEventCharCode = _dereq_("./getEventCharCode");
var getEventKey = _dereq_("./getEventKey");
var getEventModifierState = _dereq_("./getEventModifierState");

/**
 * @interface KeyboardEvent
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */
var KeyboardEventInterface = {
  key: getEventKey,
  location: null,
  ctrlKey: null,
  shiftKey: null,
  altKey: null,
  metaKey: null,
  repeat: null,
  locale: null,
  getModifierState: getEventModifierState,
  // Legacy Interface
  charCode: function(event) {
    // `charCode` is the result of a KeyPress event and represents the value of
    // the actual printable character.

    // KeyPress is deprecated, but its replacement is not yet final and not
    // implemented in any major browser. Only KeyPress has charCode.
    if (event.type === 'keypress') {
      return getEventCharCode(event);
    }
    return 0;
  },
  keyCode: function(event) {
    // `keyCode` is the result of a KeyDown/Up event and represents the value of
    // physical keyboard key.

    // The actual meaning of the value depends on the users' keyboard layout
    // which cannot be detected. Assuming that it is a US keyboard layout
    // provides a surprisingly accurate mapping for US and European users.
    // Due to this, it is left to the user to implement at this time.
    if (event.type === 'keydown' || event.type === 'keyup') {
      return event.keyCode;
    }
    return 0;
  },
  which: function(event) {
    // `which` is an alias for either `keyCode` or `charCode` depending on the
    // type of the event.
    if (event.type === 'keypress') {
      return getEventCharCode(event);
    }
    if (event.type === 'keydown' || event.type === 'keyup') {
      return event.keyCode;
    }
    return 0;
  }
};

/**
 * @param {object} dispatchConfig Configuration used to dispatch this event.
 * @param {string} dispatchMarker Marker identifying the event target.
 * @param {object} nativeEvent Native browser event.
 * @extends {SyntheticUIEvent}
 */
function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent) {
  SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
}

SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);

module.exports = SyntheticKeyboardEvent;

},{"./SyntheticUIEvent":93,"./getEventCharCode":114,"./getEventKey":115,"./getEventModifierState":116}],91:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule SyntheticMouseEvent
 * @typechecks static-only
 */

"use strict";

var SyntheticUIEvent = _dereq_("./SyntheticUIEvent");
var ViewportMetrics = _dereq_("./ViewportMetrics");

var getEventModifierState = _dereq_("./getEventModifierState");

/**
 * @interface MouseEvent
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */
var MouseEventInterface = {
  screenX: null,
  screenY: null,
  clientX: null,
  clientY: null,
  ctrlKey: null,
  shiftKey: null,
  altKey: null,
  metaKey: null,
  getModifierState: getEventModifierState,
  button: function(event) {
    // Webkit, Firefox, IE9+
    // which:  1 2 3
    // button: 0 1 2 (standard)
    var button = event.button;
    if ('which' in event) {
      return button;
    }
    // IE<9
    // which:  undefined
    // button: 0 0 0
    // button: 1 4 2 (onmouseup)
    return button === 2 ? 2 : button === 4 ? 1 : 0;
  },
  buttons: null,
  relatedTarget: function(event) {
    return event.relatedTarget || (
      event.fromElement === event.srcElement ?
        event.toElement :
        event.fromElement
    );
  },
  // "Proprietary" Interface.
  pageX: function(event) {
    return 'pageX' in event ?
      event.pageX :
      event.clientX + ViewportMetrics.currentScrollLeft;
  },
  pageY: function(event) {
    return 'pageY' in event ?
      event.pageY :
      event.clientY + ViewportMetrics.currentScrollTop;
  }
};

/**
 * @param {object} dispatchConfig Configuration used to dispatch this event.
 * @param {string} dispatchMarker Marker identifying the event target.
 * @param {object} nativeEvent Native browser event.
 * @extends {SyntheticUIEvent}
 */
function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent) {
  SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
}

SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);

module.exports = SyntheticMouseEvent;

},{"./SyntheticUIEvent":93,"./ViewportMetrics":96,"./getEventModifierState":116}],92:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule SyntheticTouchEvent
 * @typechecks static-only
 */

"use strict";

var SyntheticUIEvent = _dereq_("./SyntheticUIEvent");

var getEventModifierState = _dereq_("./getEventModifierState");

/**
 * @interface TouchEvent
 * @see http://www.w3.org/TR/touch-events/
 */
var TouchEventInterface = {
  touches: null,
  targetTouches: null,
  changedTouches: null,
  altKey: null,
  metaKey: null,
  ctrlKey: null,
  shiftKey: null,
  getModifierState: getEventModifierState
};

/**
 * @param {object} dispatchConfig Configuration used to dispatch this event.
 * @param {string} dispatchMarker Marker identifying the event target.
 * @param {object} nativeEvent Native browser event.
 * @extends {SyntheticUIEvent}
 */
function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent) {
  SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
}

SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);

module.exports = SyntheticTouchEvent;

},{"./SyntheticUIEvent":93,"./getEventModifierState":116}],93:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule SyntheticUIEvent
 * @typechecks static-only
 */

"use strict";

var SyntheticEvent = _dereq_("./SyntheticEvent");

var getEventTarget = _dereq_("./getEventTarget");

/**
 * @interface UIEvent
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */
var UIEventInterface = {
  view: function(event) {
    if (event.view) {
      return event.view;
    }

    var target = getEventTarget(event);
    if (target != null && target.window === target) {
      // target is a window object
      return target;
    }

    var doc = target.ownerDocument;
    // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
    if (doc) {
      return doc.defaultView || doc.parentWindow;
    } else {
      return window;
    }
  },
  detail: function(event) {
    return event.detail || 0;
  }
};

/**
 * @param {object} dispatchConfig Configuration used to dispatch this event.
 * @param {string} dispatchMarker Marker identifying the event target.
 * @param {object} nativeEvent Native browser event.
 * @extends {SyntheticEvent}
 */
function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent) {
  SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
}

SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface);

module.exports = SyntheticUIEvent;

},{"./SyntheticEvent":87,"./getEventTarget":117}],94:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule SyntheticWheelEvent
 * @typechecks static-only
 */

"use strict";

var SyntheticMouseEvent = _dereq_("./SyntheticMouseEvent");

/**
 * @interface WheelEvent
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */
var WheelEventInterface = {
  deltaX: function(event) {
    return (
      'deltaX' in event ? event.deltaX :
      // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
      'wheelDeltaX' in event ? -event.wheelDeltaX : 0
    );
  },
  deltaY: function(event) {
    return (
      'deltaY' in event ? event.deltaY :
      // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
      'wheelDeltaY' in event ? -event.wheelDeltaY :
      // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
      'wheelDelta' in event ? -event.wheelDelta : 0
    );
  },
  deltaZ: null,

  // Browsers without "deltaMode" is reporting in raw wheel delta where one
  // notch on the scroll is always +/- 120, roughly equivalent to pixels.
  // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
  // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
  deltaMode: null
};

/**
 * @param {object} dispatchConfig Configuration used to dispatch this event.
 * @param {string} dispatchMarker Marker identifying the event target.
 * @param {object} nativeEvent Native browser event.
 * @extends {SyntheticMouseEvent}
 */
function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent) {
  SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
}

SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);

module.exports = SyntheticWheelEvent;

},{"./SyntheticMouseEvent":91}],95:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule Transaction
 */

"use strict";

var invariant = _dereq_("./invariant");

/**
 * `Transaction` creates a black box that is able to wrap any method such that
 * certain invariants are maintained before and after the method is invoked
 * (Even if an exception is thrown while invoking the wrapped method). Whoever
 * instantiates a transaction can provide enforcers of the invariants at
 * creation time. The `Transaction` class itself will supply one additional
 * automatic invariant for you - the invariant that any transaction instance
 * should not be run while it is already being run. You would typically create a
 * single instance of a `Transaction` for reuse multiple times, that potentially
 * is used to wrap several different methods. Wrappers are extremely simple -
 * they only require implementing two methods.
 *
 * <pre>
 *                       wrappers (injected at creation time)
 *                                      +        +
 *                                      |        |
 *                    +-----------------|--------|--------------+
 *                    |                 v        |              |
 *                    |      +---------------+   |              |
 *                    |   +--|    wrapper1   |---|----+         |
 *                    |   |  +---------------+   v    |         |
 *                    |   |          +-------------+  |         |
 *                    |   |     +----|   wrapper2  |--------+   |
 *                    |   |     |    +-------------+  |     |   |
 *                    |   |     |                     |     |   |
 *                    |   v     v                     v     v   | wrapper
 *                    | +---+ +---+   +---------+   +---+ +---+ | invariants
 * perform(anyMethod) | |   | |   |   |         |   |   | |   | | maintained
 * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|-------->
 *                    | |   | |   |   |         |   |   | |   | |
 *                    | |   | |   |   |         |   |   | |   | |
 *                    | |   | |   |   |         |   |   | |   | |
 *                    | +---+ +---+   +---------+   +---+ +---+ |
 *                    |  initialize                    close    |
 *                    +-----------------------------------------+
 * </pre>
 *
 * Use cases:
 * - Preserving the input selection ranges before/after reconciliation.
 *   Restoring selection even in the event of an unexpected error.
 * - Deactivating events while rearranging the DOM, preventing blurs/focuses,
 *   while guaranteeing that afterwards, the event system is reactivated.
 * - Flushing a queue of collected DOM mutations to the main UI thread after a
 *   reconciliation takes place in a worker thread.
 * - Invoking any collected `componentDidUpdate` callbacks after rendering new
 *   content.
 * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue
 *   to preserve the `scrollTop` (an automatic scroll aware DOM).
 * - (Future use case): Layout calculations before and after DOM upates.
 *
 * Transactional plugin API:
 * - A module that has an `initialize` method that returns any precomputation.
 * - and a `close` method that accepts the precomputation. `close` is invoked
 *   when the wrapped process is completed, or has failed.
 *
 * @param {Array<TransactionalWrapper>} transactionWrapper Wrapper modules
 * that implement `initialize` and `close`.
 * @return {Transaction} Single transaction for reuse in thread.
 *
 * @class Transaction
 */
var Mixin = {
  /**
   * Sets up this instance so that it is prepared for collecting metrics. Does
   * so such that this setup method may be used on an instance that is already
   * initialized, in a way that does not consume additional memory upon reuse.
   * That can be useful if you decide to make your subclass of this mixin a
   * "PooledClass".
   */
  reinitializeTransaction: function() {
    this.transactionWrappers = this.getTransactionWrappers();
    if (!this.wrapperInitData) {
      this.wrapperInitData = [];
    } else {
      this.wrapperInitData.length = 0;
    }
    this._isInTransaction = false;
  },

  _isInTransaction: false,

  /**
   * @abstract
   * @return {Array<TransactionWrapper>} Array of transaction wrappers.
   */
  getTransactionWrappers: null,

  isInTransaction: function() {
    return !!this._isInTransaction;
  },

  /**
   * Executes the function within a safety window. Use this for the top level
   * methods that result in large amounts of computation/mutations that would
   * need to be safety checked.
   *
   * @param {function} method Member of scope to call.
   * @param {Object} scope Scope to invoke from.
   * @param {Object?=} args... Arguments to pass to the method (optional).
   *                           Helps prevent need to bind in many cases.
   * @return Return value from `method`.
   */
  perform: function(method, scope, a, b, c, d, e, f) {
    ("production" !== "development" ? invariant(
      !this.isInTransaction(),
      'Transaction.perform(...): Cannot initialize a transaction when there ' +
      'is already an outstanding transaction.'
    ) : invariant(!this.isInTransaction()));
    var errorThrown;
    var ret;
    try {
      this._isInTransaction = true;
      // Catching errors makes debugging more difficult, so we start with
      // errorThrown set to true before setting it to false after calling
      // close -- if it's still set to true in the finally block, it means
      // one of these calls threw.
      errorThrown = true;
      this.initializeAll(0);
      ret = method.call(scope, a, b, c, d, e, f);
      errorThrown = false;
    } finally {
      try {
        if (errorThrown) {
          // If `method` throws, prefer to show that stack trace over any thrown
          // by invoking `closeAll`.
          try {
            this.closeAll(0);
          } catch (err) {
          }
        } else {
          // Since `method` didn't throw, we don't want to silence the exception
          // here.
          this.closeAll(0);
        }
      } finally {
        this._isInTransaction = false;
      }
    }
    return ret;
  },

  initializeAll: function(startIndex) {
    var transactionWrappers = this.transactionWrappers;
    for (var i = startIndex; i < transactionWrappers.length; i++) {
      var wrapper = transactionWrappers[i];
      try {
        // Catching errors makes debugging more difficult, so we start with the
        // OBSERVED_ERROR state before overwriting it with the real return value
        // of initialize -- if it's still set to OBSERVED_ERROR in the finally
        // block, it means wrapper.initialize threw.
        this.wrapperInitData[i] = Transaction.OBSERVED_ERROR;
        this.wrapperInitData[i] = wrapper.initialize ?
          wrapper.initialize.call(this) :
          null;
      } finally {
        if (this.wrapperInitData[i] === Transaction.OBSERVED_ERROR) {
          // The initializer for wrapper i threw an error; initialize the
          // remaining wrappers but silence any exceptions from them to ensure
          // that the first error is the one to bubble up.
          try {
            this.initializeAll(i + 1);
          } catch (err) {
          }
        }
      }
    }
  },

  /**
   * Invokes each of `this.transactionWrappers.close[i]` functions, passing into
   * them the respective return values of `this.transactionWrappers.init[i]`
   * (`close`rs that correspond to initializers that failed will not be
   * invoked).
   */
  closeAll: function(startIndex) {
    ("production" !== "development" ? invariant(
      this.isInTransaction(),
      'Transaction.closeAll(): Cannot close transaction when none are open.'
    ) : invariant(this.isInTransaction()));
    var transactionWrappers = this.transactionWrappers;
    for (var i = startIndex; i < transactionWrappers.length; i++) {
      var wrapper = transactionWrappers[i];
      var initData = this.wrapperInitData[i];
      var errorThrown;
      try {
        // Catching errors makes debugging more difficult, so we start with
        // errorThrown set to true before setting it to false after calling
        // close -- if it's still set to true in the finally block, it means
        // wrapper.close threw.
        errorThrown = true;
        if (initData !== Transaction.OBSERVED_ERROR) {
          wrapper.close && wrapper.close.call(this, initData);
        }
        errorThrown = false;
      } finally {
        if (errorThrown) {
          // The closer for wrapper i threw an error; close the remaining
          // wrappers but silence any exceptions from them to ensure that the
          // first error is the one to bubble up.
          try {
            this.closeAll(i + 1);
          } catch (e) {
          }
        }
      }
    }
    this.wrapperInitData.length = 0;
  }
};

var Transaction = {

  Mixin: Mixin,

  /**
   * Token to look for to determine if an error occured.
   */
  OBSERVED_ERROR: {}

};

module.exports = Transaction;

},{"./invariant":126}],96:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ViewportMetrics
 */

"use strict";

var getUnboundedScrollPosition = _dereq_("./getUnboundedScrollPosition");

var ViewportMetrics = {

  currentScrollLeft: 0,

  currentScrollTop: 0,

  refreshScrollValues: function() {
    var scrollPosition = getUnboundedScrollPosition(window);
    ViewportMetrics.currentScrollLeft = scrollPosition.x;
    ViewportMetrics.currentScrollTop = scrollPosition.y;
  }

};

module.exports = ViewportMetrics;

},{"./getUnboundedScrollPosition":122}],97:[function(_dereq_,module,exports){
/**
 * Copyright 2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule accumulateInto
 */

"use strict";

var invariant = _dereq_("./invariant");

/**
 *
 * Accumulates items that must not be null or undefined into the first one. This
 * is used to conserve memory by avoiding array allocations, and thus sacrifices
 * API cleanness. Since `current` can be null before being passed in and not
 * null after this function, make sure to assign it back to `current`:
 *
 * `a = accumulateInto(a, b);`
 *
 * This API should be sparingly used. Try `accumulate` for something cleaner.
 *
 * @return {*|array<*>} An accumulation of items.
 */

function accumulateInto(current, next) {
  ("production" !== "development" ? invariant(
    next != null,
    'accumulateInto(...): Accumulated items must not be null or undefined.'
  ) : invariant(next != null));
  if (current == null) {
    return next;
  }

  // Both are not empty. Warning: Never call x.concat(y) when you are not
  // certain that x is an Array (x could be a string with concat method).
  var currentIsArray = Array.isArray(current);
  var nextIsArray = Array.isArray(next);

  if (currentIsArray && nextIsArray) {
    current.push.apply(current, next);
    return current;
  }

  if (currentIsArray) {
    current.push(next);
    return current;
  }

  if (nextIsArray) {
    // A bit too dangerous to mutate `next`.
    return [current].concat(next);
  }

  return [current, next];
}

module.exports = accumulateInto;

},{"./invariant":126}],98:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule adler32
 */

/* jslint bitwise:true */

"use strict";

var MOD = 65521;

// This is a clean-room implementation of adler32 designed for detecting
// if markup is not what we expect it to be. It does not need to be
// cryptographically strong, only reasonably good at detecting if markup
// generated on the server is different than that on the client.
function adler32(data) {
  var a = 1;
  var b = 0;
  for (var i = 0; i < data.length; i++) {
    a = (a + data.charCodeAt(i)) % MOD;
    b = (b + a) % MOD;
  }
  return a | (b << 16);
}

module.exports = adler32;

},{}],99:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule camelize
 * @typechecks
 */

var _hyphenPattern = /-(.)/g;

/**
 * Camelcases a hyphenated string, for example:
 *
 *   > camelize('background-color')
 *   < "backgroundColor"
 *
 * @param {string} string
 * @return {string}
 */
function camelize(string) {
  return string.replace(_hyphenPattern, function(_, character) {
    return character.toUpperCase();
  });
}

module.exports = camelize;

},{}],100:[function(_dereq_,module,exports){
/**
 * Copyright 2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule camelizeStyleName
 * @typechecks
 */

"use strict";

var camelize = _dereq_("./camelize");

var msPattern = /^-ms-/;

/**
 * Camelcases a hyphenated CSS property name, for example:
 *
 *   > camelizeStyleName('background-color')
 *   < "backgroundColor"
 *   > camelizeStyleName('-moz-transition')
 *   < "MozTransition"
 *   > camelizeStyleName('-ms-transition')
 *   < "msTransition"
 *
 * As Andi Smith suggests
 * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
 * is converted to lowercase `ms`.
 *
 * @param {string} string
 * @return {string}
 */
function camelizeStyleName(string) {
  return camelize(string.replace(msPattern, 'ms-'));
}

module.exports = camelizeStyleName;

},{"./camelize":99}],101:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule containsNode
 * @typechecks
 */

var isTextNode = _dereq_("./isTextNode");

/*jslint bitwise:true */

/**
 * Checks if a given DOM node contains or is another DOM node.
 *
 * @param {?DOMNode} outerNode Outer DOM node.
 * @param {?DOMNode} innerNode Inner DOM node.
 * @return {boolean} True if `outerNode` contains or is `innerNode`.
 */
function containsNode(outerNode, innerNode) {
  if (!outerNode || !innerNode) {
    return false;
  } else if (outerNode === innerNode) {
    return true;
  } else if (isTextNode(outerNode)) {
    return false;
  } else if (isTextNode(innerNode)) {
    return containsNode(outerNode, innerNode.parentNode);
  } else if (outerNode.contains) {
    return outerNode.contains(innerNode);
  } else if (outerNode.compareDocumentPosition) {
    return !!(outerNode.compareDocumentPosition(innerNode) & 16);
  } else {
    return false;
  }
}

module.exports = containsNode;

},{"./isTextNode":130}],102:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule createArrayFrom
 * @typechecks
 */

var toArray = _dereq_("./toArray");

/**
 * Perform a heuristic test to determine if an object is "array-like".
 *
 *   A monk asked Joshu, a Zen master, "Has a dog Buddha nature?"
 *   Joshu replied: "Mu."
 *
 * This function determines if its argument has "array nature": it returns
 * true if the argument is an actual array, an `arguments' object, or an
 * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()).
 *
 * It will return false for other array-like objects like Filelist.
 *
 * @param {*} obj
 * @return {boolean}
 */
function hasArrayNature(obj) {
  return (
    // not null/false
    !!obj &&
    // arrays are objects, NodeLists are functions in Safari
    (typeof obj == 'object' || typeof obj == 'function') &&
    // quacks like an array
    ('length' in obj) &&
    // not window
    !('setInterval' in obj) &&
    // no DOM node should be considered an array-like
    // a 'select' element has 'length' and 'item' properties on IE8
    (typeof obj.nodeType != 'number') &&
    (
      // a real array
      (// HTMLCollection/NodeList
      (Array.isArray(obj) ||
      // arguments
      ('callee' in obj) || 'item' in obj))
    )
  );
}

/**
 * Ensure that the argument is an array by wrapping it in an array if it is not.
 * Creates a copy of the argument if it is already an array.
 *
 * This is mostly useful idiomatically:
 *
 *   var createArrayFrom = require('createArrayFrom');
 *
 *   function takesOneOrMoreThings(things) {
 *     things = createArrayFrom(things);
 *     ...
 *   }
 *
 * This allows you to treat `things' as an array, but accept scalars in the API.
 *
 * If you need to convert an array-like object, like `arguments`, into an array
 * use toArray instead.
 *
 * @param {*} obj
 * @return {array}
 */
function createArrayFrom(obj) {
  if (!hasArrayNature(obj)) {
    return [obj];
  } else if (Array.isArray(obj)) {
    return obj.slice();
  } else {
    return toArray(obj);
  }
}

module.exports = createArrayFrom;

},{"./toArray":143}],103:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule createFullPageComponent
 * @typechecks
 */

"use strict";

// Defeat circular references by requiring this directly.
var ReactCompositeComponent = _dereq_("./ReactCompositeComponent");
var ReactElement = _dereq_("./ReactElement");

var invariant = _dereq_("./invariant");

/**
 * Create a component that will throw an exception when unmounted.
 *
 * Components like <html> <head> and <body> can't be removed or added
 * easily in a cross-browser way, however it's valuable to be able to
 * take advantage of React's reconciliation for styling and <title>
 * management. So we just document it and throw in dangerous cases.
 *
 * @param {string} tag The tag to wrap
 * @return {function} convenience constructor of new component
 */
function createFullPageComponent(tag) {
  var elementFactory = ReactElement.createFactory(tag);

  var FullPageComponent = ReactCompositeComponent.createClass({
    displayName: 'ReactFullPageComponent' + tag,

    componentWillUnmount: function() {
      ("production" !== "development" ? invariant(
        false,
        '%s tried to unmount. Because of cross-browser quirks it is ' +
        'impossible to unmount some top-level components (eg <html>, <head>, ' +
        'and <body>) reliably and efficiently. To fix this, have a single ' +
        'top-level component that never unmounts render these elements.',
        this.constructor.displayName
      ) : invariant(false));
    },

    render: function() {
      return elementFactory(this.props);
    }
  });

  return FullPageComponent;
}

module.exports = createFullPageComponent;

},{"./ReactCompositeComponent":34,"./ReactElement":52,"./invariant":126}],104:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule createNodesFromMarkup
 * @typechecks
 */

/*jslint evil: true, sub: true */

var ExecutionEnvironment = _dereq_("./ExecutionEnvironment");

var createArrayFrom = _dereq_("./createArrayFrom");
var getMarkupWrap = _dereq_("./getMarkupWrap");
var invariant = _dereq_("./invariant");

/**
 * Dummy container used to render all markup.
 */
var dummyNode =
  ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;

/**
 * Pattern used by `getNodeName`.
 */
var nodeNamePattern = /^\s*<(\w+)/;

/**
 * Extracts the `nodeName` of the first element in a string of markup.
 *
 * @param {string} markup String of markup.
 * @return {?string} Node name of the supplied markup.
 */
function getNodeName(markup) {
  var nodeNameMatch = markup.match(nodeNamePattern);
  return nodeNameMatch && nodeNameMatch[1].toLowerCase();
}

/**
 * Creates an array containing the nodes rendered from the supplied markup. The
 * optionally supplied `handleScript` function will be invoked once for each
 * <script> element that is rendered. If no `handleScript` function is supplied,
 * an exception is thrown if any <script> elements are rendered.
 *
 * @param {string} markup A string of valid HTML markup.
 * @param {?function} handleScript Invoked once for each rendered <script>.
 * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes.
 */
function createNodesFromMarkup(markup, handleScript) {
  var node = dummyNode;
  ("production" !== "development" ? invariant(!!dummyNode, 'createNodesFromMarkup dummy not initialized') : invariant(!!dummyNode));
  var nodeName = getNodeName(markup);

  var wrap = nodeName && getMarkupWrap(nodeName);
  if (wrap) {
    node.innerHTML = wrap[1] + markup + wrap[2];

    var wrapDepth = wrap[0];
    while (wrapDepth--) {
      node = node.lastChild;
    }
  } else {
    node.innerHTML = markup;
  }

  var scripts = node.getElementsByTagName('script');
  if (scripts.length) {
    ("production" !== "development" ? invariant(
      handleScript,
      'createNodesFromMarkup(...): Unexpected <script> element rendered.'
    ) : invariant(handleScript));
    createArrayFrom(scripts).forEach(handleScript);
  }

  var nodes = createArrayFrom(node.childNodes);
  while (node.lastChild) {
    node.removeChild(node.lastChild);
  }
  return nodes;
}

module.exports = createNodesFromMarkup;

},{"./ExecutionEnvironment":22,"./createArrayFrom":102,"./getMarkupWrap":118,"./invariant":126}],105:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule dangerousStyleValue
 * @typechecks static-only
 */

"use strict";

var CSSProperty = _dereq_("./CSSProperty");

var isUnitlessNumber = CSSProperty.isUnitlessNumber;

/**
 * Convert a value into the proper css writable value. The style name `name`
 * should be logical (no hyphens), as specified
 * in `CSSProperty.isUnitlessNumber`.
 *
 * @param {string} name CSS property name such as `topMargin`.
 * @param {*} value CSS property value such as `10px`.
 * @return {string} Normalized style value with dimensions applied.
 */
function dangerousStyleValue(name, value) {
  // Note that we've removed escapeTextForBrowser() calls here since the
  // whole string will be escaped when the attribute is injected into
  // the markup. If you provide unsafe user data here they can inject
  // arbitrary CSS which may be problematic (I couldn't repro this):
  // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
  // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
  // This is not an XSS hole but instead a potential CSS injection issue
  // which has lead to a greater discussion about how we're going to
  // trust URLs moving forward. See #2115901

  var isEmpty = value == null || typeof value === 'boolean' || value === '';
  if (isEmpty) {
    return '';
  }

  var isNonNumeric = isNaN(value);
  if (isNonNumeric || value === 0 ||
      isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
    return '' + value; // cast to string
  }

  if (typeof value === 'string') {
    value = value.trim();
  }
  return value + 'px';
}

module.exports = dangerousStyleValue;

},{"./CSSProperty":4}],106:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule deprecated
 */

var assign = _dereq_("./Object.assign");
var warning = _dereq_("./warning");

/**
 * This will log a single deprecation notice per function and forward the call
 * on to the new API.
 *
 * @param {string} namespace The namespace of the call, eg 'React'
 * @param {string} oldName The old function name, eg 'renderComponent'
 * @param {string} newName The new function name, eg 'render'
 * @param {*} ctx The context this forwarded call should run in
 * @param {function} fn The function to forward on to
 * @return {*} Will be the value as returned from `fn`
 */
function deprecated(namespace, oldName, newName, ctx, fn) {
  var warned = false;
  if ("production" !== "development") {
    var newFn = function() {
      ("production" !== "development" ? warning(
        warned,
        (namespace + "." + oldName + " will be deprecated in a future version. ") +
        ("Use " + namespace + "." + newName + " instead.")
      ) : null);
      warned = true;
      return fn.apply(ctx, arguments);
    };
    newFn.displayName = (namespace + "_" + oldName);
    // We need to make sure all properties of the original fn are copied over.
    // In particular, this is needed to support PropTypes
    return assign(newFn, fn);
  }

  return fn;
}

module.exports = deprecated;

},{"./Object.assign":27,"./warning":145}],107:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule emptyFunction
 */

function makeEmptyFunction(arg) {
  return function() {
    return arg;
  };
}

/**
 * This function accepts and discards inputs; it has no side effects. This is
 * primarily useful idiomatically for overridable function endpoints which
 * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
 */
function emptyFunction() {}

emptyFunction.thatReturns = makeEmptyFunction;
emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
emptyFunction.thatReturnsNull = makeEmptyFunction(null);
emptyFunction.thatReturnsThis = function() { return this; };
emptyFunction.thatReturnsArgument = function(arg) { return arg; };

module.exports = emptyFunction;

},{}],108:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule emptyObject
 */

"use strict";

var emptyObject = {};

if ("production" !== "development") {
  Object.freeze(emptyObject);
}

module.exports = emptyObject;

},{}],109:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule escapeTextForBrowser
 * @typechecks static-only
 */

"use strict";

var ESCAPE_LOOKUP = {
  "&": "&amp;",
  ">": "&gt;",
  "<": "&lt;",
  "\"": "&quot;",
  "'": "&#x27;"
};

var ESCAPE_REGEX = /[&><"']/g;

function escaper(match) {
  return ESCAPE_LOOKUP[match];
}

/**
 * Escapes text to prevent scripting attacks.
 *
 * @param {*} text Text value to escape.
 * @return {string} An escaped string.
 */
function escapeTextForBrowser(text) {
  return ('' + text).replace(ESCAPE_REGEX, escaper);
}

module.exports = escapeTextForBrowser;

},{}],110:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule flattenChildren
 */

"use strict";

var ReactTextComponent = _dereq_("./ReactTextComponent");

var traverseAllChildren = _dereq_("./traverseAllChildren");
var warning = _dereq_("./warning");

/**
 * @param {function} traverseContext Context passed through traversal.
 * @param {?ReactComponent} child React child component.
 * @param {!string} name String name of key path to child.
 */
function flattenSingleChildIntoContext(traverseContext, child, name) {
  // We found a component instance.
  var result = traverseContext;
  var keyUnique = !result.hasOwnProperty(name);
  ("production" !== "development" ? warning(
    keyUnique,
    'flattenChildren(...): Encountered two children with the same key, ' +
    '`%s`. Child keys must be unique; when two children share a key, only ' +
    'the first child will be used.',
    name
  ) : null);
  if (keyUnique && child != null) {
    var type = typeof child;
    var normalizedValue;

    if (type === 'string') {
      normalizedValue = ReactTextComponent(child);
    } else if (type === 'number') {
      normalizedValue = ReactTextComponent('' + child);
    } else {
      normalizedValue = child;
    }

    result[name] = normalizedValue;
  }
}

/**
 * Flattens children that are typically specified as `props.children`. Any null
 * children will not be included in the resulting object.
 * @return {!object} flattened children keyed by name.
 */
function flattenChildren(children) {
  if (children == null) {
    return children;
  }
  var result = {};
  traverseAllChildren(children, flattenSingleChildIntoContext, result);
  return result;
}

module.exports = flattenChildren;

},{"./ReactTextComponent":78,"./traverseAllChildren":144,"./warning":145}],111:[function(_dereq_,module,exports){
/**
 * Copyright 2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule focusNode
 */

"use strict";

/**
 * @param {DOMElement} node input/textarea to focus
 */
function focusNode(node) {
  // IE8 can throw "Can't move focus to the control because it is invisible,
  // not enabled, or of a type that does not accept the focus." for all kinds of
  // reasons that are too expensive and fragile to test.
  try {
    node.focus();
  } catch(e) {
  }
}

module.exports = focusNode;

},{}],112:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule forEachAccumulated
 */

"use strict";

/**
 * @param {array} an "accumulation" of items which is either an Array or
 * a single item. Useful when paired with the `accumulate` module. This is a
 * simple utility that allows us to reason about a collection of items, but
 * handling the case when there is exactly one item (and we do not need to
 * allocate an array).
 */
var forEachAccumulated = function(arr, cb, scope) {
  if (Array.isArray(arr)) {
    arr.forEach(cb, scope);
  } else if (arr) {
    cb.call(scope, arr);
  }
};

module.exports = forEachAccumulated;

},{}],113:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule getActiveElement
 * @typechecks
 */

/**
 * Same as document.activeElement but wraps in a try-catch block. In IE it is
 * not safe to call document.activeElement if there is nothing focused.
 *
 * The activeElement will be null only if the document body is not yet defined.
 */
function getActiveElement() /*?DOMElement*/ {
  try {
    return document.activeElement || document.body;
  } catch (e) {
    return document.body;
  }
}

module.exports = getActiveElement;

},{}],114:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule getEventCharCode
 * @typechecks static-only
 */

"use strict";

/**
 * `charCode` represents the actual "character code" and is safe to use with
 * `String.fromCharCode`. As such, only keys that correspond to printable
 * characters produce a valid `charCode`, the only exception to this is Enter.
 * The Tab-key is considered non-printable and does not have a `charCode`,
 * presumably because it does not produce a tab-character in browsers.
 *
 * @param {object} nativeEvent Native browser event.
 * @return {string} Normalized `charCode` property.
 */
function getEventCharCode(nativeEvent) {
  var charCode;
  var keyCode = nativeEvent.keyCode;

  if ('charCode' in nativeEvent) {
    charCode = nativeEvent.charCode;

    // FF does not set `charCode` for the Enter-key, check against `keyCode`.
    if (charCode === 0 && keyCode === 13) {
      charCode = 13;
    }
  } else {
    // IE8 does not implement `charCode`, but `keyCode` has the correct value.
    charCode = keyCode;
  }

  // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
  // Must not discard the (non-)printable Enter-key.
  if (charCode >= 32 || charCode === 13) {
    return charCode;
  }

  return 0;
}

module.exports = getEventCharCode;

},{}],115:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule getEventKey
 * @typechecks static-only
 */

"use strict";

var getEventCharCode = _dereq_("./getEventCharCode");

/**
 * Normalization of deprecated HTML5 `key` values
 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
 */
var normalizeKey = {
  'Esc': 'Escape',
  'Spacebar': ' ',
  'Left': 'ArrowLeft',
  'Up': 'ArrowUp',
  'Right': 'ArrowRight',
  'Down': 'ArrowDown',
  'Del': 'Delete',
  'Win': 'OS',
  'Menu': 'ContextMenu',
  'Apps': 'ContextMenu',
  'Scroll': 'ScrollLock',
  'MozPrintableKey': 'Unidentified'
};

/**
 * Translation from legacy `keyCode` to HTML5 `key`
 * Only special keys supported, all others depend on keyboard layout or browser
 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
 */
var translateToKey = {
  8: 'Backspace',
  9: 'Tab',
  12: 'Clear',
  13: 'Enter',
  16: 'Shift',
  17: 'Control',
  18: 'Alt',
  19: 'Pause',
  20: 'CapsLock',
  27: 'Escape',
  32: ' ',
  33: 'PageUp',
  34: 'PageDown',
  35: 'End',
  36: 'Home',
  37: 'ArrowLeft',
  38: 'ArrowUp',
  39: 'ArrowRight',
  40: 'ArrowDown',
  45: 'Insert',
  46: 'Delete',
  112: 'F1', 113: 'F2', 114: 'F3', 115: 'F4', 116: 'F5', 117: 'F6',
  118: 'F7', 119: 'F8', 120: 'F9', 121: 'F10', 122: 'F11', 123: 'F12',
  144: 'NumLock',
  145: 'ScrollLock',
  224: 'Meta'
};

/**
 * @param {object} nativeEvent Native browser event.
 * @return {string} Normalized `key` property.
 */
function getEventKey(nativeEvent) {
  if (nativeEvent.key) {
    // Normalize inconsistent values reported by browsers due to
    // implementations of a working draft specification.

    // FireFox implements `key` but returns `MozPrintableKey` for all
    // printable characters (normalized to `Unidentified`), ignore it.
    var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
    if (key !== 'Unidentified') {
      return key;
    }
  }

  // Browser does not implement `key`, polyfill as much of it as we can.
  if (nativeEvent.type === 'keypress') {
    var charCode = getEventCharCode(nativeEvent);

    // The enter-key is technically both printable and non-printable and can
    // thus be captured by `keypress`, no other non-printable key should.
    return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
  }
  if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
    // While user keyboard layout determines the actual meaning of each
    // `keyCode` value, almost all function keys have a universal value.
    return translateToKey[nativeEvent.keyCode] || 'Unidentified';
  }
  return '';
}

module.exports = getEventKey;

},{"./getEventCharCode":114}],116:[function(_dereq_,module,exports){
/**
 * Copyright 2013 Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule getEventModifierState
 * @typechecks static-only
 */

"use strict";

/**
 * Translation from modifier key to the associated property in the event.
 * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
 */

var modifierKeyToProp = {
  'Alt': 'altKey',
  'Control': 'ctrlKey',
  'Meta': 'metaKey',
  'Shift': 'shiftKey'
};

// IE8 does not implement getModifierState so we simply map it to the only
// modifier keys exposed by the event itself, does not support Lock-keys.
// Currently, all major browsers except Chrome seems to support Lock-keys.
function modifierStateGetter(keyArg) {
  /*jshint validthis:true */
  var syntheticEvent = this;
  var nativeEvent = syntheticEvent.nativeEvent;
  if (nativeEvent.getModifierState) {
    return nativeEvent.getModifierState(keyArg);
  }
  var keyProp = modifierKeyToProp[keyArg];
  return keyProp ? !!nativeEvent[keyProp] : false;
}

function getEventModifierState(nativeEvent) {
  return modifierStateGetter;
}

module.exports = getEventModifierState;

},{}],117:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule getEventTarget
 * @typechecks static-only
 */

"use strict";

/**
 * Gets the target node from a native browser event by accounting for
 * inconsistencies in browser DOM APIs.
 *
 * @param {object} nativeEvent Native browser event.
 * @return {DOMEventTarget} Target node.
 */
function getEventTarget(nativeEvent) {
  var target = nativeEvent.target || nativeEvent.srcElement || window;
  // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
  // @see http://www.quirksmode.org/js/events_properties.html
  return target.nodeType === 3 ? target.parentNode : target;
}

module.exports = getEventTarget;

},{}],118:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule getMarkupWrap
 */

var ExecutionEnvironment = _dereq_("./ExecutionEnvironment");

var invariant = _dereq_("./invariant");

/**
 * Dummy container used to detect which wraps are necessary.
 */
var dummyNode =
  ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;

/**
 * Some browsers cannot use `innerHTML` to render certain elements standalone,
 * so we wrap them, render the wrapped nodes, then extract the desired node.
 *
 * In IE8, certain elements cannot render alone, so wrap all elements ('*').
 */
var shouldWrap = {
  // Force wrapping for SVG elements because if they get created inside a <div>,
  // they will be initialized in the wrong namespace (and will not display).
  'circle': true,
  'defs': true,
  'ellipse': true,
  'g': true,
  'line': true,
  'linearGradient': true,
  'path': true,
  'polygon': true,
  'polyline': true,
  'radialGradient': true,
  'rect': true,
  'stop': true,
  'text': true
};

var selectWrap = [1, '<select multiple="true">', '</select>'];
var tableWrap = [1, '<table>', '</table>'];
var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>'];

var svgWrap = [1, '<svg>', '</svg>'];

var markupWrap = {
  '*': [1, '?<div>', '</div>'],

  'area': [1, '<map>', '</map>'],
  'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
  'legend': [1, '<fieldset>', '</fieldset>'],
  'param': [1, '<object>', '</object>'],
  'tr': [2, '<table><tbody>', '</tbody></table>'],

  'optgroup': selectWrap,
  'option': selectWrap,

  'caption': tableWrap,
  'colgroup': tableWrap,
  'tbody': tableWrap,
  'tfoot': tableWrap,
  'thead': tableWrap,

  'td': trWrap,
  'th': trWrap,

  'circle': svgWrap,
  'defs': svgWrap,
  'ellipse': svgWrap,
  'g': svgWrap,
  'line': svgWrap,
  'linearGradient': svgWrap,
  'path': svgWrap,
  'polygon': svgWrap,
  'polyline': svgWrap,
  'radialGradient': svgWrap,
  'rect': svgWrap,
  'stop': svgWrap,
  'text': svgWrap
};

/**
 * Gets the markup wrap configuration for the supplied `nodeName`.
 *
 * NOTE: This lazily detects which wraps are necessary for the current browser.
 *
 * @param {string} nodeName Lowercase `nodeName`.
 * @return {?array} Markup wrap configuration, if applicable.
 */
function getMarkupWrap(nodeName) {
  ("production" !== "development" ? invariant(!!dummyNode, 'Markup wrapping node not initialized') : invariant(!!dummyNode));
  if (!markupWrap.hasOwnProperty(nodeName)) {
    nodeName = '*';
  }
  if (!shouldWrap.hasOwnProperty(nodeName)) {
    if (nodeName === '*') {
      dummyNode.innerHTML = '<link />';
    } else {
      dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>';
    }
    shouldWrap[nodeName] = !dummyNode.firstChild;
  }
  return shouldWrap[nodeName] ? markupWrap[nodeName] : null;
}


module.exports = getMarkupWrap;

},{"./ExecutionEnvironment":22,"./invariant":126}],119:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule getNodeForCharacterOffset
 */

"use strict";

/**
 * Given any node return the first leaf node without children.
 *
 * @param {DOMElement|DOMTextNode} node
 * @return {DOMElement|DOMTextNode}
 */
function getLeafNode(node) {
  while (node && node.firstChild) {
    node = node.firstChild;
  }
  return node;
}

/**
 * Get the next sibling within a container. This will walk up the
 * DOM if a node's siblings have been exhausted.
 *
 * @param {DOMElement|DOMTextNode} node
 * @return {?DOMElement|DOMTextNode}
 */
function getSiblingNode(node) {
  while (node) {
    if (node.nextSibling) {
      return node.nextSibling;
    }
    node = node.parentNode;
  }
}

/**
 * Get object describing the nodes which contain characters at offset.
 *
 * @param {DOMElement|DOMTextNode} root
 * @param {number} offset
 * @return {?object}
 */
function getNodeForCharacterOffset(root, offset) {
  var node = getLeafNode(root);
  var nodeStart = 0;
  var nodeEnd = 0;

  while (node) {
    if (node.nodeType == 3) {
      nodeEnd = nodeStart + node.textContent.length;

      if (nodeStart <= offset && nodeEnd >= offset) {
        return {
          node: node,
          offset: offset - nodeStart
        };
      }

      nodeStart = nodeEnd;
    }

    node = getLeafNode(getSiblingNode(node));
  }
}

module.exports = getNodeForCharacterOffset;

},{}],120:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule getReactRootElementInContainer
 */

"use strict";

var DOC_NODE_TYPE = 9;

/**
 * @param {DOMElement|DOMDocument} container DOM element that may contain
 *                                           a React component
 * @return {?*} DOM element that may have the reactRoot ID, or null.
 */
function getReactRootElementInContainer(container) {
  if (!container) {
    return null;
  }

  if (container.nodeType === DOC_NODE_TYPE) {
    return container.documentElement;
  } else {
    return container.firstChild;
  }
}

module.exports = getReactRootElementInContainer;

},{}],121:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule getTextContentAccessor
 */

"use strict";

var ExecutionEnvironment = _dereq_("./ExecutionEnvironment");

var contentKey = null;

/**
 * Gets the key used to access text content on a DOM node.
 *
 * @return {?string} Key used to access text content.
 * @internal
 */
function getTextContentAccessor() {
  if (!contentKey && ExecutionEnvironment.canUseDOM) {
    // Prefer textContent to innerText because many browsers support both but
    // SVG <text> elements don't support innerText even when <div> does.
    contentKey = 'textContent' in document.documentElement ?
      'textContent' :
      'innerText';
  }
  return contentKey;
}

module.exports = getTextContentAccessor;

},{"./ExecutionEnvironment":22}],122:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule getUnboundedScrollPosition
 * @typechecks
 */

"use strict";

/**
 * Gets the scroll position of the supplied element or window.
 *
 * The return values are unbounded, unlike `getScrollPosition`. This means they
 * may be negative or exceed the element boundaries (which is possible using
 * inertial scrolling).
 *
 * @param {DOMWindow|DOMElement} scrollable
 * @return {object} Map with `x` and `y` keys.
 */
function getUnboundedScrollPosition(scrollable) {
  if (scrollable === window) {
    return {
      x: window.pageXOffset || document.documentElement.scrollLeft,
      y: window.pageYOffset || document.documentElement.scrollTop
    };
  }
  return {
    x: scrollable.scrollLeft,
    y: scrollable.scrollTop
  };
}

module.exports = getUnboundedScrollPosition;

},{}],123:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule hyphenate
 * @typechecks
 */

var _uppercasePattern = /([A-Z])/g;

/**
 * Hyphenates a camelcased string, for example:
 *
 *   > hyphenate('backgroundColor')
 *   < "background-color"
 *
 * For CSS style names, use `hyphenateStyleName` instead which works properly
 * with all vendor prefixes, including `ms`.
 *
 * @param {string} string
 * @return {string}
 */
function hyphenate(string) {
  return string.replace(_uppercasePattern, '-$1').toLowerCase();
}

module.exports = hyphenate;

},{}],124:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule hyphenateStyleName
 * @typechecks
 */

"use strict";

var hyphenate = _dereq_("./hyphenate");

var msPattern = /^ms-/;

/**
 * Hyphenates a camelcased CSS property name, for example:
 *
 *   > hyphenateStyleName('backgroundColor')
 *   < "background-color"
 *   > hyphenateStyleName('MozTransition')
 *   < "-moz-transition"
 *   > hyphenateStyleName('msTransition')
 *   < "-ms-transition"
 *
 * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
 * is converted to `-ms-`.
 *
 * @param {string} string
 * @return {string}
 */
function hyphenateStyleName(string) {
  return hyphenate(string).replace(msPattern, '-ms-');
}

module.exports = hyphenateStyleName;

},{"./hyphenate":123}],125:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule instantiateReactComponent
 * @typechecks static-only
 */

"use strict";

var warning = _dereq_("./warning");

var ReactElement = _dereq_("./ReactElement");
var ReactLegacyElement = _dereq_("./ReactLegacyElement");
var ReactNativeComponent = _dereq_("./ReactNativeComponent");
var ReactEmptyComponent = _dereq_("./ReactEmptyComponent");

/**
 * Given an `element` create an instance that will actually be mounted.
 *
 * @param {object} element
 * @param {*} parentCompositeType The composite type that resolved this.
 * @return {object} A new instance of the element's constructor.
 * @protected
 */
function instantiateReactComponent(element, parentCompositeType) {
  var instance;

  if ("production" !== "development") {
    ("production" !== "development" ? warning(
      element && (typeof element.type === 'function' ||
                     typeof element.type === 'string'),
      'Only functions or strings can be mounted as React components.'
    ) : null);

    // Resolve mock instances
    if (element.type._mockedReactClassConstructor) {
      // If this is a mocked class, we treat the legacy factory as if it was the
      // class constructor for future proofing unit tests. Because this might
      // be mocked as a legacy factory, we ignore any warnings triggerd by
      // this temporary hack.
      ReactLegacyElement._isLegacyCallWarningEnabled = false;
      try {
        instance = new element.type._mockedReactClassConstructor(
          element.props
        );
      } finally {
        ReactLegacyElement._isLegacyCallWarningEnabled = true;
      }

      // If the mock implementation was a legacy factory, then it returns a
      // element. We need to turn this into a real component instance.
      if (ReactElement.isValidElement(instance)) {
        instance = new instance.type(instance.props);
      }

      var render = instance.render;
      if (!render) {
        // For auto-mocked factories, the prototype isn't shimmed and therefore
        // there is no render function on the instance. We replace the whole
        // component with an empty component instance instead.
        element = ReactEmptyComponent.getEmptyComponent();
      } else {
        if (render._isMockFunction && !render._getMockImplementation()) {
          // Auto-mocked components may have a prototype with a mocked render
          // function. For those, we'll need to mock the result of the render
          // since we consider undefined to be invalid results from render.
          render.mockImplementation(
            ReactEmptyComponent.getEmptyComponent
          );
        }
        instance.construct(element);
        return instance;
      }
    }
  }

  // Special case string values
  if (typeof element.type === 'string') {
    instance = ReactNativeComponent.createInstanceForTag(
      element.type,
      element.props,
      parentCompositeType
    );
  } else {
    // Normal case for non-mocks and non-strings
    instance = new element.type(element.props);
  }

  if ("production" !== "development") {
    ("production" !== "development" ? warning(
      typeof instance.construct === 'function' &&
      typeof instance.mountComponent === 'function' &&
      typeof instance.receiveComponent === 'function',
      'Only React Components can be mounted.'
    ) : null);
  }

  // This actually sets up the internal instance. This will become decoupled
  // from the public instance in a future diff.
  instance.construct(element);

  return instance;
}

module.exports = instantiateReactComponent;

},{"./ReactElement":52,"./ReactEmptyComponent":54,"./ReactLegacyElement":61,"./ReactNativeComponent":66,"./warning":145}],126:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule invariant
 */

"use strict";

/**
 * Use invariant() to assert state which your program assumes to be true.
 *
 * Provide sprintf-style format (only %s is supported) and arguments
 * to provide information about what broke and what you were
 * expecting.
 *
 * The invariant message will be stripped in production, but the invariant
 * will remain to ensure logic does not differ in production.
 */

var invariant = function(condition, format, a, b, c, d, e, f) {
  if ("production" !== "development") {
    if (format === undefined) {
      throw new Error('invariant requires an error message argument');
    }
  }

  if (!condition) {
    var error;
    if (format === undefined) {
      error = new Error(
        'Minified exception occurred; use the non-minified dev environment ' +
        'for the full error message and additional helpful warnings.'
      );
    } else {
      var args = [a, b, c, d, e, f];
      var argIndex = 0;
      error = new Error(
        'Invariant Violation: ' +
        format.replace(/%s/g, function() { return args[argIndex++]; })
      );
    }

    error.framesToPop = 1; // we don't care about invariant's own frame
    throw error;
  }
};

module.exports = invariant;

},{}],127:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule isEventSupported
 */

"use strict";

var ExecutionEnvironment = _dereq_("./ExecutionEnvironment");

var useHasFeature;
if (ExecutionEnvironment.canUseDOM) {
  useHasFeature =
    document.implementation &&
    document.implementation.hasFeature &&
    // always returns true in newer browsers as per the standard.
    // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
    document.implementation.hasFeature('', '') !== true;
}

/**
 * Checks if an event is supported in the current execution environment.
 *
 * NOTE: This will not work correctly for non-generic events such as `change`,
 * `reset`, `load`, `error`, and `select`.
 *
 * Borrows from Modernizr.
 *
 * @param {string} eventNameSuffix Event name, e.g. "click".
 * @param {?boolean} capture Check if the capture phase is supported.
 * @return {boolean} True if the event is supported.
 * @internal
 * @license Modernizr 3.0.0pre (Custom Build) | MIT
 */
function isEventSupported(eventNameSuffix, capture) {
  if (!ExecutionEnvironment.canUseDOM ||
      capture && !('addEventListener' in document)) {
    return false;
  }

  var eventName = 'on' + eventNameSuffix;
  var isSupported = eventName in document;

  if (!isSupported) {
    var element = document.createElement('div');
    element.setAttribute(eventName, 'return;');
    isSupported = typeof element[eventName] === 'function';
  }

  if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
    // This is the only way to test support for the `wheel` event in IE9+.
    isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
  }

  return isSupported;
}

module.exports = isEventSupported;

},{"./ExecutionEnvironment":22}],128:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule isNode
 * @typechecks
 */

/**
 * @param {*} object The object to check.
 * @return {boolean} Whether or not the object is a DOM node.
 */
function isNode(object) {
  return !!(object && (
    typeof Node === 'function' ? object instanceof Node :
      typeof object === 'object' &&
      typeof object.nodeType === 'number' &&
      typeof object.nodeName === 'string'
  ));
}

module.exports = isNode;

},{}],129:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule isTextInputElement
 */

"use strict";

/**
 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
 */
var supportedInputTypes = {
  'color': true,
  'date': true,
  'datetime': true,
  'datetime-local': true,
  'email': true,
  'month': true,
  'number': true,
  'password': true,
  'range': true,
  'search': true,
  'tel': true,
  'text': true,
  'time': true,
  'url': true,
  'week': true
};

function isTextInputElement(elem) {
  return elem && (
    (elem.nodeName === 'INPUT' && supportedInputTypes[elem.type]) ||
    elem.nodeName === 'TEXTAREA'
  );
}

module.exports = isTextInputElement;

},{}],130:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule isTextNode
 * @typechecks
 */

var isNode = _dereq_("./isNode");

/**
 * @param {*} object The object to check.
 * @return {boolean} Whether or not the object is a DOM text node.
 */
function isTextNode(object) {
  return isNode(object) && object.nodeType == 3;
}

module.exports = isTextNode;

},{"./isNode":128}],131:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule joinClasses
 * @typechecks static-only
 */

"use strict";

/**
 * Combines multiple className strings into one.
 * http://jsperf.com/joinclasses-args-vs-array
 *
 * @param {...?string} classes
 * @return {string}
 */
function joinClasses(className/*, ... */) {
  if (!className) {
    className = '';
  }
  var nextClass;
  var argLength = arguments.length;
  if (argLength > 1) {
    for (var ii = 1; ii < argLength; ii++) {
      nextClass = arguments[ii];
      if (nextClass) {
        className = (className ? className + ' ' : '') + nextClass;
      }
    }
  }
  return className;
}

module.exports = joinClasses;

},{}],132:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule keyMirror
 * @typechecks static-only
 */

"use strict";

var invariant = _dereq_("./invariant");

/**
 * Constructs an enumeration with keys equal to their value.
 *
 * For example:
 *
 *   var COLORS = keyMirror({blue: null, red: null});
 *   var myColor = COLORS.blue;
 *   var isColorValid = !!COLORS[myColor];
 *
 * The last line could not be performed if the values of the generated enum were
 * not equal to their keys.
 *
 *   Input:  {key1: val1, key2: val2}
 *   Output: {key1: key1, key2: key2}
 *
 * @param {object} obj
 * @return {object}
 */
var keyMirror = function(obj) {
  var ret = {};
  var key;
  ("production" !== "development" ? invariant(
    obj instanceof Object && !Array.isArray(obj),
    'keyMirror(...): Argument must be an object.'
  ) : invariant(obj instanceof Object && !Array.isArray(obj)));
  for (key in obj) {
    if (!obj.hasOwnProperty(key)) {
      continue;
    }
    ret[key] = key;
  }
  return ret;
};

module.exports = keyMirror;

},{"./invariant":126}],133:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule keyOf
 */

/**
 * Allows extraction of a minified key. Let's the build system minify keys
 * without loosing the ability to dynamically use key strings as values
 * themselves. Pass in an object with a single key/val pair and it will return
 * you the string key of that single record. Suppose you want to grab the
 * value for a key 'className' inside of an object. Key/val minification may
 * have aliased that key to be 'xa12'. keyOf({className: null}) will return
 * 'xa12' in that case. Resolve keys you want to use once at startup time, then
 * reuse those resolutions.
 */
var keyOf = function(oneKeyObj) {
  var key;
  for (key in oneKeyObj) {
    if (!oneKeyObj.hasOwnProperty(key)) {
      continue;
    }
    return key;
  }
  return null;
};


module.exports = keyOf;

},{}],134:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule mapObject
 */

'use strict';

var hasOwnProperty = Object.prototype.hasOwnProperty;

/**
 * Executes the provided `callback` once for each enumerable own property in the
 * object and constructs a new object from the results. The `callback` is
 * invoked with three arguments:
 *
 *  - the property value
 *  - the property name
 *  - the object being traversed
 *
 * Properties that are added after the call to `mapObject` will not be visited
 * by `callback`. If the values of existing properties are changed, the value
 * passed to `callback` will be the value at the time `mapObject` visits them.
 * Properties that are deleted before being visited are not visited.
 *
 * @grep function objectMap()
 * @grep function objMap()
 *
 * @param {?object} object
 * @param {function} callback
 * @param {*} context
 * @return {?object}
 */
function mapObject(object, callback, context) {
  if (!object) {
    return null;
  }
  var result = {};
  for (var name in object) {
    if (hasOwnProperty.call(object, name)) {
      result[name] = callback.call(context, object[name], name, object);
    }
  }
  return result;
}

module.exports = mapObject;

},{}],135:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule memoizeStringOnly
 * @typechecks static-only
 */

"use strict";

/**
 * Memoizes the return value of a function that accepts one string argument.
 *
 * @param {function} callback
 * @return {function}
 */
function memoizeStringOnly(callback) {
  var cache = {};
  return function(string) {
    if (cache.hasOwnProperty(string)) {
      return cache[string];
    } else {
      return cache[string] = callback.call(this, string);
    }
  };
}

module.exports = memoizeStringOnly;

},{}],136:[function(_dereq_,module,exports){
/**
 * Copyright 2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule monitorCodeUse
 */

"use strict";

var invariant = _dereq_("./invariant");

/**
 * Provides open-source compatible instrumentation for monitoring certain API
 * uses before we're ready to issue a warning or refactor. It accepts an event
 * name which may only contain the characters [a-z0-9_] and an optional data
 * object with further information.
 */

function monitorCodeUse(eventName, data) {
  ("production" !== "development" ? invariant(
    eventName && !/[^a-z0-9_]/.test(eventName),
    'You must provide an eventName using only the characters [a-z0-9_]'
  ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));
}

module.exports = monitorCodeUse;

},{"./invariant":126}],137:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule onlyChild
 */
"use strict";

var ReactElement = _dereq_("./ReactElement");

var invariant = _dereq_("./invariant");

/**
 * Returns the first child in a collection of children and verifies that there
 * is only one child in the collection. The current implementation of this
 * function assumes that a single child gets passed without a wrapper, but the
 * purpose of this helper function is to abstract away the particular structure
 * of children.
 *
 * @param {?object} children Child collection structure.
 * @return {ReactComponent} The first and only `ReactComponent` contained in the
 * structure.
 */
function onlyChild(children) {
  ("production" !== "development" ? invariant(
    ReactElement.isValidElement(children),
    'onlyChild must be passed a children with exactly one child.'
  ) : invariant(ReactElement.isValidElement(children)));
  return children;
}

module.exports = onlyChild;

},{"./ReactElement":52,"./invariant":126}],138:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule performance
 * @typechecks
 */

"use strict";

var ExecutionEnvironment = _dereq_("./ExecutionEnvironment");

var performance;

if (ExecutionEnvironment.canUseDOM) {
  performance =
    window.performance ||
    window.msPerformance ||
    window.webkitPerformance;
}

module.exports = performance || {};

},{"./ExecutionEnvironment":22}],139:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule performanceNow
 * @typechecks
 */

var performance = _dereq_("./performance");

/**
 * Detect if we can use `window.performance.now()` and gracefully fallback to
 * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now
 * because of Facebook's testing infrastructure.
 */
if (!performance || !performance.now) {
  performance = Date;
}

var performanceNow = performance.now.bind(performance);

module.exports = performanceNow;

},{"./performance":138}],140:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule setInnerHTML
 */

"use strict";

var ExecutionEnvironment = _dereq_("./ExecutionEnvironment");

var WHITESPACE_TEST = /^[ \r\n\t\f]/;
var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/;

/**
 * Set the innerHTML property of a node, ensuring that whitespace is preserved
 * even in IE8.
 *
 * @param {DOMElement} node
 * @param {string} html
 * @internal
 */
var setInnerHTML = function(node, html) {
  node.innerHTML = html;
};

if (ExecutionEnvironment.canUseDOM) {
  // IE8: When updating a just created node with innerHTML only leading
  // whitespace is removed. When updating an existing node with innerHTML
  // whitespace in root TextNodes is also collapsed.
  // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html

  // Feature detection; only IE8 is known to behave improperly like this.
  var testElement = document.createElement('div');
  testElement.innerHTML = ' ';
  if (testElement.innerHTML === '') {
    setInnerHTML = function(node, html) {
      // Magic theory: IE8 supposedly differentiates between added and updated
      // nodes when processing innerHTML, innerHTML on updated nodes suffers
      // from worse whitespace behavior. Re-adding a node like this triggers
      // the initial and more favorable whitespace behavior.
      // TODO: What to do on a detached node?
      if (node.parentNode) {
        node.parentNode.replaceChild(node, node);
      }

      // We also implement a workaround for non-visible tags disappearing into
      // thin air on IE8, this only happens if there is no visible text
      // in-front of the non-visible tags. Piggyback on the whitespace fix
      // and simply check if any non-visible tags appear in the source.
      if (WHITESPACE_TEST.test(html) ||
          html[0] === '<' && NONVISIBLE_TEST.test(html)) {
        // Recover leading whitespace by temporarily prepending any character.
        // \uFEFF has the potential advantage of being zero-width/invisible.
        node.innerHTML = '\uFEFF' + html;

        // deleteData leaves an empty `TextNode` which offsets the index of all
        // children. Definitely want to avoid this.
        var textNode = node.firstChild;
        if (textNode.data.length === 1) {
          node.removeChild(textNode);
        } else {
          textNode.deleteData(0, 1);
        }
      } else {
        node.innerHTML = html;
      }
    };
  }
}

module.exports = setInnerHTML;

},{"./ExecutionEnvironment":22}],141:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule shallowEqual
 */

"use strict";

/**
 * Performs equality by iterating through keys on an object and returning
 * false when any key has values which are not strictly equal between
 * objA and objB. Returns true when the values of all keys are strictly equal.
 *
 * @return {boolean}
 */
function shallowEqual(objA, objB) {
  if (objA === objB) {
    return true;
  }
  var key;
  // Test for A's keys different from B.
  for (key in objA) {
    if (objA.hasOwnProperty(key) &&
        (!objB.hasOwnProperty(key) || objA[key] !== objB[key])) {
      return false;
    }
  }
  // Test for B's keys missing from A.
  for (key in objB) {
    if (objB.hasOwnProperty(key) && !objA.hasOwnProperty(key)) {
      return false;
    }
  }
  return true;
}

module.exports = shallowEqual;

},{}],142:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule shouldUpdateReactComponent
 * @typechecks static-only
 */

"use strict";

/**
 * Given a `prevElement` and `nextElement`, determines if the existing
 * instance should be updated as opposed to being destroyed or replaced by a new
 * instance. Both arguments are elements. This ensures that this logic can
 * operate on stateless trees without any backing instance.
 *
 * @param {?object} prevElement
 * @param {?object} nextElement
 * @return {boolean} True if the existing instance should be updated.
 * @protected
 */
function shouldUpdateReactComponent(prevElement, nextElement) {
  if (prevElement && nextElement &&
      prevElement.type === nextElement.type &&
      prevElement.key === nextElement.key &&
      prevElement._owner === nextElement._owner) {
    return true;
  }
  return false;
}

module.exports = shouldUpdateReactComponent;

},{}],143:[function(_dereq_,module,exports){
/**
 * Copyright 2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule toArray
 * @typechecks
 */

var invariant = _dereq_("./invariant");

/**
 * Convert array-like objects to arrays.
 *
 * This API assumes the caller knows the contents of the data type. For less
 * well defined inputs use createArrayFrom.
 *
 * @param {object|function|filelist} obj
 * @return {array}
 */
function toArray(obj) {
  var length = obj.length;

  // Some browse builtin objects can report typeof 'function' (e.g. NodeList in
  // old versions of Safari).
  ("production" !== "development" ? invariant(
    !Array.isArray(obj) &&
    (typeof obj === 'object' || typeof obj === 'function'),
    'toArray: Array-like object expected'
  ) : invariant(!Array.isArray(obj) &&
  (typeof obj === 'object' || typeof obj === 'function')));

  ("production" !== "development" ? invariant(
    typeof length === 'number',
    'toArray: Object needs a length property'
  ) : invariant(typeof length === 'number'));

  ("production" !== "development" ? invariant(
    length === 0 ||
    (length - 1) in obj,
    'toArray: Object should have keys for indices'
  ) : invariant(length === 0 ||
  (length - 1) in obj));

  // Old IE doesn't give collections access to hasOwnProperty. Assume inputs
  // without method will throw during the slice call and skip straight to the
  // fallback.
  if (obj.hasOwnProperty) {
    try {
      return Array.prototype.slice.call(obj);
    } catch (e) {
      // IE < 9 does not support Array#slice on collections objects
    }
  }

  // Fall back to copying key by key. This assumes all keys have a value,
  // so will not preserve sparsely populated inputs.
  var ret = Array(length);
  for (var ii = 0; ii < length; ii++) {
    ret[ii] = obj[ii];
  }
  return ret;
}

module.exports = toArray;

},{"./invariant":126}],144:[function(_dereq_,module,exports){
/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule traverseAllChildren
 */

"use strict";

var ReactElement = _dereq_("./ReactElement");
var ReactInstanceHandles = _dereq_("./ReactInstanceHandles");

var invariant = _dereq_("./invariant");

var SEPARATOR = ReactInstanceHandles.SEPARATOR;
var SUBSEPARATOR = ':';

/**
 * TODO: Test that:
 * 1. `mapChildren` transforms strings and numbers into `ReactTextComponent`.
 * 2. it('should fail when supplied duplicate key', function() {
 * 3. That a single child and an array with one item have the same key pattern.
 * });
 */

var userProvidedKeyEscaperLookup = {
  '=': '=0',
  '.': '=1',
  ':': '=2'
};

var userProvidedKeyEscapeRegex = /[=.:]/g;

function userProvidedKeyEscaper(match) {
  return userProvidedKeyEscaperLookup[match];
}

/**
 * Generate a key string that identifies a component within a set.
 *
 * @param {*} component A component that could contain a manual key.
 * @param {number} index Index that is used if a manual key is not provided.
 * @return {string}
 */
function getComponentKey(component, index) {
  if (component && component.key != null) {
    // Explicit key
    return wrapUserProvidedKey(component.key);
  }
  // Implicit key determined by the index in the set
  return index.toString(36);
}

/**
 * Escape a component key so that it is safe to use in a reactid.
 *
 * @param {*} key Component key to be escaped.
 * @return {string} An escaped string.
 */
function escapeUserProvidedKey(text) {
  return ('' + text).replace(
    userProvidedKeyEscapeRegex,
    userProvidedKeyEscaper
  );
}

/**
 * Wrap a `key` value explicitly provided by the user to distinguish it from
 * implicitly-generated keys generated by a component's index in its parent.
 *
 * @param {string} key Value of a user-provided `key` attribute
 * @return {string}
 */
function wrapUserProvidedKey(key) {
  return '$' + escapeUserProvidedKey(key);
}

/**
 * @param {?*} children Children tree container.
 * @param {!string} nameSoFar Name of the key path so far.
 * @param {!number} indexSoFar Number of children encountered until this point.
 * @param {!function} callback Callback to invoke with each child found.
 * @param {?*} traverseContext Used to pass information throughout the traversal
 * process.
 * @return {!number} The number of children in this subtree.
 */
var traverseAllChildrenImpl =
  function(children, nameSoFar, indexSoFar, callback, traverseContext) {
    var nextName, nextIndex;
    var subtreeCount = 0;  // Count of children found in the current subtree.
    if (Array.isArray(children)) {
      for (var i = 0; i < children.length; i++) {
        var child = children[i];
        nextName = (
          nameSoFar +
          (nameSoFar ? SUBSEPARATOR : SEPARATOR) +
          getComponentKey(child, i)
        );
        nextIndex = indexSoFar + subtreeCount;
        subtreeCount += traverseAllChildrenImpl(
          child,
          nextName,
          nextIndex,
          callback,
          traverseContext
        );
      }
    } else {
      var type = typeof children;
      var isOnlyChild = nameSoFar === '';
      // If it's the only child, treat the name as if it was wrapped in an array
      // so that it's consistent if the number of children grows
      var storageName =
        isOnlyChild ? SEPARATOR + getComponentKey(children, 0) : nameSoFar;
      if (children == null || type === 'boolean') {
        // All of the above are perceived as null.
        callback(traverseContext, null, storageName, indexSoFar);
        subtreeCount = 1;
      } else if (type === 'string' || type === 'number' ||
                 ReactElement.isValidElement(children)) {
        callback(traverseContext, children, storageName, indexSoFar);
        subtreeCount = 1;
      } else if (type === 'object') {
        ("production" !== "development" ? invariant(
          !children || children.nodeType !== 1,
          'traverseAllChildren(...): Encountered an invalid child; DOM ' +
          'elements are not valid children of React components.'
        ) : invariant(!children || children.nodeType !== 1));
        for (var key in children) {
          if (children.hasOwnProperty(key)) {
            nextName = (
              nameSoFar + (nameSoFar ? SUBSEPARATOR : SEPARATOR) +
              wrapUserProvidedKey(key) + SUBSEPARATOR +
              getComponentKey(children[key], 0)
            );
            nextIndex = indexSoFar + subtreeCount;
            subtreeCount += traverseAllChildrenImpl(
              children[key],
              nextName,
              nextIndex,
              callback,
              traverseContext
            );
          }
        }
      }
    }
    return subtreeCount;
  };

/**
 * Traverses children that are typically specified as `props.children`, but
 * might also be specified through attributes:
 *
 * - `traverseAllChildren(this.props.children, ...)`
 * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
 *
 * The `traverseContext` is an optional argument that is passed through the
 * entire traversal. It can be used to store accumulations or anything else that
 * the callback might find relevant.
 *
 * @param {?*} children Children tree object.
 * @param {!function} callback To invoke upon traversing each child.
 * @param {?*} traverseContext Context for traversal.
 * @return {!number} The number of children in this subtree.
 */
function traverseAllChildren(children, callback, traverseContext) {
  if (children == null) {
    return 0;
  }

  return traverseAllChildrenImpl(children, '', 0, callback, traverseContext);
}

module.exports = traverseAllChildren;

},{"./ReactElement":52,"./ReactInstanceHandles":60,"./invariant":126}],145:[function(_dereq_,module,exports){
/**
 * Copyright 2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule warning
 */

"use strict";

var emptyFunction = _dereq_("./emptyFunction");

/**
 * Similar to invariant but only logs a warning if the condition is not met.
 * This can be used to log issues in development environments in critical
 * paths. Removing the logging code for production environments will keep the
 * same logic and follow the same code paths.
 */

var warning = emptyFunction;

if ("production" !== "development") {
  warning = function(condition, format ) {for (var args=[],$__0=2,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]);
    if (format === undefined) {
      throw new Error(
        '`warning(condition, format, ...args)` requires a warning ' +
        'message argument'
      );
    }

    if (!condition) {
      var argIndex = 0;
      console.warn('Warning: ' + format.replace(/%s/g, function()  {return args[argIndex++];}));
    }
  };
}

module.exports = warning;

},{"./emptyFunction":107}]},{},[1])(1)
});
var CLOSURE_NO_DEPS = true;
var COMPILED = false;
var goog = goog || {};
goog.global = this;
goog.global.CLOSURE_UNCOMPILED_DEFINES;
goog.global.CLOSURE_DEFINES;
goog.isDef = function(val) {
  return val !== void 0;
};
goog.exportPath_ = function(name, opt_object, opt_objectToExportTo) {
  var parts = name.split(".");
  var cur = opt_objectToExportTo || goog.global;
  if (!(parts[0] in cur) && cur.execScript) {
    cur.execScript("var " + parts[0]);
  }
  for (var part;parts.length && (part = parts.shift());) {
    if (!parts.length && goog.isDef(opt_object)) {
      cur[part] = opt_object;
    } else {
      if (cur[part]) {
        cur = cur[part];
      } else {
        cur = cur[part] = {};
      }
    }
  }
};
goog.define = function(name, defaultValue) {
  var value = defaultValue;
  if (!COMPILED) {
    if (goog.global.CLOSURE_UNCOMPILED_DEFINES && Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_UNCOMPILED_DEFINES, name)) {
      value = goog.global.CLOSURE_UNCOMPILED_DEFINES[name];
    } else {
      if (goog.global.CLOSURE_DEFINES && Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_DEFINES, name)) {
        value = goog.global.CLOSURE_DEFINES[name];
      }
    }
  }
  goog.exportPath_(name, value);
};
goog.define("goog.DEBUG", true);
goog.define("goog.LOCALE", "en");
goog.define("goog.TRUSTED_SITE", true);
goog.define("goog.STRICT_MODE_COMPATIBLE", false);
goog.define("goog.DISALLOW_TEST_ONLY_CODE", COMPILED && !goog.DEBUG);
goog.define("goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING", false);
goog.provide = function(name) {
  if (!COMPILED) {
    if (goog.isProvided_(name)) {
      throw Error('Namespace "' + name + '" already declared.');
    }
  }
  goog.constructNamespace_(name);
};
goog.constructNamespace_ = function(name, opt_obj) {
  if (!COMPILED) {
    delete goog.implicitNamespaces_[name];
    var namespace = name;
    while (namespace = namespace.substring(0, namespace.lastIndexOf("."))) {
      if (goog.getObjectByName(namespace)) {
        break;
      }
      goog.implicitNamespaces_[namespace] = true;
    }
  }
  goog.exportPath_(name, opt_obj);
};
goog.VALID_MODULE_RE_ = /^[a-zA-Z_$][a-zA-Z0-9._$]*$/;
goog.module = function(name) {
  if (!goog.isString(name) || !name || name.search(goog.VALID_MODULE_RE_) == -1) {
    throw Error("Invalid module identifier");
  }
  if (!goog.isInModuleLoader_()) {
    throw Error("Module " + name + " has been loaded incorrectly.");
  }
  if (goog.moduleLoaderState_.moduleName) {
    throw Error("goog.module may only be called once per module.");
  }
  goog.moduleLoaderState_.moduleName = name;
  if (!COMPILED) {
    if (goog.isProvided_(name)) {
      throw Error('Namespace "' + name + '" already declared.');
    }
    delete goog.implicitNamespaces_[name];
  }
};
goog.module.get = function(name) {
  return goog.module.getInternal_(name);
};
goog.module.getInternal_ = function(name) {
  if (!COMPILED) {
    if (goog.isProvided_(name)) {
      return name in goog.loadedModules_ ? goog.loadedModules_[name] : goog.getObjectByName(name);
    } else {
      return null;
    }
  }
};
goog.moduleLoaderState_ = null;
goog.isInModuleLoader_ = function() {
  return goog.moduleLoaderState_ != null;
};
goog.module.declareLegacyNamespace = function() {
  if (!COMPILED && !goog.isInModuleLoader_()) {
    throw new Error("goog.module.declareLegacyNamespace must be called from " + "within a goog.module");
  }
  if (!COMPILED && !goog.moduleLoaderState_.moduleName) {
    throw Error("goog.module must be called prior to " + "goog.module.declareLegacyNamespace.");
  }
  goog.moduleLoaderState_.declareLegacyNamespace = true;
};
goog.setTestOnly = function(opt_message) {
  if (goog.DISALLOW_TEST_ONLY_CODE) {
    opt_message = opt_message || "";
    throw Error("Importing test-only code into non-debug environment" + (opt_message ? ": " + opt_message : "."));
  }
};
goog.forwardDeclare = function(name) {
};
goog.forwardDeclare("Document");
goog.forwardDeclare("HTMLScriptElement");
goog.forwardDeclare("XMLHttpRequest");
if (!COMPILED) {
  goog.isProvided_ = function(name) {
    return name in goog.loadedModules_ || !goog.implicitNamespaces_[name] && goog.isDefAndNotNull(goog.getObjectByName(name));
  };
  goog.implicitNamespaces_ = {"goog.module":true};
}
goog.getObjectByName = function(name, opt_obj) {
  var parts = name.split(".");
  var cur = opt_obj || goog.global;
  for (var part;part = parts.shift();) {
    if (goog.isDefAndNotNull(cur[part])) {
      cur = cur[part];
    } else {
      return null;
    }
  }
  return cur;
};
goog.globalize = function(obj, opt_global) {
  var global = opt_global || goog.global;
  for (var x in obj) {
    global[x] = obj[x];
  }
};
goog.addDependency = function(relPath, provides, requires, opt_isModule) {
  if (goog.DEPENDENCIES_ENABLED) {
    var provide, require;
    var path = relPath.replace(/\\/g, "/");
    var deps = goog.dependencies_;
    for (var i = 0;provide = provides[i];i++) {
      deps.nameToPath[provide] = path;
      deps.pathIsModule[path] = !!opt_isModule;
    }
    for (var j = 0;require = requires[j];j++) {
      if (!(path in deps.requires)) {
        deps.requires[path] = {};
      }
      deps.requires[path][require] = true;
    }
  }
};
goog.define("goog.ENABLE_DEBUG_LOADER", true);
goog.logToConsole_ = function(msg) {
  if (goog.global.console) {
    goog.global.console["error"](msg);
  }
};
goog.require = function(name) {
  if (!COMPILED) {
    if (goog.ENABLE_DEBUG_LOADER && goog.IS_OLD_IE_) {
      goog.maybeProcessDeferredDep_(name);
    }
    if (goog.isProvided_(name)) {
      if (goog.isInModuleLoader_()) {
        return goog.module.getInternal_(name);
      } else {
        return null;
      }
    }
    if (goog.ENABLE_DEBUG_LOADER) {
      var path = goog.getPathFromDeps_(name);
      if (path) {
        goog.writeScripts_(path);
        return null;
      }
    }
    var errorMessage = "goog.require could not find: " + name;
    goog.logToConsole_(errorMessage);
    throw Error(errorMessage);
  }
};
goog.basePath = "";
goog.global.CLOSURE_BASE_PATH;
goog.global.CLOSURE_NO_DEPS;
goog.global.CLOSURE_IMPORT_SCRIPT;
goog.nullFunction = function() {
};
goog.abstractMethod = function() {
  throw Error("unimplemented abstract method");
};
goog.addSingletonGetter = function(ctor) {
  ctor.getInstance = function() {
    if (ctor.instance_) {
      return ctor.instance_;
    }
    if (goog.DEBUG) {
      goog.instantiatedSingletons_[goog.instantiatedSingletons_.length] = ctor;
    }
    return ctor.instance_ = new ctor;
  };
};
goog.instantiatedSingletons_ = [];
goog.define("goog.LOAD_MODULE_USING_EVAL", true);
goog.define("goog.SEAL_MODULE_EXPORTS", goog.DEBUG);
goog.loadedModules_ = {};
goog.DEPENDENCIES_ENABLED = !COMPILED && goog.ENABLE_DEBUG_LOADER;
if (goog.DEPENDENCIES_ENABLED) {
  goog.dependencies_ = {pathIsModule:{}, nameToPath:{}, requires:{}, visited:{}, written:{}, deferred:{}};
  goog.inHtmlDocument_ = function() {
    var doc = goog.global.document;
    return doc != null && "write" in doc;
  };
  goog.findBasePath_ = function() {
    if (goog.isDef(goog.global.CLOSURE_BASE_PATH)) {
      goog.basePath = goog.global.CLOSURE_BASE_PATH;
      return;
    } else {
      if (!goog.inHtmlDocument_()) {
        return;
      }
    }
    var doc = goog.global.document;
    var scripts = doc.getElementsByTagName("SCRIPT");
    for (var i = scripts.length - 1;i >= 0;--i) {
      var script = (scripts[i]);
      var src = script.src;
      var qmark = src.lastIndexOf("?");
      var l = qmark == -1 ? src.length : qmark;
      if (src.substr(l - 7, 7) == "base.js") {
        goog.basePath = src.substr(0, l - 7);
        return;
      }
    }
  };
  goog.importScript_ = function(src, opt_sourceText) {
    var importScript = goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_;
    if (importScript(src, opt_sourceText)) {
      goog.dependencies_.written[src] = true;
    }
  };
  goog.IS_OLD_IE_ = !!(!goog.global.atob && goog.global.document && goog.global.document.all);
  goog.importModule_ = function(src) {
    var bootstrap = 'goog.retrieveAndExecModule_("' + src + '");';
    if (goog.importScript_("", bootstrap)) {
      goog.dependencies_.written[src] = true;
    }
  };
  goog.queuedModules_ = [];
  goog.wrapModule_ = function(srcUrl, scriptText) {
    if (!goog.LOAD_MODULE_USING_EVAL || !goog.isDef(goog.global.JSON)) {
      return "" + "goog.loadModule(function(exports) {" + '"use strict";' + scriptText + "\n" + ";return exports" + "});" + "\n//# sourceURL\x3d" + srcUrl + "\n";
    } else {
      return "" + "goog.loadModule(" + goog.global.JSON.stringify(scriptText + "\n//# sourceURL\x3d" + srcUrl + "\n") + ");";
    }
  };
  goog.loadQueuedModules_ = function() {
    var count = goog.queuedModules_.length;
    if (count > 0) {
      var queue = goog.queuedModules_;
      goog.queuedModules_ = [];
      for (var i = 0;i < count;i++) {
        var path = queue[i];
        goog.maybeProcessDeferredPath_(path);
      }
    }
  };
  goog.maybeProcessDeferredDep_ = function(name) {
    if (goog.isDeferredModule_(name) && goog.allDepsAreAvailable_(name)) {
      var path = goog.getPathFromDeps_(name);
      goog.maybeProcessDeferredPath_(goog.basePath + path);
    }
  };
  goog.isDeferredModule_ = function(name) {
    var path = goog.getPathFromDeps_(name);
    if (path && goog.dependencies_.pathIsModule[path]) {
      var abspath = goog.basePath + path;
      return abspath in goog.dependencies_.deferred;
    }
    return false;
  };
  goog.allDepsAreAvailable_ = function(name) {
    var path = goog.getPathFromDeps_(name);
    if (path && path in goog.dependencies_.requires) {
      for (var requireName in goog.dependencies_.requires[path]) {
        if (!goog.isProvided_(requireName) && !goog.isDeferredModule_(requireName)) {
          return false;
        }
      }
    }
    return true;
  };
  goog.maybeProcessDeferredPath_ = function(abspath) {
    if (abspath in goog.dependencies_.deferred) {
      var src = goog.dependencies_.deferred[abspath];
      delete goog.dependencies_.deferred[abspath];
      goog.globalEval(src);
    }
  };
  goog.loadModuleFromUrl = function(url) {
    goog.retrieveAndExecModule_(url);
  };
  goog.loadModule = function(moduleDef) {
    var previousState = goog.moduleLoaderState_;
    try {
      goog.moduleLoaderState_ = {moduleName:undefined, declareLegacyNamespace:false};
      var exports;
      if (goog.isFunction(moduleDef)) {
        exports = moduleDef.call(goog.global, {});
      } else {
        if (goog.isString(moduleDef)) {
          exports = goog.loadModuleFromSource_.call(goog.global, moduleDef);
        } else {
          throw Error("Invalid module definition");
        }
      }
      var moduleName = goog.moduleLoaderState_.moduleName;
      if (!goog.isString(moduleName) || !moduleName) {
        throw Error('Invalid module name "' + moduleName + '"');
      }
      if (goog.moduleLoaderState_.declareLegacyNamespace) {
        goog.constructNamespace_(moduleName, exports);
      } else {
        if (goog.SEAL_MODULE_EXPORTS && Object.seal) {
          Object.seal(exports);
        }
      }
      goog.loadedModules_[moduleName] = exports;
    } finally {
      goog.moduleLoaderState_ = previousState;
    }
  };
  goog.loadModuleFromSource_ = function() {
    var exports = {};
    eval(arguments[0]);
    return exports;
  };
  goog.writeScriptSrcNode_ = function(src) {
    goog.global.document.write('\x3cscript type\x3d"text/javascript" src\x3d"' + src + '"\x3e\x3c/' + "script\x3e");
  };
  goog.appendScriptSrcNode_ = function(src) {
    var doc = goog.global.document;
    var scriptEl = (doc.createElement("script"));
    scriptEl.type = "text/javascript";
    scriptEl.src = src;
    scriptEl.defer = false;
    scriptEl.async = false;
    doc.head.appendChild(scriptEl);
  };
  goog.writeScriptTag_ = function(src, opt_sourceText) {
    if (goog.inHtmlDocument_()) {
      var doc = goog.global.document;
      if (!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING && doc.readyState == "complete") {
        var isDeps = /\bdeps.js$/.test(src);
        if (isDeps) {
          return false;
        } else {
          throw Error('Cannot write "' + src + '" after document load');
        }
      }
      var isOldIE = goog.IS_OLD_IE_;
      if (opt_sourceText === undefined) {
        if (!isOldIE) {
          if (goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING) {
            goog.appendScriptSrcNode_(src);
          } else {
            goog.writeScriptSrcNode_(src);
          }
        } else {
          var state = " onreadystatechange\x3d'goog.onScriptLoad_(this, " + ++goog.lastNonModuleScriptIndex_ + ")' ";
          doc.write('\x3cscript type\x3d"text/javascript" src\x3d"' + src + '"' + state + "\x3e\x3c/" + "script\x3e");
        }
      } else {
        doc.write('\x3cscript type\x3d"text/javascript"\x3e' + opt_sourceText + "\x3c/" + "script\x3e");
      }
      return true;
    } else {
      return false;
    }
  };
  goog.lastNonModuleScriptIndex_ = 0;
  goog.onScriptLoad_ = function(script, scriptIndex) {
    if (script.readyState == "complete" && goog.lastNonModuleScriptIndex_ == scriptIndex) {
      goog.loadQueuedModules_();
    }
    return true;
  };
  goog.writeScripts_ = function(pathToLoad) {
    var scripts = [];
    var seenScript = {};
    var deps = goog.dependencies_;
    function visitNode(path) {
      if (path in deps.written) {
        return;
      }
      if (path in deps.visited) {
        return;
      }
      deps.visited[path] = true;
      if (path in deps.requires) {
        for (var requireName in deps.requires[path]) {
          if (!goog.isProvided_(requireName)) {
            if (requireName in deps.nameToPath) {
              visitNode(deps.nameToPath[requireName]);
            } else {
              throw Error("Undefined nameToPath for " + requireName);
            }
          }
        }
      }
      if (!(path in seenScript)) {
        seenScript[path] = true;
        scripts.push(path);
      }
    }
    visitNode(pathToLoad);
    for (var i = 0;i < scripts.length;i++) {
      var path = scripts[i];
      goog.dependencies_.written[path] = true;
    }
    var moduleState = goog.moduleLoaderState_;
    goog.moduleLoaderState_ = null;
    for (var i = 0;i < scripts.length;i++) {
      var path = scripts[i];
      if (path) {
        if (!deps.pathIsModule[path]) {
          goog.importScript_(goog.basePath + path);
        } else {
          goog.importModule_(goog.basePath + path);
        }
      } else {
        goog.moduleLoaderState_ = moduleState;
        throw Error("Undefined script input");
      }
    }
    goog.moduleLoaderState_ = moduleState;
  };
  goog.getPathFromDeps_ = function(rule) {
    if (rule in goog.dependencies_.nameToPath) {
      return goog.dependencies_.nameToPath[rule];
    } else {
      return null;
    }
  };
  goog.findBasePath_();
  if (!goog.global.CLOSURE_NO_DEPS) {
    goog.importScript_(goog.basePath + "deps.js");
  }
}
goog.normalizePath_ = function(path) {
  var components = path.split("/");
  var i = 0;
  while (i < components.length) {
    if (components[i] == ".") {
      components.splice(i, 1);
    } else {
      if (i && components[i] == ".." && components[i - 1] && components[i - 1] != "..") {
        components.splice(--i, 2);
      } else {
        i++;
      }
    }
  }
  return components.join("/");
};
goog.loadFileSync_ = function(src) {
  if (goog.global.CLOSURE_LOAD_FILE_SYNC) {
    return goog.global.CLOSURE_LOAD_FILE_SYNC(src);
  } else {
    var xhr = new goog.global["XMLHttpRequest"];
    xhr.open("get", src, false);
    xhr.send();
    return xhr.responseText;
  }
};
goog.retrieveAndExecModule_ = function(src) {
  if (!COMPILED) {
    var originalPath = src;
    src = goog.normalizePath_(src);
    var importScript = goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_;
    var scriptText = goog.loadFileSync_(src);
    if (scriptText != null) {
      var execModuleScript = goog.wrapModule_(src, scriptText);
      var isOldIE = goog.IS_OLD_IE_;
      if (isOldIE) {
        goog.dependencies_.deferred[originalPath] = execModuleScript;
        goog.queuedModules_.push(originalPath);
      } else {
        importScript(src, execModuleScript);
      }
    } else {
      throw new Error("load of " + src + "failed");
    }
  }
};
goog.typeOf = function(value) {
  var s = typeof value;
  if (s == "object") {
    if (value) {
      if (value instanceof Array) {
        return "array";
      } else {
        if (value instanceof Object) {
          return s;
        }
      }
      var className = Object.prototype.toString.call((value));
      if (className == "[object Window]") {
        return "object";
      }
      if (className == "[object Array]" || typeof value.length == "number" && typeof value.splice != "undefined" && typeof value.propertyIsEnumerable != "undefined" && !value.propertyIsEnumerable("splice")) {
        return "array";
      }
      if (className == "[object Function]" || typeof value.call != "undefined" && typeof value.propertyIsEnumerable != "undefined" && !value.propertyIsEnumerable("call")) {
        return "function";
      }
    } else {
      return "null";
    }
  } else {
    if (s == "function" && typeof value.call == "undefined") {
      return "object";
    }
  }
  return s;
};
goog.isNull = function(val) {
  return val === null;
};
goog.isDefAndNotNull = function(val) {
  return val != null;
};
goog.isArray = function(val) {
  return goog.typeOf(val) == "array";
};
goog.isArrayLike = function(val) {
  var type = goog.typeOf(val);
  return type == "array" || type == "object" && typeof val.length == "number";
};
goog.isDateLike = function(val) {
  return goog.isObject(val) && typeof val.getFullYear == "function";
};
goog.isString = function(val) {
  return typeof val == "string";
};
goog.isBoolean = function(val) {
  return typeof val == "boolean";
};
goog.isNumber = function(val) {
  return typeof val == "number";
};
goog.isFunction = function(val) {
  return goog.typeOf(val) == "function";
};
goog.isObject = function(val) {
  var type = typeof val;
  return type == "object" && val != null || type == "function";
};
goog.getUid = function(obj) {
  return obj[goog.UID_PROPERTY_] || (obj[goog.UID_PROPERTY_] = ++goog.uidCounter_);
};
goog.hasUid = function(obj) {
  return !!obj[goog.UID_PROPERTY_];
};
goog.removeUid = function(obj) {
  if ("removeAttribute" in (obj)) {
    obj.removeAttribute(goog.UID_PROPERTY_);
  }
  try {
    delete obj[goog.UID_PROPERTY_];
  } catch (ex) {
  }
};
goog.UID_PROPERTY_ = "closure_uid_" + (Math.random() * 1E9 >>> 0);
goog.uidCounter_ = 0;
goog.getHashCode = goog.getUid;
goog.removeHashCode = goog.removeUid;
goog.cloneObject = function(obj) {
  var type = goog.typeOf(obj);
  if (type == "object" || type == "array") {
    if (obj.clone) {
      return obj.clone();
    }
    var clone = type == "array" ? [] : {};
    for (var key in obj) {
      clone[key] = goog.cloneObject(obj[key]);
    }
    return clone;
  }
  return obj;
};
goog.bindNative_ = function(fn, selfObj, var_args) {
  return (fn.call.apply(fn.bind, arguments));
};
goog.bindJs_ = function(fn, selfObj, var_args) {
  if (!fn) {
    throw new Error;
  }
  if (arguments.length > 2) {
    var boundArgs = Array.prototype.slice.call(arguments, 2);
    return function() {
      var newArgs = Array.prototype.slice.call(arguments);
      Array.prototype.unshift.apply(newArgs, boundArgs);
      return fn.apply(selfObj, newArgs);
    };
  } else {
    return function() {
      return fn.apply(selfObj, arguments);
    };
  }
};
goog.bind = function(fn, selfObj, var_args) {
  if (Function.prototype.bind && Function.prototype.bind.toString().indexOf("native code") != -1) {
    goog.bind = goog.bindNative_;
  } else {
    goog.bind = goog.bindJs_;
  }
  return goog.bind.apply(null, arguments);
};
goog.partial = function(fn, var_args) {
  var args = Array.prototype.slice.call(arguments, 1);
  return function() {
    var newArgs = args.slice();
    newArgs.push.apply(newArgs, arguments);
    return fn.apply(this, newArgs);
  };
};
goog.mixin = function(target, source) {
  for (var x in source) {
    target[x] = source[x];
  }
};
goog.now = goog.TRUSTED_SITE && Date.now || function() {
  return +new Date;
};
goog.globalEval = function(script) {
  if (goog.global.execScript) {
    goog.global.execScript(script, "JavaScript");
  } else {
    if (goog.global.eval) {
      if (goog.evalWorksForGlobals_ == null) {
        goog.global.eval("var _evalTest_ \x3d 1;");
        if (typeof goog.global["_evalTest_"] != "undefined") {
          try {
            delete goog.global["_evalTest_"];
          } catch (ignore) {
          }
          goog.evalWorksForGlobals_ = true;
        } else {
          goog.evalWorksForGlobals_ = false;
        }
      }
      if (goog.evalWorksForGlobals_) {
        goog.global.eval(script);
      } else {
        var doc = goog.global.document;
        var scriptElt = (doc.createElement("SCRIPT"));
        scriptElt.type = "text/javascript";
        scriptElt.defer = false;
        scriptElt.appendChild(doc.createTextNode(script));
        doc.body.appendChild(scriptElt);
        doc.body.removeChild(scriptElt);
      }
    } else {
      throw Error("goog.globalEval not available");
    }
  }
};
goog.evalWorksForGlobals_ = null;
goog.cssNameMapping_;
goog.cssNameMappingStyle_;
goog.getCssName = function(className, opt_modifier) {
  var getMapping = function(cssName) {
    return goog.cssNameMapping_[cssName] || cssName;
  };
  var renameByParts = function(cssName) {
    var parts = cssName.split("-");
    var mapped = [];
    for (var i = 0;i < parts.length;i++) {
      mapped.push(getMapping(parts[i]));
    }
    return mapped.join("-");
  };
  var rename;
  if (goog.cssNameMapping_) {
    rename = goog.cssNameMappingStyle_ == "BY_WHOLE" ? getMapping : renameByParts;
  } else {
    rename = function(a) {
      return a;
    };
  }
  if (opt_modifier) {
    return className + "-" + rename(opt_modifier);
  } else {
    return rename(className);
  }
};
goog.setCssNameMapping = function(mapping, opt_style) {
  goog.cssNameMapping_ = mapping;
  goog.cssNameMappingStyle_ = opt_style;
};
goog.global.CLOSURE_CSS_NAME_MAPPING;
if (!COMPILED && goog.global.CLOSURE_CSS_NAME_MAPPING) {
  goog.cssNameMapping_ = goog.global.CLOSURE_CSS_NAME_MAPPING;
}
goog.getMsg = function(str, opt_values) {
  if (opt_values) {
    str = str.replace(/\{\$([^}]+)}/g, function(match, key) {
      return opt_values != null && key in opt_values ? opt_values[key] : match;
    });
  }
  return str;
};
goog.getMsgWithFallback = function(a, b) {
  return a;
};
goog.exportSymbol = function(publicPath, object, opt_objectToExportTo) {
  goog.exportPath_(publicPath, object, opt_objectToExportTo);
};
goog.exportProperty = function(object, publicName, symbol) {
  object[publicName] = symbol;
};
goog.inherits = function(childCtor, parentCtor) {
  function tempCtor() {
  }
  tempCtor.prototype = parentCtor.prototype;
  childCtor.superClass_ = parentCtor.prototype;
  childCtor.prototype = new tempCtor;
  childCtor.prototype.constructor = childCtor;
  childCtor.base = function(me, methodName, var_args) {
    var args = new Array(arguments.length - 2);
    for (var i = 2;i < arguments.length;i++) {
      args[i - 2] = arguments[i];
    }
    return parentCtor.prototype[methodName].apply(me, args);
  };
};
goog.base = function(me, opt_methodName, var_args) {
  var caller = arguments.callee.caller;
  if (goog.STRICT_MODE_COMPATIBLE || goog.DEBUG && !caller) {
    throw Error("arguments.caller not defined.  goog.base() cannot be used " + "with strict mode code. See " + "http://www.ecma-international.org/ecma-262/5.1/#sec-C");
  }
  if (caller.superClass_) {
    var ctorArgs = new Array(arguments.length - 1);
    for (var i = 1;i < arguments.length;i++) {
      ctorArgs[i - 1] = arguments[i];
    }
    return caller.superClass_.constructor.apply(me, ctorArgs);
  }
  var args = new Array(arguments.length - 2);
  for (var i = 2;i < arguments.length;i++) {
    args[i - 2] = arguments[i];
  }
  var foundCaller = false;
  for (var ctor = me.constructor;ctor;ctor = ctor.superClass_ && ctor.superClass_.constructor) {
    if (ctor.prototype[opt_methodName] === caller) {
      foundCaller = true;
    } else {
      if (foundCaller) {
        return ctor.prototype[opt_methodName].apply(me, args);
      }
    }
  }
  if (me[opt_methodName] === caller) {
    return me.constructor.prototype[opt_methodName].apply(me, args);
  } else {
    throw Error("goog.base called from a method of one name " + "to a method of a different name");
  }
};
goog.scope = function(fn) {
  fn.call(goog.global);
};
if (!COMPILED) {
  goog.global["COMPILED"] = COMPILED;
}
goog.defineClass = function(superClass, def) {
  var constructor = def.constructor;
  var statics = def.statics;
  if (!constructor || constructor == Object.prototype.constructor) {
    constructor = function() {
      throw Error("cannot instantiate an interface (no constructor defined).");
    };
  }
  var cls = goog.defineClass.createSealingConstructor_(constructor, superClass);
  if (superClass) {
    goog.inherits(cls, superClass);
  }
  delete def.constructor;
  delete def.statics;
  goog.defineClass.applyProperties_(cls.prototype, def);
  if (statics != null) {
    if (statics instanceof Function) {
      statics(cls);
    } else {
      goog.defineClass.applyProperties_(cls, statics);
    }
  }
  return cls;
};
goog.defineClass.ClassDescriptor;
goog.define("goog.defineClass.SEAL_CLASS_INSTANCES", goog.DEBUG);
goog.defineClass.createSealingConstructor_ = function(ctr, superClass) {
  if (goog.defineClass.SEAL_CLASS_INSTANCES && Object.seal instanceof Function) {
    if (superClass && superClass.prototype && superClass.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_]) {
      return ctr;
    }
    var wrappedCtr = function() {
      var instance = ctr.apply(this, arguments) || this;
      instance[goog.UID_PROPERTY_] = instance[goog.UID_PROPERTY_];
      if (this.constructor === wrappedCtr) {
        Object.seal(instance);
      }
      return instance;
    };
    return wrappedCtr;
  }
  return ctr;
};
goog.defineClass.OBJECT_PROTOTYPE_FIELDS_ = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf"];
goog.defineClass.applyProperties_ = function(target, source) {
  var key;
  for (key in source) {
    if (Object.prototype.hasOwnProperty.call(source, key)) {
      target[key] = source[key];
    }
  }
  for (var i = 0;i < goog.defineClass.OBJECT_PROTOTYPE_FIELDS_.length;i++) {
    key = goog.defineClass.OBJECT_PROTOTYPE_FIELDS_[i];
    if (Object.prototype.hasOwnProperty.call(source, key)) {
      target[key] = source[key];
    }
  }
};
goog.tagUnsealableClass = function(ctr) {
  if (!COMPILED && goog.defineClass.SEAL_CLASS_INSTANCES) {
    ctr.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_] = true;
  }
};
goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_ = "goog_defineClass_legacy_unsealable";
goog.provide("goog.string");
goog.provide("goog.string.Unicode");
goog.define("goog.string.DETECT_DOUBLE_ESCAPING", false);
goog.define("goog.string.FORCE_NON_DOM_HTML_UNESCAPING", false);
goog.string.Unicode = {NBSP:"\u00a0"};
goog.string.startsWith = function(str, prefix) {
  return str.lastIndexOf(prefix, 0) == 0;
};
goog.string.endsWith = function(str, suffix) {
  var l = str.length - suffix.length;
  return l >= 0 && str.indexOf(suffix, l) == l;
};
goog.string.caseInsensitiveStartsWith = function(str, prefix) {
  return goog.string.caseInsensitiveCompare(prefix, str.substr(0, prefix.length)) == 0;
};
goog.string.caseInsensitiveEndsWith = function(str, suffix) {
  return goog.string.caseInsensitiveCompare(suffix, str.substr(str.length - suffix.length, suffix.length)) == 0;
};
goog.string.caseInsensitiveEquals = function(str1, str2) {
  return str1.toLowerCase() == str2.toLowerCase();
};
goog.string.subs = function(str, var_args) {
  var splitParts = str.split("%s");
  var returnString = "";
  var subsArguments = Array.prototype.slice.call(arguments, 1);
  while (subsArguments.length && splitParts.length > 1) {
    returnString += splitParts.shift() + subsArguments.shift();
  }
  return returnString + splitParts.join("%s");
};
goog.string.collapseWhitespace = function(str) {
  return str.replace(/[\s\xa0]+/g, " ").replace(/^\s+|\s+$/g, "");
};
goog.string.isEmptyOrWhitespace = function(str) {
  return /^[\s\xa0]*$/.test(str);
};
goog.string.isEmptyString = function(str) {
  return str.length == 0;
};
goog.string.isEmpty = goog.string.isEmptyOrWhitespace;
goog.string.isEmptyOrWhitespaceSafe = function(str) {
  return goog.string.isEmptyOrWhitespace(goog.string.makeSafe(str));
};
goog.string.isEmptySafe = goog.string.isEmptyOrWhitespaceSafe;
goog.string.isBreakingWhitespace = function(str) {
  return !/[^\t\n\r ]/.test(str);
};
goog.string.isAlpha = function(str) {
  return !/[^a-zA-Z]/.test(str);
};
goog.string.isNumeric = function(str) {
  return !/[^0-9]/.test(str);
};
goog.string.isAlphaNumeric = function(str) {
  return !/[^a-zA-Z0-9]/.test(str);
};
goog.string.isSpace = function(ch) {
  return ch == " ";
};
goog.string.isUnicodeChar = function(ch) {
  return ch.length == 1 && ch >= " " && ch <= "~" || ch >= "\u0080" && ch <= "\ufffd";
};
goog.string.stripNewlines = function(str) {
  return str.replace(/(\r\n|\r|\n)+/g, " ");
};
goog.string.canonicalizeNewlines = function(str) {
  return str.replace(/(\r\n|\r|\n)/g, "\n");
};
goog.string.normalizeWhitespace = function(str) {
  return str.replace(/\xa0|\s/g, " ");
};
goog.string.normalizeSpaces = function(str) {
  return str.replace(/\xa0|[ \t]+/g, " ");
};
goog.string.collapseBreakingSpaces = function(str) {
  return str.replace(/[\t\r\n ]+/g, " ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g, "");
};
goog.string.trim = goog.TRUSTED_SITE && String.prototype.trim ? function(str) {
  return str.trim();
} : function(str) {
  return str.replace(/^[\s\xa0]+|[\s\xa0]+$/g, "");
};
goog.string.trimLeft = function(str) {
  return str.replace(/^[\s\xa0]+/, "");
};
goog.string.trimRight = function(str) {
  return str.replace(/[\s\xa0]+$/, "");
};
goog.string.caseInsensitiveCompare = function(str1, str2) {
  var test1 = String(str1).toLowerCase();
  var test2 = String(str2).toLowerCase();
  if (test1 < test2) {
    return -1;
  } else {
    if (test1 == test2) {
      return 0;
    } else {
      return 1;
    }
  }
};
goog.string.numberAwareCompare_ = function(str1, str2, tokenizerRegExp) {
  if (str1 == str2) {
    return 0;
  }
  if (!str1) {
    return -1;
  }
  if (!str2) {
    return 1;
  }
  var tokens1 = str1.toLowerCase().match(tokenizerRegExp);
  var tokens2 = str2.toLowerCase().match(tokenizerRegExp);
  var count = Math.min(tokens1.length, tokens2.length);
  for (var i = 0;i < count;i++) {
    var a = tokens1[i];
    var b = tokens2[i];
    if (a != b) {
      var num1 = parseInt(a, 10);
      if (!isNaN(num1)) {
        var num2 = parseInt(b, 10);
        if (!isNaN(num2) && num1 - num2) {
          return num1 - num2;
        }
      }
      return a < b ? -1 : 1;
    }
  }
  if (tokens1.length != tokens2.length) {
    return tokens1.length - tokens2.length;
  }
  return str1 < str2 ? -1 : 1;
};
goog.string.intAwareCompare = function(str1, str2) {
  return goog.string.numberAwareCompare_(str1, str2, /\d+|\D+/g);
};
goog.string.floatAwareCompare = function(str1, str2) {
  return goog.string.numberAwareCompare_(str1, str2, /\d+|\.\d+|\D+/g);
};
goog.string.numerateCompare = goog.string.floatAwareCompare;
goog.string.urlEncode = function(str) {
  return encodeURIComponent(String(str));
};
goog.string.urlDecode = function(str) {
  return decodeURIComponent(str.replace(/\+/g, " "));
};
goog.string.newLineToBr = function(str, opt_xml) {
  return str.replace(/(\r\n|\r|\n)/g, opt_xml ? "\x3cbr /\x3e" : "\x3cbr\x3e");
};
goog.string.htmlEscape = function(str, opt_isLikelyToContainHtmlChars) {
  if (opt_isLikelyToContainHtmlChars) {
    str = str.replace(goog.string.AMP_RE_, "\x26amp;").replace(goog.string.LT_RE_, "\x26lt;").replace(goog.string.GT_RE_, "\x26gt;").replace(goog.string.QUOT_RE_, "\x26quot;").replace(goog.string.SINGLE_QUOTE_RE_, "\x26#39;").replace(goog.string.NULL_RE_, "\x26#0;");
    if (goog.string.DETECT_DOUBLE_ESCAPING) {
      str = str.replace(goog.string.E_RE_, "\x26#101;");
    }
    return str;
  } else {
    if (!goog.string.ALL_RE_.test(str)) {
      return str;
    }
    if (str.indexOf("\x26") != -1) {
      str = str.replace(goog.string.AMP_RE_, "\x26amp;");
    }
    if (str.indexOf("\x3c") != -1) {
      str = str.replace(goog.string.LT_RE_, "\x26lt;");
    }
    if (str.indexOf("\x3e") != -1) {
      str = str.replace(goog.string.GT_RE_, "\x26gt;");
    }
    if (str.indexOf('"') != -1) {
      str = str.replace(goog.string.QUOT_RE_, "\x26quot;");
    }
    if (str.indexOf("'") != -1) {
      str = str.replace(goog.string.SINGLE_QUOTE_RE_, "\x26#39;");
    }
    if (str.indexOf("\x00") != -1) {
      str = str.replace(goog.string.NULL_RE_, "\x26#0;");
    }
    if (goog.string.DETECT_DOUBLE_ESCAPING && str.indexOf("e") != -1) {
      str = str.replace(goog.string.E_RE_, "\x26#101;");
    }
    return str;
  }
};
goog.string.AMP_RE_ = /&/g;
goog.string.LT_RE_ = /</g;
goog.string.GT_RE_ = />/g;
goog.string.QUOT_RE_ = /"/g;
goog.string.SINGLE_QUOTE_RE_ = /'/g;
goog.string.NULL_RE_ = /\x00/g;
goog.string.E_RE_ = /e/g;
goog.string.ALL_RE_ = goog.string.DETECT_DOUBLE_ESCAPING ? /[\x00&<>"'e]/ : /[\x00&<>"']/;
goog.string.unescapeEntities = function(str) {
  if (goog.string.contains(str, "\x26")) {
    if (!goog.string.FORCE_NON_DOM_HTML_UNESCAPING && "document" in goog.global) {
      return goog.string.unescapeEntitiesUsingDom_(str);
    } else {
      return goog.string.unescapePureXmlEntities_(str);
    }
  }
  return str;
};
goog.string.unescapeEntitiesWithDocument = function(str, document) {
  if (goog.string.contains(str, "\x26")) {
    return goog.string.unescapeEntitiesUsingDom_(str, document);
  }
  return str;
};
goog.string.unescapeEntitiesUsingDom_ = function(str, opt_document) {
  var seen = {"\x26amp;":"\x26", "\x26lt;":"\x3c", "\x26gt;":"\x3e", "\x26quot;":'"'};
  var div;
  if (opt_document) {
    div = opt_document.createElement("div");
  } else {
    div = goog.global.document.createElement("div");
  }
  return str.replace(goog.string.HTML_ENTITY_PATTERN_, function(s, entity) {
    var value = seen[s];
    if (value) {
      return value;
    }
    if (entity.charAt(0) == "#") {
      var n = Number("0" + entity.substr(1));
      if (!isNaN(n)) {
        value = String.fromCharCode(n);
      }
    }
    if (!value) {
      div.innerHTML = s + " ";
      value = div.firstChild.nodeValue.slice(0, -1);
    }
    return seen[s] = value;
  });
};
goog.string.unescapePureXmlEntities_ = function(str) {
  return str.replace(/&([^;]+);/g, function(s, entity) {
    switch(entity) {
      case "amp":
        return "\x26";
      case "lt":
        return "\x3c";
      case "gt":
        return "\x3e";
      case "quot":
        return '"';
      default:
        if (entity.charAt(0) == "#") {
          var n = Number("0" + entity.substr(1));
          if (!isNaN(n)) {
            return String.fromCharCode(n);
          }
        }
        return s;
    }
  });
};
goog.string.HTML_ENTITY_PATTERN_ = /&([^;\s<&]+);?/g;
goog.string.whitespaceEscape = function(str, opt_xml) {
  return goog.string.newLineToBr(str.replace(/  /g, " \x26#160;"), opt_xml);
};
goog.string.preserveSpaces = function(str) {
  return str.replace(/(^|[\n ]) /g, "$1" + goog.string.Unicode.NBSP);
};
goog.string.stripQuotes = function(str, quoteChars) {
  var length = quoteChars.length;
  for (var i = 0;i < length;i++) {
    var quoteChar = length == 1 ? quoteChars : quoteChars.charAt(i);
    if (str.charAt(0) == quoteChar && str.charAt(str.length - 1) == quoteChar) {
      return str.substring(1, str.length - 1);
    }
  }
  return str;
};
goog.string.truncate = function(str, chars, opt_protectEscapedCharacters) {
  if (opt_protectEscapedCharacters) {
    str = goog.string.unescapeEntities(str);
  }
  if (str.length > chars) {
    str = str.substring(0, chars - 3) + "...";
  }
  if (opt_protectEscapedCharacters) {
    str = goog.string.htmlEscape(str);
  }
  return str;
};
goog.string.truncateMiddle = function(str, chars, opt_protectEscapedCharacters, opt_trailingChars) {
  if (opt_protectEscapedCharacters) {
    str = goog.string.unescapeEntities(str);
  }
  if (opt_trailingChars && str.length > chars) {
    if (opt_trailingChars > chars) {
      opt_trailingChars = chars;
    }
    var endPoint = str.length - opt_trailingChars;
    var startPoint = chars - opt_trailingChars;
    str = str.substring(0, startPoint) + "..." + str.substring(endPoint);
  } else {
    if (str.length > chars) {
      var half = Math.floor(chars / 2);
      var endPos = str.length - half;
      half += chars % 2;
      str = str.substring(0, half) + "..." + str.substring(endPos);
    }
  }
  if (opt_protectEscapedCharacters) {
    str = goog.string.htmlEscape(str);
  }
  return str;
};
goog.string.specialEscapeChars_ = {"\x00":"\\0", "\b":"\\b", "\f":"\\f", "\n":"\\n", "\r":"\\r", "\t":"\\t", "\x0B":"\\x0B", '"':'\\"', "\\":"\\\\", "\x3c":"\x3c"};
goog.string.jsEscapeCache_ = {"'":"\\'"};
goog.string.quote = function(s) {
  s = String(s);
  var sb = ['"'];
  for (var i = 0;i < s.length;i++) {
    var ch = s.charAt(i);
    var cc = ch.charCodeAt(0);
    sb[i + 1] = goog.string.specialEscapeChars_[ch] || (cc > 31 && cc < 127 ? ch : goog.string.escapeChar(ch));
  }
  sb.push('"');
  return sb.join("");
};
goog.string.escapeString = function(str) {
  var sb = [];
  for (var i = 0;i < str.length;i++) {
    sb[i] = goog.string.escapeChar(str.charAt(i));
  }
  return sb.join("");
};
goog.string.escapeChar = function(c) {
  if (c in goog.string.jsEscapeCache_) {
    return goog.string.jsEscapeCache_[c];
  }
  if (c in goog.string.specialEscapeChars_) {
    return goog.string.jsEscapeCache_[c] = goog.string.specialEscapeChars_[c];
  }
  var rv = c;
  var cc = c.charCodeAt(0);
  if (cc > 31 && cc < 127) {
    rv = c;
  } else {
    if (cc < 256) {
      rv = "\\x";
      if (cc < 16 || cc > 256) {
        rv += "0";
      }
    } else {
      rv = "\\u";
      if (cc < 4096) {
        rv += "0";
      }
    }
    rv += cc.toString(16).toUpperCase();
  }
  return goog.string.jsEscapeCache_[c] = rv;
};
goog.string.contains = function(str, subString) {
  return str.indexOf(subString) != -1;
};
goog.string.caseInsensitiveContains = function(str, subString) {
  return goog.string.contains(str.toLowerCase(), subString.toLowerCase());
};
goog.string.countOf = function(s, ss) {
  return s && ss ? s.split(ss).length - 1 : 0;
};
goog.string.removeAt = function(s, index, stringLength) {
  var resultStr = s;
  if (index >= 0 && index < s.length && stringLength > 0) {
    resultStr = s.substr(0, index) + s.substr(index + stringLength, s.length - index - stringLength);
  }
  return resultStr;
};
goog.string.remove = function(s, ss) {
  var re = new RegExp(goog.string.regExpEscape(ss), "");
  return s.replace(re, "");
};
goog.string.removeAll = function(s, ss) {
  var re = new RegExp(goog.string.regExpEscape(ss), "g");
  return s.replace(re, "");
};
goog.string.regExpEscape = function(s) {
  return String(s).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, "\\$1").replace(/\x08/g, "\\x08");
};
goog.string.repeat = String.prototype.repeat ? function(string, length) {
  return string.repeat(length);
} : function(string, length) {
  return (new Array(length + 1)).join(string);
};
goog.string.padNumber = function(num, length, opt_precision) {
  var s = goog.isDef(opt_precision) ? num.toFixed(opt_precision) : String(num);
  var index = s.indexOf(".");
  if (index == -1) {
    index = s.length;
  }
  return goog.string.repeat("0", Math.max(0, length - index)) + s;
};
goog.string.makeSafe = function(obj) {
  return obj == null ? "" : String(obj);
};
goog.string.buildString = function(var_args) {
  return Array.prototype.join.call(arguments, "");
};
goog.string.getRandomString = function() {
  var x = 2147483648;
  return Math.floor(Math.random() * x).toString(36) + Math.abs(Math.floor(Math.random() * x) ^ goog.now()).toString(36);
};
goog.string.compareVersions = function(version1, version2) {
  var order = 0;
  var v1Subs = goog.string.trim(String(version1)).split(".");
  var v2Subs = goog.string.trim(String(version2)).split(".");
  var subCount = Math.max(v1Subs.length, v2Subs.length);
  for (var subIdx = 0;order == 0 && subIdx < subCount;subIdx++) {
    var v1Sub = v1Subs[subIdx] || "";
    var v2Sub = v2Subs[subIdx] || "";
    var v1CompParser = new RegExp("(\\d*)(\\D*)", "g");
    var v2CompParser = new RegExp("(\\d*)(\\D*)", "g");
    do {
      var v1Comp = v1CompParser.exec(v1Sub) || ["", "", ""];
      var v2Comp = v2CompParser.exec(v2Sub) || ["", "", ""];
      if (v1Comp[0].length == 0 && v2Comp[0].length == 0) {
        break;
      }
      var v1CompNum = v1Comp[1].length == 0 ? 0 : parseInt(v1Comp[1], 10);
      var v2CompNum = v2Comp[1].length == 0 ? 0 : parseInt(v2Comp[1], 10);
      order = goog.string.compareElements_(v1CompNum, v2CompNum) || goog.string.compareElements_(v1Comp[2].length == 0, v2Comp[2].length == 0) || goog.string.compareElements_(v1Comp[2], v2Comp[2]);
    } while (order == 0);
  }
  return order;
};
goog.string.compareElements_ = function(left, right) {
  if (left < right) {
    return -1;
  } else {
    if (left > right) {
      return 1;
    }
  }
  return 0;
};
goog.string.hashCode = function(str) {
  var result = 0;
  for (var i = 0;i < str.length;++i) {
    result = 31 * result + str.charCodeAt(i) >>> 0;
  }
  return result;
};
goog.string.uniqueStringCounter_ = Math.random() * 2147483648 | 0;
goog.string.createUniqueString = function() {
  return "goog_" + goog.string.uniqueStringCounter_++;
};
goog.string.toNumber = function(str) {
  var num = Number(str);
  if (num == 0 && goog.string.isEmptyOrWhitespace(str)) {
    return NaN;
  }
  return num;
};
goog.string.isLowerCamelCase = function(str) {
  return /^[a-z]+([A-Z][a-z]*)*$/.test(str);
};
goog.string.isUpperCamelCase = function(str) {
  return /^([A-Z][a-z]*)+$/.test(str);
};
goog.string.toCamelCase = function(str) {
  return String(str).replace(/\-([a-z])/g, function(all, match) {
    return match.toUpperCase();
  });
};
goog.string.toSelectorCase = function(str) {
  return String(str).replace(/([A-Z])/g, "-$1").toLowerCase();
};
goog.string.toTitleCase = function(str, opt_delimiters) {
  var delimiters = goog.isString(opt_delimiters) ? goog.string.regExpEscape(opt_delimiters) : "\\s";
  delimiters = delimiters ? "|[" + delimiters + "]+" : "";
  var regexp = new RegExp("(^" + delimiters + ")([a-z])", "g");
  return str.replace(regexp, function(all, p1, p2) {
    return p1 + p2.toUpperCase();
  });
};
goog.string.capitalize = function(str) {
  return String(str.charAt(0)).toUpperCase() + String(str.substr(1)).toLowerCase();
};
goog.string.parseInt = function(value) {
  if (isFinite(value)) {
    value = String(value);
  }
  if (goog.isString(value)) {
    return /^\s*-?0x/i.test(value) ? parseInt(value, 16) : parseInt(value, 10);
  }
  return NaN;
};
goog.string.splitLimit = function(str, separator, limit) {
  var parts = str.split(separator);
  var returnVal = [];
  while (limit > 0 && parts.length) {
    returnVal.push(parts.shift());
    limit--;
  }
  if (parts.length) {
    returnVal.push(parts.join(separator));
  }
  return returnVal;
};
goog.string.editDistance = function(a, b) {
  var v0 = [];
  var v1 = [];
  if (a == b) {
    return 0;
  }
  if (!a.length || !b.length) {
    return Math.max(a.length, b.length);
  }
  for (var i = 0;i < b.length + 1;i++) {
    v0[i] = i;
  }
  for (var i = 0;i < a.length;i++) {
    v1[0] = i + 1;
    for (var j = 0;j < b.length;j++) {
      var cost = a[i] != b[j];
      v1[j + 1] = Math.min(v1[j] + 1, v0[j + 1] + 1, v0[j] + cost);
    }
    for (var j = 0;j < v0.length;j++) {
      v0[j] = v1[j];
    }
  }
  return v1[b.length];
};
goog.provide("goog.object");
goog.object.forEach = function(obj, f, opt_obj) {
  for (var key in obj) {
    f.call(opt_obj, obj[key], key, obj);
  }
};
goog.object.filter = function(obj, f, opt_obj) {
  var res = {};
  for (var key in obj) {
    if (f.call(opt_obj, obj[key], key, obj)) {
      res[key] = obj[key];
    }
  }
  return res;
};
goog.object.map = function(obj, f, opt_obj) {
  var res = {};
  for (var key in obj) {
    res[key] = f.call(opt_obj, obj[key], key, obj);
  }
  return res;
};
goog.object.some = function(obj, f, opt_obj) {
  for (var key in obj) {
    if (f.call(opt_obj, obj[key], key, obj)) {
      return true;
    }
  }
  return false;
};
goog.object.every = function(obj, f, opt_obj) {
  for (var key in obj) {
    if (!f.call(opt_obj, obj[key], key, obj)) {
      return false;
    }
  }
  return true;
};
goog.object.getCount = function(obj) {
  var rv = 0;
  for (var key in obj) {
    rv++;
  }
  return rv;
};
goog.object.getAnyKey = function(obj) {
  for (var key in obj) {
    return key;
  }
};
goog.object.getAnyValue = function(obj) {
  for (var key in obj) {
    return obj[key];
  }
};
goog.object.contains = function(obj, val) {
  return goog.object.containsValue(obj, val);
};
goog.object.getValues = function(obj) {
  var res = [];
  var i = 0;
  for (var key in obj) {
    res[i++] = obj[key];
  }
  return res;
};
goog.object.getKeys = function(obj) {
  var res = [];
  var i = 0;
  for (var key in obj) {
    res[i++] = key;
  }
  return res;
};
goog.object.getValueByKeys = function(obj, var_args) {
  var isArrayLike = goog.isArrayLike(var_args);
  var keys = isArrayLike ? var_args : arguments;
  for (var i = isArrayLike ? 0 : 1;i < keys.length;i++) {
    obj = obj[keys[i]];
    if (!goog.isDef(obj)) {
      break;
    }
  }
  return obj;
};
goog.object.containsKey = function(obj, key) {
  return obj !== null && key in obj;
};
goog.object.containsValue = function(obj, val) {
  for (var key in obj) {
    if (obj[key] == val) {
      return true;
    }
  }
  return false;
};
goog.object.findKey = function(obj, f, opt_this) {
  for (var key in obj) {
    if (f.call(opt_this, obj[key], key, obj)) {
      return key;
    }
  }
  return undefined;
};
goog.object.findValue = function(obj, f, opt_this) {
  var key = goog.object.findKey(obj, f, opt_this);
  return key && obj[key];
};
goog.object.isEmpty = function(obj) {
  for (var key in obj) {
    return false;
  }
  return true;
};
goog.object.clear = function(obj) {
  for (var i in obj) {
    delete obj[i];
  }
};
goog.object.remove = function(obj, key) {
  var rv;
  if (rv = key in (obj)) {
    delete obj[key];
  }
  return rv;
};
goog.object.add = function(obj, key, val) {
  if (obj !== null && key in obj) {
    throw Error('The object already contains the key "' + key + '"');
  }
  goog.object.set(obj, key, val);
};
goog.object.get = function(obj, key, opt_val) {
  if (obj !== null && key in obj) {
    return obj[key];
  }
  return opt_val;
};
goog.object.set = function(obj, key, value) {
  obj[key] = value;
};
goog.object.setIfUndefined = function(obj, key, value) {
  return key in (obj) ? obj[key] : obj[key] = value;
};
goog.object.setWithReturnValueIfNotSet = function(obj, key, f) {
  if (key in obj) {
    return obj[key];
  }
  var val = f();
  obj[key] = val;
  return val;
};
goog.object.equals = function(a, b) {
  for (var k in a) {
    if (!(k in b) || a[k] !== b[k]) {
      return false;
    }
  }
  for (var k in b) {
    if (!(k in a)) {
      return false;
    }
  }
  return true;
};
goog.object.clone = function(obj) {
  var res = {};
  for (var key in obj) {
    res[key] = obj[key];
  }
  return res;
};
goog.object.unsafeClone = function(obj) {
  var type = goog.typeOf(obj);
  if (type == "object" || type == "array") {
    if (goog.isFunction(obj.clone)) {
      return obj.clone();
    }
    var clone = type == "array" ? [] : {};
    for (var key in obj) {
      clone[key] = goog.object.unsafeClone(obj[key]);
    }
    return clone;
  }
  return obj;
};
goog.object.transpose = function(obj) {
  var transposed = {};
  for (var key in obj) {
    transposed[obj[key]] = key;
  }
  return transposed;
};
goog.object.PROTOTYPE_FIELDS_ = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf"];
goog.object.extend = function(target, var_args) {
  var key, source;
  for (var i = 1;i < arguments.length;i++) {
    source = arguments[i];
    for (key in source) {
      target[key] = source[key];
    }
    for (var j = 0;j < goog.object.PROTOTYPE_FIELDS_.length;j++) {
      key = goog.object.PROTOTYPE_FIELDS_[j];
      if (Object.prototype.hasOwnProperty.call(source, key)) {
        target[key] = source[key];
      }
    }
  }
};
goog.object.create = function(var_args) {
  var argLength = arguments.length;
  if (argLength == 1 && goog.isArray(arguments[0])) {
    return goog.object.create.apply(null, arguments[0]);
  }
  if (argLength % 2) {
    throw Error("Uneven number of arguments");
  }
  var rv = {};
  for (var i = 0;i < argLength;i += 2) {
    rv[arguments[i]] = arguments[i + 1];
  }
  return rv;
};
goog.object.createSet = function(var_args) {
  var argLength = arguments.length;
  if (argLength == 1 && goog.isArray(arguments[0])) {
    return goog.object.createSet.apply(null, arguments[0]);
  }
  var rv = {};
  for (var i = 0;i < argLength;i++) {
    rv[arguments[i]] = true;
  }
  return rv;
};
goog.object.createImmutableView = function(obj) {
  var result = obj;
  if (Object.isFrozen && !Object.isFrozen(obj)) {
    result = Object.create(obj);
    Object.freeze(result);
  }
  return result;
};
goog.object.isImmutableView = function(obj) {
  return !!Object.isFrozen && Object.isFrozen(obj);
};
goog.provide("goog.string.StringBuffer");
goog.string.StringBuffer = function(opt_a1, var_args) {
  if (opt_a1 != null) {
    this.append.apply(this, arguments);
  }
};
goog.string.StringBuffer.prototype.buffer_ = "";
goog.string.StringBuffer.prototype.set = function(s) {
  this.buffer_ = "" + s;
};
goog.string.StringBuffer.prototype.append = function(a1, opt_a2, var_args) {
  this.buffer_ += a1;
  if (opt_a2 != null) {
    for (var i = 1;i < arguments.length;i++) {
      this.buffer_ += arguments[i];
    }
  }
  return this;
};
goog.string.StringBuffer.prototype.clear = function() {
  this.buffer_ = "";
};
goog.string.StringBuffer.prototype.getLength = function() {
  return this.buffer_.length;
};
goog.string.StringBuffer.prototype.toString = function() {
  return this.buffer_;
};
goog.provide("goog.debug.Error");
goog.debug.Error = function(opt_msg) {
  if (Error.captureStackTrace) {
    Error.captureStackTrace(this, goog.debug.Error);
  } else {
    var stack = (new Error).stack;
    if (stack) {
      this.stack = stack;
    }
  }
  if (opt_msg) {
    this.message = String(opt_msg);
  }
  this.reportErrorToServer = true;
};
goog.inherits(goog.debug.Error, Error);
goog.debug.Error.prototype.name = "CustomError";
goog.provide("goog.dom.NodeType");
goog.dom.NodeType = {ELEMENT:1, ATTRIBUTE:2, TEXT:3, CDATA_SECTION:4, ENTITY_REFERENCE:5, ENTITY:6, PROCESSING_INSTRUCTION:7, COMMENT:8, DOCUMENT:9, DOCUMENT_TYPE:10, DOCUMENT_FRAGMENT:11, NOTATION:12};
goog.provide("goog.asserts");
goog.provide("goog.asserts.AssertionError");
goog.require("goog.debug.Error");
goog.require("goog.dom.NodeType");
goog.require("goog.string");
goog.define("goog.asserts.ENABLE_ASSERTS", goog.DEBUG);
goog.asserts.AssertionError = function(messagePattern, messageArgs) {
  messageArgs.unshift(messagePattern);
  goog.debug.Error.call(this, goog.string.subs.apply(null, messageArgs));
  messageArgs.shift();
  this.messagePattern = messagePattern;
};
goog.inherits(goog.asserts.AssertionError, goog.debug.Error);
goog.asserts.AssertionError.prototype.name = "AssertionError";
goog.asserts.DEFAULT_ERROR_HANDLER = function(e) {
  throw e;
};
goog.asserts.errorHandler_ = goog.asserts.DEFAULT_ERROR_HANDLER;
goog.asserts.doAssertFailure_ = function(defaultMessage, defaultArgs, givenMessage, givenArgs) {
  var message = "Assertion failed";
  if (givenMessage) {
    message += ": " + givenMessage;
    var args = givenArgs;
  } else {
    if (defaultMessage) {
      message += ": " + defaultMessage;
      args = defaultArgs;
    }
  }
  var e = new goog.asserts.AssertionError("" + message, args || []);
  goog.asserts.errorHandler_(e);
};
goog.asserts.setErrorHandler = function(errorHandler) {
  if (goog.asserts.ENABLE_ASSERTS) {
    goog.asserts.errorHandler_ = errorHandler;
  }
};
goog.asserts.assert = function(condition, opt_message, var_args) {
  if (goog.asserts.ENABLE_ASSERTS && !condition) {
    goog.asserts.doAssertFailure_("", null, opt_message, Array.prototype.slice.call(arguments, 2));
  }
  return condition;
};
goog.asserts.fail = function(opt_message, var_args) {
  if (goog.asserts.ENABLE_ASSERTS) {
    goog.asserts.errorHandler_(new goog.asserts.AssertionError("Failure" + (opt_message ? ": " + opt_message : ""), Array.prototype.slice.call(arguments, 1)));
  }
};
goog.asserts.assertNumber = function(value, opt_message, var_args) {
  if (goog.asserts.ENABLE_ASSERTS && !goog.isNumber(value)) {
    goog.asserts.doAssertFailure_("Expected number but got %s: %s.", [goog.typeOf(value), value], opt_message, Array.prototype.slice.call(arguments, 2));
  }
  return (value);
};
goog.asserts.assertString = function(value, opt_message, var_args) {
  if (goog.asserts.ENABLE_ASSERTS && !goog.isString(value)) {
    goog.asserts.doAssertFailure_("Expected string but got %s: %s.", [goog.typeOf(value), value], opt_message, Array.prototype.slice.call(arguments, 2));
  }
  return (value);
};
goog.asserts.assertFunction = function(value, opt_message, var_args) {
  if (goog.asserts.ENABLE_ASSERTS && !goog.isFunction(value)) {
    goog.asserts.doAssertFailure_("Expected function but got %s: %s.", [goog.typeOf(value), value], opt_message, Array.prototype.slice.call(arguments, 2));
  }
  return (value);
};
goog.asserts.assertObject = function(value, opt_message, var_args) {
  if (goog.asserts.ENABLE_ASSERTS && !goog.isObject(value)) {
    goog.asserts.doAssertFailure_("Expected object but got %s: %s.", [goog.typeOf(value), value], opt_message, Array.prototype.slice.call(arguments, 2));
  }
  return (value);
};
goog.asserts.assertArray = function(value, opt_message, var_args) {
  if (goog.asserts.ENABLE_ASSERTS && !goog.isArray(value)) {
    goog.asserts.doAssertFailure_("Expected array but got %s: %s.", [goog.typeOf(value), value], opt_message, Array.prototype.slice.call(arguments, 2));
  }
  return (value);
};
goog.asserts.assertBoolean = function(value, opt_message, var_args) {
  if (goog.asserts.ENABLE_ASSERTS && !goog.isBoolean(value)) {
    goog.asserts.doAssertFailure_("Expected boolean but got %s: %s.", [goog.typeOf(value), value], opt_message, Array.prototype.slice.call(arguments, 2));
  }
  return (value);
};
goog.asserts.assertElement = function(value, opt_message, var_args) {
  if (goog.asserts.ENABLE_ASSERTS && (!goog.isObject(value) || value.nodeType != goog.dom.NodeType.ELEMENT)) {
    goog.asserts.doAssertFailure_("Expected Element but got %s: %s.", [goog.typeOf(value), value], opt_message, Array.prototype.slice.call(arguments, 2));
  }
  return (value);
};
goog.asserts.assertInstanceof = function(value, type, opt_message, var_args) {
  if (goog.asserts.ENABLE_ASSERTS && !(value instanceof type)) {
    goog.asserts.doAssertFailure_("Expected instanceof %s but got %s.", [goog.asserts.getType_(type), goog.asserts.getType_(value)], opt_message, Array.prototype.slice.call(arguments, 3));
  }
  return value;
};
goog.asserts.assertObjectPrototypeIsIntact = function() {
  for (var key in Object.prototype) {
    goog.asserts.fail(key + " should not be enumerable in Object.prototype.");
  }
};
goog.asserts.getType_ = function(value) {
  if (value instanceof Function) {
    return value.displayName || value.name || "unknown type name";
  } else {
    if (value instanceof Object) {
      return value.constructor.displayName || value.constructor.name || Object.prototype.toString.call(value);
    } else {
      return value === null ? "null" : typeof value;
    }
  }
};
goog.provide("goog.array");
goog.provide("goog.array.ArrayLike");
goog.require("goog.asserts");
goog.define("goog.NATIVE_ARRAY_PROTOTYPES", goog.TRUSTED_SITE);
goog.define("goog.array.ASSUME_NATIVE_FUNCTIONS", false);
goog.array.ArrayLike;
goog.array.peek = function(array) {
  return array[array.length - 1];
};
goog.array.last = goog.array.peek;
goog.array.ARRAY_PROTOTYPE_ = Array.prototype;
goog.array.indexOf = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || goog.array.ARRAY_PROTOTYPE_.indexOf) ? function(arr, obj, opt_fromIndex) {
  goog.asserts.assert(arr.length != null);
  return goog.array.ARRAY_PROTOTYPE_.indexOf.call(arr, obj, opt_fromIndex);
} : function(arr, obj, opt_fromIndex) {
  var fromIndex = opt_fromIndex == null ? 0 : opt_fromIndex < 0 ? Math.max(0, arr.length + opt_fromIndex) : opt_fromIndex;
  if (goog.isString(arr)) {
    if (!goog.isString(obj) || obj.length != 1) {
      return -1;
    }
    return arr.indexOf(obj, fromIndex);
  }
  for (var i = fromIndex;i < arr.length;i++) {
    if (i in arr && arr[i] === obj) {
      return i;
    }
  }
  return -1;
};
goog.array.lastIndexOf = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || goog.array.ARRAY_PROTOTYPE_.lastIndexOf) ? function(arr, obj, opt_fromIndex) {
  goog.asserts.assert(arr.length != null);
  var fromIndex = opt_fromIndex == null ? arr.length - 1 : opt_fromIndex;
  return goog.array.ARRAY_PROTOTYPE_.lastIndexOf.call(arr, obj, fromIndex);
} : function(arr, obj, opt_fromIndex) {
  var fromIndex = opt_fromIndex == null ? arr.length - 1 : opt_fromIndex;
  if (fromIndex < 0) {
    fromIndex = Math.max(0, arr.length + fromIndex);
  }
  if (goog.isString(arr)) {
    if (!goog.isString(obj) || obj.length != 1) {
      return -1;
    }
    return arr.lastIndexOf(obj, fromIndex);
  }
  for (var i = fromIndex;i >= 0;i--) {
    if (i in arr && arr[i] === obj) {
      return i;
    }
  }
  return -1;
};
goog.array.forEach = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || goog.array.ARRAY_PROTOTYPE_.forEach) ? function(arr, f, opt_obj) {
  goog.asserts.assert(arr.length != null);
  goog.array.ARRAY_PROTOTYPE_.forEach.call(arr, f, opt_obj);
} : function(arr, f, opt_obj) {
  var l = arr.length;
  var arr2 = goog.isString(arr) ? arr.split("") : arr;
  for (var i = 0;i < l;i++) {
    if (i in arr2) {
      f.call(opt_obj, arr2[i], i, arr);
    }
  }
};
goog.array.forEachRight = function(arr, f, opt_obj) {
  var l = arr.length;
  var arr2 = goog.isString(arr) ? arr.split("") : arr;
  for (var i = l - 1;i >= 0;--i) {
    if (i in arr2) {
      f.call(opt_obj, arr2[i], i, arr);
    }
  }
};
goog.array.filter = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || goog.array.ARRAY_PROTOTYPE_.filter) ? function(arr, f, opt_obj) {
  goog.asserts.assert(arr.length != null);
  return goog.array.ARRAY_PROTOTYPE_.filter.call(arr, f, opt_obj);
} : function(arr, f, opt_obj) {
  var l = arr.length;
  var res = [];
  var resLength = 0;
  var arr2 = goog.isString(arr) ? arr.split("") : arr;
  for (var i = 0;i < l;i++) {
    if (i in arr2) {
      var val = arr2[i];
      if (f.call(opt_obj, val, i, arr)) {
        res[resLength++] = val;
      }
    }
  }
  return res;
};
goog.array.map = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || goog.array.ARRAY_PROTOTYPE_.map) ? function(arr, f, opt_obj) {
  goog.asserts.assert(arr.length != null);
  return goog.array.ARRAY_PROTOTYPE_.map.call(arr, f, opt_obj);
} : function(arr, f, opt_obj) {
  var l = arr.length;
  var res = new Array(l);
  var arr2 = goog.isString(arr) ? arr.split("") : arr;
  for (var i = 0;i < l;i++) {
    if (i in arr2) {
      res[i] = f.call(opt_obj, arr2[i], i, arr);
    }
  }
  return res;
};
goog.array.reduce = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || goog.array.ARRAY_PROTOTYPE_.reduce) ? function(arr, f, val, opt_obj) {
  goog.asserts.assert(arr.length != null);
  if (opt_obj) {
    f = goog.bind(f, opt_obj);
  }
  return goog.array.ARRAY_PROTOTYPE_.reduce.call(arr, f, val);
} : function(arr, f, val, opt_obj) {
  var rval = val;
  goog.array.forEach(arr, function(val, index) {
    rval = f.call(opt_obj, rval, val, index, arr);
  });
  return rval;
};
goog.array.reduceRight = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || goog.array.ARRAY_PROTOTYPE_.reduceRight) ? function(arr, f, val, opt_obj) {
  goog.asserts.assert(arr.length != null);
  if (opt_obj) {
    f = goog.bind(f, opt_obj);
  }
  return goog.array.ARRAY_PROTOTYPE_.reduceRight.call(arr, f, val);
} : function(arr, f, val, opt_obj) {
  var rval = val;
  goog.array.forEachRight(arr, function(val, index) {
    rval = f.call(opt_obj, rval, val, index, arr);
  });
  return rval;
};
goog.array.some = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || goog.array.ARRAY_PROTOTYPE_.some) ? function(arr, f, opt_obj) {
  goog.asserts.assert(arr.length != null);
  return goog.array.ARRAY_PROTOTYPE_.some.call(arr, f, opt_obj);
} : function(arr, f, opt_obj) {
  var l = arr.length;
  var arr2 = goog.isString(arr) ? arr.split("") : arr;
  for (var i = 0;i < l;i++) {
    if (i in arr2 && f.call(opt_obj, arr2[i], i, arr)) {
      return true;
    }
  }
  return false;
};
goog.array.every = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || goog.array.ARRAY_PROTOTYPE_.every) ? function(arr, f, opt_obj) {
  goog.asserts.assert(arr.length != null);
  return goog.array.ARRAY_PROTOTYPE_.every.call(arr, f, opt_obj);
} : function(arr, f, opt_obj) {
  var l = arr.length;
  var arr2 = goog.isString(arr) ? arr.split("") : arr;
  for (var i = 0;i < l;i++) {
    if (i in arr2 && !f.call(opt_obj, arr2[i], i, arr)) {
      return false;
    }
  }
  return true;
};
goog.array.count = function(arr, f, opt_obj) {
  var count = 0;
  goog.array.forEach(arr, function(element, index, arr) {
    if (f.call(opt_obj, element, index, arr)) {
      ++count;
    }
  }, opt_obj);
  return count;
};
goog.array.find = function(arr, f, opt_obj) {
  var i = goog.array.findIndex(arr, f, opt_obj);
  return i < 0 ? null : goog.isString(arr) ? arr.charAt(i) : arr[i];
};
goog.array.findIndex = function(arr, f, opt_obj) {
  var l = arr.length;
  var arr2 = goog.isString(arr) ? arr.split("") : arr;
  for (var i = 0;i < l;i++) {
    if (i in arr2 && f.call(opt_obj, arr2[i], i, arr)) {
      return i;
    }
  }
  return -1;
};
goog.array.findRight = function(arr, f, opt_obj) {
  var i = goog.array.findIndexRight(arr, f, opt_obj);
  return i < 0 ? null : goog.isString(arr) ? arr.charAt(i) : arr[i];
};
goog.array.findIndexRight = function(arr, f, opt_obj) {
  var l = arr.length;
  var arr2 = goog.isString(arr) ? arr.split("") : arr;
  for (var i = l - 1;i >= 0;i--) {
    if (i in arr2 && f.call(opt_obj, arr2[i], i, arr)) {
      return i;
    }
  }
  return -1;
};
goog.array.contains = function(arr, obj) {
  return goog.array.indexOf(arr, obj) >= 0;
};
goog.array.isEmpty = function(arr) {
  return arr.length == 0;
};
goog.array.clear = function(arr) {
  if (!goog.isArray(arr)) {
    for (var i = arr.length - 1;i >= 0;i--) {
      delete arr[i];
    }
  }
  arr.length = 0;
};
goog.array.insert = function(arr, obj) {
  if (!goog.array.contains(arr, obj)) {
    arr.push(obj);
  }
};
goog.array.insertAt = function(arr, obj, opt_i) {
  goog.array.splice(arr, opt_i, 0, obj);
};
goog.array.insertArrayAt = function(arr, elementsToAdd, opt_i) {
  goog.partial(goog.array.splice, arr, opt_i, 0).apply(null, elementsToAdd);
};
goog.array.insertBefore = function(arr, obj, opt_obj2) {
  var i;
  if (arguments.length == 2 || (i = goog.array.indexOf(arr, opt_obj2)) < 0) {
    arr.push(obj);
  } else {
    goog.array.insertAt(arr, obj, i);
  }
};
goog.array.remove = function(arr, obj) {
  var i = goog.array.indexOf(arr, obj);
  var rv;
  if (rv = i >= 0) {
    goog.array.removeAt(arr, i);
  }
  return rv;
};
goog.array.removeAt = function(arr, i) {
  goog.asserts.assert(arr.length != null);
  return goog.array.ARRAY_PROTOTYPE_.splice.call(arr, i, 1).length == 1;
};
goog.array.removeIf = function(arr, f, opt_obj) {
  var i = goog.array.findIndex(arr, f, opt_obj);
  if (i >= 0) {
    goog.array.removeAt(arr, i);
    return true;
  }
  return false;
};
goog.array.removeAllIf = function(arr, f, opt_obj) {
  var removedCount = 0;
  goog.array.forEachRight(arr, function(val, index) {
    if (f.call(opt_obj, val, index, arr)) {
      if (goog.array.removeAt(arr, index)) {
        removedCount++;
      }
    }
  });
  return removedCount;
};
goog.array.concat = function(var_args) {
  return goog.array.ARRAY_PROTOTYPE_.concat.apply(goog.array.ARRAY_PROTOTYPE_, arguments);
};
goog.array.join = function(var_args) {
  return goog.array.ARRAY_PROTOTYPE_.concat.apply(goog.array.ARRAY_PROTOTYPE_, arguments);
};
goog.array.toArray = function(object) {
  var length = object.length;
  if (length > 0) {
    var rv = new Array(length);
    for (var i = 0;i < length;i++) {
      rv[i] = object[i];
    }
    return rv;
  }
  return [];
};
goog.array.clone = goog.array.toArray;
goog.array.extend = function(arr1, var_args) {
  for (var i = 1;i < arguments.length;i++) {
    var arr2 = arguments[i];
    if (goog.isArrayLike(arr2)) {
      var len1 = arr1.length || 0;
      var len2 = arr2.length || 0;
      arr1.length = len1 + len2;
      for (var j = 0;j < len2;j++) {
        arr1[len1 + j] = arr2[j];
      }
    } else {
      arr1.push(arr2);
    }
  }
};
goog.array.splice = function(arr, index, howMany, var_args) {
  goog.asserts.assert(arr.length != null);
  return goog.array.ARRAY_PROTOTYPE_.splice.apply(arr, goog.array.slice(arguments, 1));
};
goog.array.slice = function(arr, start, opt_end) {
  goog.asserts.assert(arr.length != null);
  if (arguments.length <= 2) {
    return goog.array.ARRAY_PROTOTYPE_.slice.call(arr, start);
  } else {
    return goog.array.ARRAY_PROTOTYPE_.slice.call(arr, start, opt_end);
  }
};
goog.array.removeDuplicates = function(arr, opt_rv, opt_hashFn) {
  var returnArray = opt_rv || arr;
  var defaultHashFn = function(item) {
    return goog.isObject(item) ? "o" + goog.getUid(item) : (typeof item).charAt(0) + item;
  };
  var hashFn = opt_hashFn || defaultHashFn;
  var seen = {}, cursorInsert = 0, cursorRead = 0;
  while (cursorRead < arr.length) {
    var current = arr[cursorRead++];
    var key = hashFn(current);
    if (!Object.prototype.hasOwnProperty.call(seen, key)) {
      seen[key] = true;
      returnArray[cursorInsert++] = current;
    }
  }
  returnArray.length = cursorInsert;
};
goog.array.binarySearch = function(arr, target, opt_compareFn) {
  return goog.array.binarySearch_(arr, opt_compareFn || goog.array.defaultCompare, false, target);
};
goog.array.binarySelect = function(arr, evaluator, opt_obj) {
  return goog.array.binarySearch_(arr, evaluator, true, undefined, opt_obj);
};
goog.array.binarySearch_ = function(arr, compareFn, isEvaluator, opt_target, opt_selfObj) {
  var left = 0;
  var right = arr.length;
  var found;
  while (left < right) {
    var middle = left + right >> 1;
    var compareResult;
    if (isEvaluator) {
      compareResult = compareFn.call(opt_selfObj, arr[middle], middle, arr);
    } else {
      compareResult = compareFn(opt_target, arr[middle]);
    }
    if (compareResult > 0) {
      left = middle + 1;
    } else {
      right = middle;
      found = !compareResult;
    }
  }
  return found ? left : ~left;
};
goog.array.sort = function(arr, opt_compareFn) {
  arr.sort(opt_compareFn || goog.array.defaultCompare);
};
goog.array.stableSort = function(arr, opt_compareFn) {
  for (var i = 0;i < arr.length;i++) {
    arr[i] = {index:i, value:arr[i]};
  }
  var valueCompareFn = opt_compareFn || goog.array.defaultCompare;
  function stableCompareFn(obj1, obj2) {
    return valueCompareFn(obj1.value, obj2.value) || obj1.index - obj2.index;
  }
  goog.array.sort(arr, stableCompareFn);
  for (var i = 0;i < arr.length;i++) {
    arr[i] = arr[i].value;
  }
};
goog.array.sortByKey = function(arr, keyFn, opt_compareFn) {
  var keyCompareFn = opt_compareFn || goog.array.defaultCompare;
  goog.array.sort(arr, function(a, b) {
    return keyCompareFn(keyFn(a), keyFn(b));
  });
};
goog.array.sortObjectsByKey = function(arr, key, opt_compareFn) {
  goog.array.sortByKey(arr, function(obj) {
    return obj[key];
  }, opt_compareFn);
};
goog.array.isSorted = function(arr, opt_compareFn, opt_strict) {
  var compare = opt_compareFn || goog.array.defaultCompare;
  for (var i = 1;i < arr.length;i++) {
    var compareResult = compare(arr[i - 1], arr[i]);
    if (compareResult > 0 || compareResult == 0 && opt_strict) {
      return false;
    }
  }
  return true;
};
goog.array.equals = function(arr1, arr2, opt_equalsFn) {
  if (!goog.isArrayLike(arr1) || !goog.isArrayLike(arr2) || arr1.length != arr2.length) {
    return false;
  }
  var l = arr1.length;
  var equalsFn = opt_equalsFn || goog.array.defaultCompareEquality;
  for (var i = 0;i < l;i++) {
    if (!equalsFn(arr1[i], arr2[i])) {
      return false;
    }
  }
  return true;
};
goog.array.compare3 = function(arr1, arr2, opt_compareFn) {
  var compare = opt_compareFn || goog.array.defaultCompare;
  var l = Math.min(arr1.length, arr2.length);
  for (var i = 0;i < l;i++) {
    var result = compare(arr1[i], arr2[i]);
    if (result != 0) {
      return result;
    }
  }
  return goog.array.defaultCompare(arr1.length, arr2.length);
};
goog.array.defaultCompare = function(a, b) {
  return a > b ? 1 : a < b ? -1 : 0;
};
goog.array.inverseDefaultCompare = function(a, b) {
  return -goog.array.defaultCompare(a, b);
};
goog.array.defaultCompareEquality = function(a, b) {
  return a === b;
};
goog.array.binaryInsert = function(array, value, opt_compareFn) {
  var index = goog.array.binarySearch(array, value, opt_compareFn);
  if (index < 0) {
    goog.array.insertAt(array, value, -(index + 1));
    return true;
  }
  return false;
};
goog.array.binaryRemove = function(array, value, opt_compareFn) {
  var index = goog.array.binarySearch(array, value, opt_compareFn);
  return index >= 0 ? goog.array.removeAt(array, index) : false;
};
goog.array.bucket = function(array, sorter, opt_obj) {
  var buckets = {};
  for (var i = 0;i < array.length;i++) {
    var value = array[i];
    var key = sorter.call(opt_obj, value, i, array);
    if (goog.isDef(key)) {
      var bucket = buckets[key] || (buckets[key] = []);
      bucket.push(value);
    }
  }
  return buckets;
};
goog.array.toObject = function(arr, keyFunc, opt_obj) {
  var ret = {};
  goog.array.forEach(arr, function(element, index) {
    ret[keyFunc.call(opt_obj, element, index, arr)] = element;
  });
  return ret;
};
goog.array.range = function(startOrEnd, opt_end, opt_step) {
  var array = [];
  var start = 0;
  var end = startOrEnd;
  var step = opt_step || 1;
  if (opt_end !== undefined) {
    start = startOrEnd;
    end = opt_end;
  }
  if (step * (end - start) < 0) {
    return [];
  }
  if (step > 0) {
    for (var i = start;i < end;i += step) {
      array.push(i);
    }
  } else {
    for (var i = start;i > end;i += step) {
      array.push(i);
    }
  }
  return array;
};
goog.array.repeat = function(value, n) {
  var array = [];
  for (var i = 0;i < n;i++) {
    array[i] = value;
  }
  return array;
};
goog.array.flatten = function(var_args) {
  var CHUNK_SIZE = 8192;
  var result = [];
  for (var i = 0;i < arguments.length;i++) {
    var element = arguments[i];
    if (goog.isArray(element)) {
      for (var c = 0;c < element.length;c += CHUNK_SIZE) {
        var chunk = goog.array.slice(element, c, c + CHUNK_SIZE);
        var recurseResult = goog.array.flatten.apply(null, chunk);
        for (var r = 0;r < recurseResult.length;r++) {
          result.push(recurseResult[r]);
        }
      }
    } else {
      result.push(element);
    }
  }
  return result;
};
goog.array.rotate = function(array, n) {
  goog.asserts.assert(array.length != null);
  if (array.length) {
    n %= array.length;
    if (n > 0) {
      goog.array.ARRAY_PROTOTYPE_.unshift.apply(array, array.splice(-n, n));
    } else {
      if (n < 0) {
        goog.array.ARRAY_PROTOTYPE_.push.apply(array, array.splice(0, -n));
      }
    }
  }
  return array;
};
goog.array.moveItem = function(arr, fromIndex, toIndex) {
  goog.asserts.assert(fromIndex >= 0 && fromIndex < arr.length);
  goog.asserts.assert(toIndex >= 0 && toIndex < arr.length);
  var removedItems = goog.array.ARRAY_PROTOTYPE_.splice.call(arr, fromIndex, 1);
  goog.array.ARRAY_PROTOTYPE_.splice.call(arr, toIndex, 0, removedItems[0]);
};
goog.array.zip = function(var_args) {
  if (!arguments.length) {
    return [];
  }
  var result = [];
  var minLen = arguments[0].length;
  for (var i = 1;i < arguments.length;i++) {
    if (arguments[i].length < minLen) {
      minLen = arguments[i].length;
    }
  }
  for (var i = 0;i < minLen;i++) {
    var value = [];
    for (var j = 0;j < arguments.length;j++) {
      value.push(arguments[j][i]);
    }
    result.push(value);
  }
  return result;
};
goog.array.shuffle = function(arr, opt_randFn) {
  var randFn = opt_randFn || Math.random;
  for (var i = arr.length - 1;i > 0;i--) {
    var j = Math.floor(randFn() * (i + 1));
    var tmp = arr[i];
    arr[i] = arr[j];
    arr[j] = tmp;
  }
};
goog.array.copyByIndex = function(arr, index_arr) {
  var result = [];
  goog.array.forEach(index_arr, function(index) {
    result.push(arr[index]);
  });
  return result;
};
goog.provide("cljs.core");
goog.require("goog.string");
goog.require("goog.object");
goog.require("goog.array");
goog.require("goog.string.StringBuffer");
cljs.core._STAR_clojurescript_version_STAR_ = "1.7.228";
cljs.core._STAR_unchecked_if_STAR_ = false;
goog.define("cljs.core._STAR_target_STAR_", "default");
cljs.core._STAR_ns_STAR_ = null;
cljs.core._STAR_out_STAR_ = null;
cljs.core._STAR_assert_STAR_ = true;
if (typeof cljs.core._STAR_print_fn_STAR_ !== "undefined") {
} else {
  cljs.core._STAR_print_fn_STAR_ = function cljs$core$_STAR_print_fn_STAR_(_) {
    throw new Error("No *print-fn* fn set for evaluation environment");
  };
}
if (typeof cljs.core._STAR_print_err_fn_STAR_ !== "undefined") {
} else {
  cljs.core._STAR_print_err_fn_STAR_ = function cljs$core$_STAR_print_err_fn_STAR_(_) {
    throw new Error("No *print-err-fn* fn set for evaluation environment");
  };
}
cljs.core.set_print_fn_BANG_ = function cljs$core$set_print_fn_BANG_(f) {
  return cljs.core._STAR_print_fn_STAR_ = f;
};
cljs.core.set_print_err_fn_BANG_ = function cljs$core$set_print_err_fn_BANG_(f) {
  return cljs.core._STAR_print_err_fn_STAR_ = f;
};
cljs.core._STAR_flush_on_newline_STAR_ = true;
cljs.core._STAR_print_newline_STAR_ = true;
cljs.core._STAR_print_readably_STAR_ = true;
cljs.core._STAR_print_meta_STAR_ = false;
cljs.core._STAR_print_dup_STAR_ = false;
cljs.core._STAR_print_length_STAR_ = null;
cljs.core._STAR_print_level_STAR_ = null;
if (typeof cljs.core._STAR_loaded_libs_STAR_ !== "undefined") {
} else {
  cljs.core._STAR_loaded_libs_STAR_ = null;
}
cljs.core.pr_opts = function cljs$core$pr_opts() {
  return new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "flush-on-newline", "flush-on-newline", -151457939), cljs.core._STAR_flush_on_newline_STAR_, new cljs.core.Keyword(null, "readably", "readably", 1129599760), cljs.core._STAR_print_readably_STAR_, new cljs.core.Keyword(null, "meta", "meta", 1499536964), cljs.core._STAR_print_meta_STAR_, new cljs.core.Keyword(null, "dup", "dup", 556298533), cljs.core._STAR_print_dup_STAR_, new cljs.core.Keyword(null, "print-length", "print-length", 
  1931866356), cljs.core._STAR_print_length_STAR_], null);
};
cljs.core.enable_console_print_BANG_ = function cljs$core$enable_console_print_BANG_() {
  cljs.core._STAR_print_newline_STAR_ = false;
  cljs.core._STAR_print_fn_STAR_ = function() {
    var G__8249__delegate = function(args) {
      return console.log.apply(console, cljs.core.into_array.cljs$core$IFn$_invoke$arity$1 ? cljs.core.into_array.cljs$core$IFn$_invoke$arity$1(args) : cljs.core.into_array.call(null, args));
    };
    var G__8249 = function(var_args) {
      var args = null;
      if (arguments.length > 0) {
        var G__8250__i = 0, G__8250__a = new Array(arguments.length - 0);
        while (G__8250__i < G__8250__a.length) {
          G__8250__a[G__8250__i] = arguments[G__8250__i + 0];
          ++G__8250__i;
        }
        args = new cljs.core.IndexedSeq(G__8250__a, 0);
      }
      return G__8249__delegate.call(this, args);
    };
    G__8249.cljs$lang$maxFixedArity = 0;
    G__8249.cljs$lang$applyTo = function(arglist__8251) {
      var args = cljs.core.seq(arglist__8251);
      return G__8249__delegate(args);
    };
    G__8249.cljs$core$IFn$_invoke$arity$variadic = G__8249__delegate;
    return G__8249;
  }();
  cljs.core._STAR_print_err_fn_STAR_ = function() {
    var G__8252__delegate = function(args) {
      return console.error.apply(console, cljs.core.into_array.cljs$core$IFn$_invoke$arity$1 ? cljs.core.into_array.cljs$core$IFn$_invoke$arity$1(args) : cljs.core.into_array.call(null, args));
    };
    var G__8252 = function(var_args) {
      var args = null;
      if (arguments.length > 0) {
        var G__8253__i = 0, G__8253__a = new Array(arguments.length - 0);
        while (G__8253__i < G__8253__a.length) {
          G__8253__a[G__8253__i] = arguments[G__8253__i + 0];
          ++G__8253__i;
        }
        args = new cljs.core.IndexedSeq(G__8253__a, 0);
      }
      return G__8252__delegate.call(this, args);
    };
    G__8252.cljs$lang$maxFixedArity = 0;
    G__8252.cljs$lang$applyTo = function(arglist__8254) {
      var args = cljs.core.seq(arglist__8254);
      return G__8252__delegate(args);
    };
    G__8252.cljs$core$IFn$_invoke$arity$variadic = G__8252__delegate;
    return G__8252;
  }();
  return null;
};
cljs.core.truth_ = function cljs$core$truth_(x) {
  return x != null && x !== false;
};
cljs.core.not_native = null;
cljs.core.identical_QMARK_ = function cljs$core$identical_QMARK_(x, y) {
  return x === y;
};
cljs.core.nil_QMARK_ = function cljs$core$nil_QMARK_(x) {
  return x == null;
};
cljs.core.array_QMARK_ = function cljs$core$array_QMARK_(x) {
  if (cljs.core._STAR_target_STAR_ === "nodejs") {
    return Array.isArray(x);
  } else {
    return x instanceof Array;
  }
};
cljs.core.number_QMARK_ = function cljs$core$number_QMARK_(x) {
  return typeof x === "number";
};
cljs.core.not = function cljs$core$not(x) {
  if (x == null) {
    return true;
  } else {
    if (x === false) {
      return true;
    } else {
      return false;
    }
  }
};
cljs.core.some_QMARK_ = function cljs$core$some_QMARK_(x) {
  return !(x == null);
};
cljs.core.object_QMARK_ = function cljs$core$object_QMARK_(x) {
  if (!(x == null)) {
    return x.constructor === Object;
  } else {
    return false;
  }
};
cljs.core.string_QMARK_ = function cljs$core$string_QMARK_(x) {
  return goog.isString(x);
};
cljs.core.char_QMARK_ = function cljs$core$char_QMARK_(x) {
  return goog.string.isUnicodeChar(x);
};
cljs.core.native_satisfies_QMARK_ = function cljs$core$native_satisfies_QMARK_(p, x) {
  var x__$1 = x == null ? null : x;
  if (p[goog.typeOf(x__$1)]) {
    return true;
  } else {
    if (p["_"]) {
      return true;
    } else {
      return false;
    }
  }
};
cljs.core.is_proto_ = function cljs$core$is_proto_(x) {
  return x.constructor.prototype === x;
};
cljs.core._STAR_main_cli_fn_STAR_ = null;
cljs.core.type = function cljs$core$type(x) {
  if (x == null) {
    return null;
  } else {
    return x.constructor;
  }
};
cljs.core.missing_protocol = function cljs$core$missing_protocol(proto, obj) {
  var ty = cljs.core.type(obj);
  var ty__$1 = cljs.core.truth_(function() {
    var and__6128__auto__ = ty;
    if (cljs.core.truth_(and__6128__auto__)) {
      return ty.cljs$lang$type;
    } else {
      return and__6128__auto__;
    }
  }()) ? ty.cljs$lang$ctorStr : goog.typeOf(obj);
  return new Error(["No protocol method ", proto, " defined for type ", ty__$1, ": ", obj].join(""));
};
cljs.core.type__GT_str = function cljs$core$type__GT_str(ty) {
  var temp__4423__auto__ = ty.cljs$lang$ctorStr;
  if (cljs.core.truth_(temp__4423__auto__)) {
    var s = temp__4423__auto__;
    return s;
  } else {
    return [cljs.core.str(ty)].join("");
  }
};
cljs.core.load_file = function cljs$core$load_file(file) {
  if (cljs.core.truth_(COMPILED)) {
    return null;
  } else {
    return goog.nodeGlobalRequire(file);
  }
};
if (typeof Symbol !== "undefined" && goog.typeOf(Symbol) === "function") {
  cljs.core.ITER_SYMBOL = Symbol.iterator;
} else {
  cljs.core.ITER_SYMBOL = "@@iterator";
}
cljs.core.CHAR_MAP = {"]":"_RBRACK_", "'":"_SINGLEQUOTE_", "\x3d":"_EQ_", '"':"_DOUBLEQUOTE_", "!":"_BANG_", "*":"_STAR_", "%":"_PERCENT_", "|":"_BAR_", "~":"_TILDE_", "/":"_SLASH_", "\\":"_BSLASH_", "-":"_", "?":"_QMARK_", "\x26":"_AMPERSAND_", ":":"_COLON_", "\x3c":"_LT_", "{":"_LBRACE_", "}":"_RBRACE_", "[":"_LBRACK_", "#":"_SHARP_", "^":"_CARET_", "+":"_PLUS_", "@":"_CIRCA_", "\x3e":"_GT_"};
cljs.core.DEMUNGE_MAP = {"_RBRACE_":"}", "_COLON_":":", "_BANG_":"!", "_QMARK_":"?", "_BSLASH_":"\\\\", "_SLASH_":"/", "_PERCENT_":"%", "_PLUS_":"+", "_SHARP_":"#", "_LBRACE_":"{", "_BAR_":"|", "_LBRACK_":"[", "_EQ_":"\x3d", "_":"-", "_TILDE_":"~", "_RBRACK_":"]", "_GT_":"\x3e", "_SINGLEQUOTE_":"'", "_CIRCA_":"@", "_AMPERSAND_":"\x26", "_DOUBLEQUOTE_":'\\"', "_CARET_":"^", "_LT_":"\x3c", "_STAR_":"*"};
cljs.core.DEMUNGE_PATTERN = null;
cljs.core.system_time = function cljs$core$system_time() {
  if (typeof performance !== "undefined" && !(performance.now == null)) {
    return performance.now();
  } else {
    if (typeof process !== "undefined" && !(process.hrtime == null)) {
      var t = process.hrtime();
      return (t[0] * 1E9 + t[1]) / 1E6;
    } else {
      return (new Date).getTime();
    }
  }
};
cljs.core.make_array = function cljs$core$make_array(var_args) {
  var args8255 = [];
  var len__7198__auto___8258 = arguments.length;
  var i__7199__auto___8259 = 0;
  while (true) {
    if (i__7199__auto___8259 < len__7198__auto___8258) {
      args8255.push(arguments[i__7199__auto___8259]);
      var G__8260 = i__7199__auto___8259 + 1;
      i__7199__auto___8259 = G__8260;
      continue;
    } else {
    }
    break;
  }
  var G__8257 = args8255.length;
  switch(G__8257) {
    case 1:
      return cljs.core.make_array.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.make_array.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args8255.length)].join(""));;
  }
};
cljs.core.make_array.cljs$core$IFn$_invoke$arity$1 = function(size) {
  return new Array(size);
};
cljs.core.make_array.cljs$core$IFn$_invoke$arity$2 = function(type, size) {
  return new Array(size);
};
cljs.core.make_array.cljs$lang$maxFixedArity = 2;
cljs.core.aclone = function cljs$core$aclone(arr) {
  var len = arr.length;
  var new_arr = new Array(len);
  var n__7043__auto___8262 = len;
  var i_8263 = 0;
  while (true) {
    if (i_8263 < n__7043__auto___8262) {
      new_arr[i_8263] = arr[i_8263];
      var G__8264 = i_8263 + 1;
      i_8263 = G__8264;
      continue;
    } else {
    }
    break;
  }
  return new_arr;
};
cljs.core.array = function cljs$core$array(var_args) {
  var a = new Array(arguments.length);
  var i = 0;
  while (true) {
    if (i < a.length) {
      a[i] = arguments[i];
      var G__8265 = i + 1;
      i = G__8265;
      continue;
    } else {
      return a;
    }
    break;
  }
};
cljs.core.aget = function cljs$core$aget(var_args) {
  var args8266 = [];
  var len__7198__auto___8275 = arguments.length;
  var i__7199__auto___8276 = 0;
  while (true) {
    if (i__7199__auto___8276 < len__7198__auto___8275) {
      args8266.push(arguments[i__7199__auto___8276]);
      var G__8277 = i__7199__auto___8276 + 1;
      i__7199__auto___8276 = G__8277;
      continue;
    } else {
    }
    break;
  }
  var G__8271 = args8266.length;
  switch(G__8271) {
    case 2:
      return cljs.core.aget.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8266.slice(2), 0);
      return cljs.core.aget.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.aget.cljs$core$IFn$_invoke$arity$2 = function(array, i) {
  return array[i];
};
cljs.core.aget.cljs$core$IFn$_invoke$arity$variadic = function(array, i, idxs) {
  var G__8272 = cljs.core.aget;
  var G__8273 = array[i];
  var G__8274 = idxs;
  return cljs.core.apply.cljs$core$IFn$_invoke$arity$3 ? cljs.core.apply.cljs$core$IFn$_invoke$arity$3(G__8272, G__8273, G__8274) : cljs.core.apply.call(null, G__8272, G__8273, G__8274);
};
cljs.core.aget.cljs$lang$applyTo = function(seq8267) {
  var G__8268 = cljs.core.first(seq8267);
  var seq8267__$1 = cljs.core.next(seq8267);
  var G__8269 = cljs.core.first(seq8267__$1);
  var seq8267__$2 = cljs.core.next(seq8267__$1);
  return cljs.core.aget.cljs$core$IFn$_invoke$arity$variadic(G__8268, G__8269, seq8267__$2);
};
cljs.core.aget.cljs$lang$maxFixedArity = 2;
cljs.core.aset = function cljs$core$aset(var_args) {
  var args8279 = [];
  var len__7198__auto___8290 = arguments.length;
  var i__7199__auto___8291 = 0;
  while (true) {
    if (i__7199__auto___8291 < len__7198__auto___8290) {
      args8279.push(arguments[i__7199__auto___8291]);
      var G__8292 = i__7199__auto___8291 + 1;
      i__7199__auto___8291 = G__8292;
      continue;
    } else {
    }
    break;
  }
  var G__8285 = args8279.length;
  switch(G__8285) {
    case 3:
      return cljs.core.aset.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8279.slice(3), 0);
      return cljs.core.aset.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], argseq__7217__auto__);
  }
};
cljs.core.aset.cljs$core$IFn$_invoke$arity$3 = function(array, i, val) {
  return array[i] = val;
};
cljs.core.aset.cljs$core$IFn$_invoke$arity$variadic = function(array, idx, idx2, idxv) {
  var G__8286 = cljs.core.aset;
  var G__8287 = array[idx];
  var G__8288 = idx2;
  var G__8289 = idxv;
  return cljs.core.apply.cljs$core$IFn$_invoke$arity$4 ? cljs.core.apply.cljs$core$IFn$_invoke$arity$4(G__8286, G__8287, G__8288, G__8289) : cljs.core.apply.call(null, G__8286, G__8287, G__8288, G__8289);
};
cljs.core.aset.cljs$lang$applyTo = function(seq8280) {
  var G__8281 = cljs.core.first(seq8280);
  var seq8280__$1 = cljs.core.next(seq8280);
  var G__8282 = cljs.core.first(seq8280__$1);
  var seq8280__$2 = cljs.core.next(seq8280__$1);
  var G__8283 = cljs.core.first(seq8280__$2);
  var seq8280__$3 = cljs.core.next(seq8280__$2);
  return cljs.core.aset.cljs$core$IFn$_invoke$arity$variadic(G__8281, G__8282, G__8283, seq8280__$3);
};
cljs.core.aset.cljs$lang$maxFixedArity = 3;
cljs.core.alength = function cljs$core$alength(array) {
  return array.length;
};
cljs.core.into_array = function cljs$core$into_array(var_args) {
  var args8294 = [];
  var len__7198__auto___8300 = arguments.length;
  var i__7199__auto___8301 = 0;
  while (true) {
    if (i__7199__auto___8301 < len__7198__auto___8300) {
      args8294.push(arguments[i__7199__auto___8301]);
      var G__8302 = i__7199__auto___8301 + 1;
      i__7199__auto___8301 = G__8302;
      continue;
    } else {
    }
    break;
  }
  var G__8296 = args8294.length;
  switch(G__8296) {
    case 1:
      return cljs.core.into_array.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.into_array.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args8294.length)].join(""));;
  }
};
cljs.core.into_array.cljs$core$IFn$_invoke$arity$1 = function(aseq) {
  return cljs.core.into_array.cljs$core$IFn$_invoke$arity$2(null, aseq);
};
cljs.core.into_array.cljs$core$IFn$_invoke$arity$2 = function(type, aseq) {
  var G__8297 = function(a, x) {
    a.push(x);
    return a;
  };
  var G__8298 = [];
  var G__8299 = aseq;
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3 ? cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(G__8297, G__8298, G__8299) : cljs.core.reduce.call(null, G__8297, G__8298, G__8299);
};
cljs.core.into_array.cljs$lang$maxFixedArity = 2;
cljs.core.js_invoke = function cljs$core$js_invoke(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___8307 = arguments.length;
  var i__7199__auto___8308 = 0;
  while (true) {
    if (i__7199__auto___8308 < len__7198__auto___8307) {
      args__7205__auto__.push(arguments[i__7199__auto___8308]);
      var G__8309 = i__7199__auto___8308 + 1;
      i__7199__auto___8308 = G__8309;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 2 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(2), 0) : null;
  return cljs.core.js_invoke.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7206__auto__);
};
cljs.core.js_invoke.cljs$core$IFn$_invoke$arity$variadic = function(obj, s, args) {
  return obj[s].apply(obj, cljs.core.into_array.cljs$core$IFn$_invoke$arity$1(args));
};
cljs.core.js_invoke.cljs$lang$maxFixedArity = 2;
cljs.core.js_invoke.cljs$lang$applyTo = function(seq8304) {
  var G__8305 = cljs.core.first(seq8304);
  var seq8304__$1 = cljs.core.next(seq8304);
  var G__8306 = cljs.core.first(seq8304__$1);
  var seq8304__$2 = cljs.core.next(seq8304__$1);
  return cljs.core.js_invoke.cljs$core$IFn$_invoke$arity$variadic(G__8305, G__8306, seq8304__$2);
};
cljs.core.Fn = function() {
};
cljs.core.IFn = function() {
};
cljs.core._invoke = function cljs$core$_invoke(var_args) {
  var args8310 = [];
  var len__7198__auto___8313 = arguments.length;
  var i__7199__auto___8314 = 0;
  while (true) {
    if (i__7199__auto___8314 < len__7198__auto___8313) {
      args8310.push(arguments[i__7199__auto___8314]);
      var G__8315 = i__7199__auto___8314 + 1;
      i__7199__auto___8314 = G__8315;
      continue;
    } else {
    }
    break;
  }
  var G__8312 = args8310.length;
  switch(G__8312) {
    case 1:
      return cljs.core._invoke.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core._invoke.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core._invoke.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 4:
      return cljs.core._invoke.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    case 5:
      return cljs.core._invoke.cljs$core$IFn$_invoke$arity$5(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);
      break;
    case 6:
      return cljs.core._invoke.cljs$core$IFn$_invoke$arity$6(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
      break;
    case 7:
      return cljs.core._invoke.cljs$core$IFn$_invoke$arity$7(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6]);
      break;
    case 8:
      return cljs.core._invoke.cljs$core$IFn$_invoke$arity$8(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7]);
      break;
    case 9:
      return cljs.core._invoke.cljs$core$IFn$_invoke$arity$9(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], arguments[8]);
      break;
    case 10:
      return cljs.core._invoke.cljs$core$IFn$_invoke$arity$10(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], arguments[8], arguments[9]);
      break;
    case 11:
      return cljs.core._invoke.cljs$core$IFn$_invoke$arity$11(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], arguments[8], arguments[9], arguments[10]);
      break;
    case 12:
      return cljs.core._invoke.cljs$core$IFn$_invoke$arity$12(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], arguments[8], arguments[9], arguments[10], arguments[11]);
      break;
    case 13:
      return cljs.core._invoke.cljs$core$IFn$_invoke$arity$13(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], arguments[8], arguments[9], arguments[10], arguments[11], arguments[12]);
      break;
    case 14:
      return cljs.core._invoke.cljs$core$IFn$_invoke$arity$14(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], arguments[8], arguments[9], arguments[10], arguments[11], arguments[12], arguments[13]);
      break;
    case 15:
      return cljs.core._invoke.cljs$core$IFn$_invoke$arity$15(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], arguments[8], arguments[9], arguments[10], arguments[11], arguments[12], arguments[13], arguments[14]);
      break;
    case 16:
      return cljs.core._invoke.cljs$core$IFn$_invoke$arity$16(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], arguments[8], arguments[9], arguments[10], arguments[11], arguments[12], arguments[13], arguments[14], arguments[15]);
      break;
    case 17:
      return cljs.core._invoke.cljs$core$IFn$_invoke$arity$17(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], arguments[8], arguments[9], arguments[10], arguments[11], arguments[12], arguments[13], arguments[14], arguments[15], arguments[16]);
      break;
    case 18:
      return cljs.core._invoke.cljs$core$IFn$_invoke$arity$18(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], arguments[8], arguments[9], arguments[10], arguments[11], arguments[12], arguments[13], arguments[14], arguments[15], arguments[16], arguments[17]);
      break;
    case 19:
      return cljs.core._invoke.cljs$core$IFn$_invoke$arity$19(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], arguments[8], arguments[9], arguments[10], arguments[11], arguments[12], arguments[13], arguments[14], arguments[15], arguments[16], arguments[17], arguments[18]);
      break;
    case 20:
      return cljs.core._invoke.cljs$core$IFn$_invoke$arity$20(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], arguments[8], arguments[9], arguments[10], arguments[11], arguments[12], arguments[13], arguments[14], arguments[15], arguments[16], arguments[17], arguments[18], arguments[19]);
      break;
    case 21:
      return cljs.core._invoke.cljs$core$IFn$_invoke$arity$21(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], arguments[8], arguments[9], arguments[10], arguments[11], arguments[12], arguments[13], arguments[14], arguments[15], arguments[16], arguments[17], arguments[18], arguments[19], arguments[20]);
      break;
    case 22:
      return cljs.core._invoke.cljs$core$IFn$_invoke$arity$22(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], arguments[8], arguments[9], arguments[10], arguments[11], arguments[12], arguments[13], arguments[14], arguments[15], arguments[16], arguments[17], arguments[18], arguments[19], arguments[20], arguments[21]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args8310.length)].join(""));;
  }
};
cljs.core._invoke.cljs$core$IFn$_invoke$arity$1 = function(this$) {
  if (!(this$ == null) && !(this$.cljs$core$IFn$_invoke$arity$1 == null)) {
    return this$.cljs$core$IFn$_invoke$arity$1(this$);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._invoke[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(this$) : m__6796__auto__.call(null, this$);
    } else {
      var m__6796__auto____$1 = cljs.core._invoke["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(this$) : m__6796__auto____$1.call(null, this$);
      } else {
        throw cljs.core.missing_protocol("IFn.-invoke", this$);
      }
    }
  }
};
cljs.core._invoke.cljs$core$IFn$_invoke$arity$2 = function(this$, a) {
  if (!(this$ == null) && !(this$.cljs$core$IFn$_invoke$arity$2 == null)) {
    return this$.cljs$core$IFn$_invoke$arity$2(this$, a);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._invoke[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(this$, a) : m__6796__auto__.call(null, this$, a);
    } else {
      var m__6796__auto____$1 = cljs.core._invoke["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(this$, a) : m__6796__auto____$1.call(null, this$, a);
      } else {
        throw cljs.core.missing_protocol("IFn.-invoke", this$);
      }
    }
  }
};
cljs.core._invoke.cljs$core$IFn$_invoke$arity$3 = function(this$, a, b) {
  if (!(this$ == null) && !(this$.cljs$core$IFn$_invoke$arity$3 == null)) {
    return this$.cljs$core$IFn$_invoke$arity$3(this$, a, b);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._invoke[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$3(this$, a, b) : m__6796__auto__.call(null, this$, a, b);
    } else {
      var m__6796__auto____$1 = cljs.core._invoke["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3(this$, a, b) : m__6796__auto____$1.call(null, this$, a, b);
      } else {
        throw cljs.core.missing_protocol("IFn.-invoke", this$);
      }
    }
  }
};
cljs.core._invoke.cljs$core$IFn$_invoke$arity$4 = function(this$, a, b, c) {
  if (!(this$ == null) && !(this$.cljs$core$IFn$_invoke$arity$4 == null)) {
    return this$.cljs$core$IFn$_invoke$arity$4(this$, a, b, c);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._invoke[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$4 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$4(this$, a, b, c) : m__6796__auto__.call(null, this$, a, b, c);
    } else {
      var m__6796__auto____$1 = cljs.core._invoke["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$4 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$4(this$, a, b, c) : m__6796__auto____$1.call(null, this$, a, b, c);
      } else {
        throw cljs.core.missing_protocol("IFn.-invoke", this$);
      }
    }
  }
};
cljs.core._invoke.cljs$core$IFn$_invoke$arity$5 = function(this$, a, b, c, d) {
  if (!(this$ == null) && !(this$.cljs$core$IFn$_invoke$arity$5 == null)) {
    return this$.cljs$core$IFn$_invoke$arity$5(this$, a, b, c, d);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._invoke[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$5 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$5(this$, a, b, c, d) : m__6796__auto__.call(null, this$, a, b, c, d);
    } else {
      var m__6796__auto____$1 = cljs.core._invoke["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$5 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$5(this$, a, b, c, d) : m__6796__auto____$1.call(null, this$, a, b, c, d);
      } else {
        throw cljs.core.missing_protocol("IFn.-invoke", this$);
      }
    }
  }
};
cljs.core._invoke.cljs$core$IFn$_invoke$arity$6 = function(this$, a, b, c, d, e) {
  if (!(this$ == null) && !(this$.cljs$core$IFn$_invoke$arity$6 == null)) {
    return this$.cljs$core$IFn$_invoke$arity$6(this$, a, b, c, d, e);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._invoke[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$6 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$6(this$, a, b, c, d, e) : m__6796__auto__.call(null, this$, a, b, c, d, e);
    } else {
      var m__6796__auto____$1 = cljs.core._invoke["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$6 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$6(this$, a, b, c, d, e) : m__6796__auto____$1.call(null, this$, a, b, c, d, e);
      } else {
        throw cljs.core.missing_protocol("IFn.-invoke", this$);
      }
    }
  }
};
cljs.core._invoke.cljs$core$IFn$_invoke$arity$7 = function(this$, a, b, c, d, e, f) {
  if (!(this$ == null) && !(this$.cljs$core$IFn$_invoke$arity$7 == null)) {
    return this$.cljs$core$IFn$_invoke$arity$7(this$, a, b, c, d, e, f);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._invoke[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$7 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$7(this$, a, b, c, d, e, f) : m__6796__auto__.call(null, this$, a, b, c, d, e, f);
    } else {
      var m__6796__auto____$1 = cljs.core._invoke["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$7 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$7(this$, a, b, c, d, e, f) : m__6796__auto____$1.call(null, this$, a, b, c, d, e, f);
      } else {
        throw cljs.core.missing_protocol("IFn.-invoke", this$);
      }
    }
  }
};
cljs.core._invoke.cljs$core$IFn$_invoke$arity$8 = function(this$, a, b, c, d, e, f, g) {
  if (!(this$ == null) && !(this$.cljs$core$IFn$_invoke$arity$8 == null)) {
    return this$.cljs$core$IFn$_invoke$arity$8(this$, a, b, c, d, e, f, g);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._invoke[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$8 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$8(this$, a, b, c, d, e, f, g) : m__6796__auto__.call(null, this$, a, b, c, d, e, f, g);
    } else {
      var m__6796__auto____$1 = cljs.core._invoke["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$8 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$8(this$, a, b, c, d, e, f, g) : m__6796__auto____$1.call(null, this$, a, b, c, d, e, f, g);
      } else {
        throw cljs.core.missing_protocol("IFn.-invoke", this$);
      }
    }
  }
};
cljs.core._invoke.cljs$core$IFn$_invoke$arity$9 = function(this$, a, b, c, d, e, f, g, h) {
  if (!(this$ == null) && !(this$.cljs$core$IFn$_invoke$arity$9 == null)) {
    return this$.cljs$core$IFn$_invoke$arity$9(this$, a, b, c, d, e, f, g, h);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._invoke[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$9 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$9(this$, a, b, c, d, e, f, g, h) : m__6796__auto__.call(null, this$, a, b, c, d, e, f, g, h);
    } else {
      var m__6796__auto____$1 = cljs.core._invoke["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$9 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$9(this$, a, b, c, d, e, f, g, h) : m__6796__auto____$1.call(null, this$, a, b, c, d, e, f, g, h);
      } else {
        throw cljs.core.missing_protocol("IFn.-invoke", this$);
      }
    }
  }
};
cljs.core._invoke.cljs$core$IFn$_invoke$arity$10 = function(this$, a, b, c, d, e, f, g, h, i) {
  if (!(this$ == null) && !(this$.cljs$core$IFn$_invoke$arity$10 == null)) {
    return this$.cljs$core$IFn$_invoke$arity$10(this$, a, b, c, d, e, f, g, h, i);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._invoke[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$10 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$10(this$, a, b, c, d, e, f, g, h, i) : m__6796__auto__.call(null, this$, a, b, c, d, e, f, g, h, i);
    } else {
      var m__6796__auto____$1 = cljs.core._invoke["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$10 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$10(this$, a, b, c, d, e, f, g, h, i) : m__6796__auto____$1.call(null, this$, a, b, c, d, e, f, g, h, i);
      } else {
        throw cljs.core.missing_protocol("IFn.-invoke", this$);
      }
    }
  }
};
cljs.core._invoke.cljs$core$IFn$_invoke$arity$11 = function(this$, a, b, c, d, e, f, g, h, i, j) {
  if (!(this$ == null) && !(this$.cljs$core$IFn$_invoke$arity$11 == null)) {
    return this$.cljs$core$IFn$_invoke$arity$11(this$, a, b, c, d, e, f, g, h, i, j);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._invoke[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$11 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$11(this$, a, b, c, d, e, f, g, h, i, j) : m__6796__auto__.call(null, this$, a, b, c, d, e, f, g, h, i, j);
    } else {
      var m__6796__auto____$1 = cljs.core._invoke["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$11 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$11(this$, a, b, c, d, e, f, g, h, i, j) : m__6796__auto____$1.call(null, this$, a, b, c, d, e, f, g, h, i, j);
      } else {
        throw cljs.core.missing_protocol("IFn.-invoke", this$);
      }
    }
  }
};
cljs.core._invoke.cljs$core$IFn$_invoke$arity$12 = function(this$, a, b, c, d, e, f, g, h, i, j, k) {
  if (!(this$ == null) && !(this$.cljs$core$IFn$_invoke$arity$12 == null)) {
    return this$.cljs$core$IFn$_invoke$arity$12(this$, a, b, c, d, e, f, g, h, i, j, k);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._invoke[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$12 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$12(this$, a, b, c, d, e, f, g, h, i, j, k) : m__6796__auto__.call(null, this$, a, b, c, d, e, f, g, h, i, j, k);
    } else {
      var m__6796__auto____$1 = cljs.core._invoke["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$12 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$12(this$, a, b, c, d, e, f, g, h, i, j, k) : m__6796__auto____$1.call(null, this$, a, b, c, d, e, f, g, h, i, j, k);
      } else {
        throw cljs.core.missing_protocol("IFn.-invoke", this$);
      }
    }
  }
};
cljs.core._invoke.cljs$core$IFn$_invoke$arity$13 = function(this$, a, b, c, d, e, f, g, h, i, j, k, l) {
  if (!(this$ == null) && !(this$.cljs$core$IFn$_invoke$arity$13 == null)) {
    return this$.cljs$core$IFn$_invoke$arity$13(this$, a, b, c, d, e, f, g, h, i, j, k, l);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._invoke[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$13 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$13(this$, a, b, c, d, e, f, g, h, i, j, k, l) : m__6796__auto__.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l);
    } else {
      var m__6796__auto____$1 = cljs.core._invoke["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$13 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$13(this$, a, b, c, d, e, f, g, h, i, j, k, l) : m__6796__auto____$1.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l);
      } else {
        throw cljs.core.missing_protocol("IFn.-invoke", this$);
      }
    }
  }
};
cljs.core._invoke.cljs$core$IFn$_invoke$arity$14 = function(this$, a, b, c, d, e, f, g, h, i, j, k, l, m) {
  if (!(this$ == null) && !(this$.cljs$core$IFn$_invoke$arity$14 == null)) {
    return this$.cljs$core$IFn$_invoke$arity$14(this$, a, b, c, d, e, f, g, h, i, j, k, l, m);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._invoke[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$14 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$14(this$, a, b, c, d, e, f, g, h, i, j, k, l, m) : m__6796__auto__.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m);
    } else {
      var m__6796__auto____$1 = cljs.core._invoke["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$14 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$14(this$, a, b, c, d, e, f, g, h, i, j, k, l, m) : m__6796__auto____$1.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m);
      } else {
        throw cljs.core.missing_protocol("IFn.-invoke", this$);
      }
    }
  }
};
cljs.core._invoke.cljs$core$IFn$_invoke$arity$15 = function(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n) {
  if (!(this$ == null) && !(this$.cljs$core$IFn$_invoke$arity$15 == null)) {
    return this$.cljs$core$IFn$_invoke$arity$15(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._invoke[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$15 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$15(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n) : m__6796__auto__.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n);
    } else {
      var m__6796__auto____$1 = cljs.core._invoke["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$15 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$15(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n) : m__6796__auto____$1.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n);
      } else {
        throw cljs.core.missing_protocol("IFn.-invoke", this$);
      }
    }
  }
};
cljs.core._invoke.cljs$core$IFn$_invoke$arity$16 = function(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) {
  if (!(this$ == null) && !(this$.cljs$core$IFn$_invoke$arity$16 == null)) {
    return this$.cljs$core$IFn$_invoke$arity$16(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._invoke[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$16 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$16(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) : m__6796__auto__.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
    } else {
      var m__6796__auto____$1 = cljs.core._invoke["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$16 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$16(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) : m__6796__auto____$1.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
      } else {
        throw cljs.core.missing_protocol("IFn.-invoke", this$);
      }
    }
  }
};
cljs.core._invoke.cljs$core$IFn$_invoke$arity$17 = function(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
  if (!(this$ == null) && !(this$.cljs$core$IFn$_invoke$arity$17 == null)) {
    return this$.cljs$core$IFn$_invoke$arity$17(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._invoke[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$17 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$17(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) : m__6796__auto__.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
    } else {
      var m__6796__auto____$1 = cljs.core._invoke["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$17 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$17(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) : m__6796__auto____$1.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
      } else {
        throw cljs.core.missing_protocol("IFn.-invoke", this$);
      }
    }
  }
};
cljs.core._invoke.cljs$core$IFn$_invoke$arity$18 = function(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) {
  if (!(this$ == null) && !(this$.cljs$core$IFn$_invoke$arity$18 == null)) {
    return this$.cljs$core$IFn$_invoke$arity$18(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._invoke[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$18 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$18(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) : m__6796__auto__.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q);
    } else {
      var m__6796__auto____$1 = cljs.core._invoke["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$18 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$18(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) : m__6796__auto____$1.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q);
      } else {
        throw cljs.core.missing_protocol("IFn.-invoke", this$);
      }
    }
  }
};
cljs.core._invoke.cljs$core$IFn$_invoke$arity$19 = function(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) {
  if (!(this$ == null) && !(this$.cljs$core$IFn$_invoke$arity$19 == null)) {
    return this$.cljs$core$IFn$_invoke$arity$19(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._invoke[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$19 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$19(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) : m__6796__auto__.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r);
    } else {
      var m__6796__auto____$1 = cljs.core._invoke["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$19 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$19(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) : m__6796__auto____$1.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r);
      } else {
        throw cljs.core.missing_protocol("IFn.-invoke", this$);
      }
    }
  }
};
cljs.core._invoke.cljs$core$IFn$_invoke$arity$20 = function(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) {
  if (!(this$ == null) && !(this$.cljs$core$IFn$_invoke$arity$20 == null)) {
    return this$.cljs$core$IFn$_invoke$arity$20(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._invoke[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$20 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$20(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) : m__6796__auto__.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s);
    } else {
      var m__6796__auto____$1 = cljs.core._invoke["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$20 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$20(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) : m__6796__auto____$1.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s);
      } else {
        throw cljs.core.missing_protocol("IFn.-invoke", this$);
      }
    }
  }
};
cljs.core._invoke.cljs$core$IFn$_invoke$arity$21 = function(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) {
  if (!(this$ == null) && !(this$.cljs$core$IFn$_invoke$arity$21 == null)) {
    return this$.cljs$core$IFn$_invoke$arity$21(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._invoke[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$21 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$21(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) : m__6796__auto__.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t);
    } else {
      var m__6796__auto____$1 = cljs.core._invoke["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$21 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$21(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) : m__6796__auto____$1.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t);
      } else {
        throw cljs.core.missing_protocol("IFn.-invoke", this$);
      }
    }
  }
};
cljs.core._invoke.cljs$core$IFn$_invoke$arity$22 = function(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest) {
  if (!(this$ == null) && !(this$.cljs$core$IFn$_invoke$arity$22 == null)) {
    return this$.cljs$core$IFn$_invoke$arity$22(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._invoke[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$22 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$22(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest) : m__6796__auto__.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest);
    } else {
      var m__6796__auto____$1 = cljs.core._invoke["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$22 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$22(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest) : m__6796__auto____$1.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest);
      } else {
        throw cljs.core.missing_protocol("IFn.-invoke", this$);
      }
    }
  }
};
cljs.core._invoke.cljs$lang$maxFixedArity = 22;
cljs.core.ICloneable = function() {
};
cljs.core._clone = function cljs$core$_clone(value) {
  if (!(value == null) && !(value.cljs$core$ICloneable$_clone$arity$1 == null)) {
    return value.cljs$core$ICloneable$_clone$arity$1(value);
  } else {
    var x__6795__auto__ = value == null ? null : value;
    var m__6796__auto__ = cljs.core._clone[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(value) : m__6796__auto__.call(null, value);
    } else {
      var m__6796__auto____$1 = cljs.core._clone["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(value) : m__6796__auto____$1.call(null, value);
      } else {
        throw cljs.core.missing_protocol("ICloneable.-clone", value);
      }
    }
  }
};
cljs.core.ICounted = function() {
};
cljs.core._count = function cljs$core$_count(coll) {
  if (!(coll == null) && !(coll.cljs$core$ICounted$_count$arity$1 == null)) {
    return coll.cljs$core$ICounted$_count$arity$1(coll);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._count[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto__.call(null, coll);
    } else {
      var m__6796__auto____$1 = cljs.core._count["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto____$1.call(null, coll);
      } else {
        throw cljs.core.missing_protocol("ICounted.-count", coll);
      }
    }
  }
};
cljs.core.IEmptyableCollection = function() {
};
cljs.core._empty = function cljs$core$_empty(coll) {
  if (!(coll == null) && !(coll.cljs$core$IEmptyableCollection$_empty$arity$1 == null)) {
    return coll.cljs$core$IEmptyableCollection$_empty$arity$1(coll);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._empty[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto__.call(null, coll);
    } else {
      var m__6796__auto____$1 = cljs.core._empty["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto____$1.call(null, coll);
      } else {
        throw cljs.core.missing_protocol("IEmptyableCollection.-empty", coll);
      }
    }
  }
};
cljs.core.ICollection = function() {
};
cljs.core._conj = function cljs$core$_conj(coll, o) {
  if (!(coll == null) && !(coll.cljs$core$ICollection$_conj$arity$2 == null)) {
    return coll.cljs$core$ICollection$_conj$arity$2(coll, o);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._conj[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(coll, o) : m__6796__auto__.call(null, coll, o);
    } else {
      var m__6796__auto____$1 = cljs.core._conj["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(coll, o) : m__6796__auto____$1.call(null, coll, o);
      } else {
        throw cljs.core.missing_protocol("ICollection.-conj", coll);
      }
    }
  }
};
cljs.core.IIndexed = function() {
};
cljs.core._nth = function cljs$core$_nth(var_args) {
  var args8317 = [];
  var len__7198__auto___8320 = arguments.length;
  var i__7199__auto___8321 = 0;
  while (true) {
    if (i__7199__auto___8321 < len__7198__auto___8320) {
      args8317.push(arguments[i__7199__auto___8321]);
      var G__8322 = i__7199__auto___8321 + 1;
      i__7199__auto___8321 = G__8322;
      continue;
    } else {
    }
    break;
  }
  var G__8319 = args8317.length;
  switch(G__8319) {
    case 2:
      return cljs.core._nth.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core._nth.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args8317.length)].join(""));;
  }
};
cljs.core._nth.cljs$core$IFn$_invoke$arity$2 = function(coll, n) {
  if (!(coll == null) && !(coll.cljs$core$IIndexed$_nth$arity$2 == null)) {
    return coll.cljs$core$IIndexed$_nth$arity$2(coll, n);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._nth[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(coll, n) : m__6796__auto__.call(null, coll, n);
    } else {
      var m__6796__auto____$1 = cljs.core._nth["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(coll, n) : m__6796__auto____$1.call(null, coll, n);
      } else {
        throw cljs.core.missing_protocol("IIndexed.-nth", coll);
      }
    }
  }
};
cljs.core._nth.cljs$core$IFn$_invoke$arity$3 = function(coll, n, not_found) {
  if (!(coll == null) && !(coll.cljs$core$IIndexed$_nth$arity$3 == null)) {
    return coll.cljs$core$IIndexed$_nth$arity$3(coll, n, not_found);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._nth[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$3(coll, n, not_found) : m__6796__auto__.call(null, coll, n, not_found);
    } else {
      var m__6796__auto____$1 = cljs.core._nth["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3(coll, n, not_found) : m__6796__auto____$1.call(null, coll, n, not_found);
      } else {
        throw cljs.core.missing_protocol("IIndexed.-nth", coll);
      }
    }
  }
};
cljs.core._nth.cljs$lang$maxFixedArity = 3;
cljs.core.ASeq = function() {
};
cljs.core.ISeq = function() {
};
cljs.core._first = function cljs$core$_first(coll) {
  if (!(coll == null) && !(coll.cljs$core$ISeq$_first$arity$1 == null)) {
    return coll.cljs$core$ISeq$_first$arity$1(coll);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._first[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto__.call(null, coll);
    } else {
      var m__6796__auto____$1 = cljs.core._first["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto____$1.call(null, coll);
      } else {
        throw cljs.core.missing_protocol("ISeq.-first", coll);
      }
    }
  }
};
cljs.core._rest = function cljs$core$_rest(coll) {
  if (!(coll == null) && !(coll.cljs$core$ISeq$_rest$arity$1 == null)) {
    return coll.cljs$core$ISeq$_rest$arity$1(coll);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._rest[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto__.call(null, coll);
    } else {
      var m__6796__auto____$1 = cljs.core._rest["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto____$1.call(null, coll);
      } else {
        throw cljs.core.missing_protocol("ISeq.-rest", coll);
      }
    }
  }
};
cljs.core.INext = function() {
};
cljs.core._next = function cljs$core$_next(coll) {
  if (!(coll == null) && !(coll.cljs$core$INext$_next$arity$1 == null)) {
    return coll.cljs$core$INext$_next$arity$1(coll);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._next[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto__.call(null, coll);
    } else {
      var m__6796__auto____$1 = cljs.core._next["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto____$1.call(null, coll);
      } else {
        throw cljs.core.missing_protocol("INext.-next", coll);
      }
    }
  }
};
cljs.core.ILookup = function() {
};
cljs.core._lookup = function cljs$core$_lookup(var_args) {
  var args8324 = [];
  var len__7198__auto___8327 = arguments.length;
  var i__7199__auto___8328 = 0;
  while (true) {
    if (i__7199__auto___8328 < len__7198__auto___8327) {
      args8324.push(arguments[i__7199__auto___8328]);
      var G__8329 = i__7199__auto___8328 + 1;
      i__7199__auto___8328 = G__8329;
      continue;
    } else {
    }
    break;
  }
  var G__8326 = args8324.length;
  switch(G__8326) {
    case 2:
      return cljs.core._lookup.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args8324.length)].join(""));;
  }
};
cljs.core._lookup.cljs$core$IFn$_invoke$arity$2 = function(o, k) {
  if (!(o == null) && !(o.cljs$core$ILookup$_lookup$arity$2 == null)) {
    return o.cljs$core$ILookup$_lookup$arity$2(o, k);
  } else {
    var x__6795__auto__ = o == null ? null : o;
    var m__6796__auto__ = cljs.core._lookup[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(o, k) : m__6796__auto__.call(null, o, k);
    } else {
      var m__6796__auto____$1 = cljs.core._lookup["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(o, k) : m__6796__auto____$1.call(null, o, k);
      } else {
        throw cljs.core.missing_protocol("ILookup.-lookup", o);
      }
    }
  }
};
cljs.core._lookup.cljs$core$IFn$_invoke$arity$3 = function(o, k, not_found) {
  if (!(o == null) && !(o.cljs$core$ILookup$_lookup$arity$3 == null)) {
    return o.cljs$core$ILookup$_lookup$arity$3(o, k, not_found);
  } else {
    var x__6795__auto__ = o == null ? null : o;
    var m__6796__auto__ = cljs.core._lookup[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$3(o, k, not_found) : m__6796__auto__.call(null, o, k, not_found);
    } else {
      var m__6796__auto____$1 = cljs.core._lookup["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3(o, k, not_found) : m__6796__auto____$1.call(null, o, k, not_found);
      } else {
        throw cljs.core.missing_protocol("ILookup.-lookup", o);
      }
    }
  }
};
cljs.core._lookup.cljs$lang$maxFixedArity = 3;
cljs.core.IAssociative = function() {
};
cljs.core._contains_key_QMARK_ = function cljs$core$_contains_key_QMARK_(coll, k) {
  if (!(coll == null) && !(coll.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 == null)) {
    return coll.cljs$core$IAssociative$_contains_key_QMARK_$arity$2(coll, k);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._contains_key_QMARK_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(coll, k) : m__6796__auto__.call(null, coll, k);
    } else {
      var m__6796__auto____$1 = cljs.core._contains_key_QMARK_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(coll, k) : m__6796__auto____$1.call(null, coll, k);
      } else {
        throw cljs.core.missing_protocol("IAssociative.-contains-key?", coll);
      }
    }
  }
};
cljs.core._assoc = function cljs$core$_assoc(coll, k, v) {
  if (!(coll == null) && !(coll.cljs$core$IAssociative$_assoc$arity$3 == null)) {
    return coll.cljs$core$IAssociative$_assoc$arity$3(coll, k, v);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._assoc[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$3(coll, k, v) : m__6796__auto__.call(null, coll, k, v);
    } else {
      var m__6796__auto____$1 = cljs.core._assoc["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3(coll, k, v) : m__6796__auto____$1.call(null, coll, k, v);
      } else {
        throw cljs.core.missing_protocol("IAssociative.-assoc", coll);
      }
    }
  }
};
cljs.core.IMap = function() {
};
cljs.core._dissoc = function cljs$core$_dissoc(coll, k) {
  if (!(coll == null) && !(coll.cljs$core$IMap$_dissoc$arity$2 == null)) {
    return coll.cljs$core$IMap$_dissoc$arity$2(coll, k);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._dissoc[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(coll, k) : m__6796__auto__.call(null, coll, k);
    } else {
      var m__6796__auto____$1 = cljs.core._dissoc["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(coll, k) : m__6796__auto____$1.call(null, coll, k);
      } else {
        throw cljs.core.missing_protocol("IMap.-dissoc", coll);
      }
    }
  }
};
cljs.core.IMapEntry = function() {
};
cljs.core._key = function cljs$core$_key(coll) {
  if (!(coll == null) && !(coll.cljs$core$IMapEntry$_key$arity$1 == null)) {
    return coll.cljs$core$IMapEntry$_key$arity$1(coll);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._key[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto__.call(null, coll);
    } else {
      var m__6796__auto____$1 = cljs.core._key["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto____$1.call(null, coll);
      } else {
        throw cljs.core.missing_protocol("IMapEntry.-key", coll);
      }
    }
  }
};
cljs.core._val = function cljs$core$_val(coll) {
  if (!(coll == null) && !(coll.cljs$core$IMapEntry$_val$arity$1 == null)) {
    return coll.cljs$core$IMapEntry$_val$arity$1(coll);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._val[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto__.call(null, coll);
    } else {
      var m__6796__auto____$1 = cljs.core._val["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto____$1.call(null, coll);
      } else {
        throw cljs.core.missing_protocol("IMapEntry.-val", coll);
      }
    }
  }
};
cljs.core.ISet = function() {
};
cljs.core._disjoin = function cljs$core$_disjoin(coll, v) {
  if (!(coll == null) && !(coll.cljs$core$ISet$_disjoin$arity$2 == null)) {
    return coll.cljs$core$ISet$_disjoin$arity$2(coll, v);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._disjoin[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(coll, v) : m__6796__auto__.call(null, coll, v);
    } else {
      var m__6796__auto____$1 = cljs.core._disjoin["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(coll, v) : m__6796__auto____$1.call(null, coll, v);
      } else {
        throw cljs.core.missing_protocol("ISet.-disjoin", coll);
      }
    }
  }
};
cljs.core.IStack = function() {
};
cljs.core._peek = function cljs$core$_peek(coll) {
  if (!(coll == null) && !(coll.cljs$core$IStack$_peek$arity$1 == null)) {
    return coll.cljs$core$IStack$_peek$arity$1(coll);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._peek[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto__.call(null, coll);
    } else {
      var m__6796__auto____$1 = cljs.core._peek["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto____$1.call(null, coll);
      } else {
        throw cljs.core.missing_protocol("IStack.-peek", coll);
      }
    }
  }
};
cljs.core._pop = function cljs$core$_pop(coll) {
  if (!(coll == null) && !(coll.cljs$core$IStack$_pop$arity$1 == null)) {
    return coll.cljs$core$IStack$_pop$arity$1(coll);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._pop[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto__.call(null, coll);
    } else {
      var m__6796__auto____$1 = cljs.core._pop["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto____$1.call(null, coll);
      } else {
        throw cljs.core.missing_protocol("IStack.-pop", coll);
      }
    }
  }
};
cljs.core.IVector = function() {
};
cljs.core._assoc_n = function cljs$core$_assoc_n(coll, n, val) {
  if (!(coll == null) && !(coll.cljs$core$IVector$_assoc_n$arity$3 == null)) {
    return coll.cljs$core$IVector$_assoc_n$arity$3(coll, n, val);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._assoc_n[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$3(coll, n, val) : m__6796__auto__.call(null, coll, n, val);
    } else {
      var m__6796__auto____$1 = cljs.core._assoc_n["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3(coll, n, val) : m__6796__auto____$1.call(null, coll, n, val);
      } else {
        throw cljs.core.missing_protocol("IVector.-assoc-n", coll);
      }
    }
  }
};
cljs.core.IDeref = function() {
};
cljs.core._deref = function cljs$core$_deref(o) {
  if (!(o == null) && !(o.cljs$core$IDeref$_deref$arity$1 == null)) {
    return o.cljs$core$IDeref$_deref$arity$1(o);
  } else {
    var x__6795__auto__ = o == null ? null : o;
    var m__6796__auto__ = cljs.core._deref[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(o) : m__6796__auto__.call(null, o);
    } else {
      var m__6796__auto____$1 = cljs.core._deref["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(o) : m__6796__auto____$1.call(null, o);
      } else {
        throw cljs.core.missing_protocol("IDeref.-deref", o);
      }
    }
  }
};
cljs.core.IDerefWithTimeout = function() {
};
cljs.core._deref_with_timeout = function cljs$core$_deref_with_timeout(o, msec, timeout_val) {
  if (!(o == null) && !(o.cljs$core$IDerefWithTimeout$_deref_with_timeout$arity$3 == null)) {
    return o.cljs$core$IDerefWithTimeout$_deref_with_timeout$arity$3(o, msec, timeout_val);
  } else {
    var x__6795__auto__ = o == null ? null : o;
    var m__6796__auto__ = cljs.core._deref_with_timeout[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$3(o, msec, timeout_val) : m__6796__auto__.call(null, o, msec, timeout_val);
    } else {
      var m__6796__auto____$1 = cljs.core._deref_with_timeout["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3(o, msec, timeout_val) : m__6796__auto____$1.call(null, o, msec, timeout_val);
      } else {
        throw cljs.core.missing_protocol("IDerefWithTimeout.-deref-with-timeout", o);
      }
    }
  }
};
cljs.core.IMeta = function() {
};
cljs.core._meta = function cljs$core$_meta(o) {
  if (!(o == null) && !(o.cljs$core$IMeta$_meta$arity$1 == null)) {
    return o.cljs$core$IMeta$_meta$arity$1(o);
  } else {
    var x__6795__auto__ = o == null ? null : o;
    var m__6796__auto__ = cljs.core._meta[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(o) : m__6796__auto__.call(null, o);
    } else {
      var m__6796__auto____$1 = cljs.core._meta["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(o) : m__6796__auto____$1.call(null, o);
      } else {
        throw cljs.core.missing_protocol("IMeta.-meta", o);
      }
    }
  }
};
cljs.core.IWithMeta = function() {
};
cljs.core._with_meta = function cljs$core$_with_meta(o, meta) {
  if (!(o == null) && !(o.cljs$core$IWithMeta$_with_meta$arity$2 == null)) {
    return o.cljs$core$IWithMeta$_with_meta$arity$2(o, meta);
  } else {
    var x__6795__auto__ = o == null ? null : o;
    var m__6796__auto__ = cljs.core._with_meta[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(o, meta) : m__6796__auto__.call(null, o, meta);
    } else {
      var m__6796__auto____$1 = cljs.core._with_meta["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(o, meta) : m__6796__auto____$1.call(null, o, meta);
      } else {
        throw cljs.core.missing_protocol("IWithMeta.-with-meta", o);
      }
    }
  }
};
cljs.core.IReduce = function() {
};
cljs.core._reduce = function cljs$core$_reduce(var_args) {
  var args8331 = [];
  var len__7198__auto___8334 = arguments.length;
  var i__7199__auto___8335 = 0;
  while (true) {
    if (i__7199__auto___8335 < len__7198__auto___8334) {
      args8331.push(arguments[i__7199__auto___8335]);
      var G__8336 = i__7199__auto___8335 + 1;
      i__7199__auto___8335 = G__8336;
      continue;
    } else {
    }
    break;
  }
  var G__8333 = args8331.length;
  switch(G__8333) {
    case 2:
      return cljs.core._reduce.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core._reduce.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args8331.length)].join(""));;
  }
};
cljs.core._reduce.cljs$core$IFn$_invoke$arity$2 = function(coll, f) {
  if (!(coll == null) && !(coll.cljs$core$IReduce$_reduce$arity$2 == null)) {
    return coll.cljs$core$IReduce$_reduce$arity$2(coll, f);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._reduce[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(coll, f) : m__6796__auto__.call(null, coll, f);
    } else {
      var m__6796__auto____$1 = cljs.core._reduce["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(coll, f) : m__6796__auto____$1.call(null, coll, f);
      } else {
        throw cljs.core.missing_protocol("IReduce.-reduce", coll);
      }
    }
  }
};
cljs.core._reduce.cljs$core$IFn$_invoke$arity$3 = function(coll, f, start) {
  if (!(coll == null) && !(coll.cljs$core$IReduce$_reduce$arity$3 == null)) {
    return coll.cljs$core$IReduce$_reduce$arity$3(coll, f, start);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._reduce[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$3(coll, f, start) : m__6796__auto__.call(null, coll, f, start);
    } else {
      var m__6796__auto____$1 = cljs.core._reduce["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3(coll, f, start) : m__6796__auto____$1.call(null, coll, f, start);
      } else {
        throw cljs.core.missing_protocol("IReduce.-reduce", coll);
      }
    }
  }
};
cljs.core._reduce.cljs$lang$maxFixedArity = 3;
cljs.core.IKVReduce = function() {
};
cljs.core._kv_reduce = function cljs$core$_kv_reduce(coll, f, init) {
  if (!(coll == null) && !(coll.cljs$core$IKVReduce$_kv_reduce$arity$3 == null)) {
    return coll.cljs$core$IKVReduce$_kv_reduce$arity$3(coll, f, init);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._kv_reduce[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$3(coll, f, init) : m__6796__auto__.call(null, coll, f, init);
    } else {
      var m__6796__auto____$1 = cljs.core._kv_reduce["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3(coll, f, init) : m__6796__auto____$1.call(null, coll, f, init);
      } else {
        throw cljs.core.missing_protocol("IKVReduce.-kv-reduce", coll);
      }
    }
  }
};
cljs.core.IEquiv = function() {
};
cljs.core._equiv = function cljs$core$_equiv(o, other) {
  if (!(o == null) && !(o.cljs$core$IEquiv$_equiv$arity$2 == null)) {
    return o.cljs$core$IEquiv$_equiv$arity$2(o, other);
  } else {
    var x__6795__auto__ = o == null ? null : o;
    var m__6796__auto__ = cljs.core._equiv[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(o, other) : m__6796__auto__.call(null, o, other);
    } else {
      var m__6796__auto____$1 = cljs.core._equiv["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(o, other) : m__6796__auto____$1.call(null, o, other);
      } else {
        throw cljs.core.missing_protocol("IEquiv.-equiv", o);
      }
    }
  }
};
cljs.core.IHash = function() {
};
cljs.core._hash = function cljs$core$_hash(o) {
  if (!(o == null) && !(o.cljs$core$IHash$_hash$arity$1 == null)) {
    return o.cljs$core$IHash$_hash$arity$1(o);
  } else {
    var x__6795__auto__ = o == null ? null : o;
    var m__6796__auto__ = cljs.core._hash[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(o) : m__6796__auto__.call(null, o);
    } else {
      var m__6796__auto____$1 = cljs.core._hash["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(o) : m__6796__auto____$1.call(null, o);
      } else {
        throw cljs.core.missing_protocol("IHash.-hash", o);
      }
    }
  }
};
cljs.core.ISeqable = function() {
};
cljs.core._seq = function cljs$core$_seq(o) {
  if (!(o == null) && !(o.cljs$core$ISeqable$_seq$arity$1 == null)) {
    return o.cljs$core$ISeqable$_seq$arity$1(o);
  } else {
    var x__6795__auto__ = o == null ? null : o;
    var m__6796__auto__ = cljs.core._seq[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(o) : m__6796__auto__.call(null, o);
    } else {
      var m__6796__auto____$1 = cljs.core._seq["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(o) : m__6796__auto____$1.call(null, o);
      } else {
        throw cljs.core.missing_protocol("ISeqable.-seq", o);
      }
    }
  }
};
cljs.core.ISequential = function() {
};
cljs.core.IList = function() {
};
cljs.core.IRecord = function() {
};
cljs.core.IReversible = function() {
};
cljs.core._rseq = function cljs$core$_rseq(coll) {
  if (!(coll == null) && !(coll.cljs$core$IReversible$_rseq$arity$1 == null)) {
    return coll.cljs$core$IReversible$_rseq$arity$1(coll);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._rseq[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto__.call(null, coll);
    } else {
      var m__6796__auto____$1 = cljs.core._rseq["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto____$1.call(null, coll);
      } else {
        throw cljs.core.missing_protocol("IReversible.-rseq", coll);
      }
    }
  }
};
cljs.core.ISorted = function() {
};
cljs.core._sorted_seq = function cljs$core$_sorted_seq(coll, ascending_QMARK_) {
  if (!(coll == null) && !(coll.cljs$core$ISorted$_sorted_seq$arity$2 == null)) {
    return coll.cljs$core$ISorted$_sorted_seq$arity$2(coll, ascending_QMARK_);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._sorted_seq[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(coll, ascending_QMARK_) : m__6796__auto__.call(null, coll, ascending_QMARK_);
    } else {
      var m__6796__auto____$1 = cljs.core._sorted_seq["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(coll, ascending_QMARK_) : m__6796__auto____$1.call(null, coll, ascending_QMARK_);
      } else {
        throw cljs.core.missing_protocol("ISorted.-sorted-seq", coll);
      }
    }
  }
};
cljs.core._sorted_seq_from = function cljs$core$_sorted_seq_from(coll, k, ascending_QMARK_) {
  if (!(coll == null) && !(coll.cljs$core$ISorted$_sorted_seq_from$arity$3 == null)) {
    return coll.cljs$core$ISorted$_sorted_seq_from$arity$3(coll, k, ascending_QMARK_);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._sorted_seq_from[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$3(coll, k, ascending_QMARK_) : m__6796__auto__.call(null, coll, k, ascending_QMARK_);
    } else {
      var m__6796__auto____$1 = cljs.core._sorted_seq_from["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3(coll, k, ascending_QMARK_) : m__6796__auto____$1.call(null, coll, k, ascending_QMARK_);
      } else {
        throw cljs.core.missing_protocol("ISorted.-sorted-seq-from", coll);
      }
    }
  }
};
cljs.core._entry_key = function cljs$core$_entry_key(coll, entry) {
  if (!(coll == null) && !(coll.cljs$core$ISorted$_entry_key$arity$2 == null)) {
    return coll.cljs$core$ISorted$_entry_key$arity$2(coll, entry);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._entry_key[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(coll, entry) : m__6796__auto__.call(null, coll, entry);
    } else {
      var m__6796__auto____$1 = cljs.core._entry_key["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(coll, entry) : m__6796__auto____$1.call(null, coll, entry);
      } else {
        throw cljs.core.missing_protocol("ISorted.-entry-key", coll);
      }
    }
  }
};
cljs.core._comparator = function cljs$core$_comparator(coll) {
  if (!(coll == null) && !(coll.cljs$core$ISorted$_comparator$arity$1 == null)) {
    return coll.cljs$core$ISorted$_comparator$arity$1(coll);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._comparator[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto__.call(null, coll);
    } else {
      var m__6796__auto____$1 = cljs.core._comparator["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto____$1.call(null, coll);
      } else {
        throw cljs.core.missing_protocol("ISorted.-comparator", coll);
      }
    }
  }
};
cljs.core.IWriter = function() {
};
cljs.core._write = function cljs$core$_write(writer, s) {
  if (!(writer == null) && !(writer.cljs$core$IWriter$_write$arity$2 == null)) {
    return writer.cljs$core$IWriter$_write$arity$2(writer, s);
  } else {
    var x__6795__auto__ = writer == null ? null : writer;
    var m__6796__auto__ = cljs.core._write[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(writer, s) : m__6796__auto__.call(null, writer, s);
    } else {
      var m__6796__auto____$1 = cljs.core._write["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(writer, s) : m__6796__auto____$1.call(null, writer, s);
      } else {
        throw cljs.core.missing_protocol("IWriter.-write", writer);
      }
    }
  }
};
cljs.core._flush = function cljs$core$_flush(writer) {
  if (!(writer == null) && !(writer.cljs$core$IWriter$_flush$arity$1 == null)) {
    return writer.cljs$core$IWriter$_flush$arity$1(writer);
  } else {
    var x__6795__auto__ = writer == null ? null : writer;
    var m__6796__auto__ = cljs.core._flush[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(writer) : m__6796__auto__.call(null, writer);
    } else {
      var m__6796__auto____$1 = cljs.core._flush["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(writer) : m__6796__auto____$1.call(null, writer);
      } else {
        throw cljs.core.missing_protocol("IWriter.-flush", writer);
      }
    }
  }
};
cljs.core.IPrintWithWriter = function() {
};
cljs.core._pr_writer = function cljs$core$_pr_writer(o, writer, opts) {
  if (!(o == null) && !(o.cljs$core$IPrintWithWriter$_pr_writer$arity$3 == null)) {
    return o.cljs$core$IPrintWithWriter$_pr_writer$arity$3(o, writer, opts);
  } else {
    var x__6795__auto__ = o == null ? null : o;
    var m__6796__auto__ = cljs.core._pr_writer[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$3(o, writer, opts) : m__6796__auto__.call(null, o, writer, opts);
    } else {
      var m__6796__auto____$1 = cljs.core._pr_writer["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3(o, writer, opts) : m__6796__auto____$1.call(null, o, writer, opts);
      } else {
        throw cljs.core.missing_protocol("IPrintWithWriter.-pr-writer", o);
      }
    }
  }
};
cljs.core.IPending = function() {
};
cljs.core._realized_QMARK_ = function cljs$core$_realized_QMARK_(x) {
  if (!(x == null) && !(x.cljs$core$IPending$_realized_QMARK_$arity$1 == null)) {
    return x.cljs$core$IPending$_realized_QMARK_$arity$1(x);
  } else {
    var x__6795__auto__ = x == null ? null : x;
    var m__6796__auto__ = cljs.core._realized_QMARK_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(x) : m__6796__auto__.call(null, x);
    } else {
      var m__6796__auto____$1 = cljs.core._realized_QMARK_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(x) : m__6796__auto____$1.call(null, x);
      } else {
        throw cljs.core.missing_protocol("IPending.-realized?", x);
      }
    }
  }
};
cljs.core.IWatchable = function() {
};
cljs.core._notify_watches = function cljs$core$_notify_watches(this$, oldval, newval) {
  if (!(this$ == null) && !(this$.cljs$core$IWatchable$_notify_watches$arity$3 == null)) {
    return this$.cljs$core$IWatchable$_notify_watches$arity$3(this$, oldval, newval);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._notify_watches[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$3(this$, oldval, newval) : m__6796__auto__.call(null, this$, oldval, newval);
    } else {
      var m__6796__auto____$1 = cljs.core._notify_watches["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3(this$, oldval, newval) : m__6796__auto____$1.call(null, this$, oldval, newval);
      } else {
        throw cljs.core.missing_protocol("IWatchable.-notify-watches", this$);
      }
    }
  }
};
cljs.core._add_watch = function cljs$core$_add_watch(this$, key, f) {
  if (!(this$ == null) && !(this$.cljs$core$IWatchable$_add_watch$arity$3 == null)) {
    return this$.cljs$core$IWatchable$_add_watch$arity$3(this$, key, f);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._add_watch[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$3(this$, key, f) : m__6796__auto__.call(null, this$, key, f);
    } else {
      var m__6796__auto____$1 = cljs.core._add_watch["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3(this$, key, f) : m__6796__auto____$1.call(null, this$, key, f);
      } else {
        throw cljs.core.missing_protocol("IWatchable.-add-watch", this$);
      }
    }
  }
};
cljs.core._remove_watch = function cljs$core$_remove_watch(this$, key) {
  if (!(this$ == null) && !(this$.cljs$core$IWatchable$_remove_watch$arity$2 == null)) {
    return this$.cljs$core$IWatchable$_remove_watch$arity$2(this$, key);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = cljs.core._remove_watch[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(this$, key) : m__6796__auto__.call(null, this$, key);
    } else {
      var m__6796__auto____$1 = cljs.core._remove_watch["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(this$, key) : m__6796__auto____$1.call(null, this$, key);
      } else {
        throw cljs.core.missing_protocol("IWatchable.-remove-watch", this$);
      }
    }
  }
};
cljs.core.IEditableCollection = function() {
};
cljs.core._as_transient = function cljs$core$_as_transient(coll) {
  if (!(coll == null) && !(coll.cljs$core$IEditableCollection$_as_transient$arity$1 == null)) {
    return coll.cljs$core$IEditableCollection$_as_transient$arity$1(coll);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._as_transient[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto__.call(null, coll);
    } else {
      var m__6796__auto____$1 = cljs.core._as_transient["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto____$1.call(null, coll);
      } else {
        throw cljs.core.missing_protocol("IEditableCollection.-as-transient", coll);
      }
    }
  }
};
cljs.core.ITransientCollection = function() {
};
cljs.core._conj_BANG_ = function cljs$core$_conj_BANG_(tcoll, val) {
  if (!(tcoll == null) && !(tcoll.cljs$core$ITransientCollection$_conj_BANG_$arity$2 == null)) {
    return tcoll.cljs$core$ITransientCollection$_conj_BANG_$arity$2(tcoll, val);
  } else {
    var x__6795__auto__ = tcoll == null ? null : tcoll;
    var m__6796__auto__ = cljs.core._conj_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(tcoll, val) : m__6796__auto__.call(null, tcoll, val);
    } else {
      var m__6796__auto____$1 = cljs.core._conj_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(tcoll, val) : m__6796__auto____$1.call(null, tcoll, val);
      } else {
        throw cljs.core.missing_protocol("ITransientCollection.-conj!", tcoll);
      }
    }
  }
};
cljs.core._persistent_BANG_ = function cljs$core$_persistent_BANG_(tcoll) {
  if (!(tcoll == null) && !(tcoll.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 == null)) {
    return tcoll.cljs$core$ITransientCollection$_persistent_BANG_$arity$1(tcoll);
  } else {
    var x__6795__auto__ = tcoll == null ? null : tcoll;
    var m__6796__auto__ = cljs.core._persistent_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(tcoll) : m__6796__auto__.call(null, tcoll);
    } else {
      var m__6796__auto____$1 = cljs.core._persistent_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(tcoll) : m__6796__auto____$1.call(null, tcoll);
      } else {
        throw cljs.core.missing_protocol("ITransientCollection.-persistent!", tcoll);
      }
    }
  }
};
cljs.core.ITransientAssociative = function() {
};
cljs.core._assoc_BANG_ = function cljs$core$_assoc_BANG_(tcoll, key, val) {
  if (!(tcoll == null) && !(tcoll.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3 == null)) {
    return tcoll.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3(tcoll, key, val);
  } else {
    var x__6795__auto__ = tcoll == null ? null : tcoll;
    var m__6796__auto__ = cljs.core._assoc_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$3(tcoll, key, val) : m__6796__auto__.call(null, tcoll, key, val);
    } else {
      var m__6796__auto____$1 = cljs.core._assoc_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3(tcoll, key, val) : m__6796__auto____$1.call(null, tcoll, key, val);
      } else {
        throw cljs.core.missing_protocol("ITransientAssociative.-assoc!", tcoll);
      }
    }
  }
};
cljs.core.ITransientMap = function() {
};
cljs.core._dissoc_BANG_ = function cljs$core$_dissoc_BANG_(tcoll, key) {
  if (!(tcoll == null) && !(tcoll.cljs$core$ITransientMap$_dissoc_BANG_$arity$2 == null)) {
    return tcoll.cljs$core$ITransientMap$_dissoc_BANG_$arity$2(tcoll, key);
  } else {
    var x__6795__auto__ = tcoll == null ? null : tcoll;
    var m__6796__auto__ = cljs.core._dissoc_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(tcoll, key) : m__6796__auto__.call(null, tcoll, key);
    } else {
      var m__6796__auto____$1 = cljs.core._dissoc_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(tcoll, key) : m__6796__auto____$1.call(null, tcoll, key);
      } else {
        throw cljs.core.missing_protocol("ITransientMap.-dissoc!", tcoll);
      }
    }
  }
};
cljs.core.ITransientVector = function() {
};
cljs.core._assoc_n_BANG_ = function cljs$core$_assoc_n_BANG_(tcoll, n, val) {
  if (!(tcoll == null) && !(tcoll.cljs$core$ITransientVector$_assoc_n_BANG_$arity$3 == null)) {
    return tcoll.cljs$core$ITransientVector$_assoc_n_BANG_$arity$3(tcoll, n, val);
  } else {
    var x__6795__auto__ = tcoll == null ? null : tcoll;
    var m__6796__auto__ = cljs.core._assoc_n_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$3(tcoll, n, val) : m__6796__auto__.call(null, tcoll, n, val);
    } else {
      var m__6796__auto____$1 = cljs.core._assoc_n_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3(tcoll, n, val) : m__6796__auto____$1.call(null, tcoll, n, val);
      } else {
        throw cljs.core.missing_protocol("ITransientVector.-assoc-n!", tcoll);
      }
    }
  }
};
cljs.core._pop_BANG_ = function cljs$core$_pop_BANG_(tcoll) {
  if (!(tcoll == null) && !(tcoll.cljs$core$ITransientVector$_pop_BANG_$arity$1 == null)) {
    return tcoll.cljs$core$ITransientVector$_pop_BANG_$arity$1(tcoll);
  } else {
    var x__6795__auto__ = tcoll == null ? null : tcoll;
    var m__6796__auto__ = cljs.core._pop_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(tcoll) : m__6796__auto__.call(null, tcoll);
    } else {
      var m__6796__auto____$1 = cljs.core._pop_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(tcoll) : m__6796__auto____$1.call(null, tcoll);
      } else {
        throw cljs.core.missing_protocol("ITransientVector.-pop!", tcoll);
      }
    }
  }
};
cljs.core.ITransientSet = function() {
};
cljs.core._disjoin_BANG_ = function cljs$core$_disjoin_BANG_(tcoll, v) {
  if (!(tcoll == null) && !(tcoll.cljs$core$ITransientSet$_disjoin_BANG_$arity$2 == null)) {
    return tcoll.cljs$core$ITransientSet$_disjoin_BANG_$arity$2(tcoll, v);
  } else {
    var x__6795__auto__ = tcoll == null ? null : tcoll;
    var m__6796__auto__ = cljs.core._disjoin_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(tcoll, v) : m__6796__auto__.call(null, tcoll, v);
    } else {
      var m__6796__auto____$1 = cljs.core._disjoin_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(tcoll, v) : m__6796__auto____$1.call(null, tcoll, v);
      } else {
        throw cljs.core.missing_protocol("ITransientSet.-disjoin!", tcoll);
      }
    }
  }
};
cljs.core.IComparable = function() {
};
cljs.core._compare = function cljs$core$_compare(x, y) {
  if (!(x == null) && !(x.cljs$core$IComparable$_compare$arity$2 == null)) {
    return x.cljs$core$IComparable$_compare$arity$2(x, y);
  } else {
    var x__6795__auto__ = x == null ? null : x;
    var m__6796__auto__ = cljs.core._compare[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(x, y) : m__6796__auto__.call(null, x, y);
    } else {
      var m__6796__auto____$1 = cljs.core._compare["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(x, y) : m__6796__auto____$1.call(null, x, y);
      } else {
        throw cljs.core.missing_protocol("IComparable.-compare", x);
      }
    }
  }
};
cljs.core.IChunk = function() {
};
cljs.core._drop_first = function cljs$core$_drop_first(coll) {
  if (!(coll == null) && !(coll.cljs$core$IChunk$_drop_first$arity$1 == null)) {
    return coll.cljs$core$IChunk$_drop_first$arity$1(coll);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._drop_first[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto__.call(null, coll);
    } else {
      var m__6796__auto____$1 = cljs.core._drop_first["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto____$1.call(null, coll);
      } else {
        throw cljs.core.missing_protocol("IChunk.-drop-first", coll);
      }
    }
  }
};
cljs.core.IChunkedSeq = function() {
};
cljs.core._chunked_first = function cljs$core$_chunked_first(coll) {
  if (!(coll == null) && !(coll.cljs$core$IChunkedSeq$_chunked_first$arity$1 == null)) {
    return coll.cljs$core$IChunkedSeq$_chunked_first$arity$1(coll);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._chunked_first[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto__.call(null, coll);
    } else {
      var m__6796__auto____$1 = cljs.core._chunked_first["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto____$1.call(null, coll);
      } else {
        throw cljs.core.missing_protocol("IChunkedSeq.-chunked-first", coll);
      }
    }
  }
};
cljs.core._chunked_rest = function cljs$core$_chunked_rest(coll) {
  if (!(coll == null) && !(coll.cljs$core$IChunkedSeq$_chunked_rest$arity$1 == null)) {
    return coll.cljs$core$IChunkedSeq$_chunked_rest$arity$1(coll);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._chunked_rest[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto__.call(null, coll);
    } else {
      var m__6796__auto____$1 = cljs.core._chunked_rest["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto____$1.call(null, coll);
      } else {
        throw cljs.core.missing_protocol("IChunkedSeq.-chunked-rest", coll);
      }
    }
  }
};
cljs.core.IChunkedNext = function() {
};
cljs.core._chunked_next = function cljs$core$_chunked_next(coll) {
  if (!(coll == null) && !(coll.cljs$core$IChunkedNext$_chunked_next$arity$1 == null)) {
    return coll.cljs$core$IChunkedNext$_chunked_next$arity$1(coll);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._chunked_next[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto__.call(null, coll);
    } else {
      var m__6796__auto____$1 = cljs.core._chunked_next["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto____$1.call(null, coll);
      } else {
        throw cljs.core.missing_protocol("IChunkedNext.-chunked-next", coll);
      }
    }
  }
};
cljs.core.INamed = function() {
};
cljs.core._name = function cljs$core$_name(x) {
  if (!(x == null) && !(x.cljs$core$INamed$_name$arity$1 == null)) {
    return x.cljs$core$INamed$_name$arity$1(x);
  } else {
    var x__6795__auto__ = x == null ? null : x;
    var m__6796__auto__ = cljs.core._name[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(x) : m__6796__auto__.call(null, x);
    } else {
      var m__6796__auto____$1 = cljs.core._name["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(x) : m__6796__auto____$1.call(null, x);
      } else {
        throw cljs.core.missing_protocol("INamed.-name", x);
      }
    }
  }
};
cljs.core._namespace = function cljs$core$_namespace(x) {
  if (!(x == null) && !(x.cljs$core$INamed$_namespace$arity$1 == null)) {
    return x.cljs$core$INamed$_namespace$arity$1(x);
  } else {
    var x__6795__auto__ = x == null ? null : x;
    var m__6796__auto__ = cljs.core._namespace[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(x) : m__6796__auto__.call(null, x);
    } else {
      var m__6796__auto____$1 = cljs.core._namespace["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(x) : m__6796__auto____$1.call(null, x);
      } else {
        throw cljs.core.missing_protocol("INamed.-namespace", x);
      }
    }
  }
};
cljs.core.IAtom = function() {
};
cljs.core.IReset = function() {
};
cljs.core._reset_BANG_ = function cljs$core$_reset_BANG_(o, new_value) {
  if (!(o == null) && !(o.cljs$core$IReset$_reset_BANG_$arity$2 == null)) {
    return o.cljs$core$IReset$_reset_BANG_$arity$2(o, new_value);
  } else {
    var x__6795__auto__ = o == null ? null : o;
    var m__6796__auto__ = cljs.core._reset_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(o, new_value) : m__6796__auto__.call(null, o, new_value);
    } else {
      var m__6796__auto____$1 = cljs.core._reset_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(o, new_value) : m__6796__auto____$1.call(null, o, new_value);
      } else {
        throw cljs.core.missing_protocol("IReset.-reset!", o);
      }
    }
  }
};
cljs.core.ISwap = function() {
};
cljs.core._swap_BANG_ = function cljs$core$_swap_BANG_(var_args) {
  var args8338 = [];
  var len__7198__auto___8341 = arguments.length;
  var i__7199__auto___8342 = 0;
  while (true) {
    if (i__7199__auto___8342 < len__7198__auto___8341) {
      args8338.push(arguments[i__7199__auto___8342]);
      var G__8343 = i__7199__auto___8342 + 1;
      i__7199__auto___8342 = G__8343;
      continue;
    } else {
    }
    break;
  }
  var G__8340 = args8338.length;
  switch(G__8340) {
    case 2:
      return cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 4:
      return cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    case 5:
      return cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$5(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args8338.length)].join(""));;
  }
};
cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$2 = function(o, f) {
  if (!(o == null) && !(o.cljs$core$ISwap$_swap_BANG_$arity$2 == null)) {
    return o.cljs$core$ISwap$_swap_BANG_$arity$2(o, f);
  } else {
    var x__6795__auto__ = o == null ? null : o;
    var m__6796__auto__ = cljs.core._swap_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(o, f) : m__6796__auto__.call(null, o, f);
    } else {
      var m__6796__auto____$1 = cljs.core._swap_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(o, f) : m__6796__auto____$1.call(null, o, f);
      } else {
        throw cljs.core.missing_protocol("ISwap.-swap!", o);
      }
    }
  }
};
cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$3 = function(o, f, a) {
  if (!(o == null) && !(o.cljs$core$ISwap$_swap_BANG_$arity$3 == null)) {
    return o.cljs$core$ISwap$_swap_BANG_$arity$3(o, f, a);
  } else {
    var x__6795__auto__ = o == null ? null : o;
    var m__6796__auto__ = cljs.core._swap_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$3(o, f, a) : m__6796__auto__.call(null, o, f, a);
    } else {
      var m__6796__auto____$1 = cljs.core._swap_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3(o, f, a) : m__6796__auto____$1.call(null, o, f, a);
      } else {
        throw cljs.core.missing_protocol("ISwap.-swap!", o);
      }
    }
  }
};
cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$4 = function(o, f, a, b) {
  if (!(o == null) && !(o.cljs$core$ISwap$_swap_BANG_$arity$4 == null)) {
    return o.cljs$core$ISwap$_swap_BANG_$arity$4(o, f, a, b);
  } else {
    var x__6795__auto__ = o == null ? null : o;
    var m__6796__auto__ = cljs.core._swap_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$4 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$4(o, f, a, b) : m__6796__auto__.call(null, o, f, a, b);
    } else {
      var m__6796__auto____$1 = cljs.core._swap_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$4 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$4(o, f, a, b) : m__6796__auto____$1.call(null, o, f, a, b);
      } else {
        throw cljs.core.missing_protocol("ISwap.-swap!", o);
      }
    }
  }
};
cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$5 = function(o, f, a, b, xs) {
  if (!(o == null) && !(o.cljs$core$ISwap$_swap_BANG_$arity$5 == null)) {
    return o.cljs$core$ISwap$_swap_BANG_$arity$5(o, f, a, b, xs);
  } else {
    var x__6795__auto__ = o == null ? null : o;
    var m__6796__auto__ = cljs.core._swap_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$5 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$5(o, f, a, b, xs) : m__6796__auto__.call(null, o, f, a, b, xs);
    } else {
      var m__6796__auto____$1 = cljs.core._swap_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$5 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$5(o, f, a, b, xs) : m__6796__auto____$1.call(null, o, f, a, b, xs);
      } else {
        throw cljs.core.missing_protocol("ISwap.-swap!", o);
      }
    }
  }
};
cljs.core._swap_BANG_.cljs$lang$maxFixedArity = 5;
cljs.core.IVolatile = function() {
};
cljs.core._vreset_BANG_ = function cljs$core$_vreset_BANG_(o, new_value) {
  if (!(o == null) && !(o.cljs$core$IVolatile$_vreset_BANG_$arity$2 == null)) {
    return o.cljs$core$IVolatile$_vreset_BANG_$arity$2(o, new_value);
  } else {
    var x__6795__auto__ = o == null ? null : o;
    var m__6796__auto__ = cljs.core._vreset_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(o, new_value) : m__6796__auto__.call(null, o, new_value);
    } else {
      var m__6796__auto____$1 = cljs.core._vreset_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(o, new_value) : m__6796__auto____$1.call(null, o, new_value);
      } else {
        throw cljs.core.missing_protocol("IVolatile.-vreset!", o);
      }
    }
  }
};
cljs.core.IIterable = function() {
};
cljs.core._iterator = function cljs$core$_iterator(coll) {
  if (!(coll == null) && !(coll.cljs$core$IIterable$_iterator$arity$1 == null)) {
    return coll.cljs$core$IIterable$_iterator$arity$1(coll);
  } else {
    var x__6795__auto__ = coll == null ? null : coll;
    var m__6796__auto__ = cljs.core._iterator[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto__.call(null, coll);
    } else {
      var m__6796__auto____$1 = cljs.core._iterator["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__6796__auto____$1.call(null, coll);
      } else {
        throw cljs.core.missing_protocol("IIterable.-iterator", coll);
      }
    }
  }
};
cljs.core.StringBufferWriter = function(sb) {
  this.sb = sb;
  this.cljs$lang$protocol_mask$partition0$ = 1073741824;
  this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.StringBufferWriter.prototype.cljs$core$IWriter$_write$arity$2 = function(_, s) {
  var self__ = this;
  var ___$1 = this;
  return self__.sb.append(s);
};
cljs.core.StringBufferWriter.prototype.cljs$core$IWriter$_flush$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return null;
};
cljs.core.StringBufferWriter.getBasis = function() {
  return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "sb", "sb", -1249746442, null)], null);
};
cljs.core.StringBufferWriter.cljs$lang$type = true;
cljs.core.StringBufferWriter.cljs$lang$ctorStr = "cljs.core/StringBufferWriter";
cljs.core.StringBufferWriter.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/StringBufferWriter");
};
cljs.core.__GT_StringBufferWriter = function cljs$core$__GT_StringBufferWriter(sb) {
  return new cljs.core.StringBufferWriter(sb);
};
cljs.core.pr_str_STAR_ = function cljs$core$pr_str_STAR_(obj) {
  var sb = new goog.string.StringBuffer;
  var writer = new cljs.core.StringBufferWriter(sb);
  obj.cljs$core$IPrintWithWriter$_pr_writer$arity$3(null, writer, cljs.core.pr_opts());
  writer.cljs$core$IWriter$_flush$arity$1(null);
  return [cljs.core.str(sb)].join("");
};
cljs.core.int_rotate_left = function cljs$core$int_rotate_left(x, n) {
  return x << n | x >>> -n;
};
if (typeof Math.imul !== "undefined" && !(Math.imul(4294967295, 5) === 0)) {
  cljs.core.imul = function cljs$core$imul(a, b) {
    return Math.imul(a, b);
  };
} else {
  cljs.core.imul = function cljs$core$imul(a, b) {
    var ah = a >>> 16 & 65535;
    var al = a & 65535;
    var bh = b >>> 16 & 65535;
    var bl = b & 65535;
    return al * bl + (ah * bl + al * bh << 16 >>> 0) | 0;
  };
}
cljs.core.m3_seed = 0;
cljs.core.m3_C1 = 3432918353 | 0;
cljs.core.m3_C2 = 461845907 | 0;
cljs.core.m3_mix_K1 = function cljs$core$m3_mix_K1(k1) {
  return cljs.core.imul(cljs.core.int_rotate_left(cljs.core.imul(k1 | 0, cljs.core.m3_C1), 15), cljs.core.m3_C2);
};
cljs.core.m3_mix_H1 = function cljs$core$m3_mix_H1(h1, k1) {
  return cljs.core.imul(cljs.core.int_rotate_left((h1 | 0) ^ (k1 | 0), 13), 5) + (3864292196 | 0) | 0;
};
cljs.core.m3_fmix = function cljs$core$m3_fmix(h1, len) {
  var h1__$1 = h1 | 0;
  var h1__$2 = h1__$1 ^ len;
  var h1__$3 = h1__$2 ^ h1__$2 >>> 16;
  var h1__$4 = cljs.core.imul(h1__$3, 2246822507 | 0);
  var h1__$5 = h1__$4 ^ h1__$4 >>> 13;
  var h1__$6 = cljs.core.imul(h1__$5, 3266489909 | 0);
  var h1__$7 = h1__$6 ^ h1__$6 >>> 16;
  return h1__$7;
};
cljs.core.m3_hash_int = function cljs$core$m3_hash_int(in$) {
  if (in$ === 0) {
    return in$;
  } else {
    var k1 = cljs.core.m3_mix_K1(in$);
    var h1 = cljs.core.m3_mix_H1(cljs.core.m3_seed, k1);
    return cljs.core.m3_fmix(h1, 4);
  }
};
cljs.core.m3_hash_unencoded_chars = function cljs$core$m3_hash_unencoded_chars(in$) {
  var h1 = function() {
    var i = 1;
    var h1 = cljs.core.m3_seed;
    while (true) {
      if (i < in$.length) {
        var G__8345 = i + 2;
        var G__8346 = cljs.core.m3_mix_H1(h1, cljs.core.m3_mix_K1(in$.charCodeAt(i - 1) | in$.charCodeAt(i) << 16));
        i = G__8345;
        h1 = G__8346;
        continue;
      } else {
        return h1;
      }
      break;
    }
  }();
  var h1__$1 = (in$.length & 1) === 1 ? h1 ^ cljs.core.m3_mix_K1(in$.charCodeAt(in$.length - 1)) : h1;
  return cljs.core.m3_fmix(h1__$1, cljs.core.imul(2, in$.length));
};
cljs.core.string_hash_cache = {};
cljs.core.string_hash_cache_count = 0;
cljs.core.hash_string_STAR_ = function cljs$core$hash_string_STAR_(s) {
  if (!(s == null)) {
    var len = s.length;
    if (len > 0) {
      var i = 0;
      var hash = 0;
      while (true) {
        if (i < len) {
          var G__8349 = i + 1;
          var G__8350 = cljs.core.imul(31, hash) + s.charCodeAt(i);
          i = G__8349;
          hash = G__8350;
          continue;
        } else {
          return hash;
        }
        break;
      }
    } else {
      return 0;
    }
  } else {
    return 0;
  }
};
cljs.core.add_to_string_hash_cache = function cljs$core$add_to_string_hash_cache(k) {
  var h = cljs.core.hash_string_STAR_(k);
  cljs.core.string_hash_cache[k] = h;
  cljs.core.string_hash_cache_count = cljs.core.string_hash_cache_count + 1;
  return h;
};
cljs.core.hash_string = function cljs$core$hash_string(k) {
  if (cljs.core.string_hash_cache_count > 255) {
    cljs.core.string_hash_cache = {};
    cljs.core.string_hash_cache_count = 0;
  } else {
  }
  var h = cljs.core.string_hash_cache[k];
  if (typeof h === "number") {
    return h;
  } else {
    return cljs.core.add_to_string_hash_cache(k);
  }
};
cljs.core.hash = function cljs$core$hash(o) {
  if (!(o == null) ? o.cljs$lang$protocol_mask$partition0$ & 4194304 || o.cljs$core$IHash$ ? true : false : false) {
    return o.cljs$core$IHash$_hash$arity$1(null);
  } else {
    if (typeof o === "number") {
      return Math.floor(o) % 2147483647;
    } else {
      if (o === true) {
        return 1;
      } else {
        if (o === false) {
          return 0;
        } else {
          if (typeof o === "string") {
            return cljs.core.m3_hash_int(cljs.core.hash_string(o));
          } else {
            if (o instanceof Date) {
              return o.valueOf();
            } else {
              if (o == null) {
                return 0;
              } else {
                return cljs.core._hash(o);
              }
            }
          }
        }
      }
    }
  }
};
cljs.core.hash_combine = function cljs$core$hash_combine(seed, hash) {
  return seed ^ hash + 2654435769 + (seed << 6) + (seed >> 2);
};
cljs.core.instance_QMARK_ = function cljs$core$instance_QMARK_(c, x) {
  return x instanceof c;
};
cljs.core.symbol_QMARK_ = function cljs$core$symbol_QMARK_(x) {
  return x instanceof cljs.core.Symbol;
};
cljs.core.hash_symbol = function cljs$core$hash_symbol(sym) {
  return cljs.core.hash_combine(cljs.core.m3_hash_unencoded_chars(sym.name), cljs.core.hash_string(sym.ns));
};
cljs.core.compare_symbols = function cljs$core$compare_symbols(a, b) {
  if (a.str === b.str) {
    return 0;
  } else {
    if (cljs.core.truth_(function() {
      var and__6128__auto__ = cljs.core.not(a.ns);
      if (and__6128__auto__) {
        return b.ns;
      } else {
        return and__6128__auto__;
      }
    }())) {
      return -1;
    } else {
      if (cljs.core.truth_(a.ns)) {
        if (cljs.core.not(b.ns)) {
          return 1;
        } else {
          var nsc = function() {
            var G__8363 = a.ns;
            var G__8364 = b.ns;
            return goog.array.defaultCompare(G__8363, G__8364);
          }();
          if (0 === nsc) {
            var G__8365 = a.name;
            var G__8366 = b.name;
            return goog.array.defaultCompare(G__8365, G__8366);
          } else {
            return nsc;
          }
        }
      } else {
        var G__8367 = a.name;
        var G__8368 = b.name;
        return goog.array.defaultCompare(G__8367, G__8368);
      }
    }
  }
};
cljs.core.Symbol = function(ns, name, str, _hash, _meta) {
  this.ns = ns;
  this.name = name;
  this.str = str;
  this._hash = _hash;
  this._meta = _meta;
  this.cljs$lang$protocol_mask$partition0$ = 2154168321;
  this.cljs$lang$protocol_mask$partition1$ = 4096;
};
cljs.core.Symbol.prototype.toString = function() {
  var self__ = this;
  var _ = this;
  return self__.str;
};
cljs.core.Symbol.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.Symbol.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(_, other) {
  var self__ = this;
  var ___$1 = this;
  if (other instanceof cljs.core.Symbol) {
    return self__.str === other.str;
  } else {
    return false;
  }
};
cljs.core.Symbol.prototype.call = function() {
  var G__8370 = null;
  var G__8370__2 = function(self__, coll) {
    var self__ = this;
    var self____$1 = this;
    var sym = self____$1;
    return cljs.core.get.cljs$core$IFn$_invoke$arity$2 ? cljs.core.get.cljs$core$IFn$_invoke$arity$2(coll, sym) : cljs.core.get.call(null, coll, sym);
  };
  var G__8370__3 = function(self__, coll, not_found) {
    var self__ = this;
    var self____$1 = this;
    var sym = self____$1;
    return cljs.core.get.cljs$core$IFn$_invoke$arity$3 ? cljs.core.get.cljs$core$IFn$_invoke$arity$3(coll, sym, not_found) : cljs.core.get.call(null, coll, sym, not_found);
  };
  G__8370 = function(self__, coll, not_found) {
    switch(arguments.length) {
      case 2:
        return G__8370__2.call(this, self__, coll);
      case 3:
        return G__8370__3.call(this, self__, coll, not_found);
    }
    throw new Error("Invalid arity: " + arguments.length);
  };
  G__8370.cljs$core$IFn$_invoke$arity$2 = G__8370__2;
  G__8370.cljs$core$IFn$_invoke$arity$3 = G__8370__3;
  return G__8370;
}();
cljs.core.Symbol.prototype.apply = function(self__, args8369) {
  var self__ = this;
  var self____$1 = this;
  return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args8369)));
};
cljs.core.Symbol.prototype.cljs$core$IFn$_invoke$arity$1 = function(coll) {
  var self__ = this;
  var sym = this;
  return cljs.core.get.cljs$core$IFn$_invoke$arity$2 ? cljs.core.get.cljs$core$IFn$_invoke$arity$2(coll, sym) : cljs.core.get.call(null, coll, sym);
};
cljs.core.Symbol.prototype.cljs$core$IFn$_invoke$arity$2 = function(coll, not_found) {
  var self__ = this;
  var sym = this;
  return cljs.core.get.cljs$core$IFn$_invoke$arity$3 ? cljs.core.get.cljs$core$IFn$_invoke$arity$3(coll, sym, not_found) : cljs.core.get.call(null, coll, sym, not_found);
};
cljs.core.Symbol.prototype.cljs$core$IMeta$_meta$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return self__._meta;
};
cljs.core.Symbol.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(_, new_meta) {
  var self__ = this;
  var ___$1 = this;
  return new cljs.core.Symbol(self__.ns, self__.name, self__.str, self__._hash, new_meta);
};
cljs.core.Symbol.prototype.cljs$core$IHash$_hash$arity$1 = function(sym) {
  var self__ = this;
  var sym__$1 = this;
  var h__6575__auto__ = self__._hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_symbol(sym__$1);
    self__._hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.Symbol.prototype.cljs$core$INamed$_name$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return self__.name;
};
cljs.core.Symbol.prototype.cljs$core$INamed$_namespace$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return self__.ns;
};
cljs.core.Symbol.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(o, writer, _) {
  var self__ = this;
  var o__$1 = this;
  return cljs.core._write(writer, self__.str);
};
cljs.core.Symbol.getBasis = function() {
  return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "ns", "ns", 2082130287, null), new cljs.core.Symbol(null, "name", "name", -810760592, null), new cljs.core.Symbol(null, "str", "str", -1564826950, null), cljs.core.with_meta(new cljs.core.Symbol(null, "_hash", "_hash", -2130838312, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), new cljs.core.Symbol(null, 
  "_meta", "_meta", -1716892533, null)], null);
};
cljs.core.Symbol.cljs$lang$type = true;
cljs.core.Symbol.cljs$lang$ctorStr = "cljs.core/Symbol";
cljs.core.Symbol.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/Symbol");
};
cljs.core.__GT_Symbol = function cljs$core$__GT_Symbol(ns, name, str, _hash, _meta) {
  return new cljs.core.Symbol(ns, name, str, _hash, _meta);
};
cljs.core.symbol = function cljs$core$symbol(var_args) {
  var args8371 = [];
  var len__7198__auto___8374 = arguments.length;
  var i__7199__auto___8375 = 0;
  while (true) {
    if (i__7199__auto___8375 < len__7198__auto___8374) {
      args8371.push(arguments[i__7199__auto___8375]);
      var G__8376 = i__7199__auto___8375 + 1;
      i__7199__auto___8375 = G__8376;
      continue;
    } else {
    }
    break;
  }
  var G__8373 = args8371.length;
  switch(G__8373) {
    case 1:
      return cljs.core.symbol.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.symbol.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args8371.length)].join(""));;
  }
};
cljs.core.symbol.cljs$core$IFn$_invoke$arity$1 = function(name) {
  if (name instanceof cljs.core.Symbol) {
    return name;
  } else {
    var idx = name.indexOf("/");
    if (idx === -1) {
      return cljs.core.symbol.cljs$core$IFn$_invoke$arity$2(null, name);
    } else {
      return cljs.core.symbol.cljs$core$IFn$_invoke$arity$2(name.substring(0, idx), name.substring(idx + 1, name.length));
    }
  }
};
cljs.core.symbol.cljs$core$IFn$_invoke$arity$2 = function(ns, name) {
  var sym_str = !(ns == null) ? [cljs.core.str(ns), cljs.core.str("/"), cljs.core.str(name)].join("") : name;
  return new cljs.core.Symbol(ns, name, sym_str, null, null);
};
cljs.core.symbol.cljs$lang$maxFixedArity = 2;
cljs.core.Var = function(val, sym, _meta) {
  this.val = val;
  this.sym = sym;
  this._meta = _meta;
  this.cljs$lang$protocol_mask$partition0$ = 2523137;
  this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.Var.prototype.isMacro = function() {
  var self__ = this;
  var _ = this;
  return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).cljs$lang$macro;
};
cljs.core.Var.prototype.cljs$core$IDeref$_deref$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null);
};
cljs.core.Var.prototype.cljs$core$IMeta$_meta$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return self__._meta;
};
cljs.core.Var.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(_, new_meta) {
  var self__ = this;
  var ___$1 = this;
  return new cljs.core.Var(self__.val, self__.sym, new_meta);
};
cljs.core.Var.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(this$, other) {
  var self__ = this;
  var this$__$1 = this;
  if (other instanceof cljs.core.Var) {
    var G__8379 = this$__$1.sym;
    var G__8380 = other.sym;
    return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2 ? cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(G__8379, G__8380) : cljs.core._EQ_.call(null, G__8379, G__8380);
  } else {
    return false;
  }
};
cljs.core.Var.prototype.cljs$core$Fn$ = true;
cljs.core.Var.prototype.call = function() {
  var G__8425 = null;
  var G__8425__1 = function(self__) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null);
  };
  var G__8425__2 = function(self__, a) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a);
  };
  var G__8425__3 = function(self__, a, b) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b);
  };
  var G__8425__4 = function(self__, a, b, c) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c);
  };
  var G__8425__5 = function(self__, a, b, c, d) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d);
  };
  var G__8425__6 = function(self__, a, b, c, d, e) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e);
  };
  var G__8425__7 = function(self__, a, b, c, d, e, f) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f);
  };
  var G__8425__8 = function(self__, a, b, c, d, e, f, g) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g);
  };
  var G__8425__9 = function(self__, a, b, c, d, e, f, g, h) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h);
  };
  var G__8425__10 = function(self__, a, b, c, d, e, f, g, h, i) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i);
  };
  var G__8425__11 = function(self__, a, b, c, d, e, f, g, h, i, j) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i, j);
  };
  var G__8425__12 = function(self__, a, b, c, d, e, f, g, h, i, j, k) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i, j, k);
  };
  var G__8425__13 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i, j, k, l);
  };
  var G__8425__14 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i, j, k, l, m);
  };
  var G__8425__15 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n);
  };
  var G__8425__16 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
  };
  var G__8425__17 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
  };
  var G__8425__18 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q);
  };
  var G__8425__19 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r);
  };
  var G__8425__20 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s);
  };
  var G__8425__21 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t);
  };
  var G__8425__22 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    var G__8381 = self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null);
    var G__8382 = a;
    var G__8383 = b;
    var G__8384 = c;
    var G__8385 = d;
    var G__8386 = e;
    var G__8387 = f;
    var G__8388 = g;
    var G__8389 = h;
    var G__8390 = i;
    var G__8391 = j;
    var G__8392 = k;
    var G__8393 = l;
    var G__8394 = m;
    var G__8395 = n;
    var G__8396 = o;
    var G__8397 = p;
    var G__8398 = q;
    var G__8399 = r;
    var G__8400 = s;
    var G__8401 = t;
    var G__8402 = rest;
    return cljs.core.apply.cljs$core$IFn$_invoke$arity$22 ? cljs.core.apply.cljs$core$IFn$_invoke$arity$22(G__8381, G__8382, G__8383, G__8384, G__8385, G__8386, G__8387, G__8388, G__8389, G__8390, G__8391, G__8392, G__8393, G__8394, G__8395, G__8396, G__8397, G__8398, G__8399, G__8400, G__8401, G__8402) : cljs.core.apply.call(null, G__8381, G__8382, G__8383, G__8384, G__8385, G__8386, G__8387, G__8388, G__8389, G__8390, G__8391, G__8392, G__8393, G__8394, G__8395, G__8396, G__8397, G__8398, G__8399, 
    G__8400, G__8401, G__8402);
  };
  G__8425 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest) {
    switch(arguments.length) {
      case 1:
        return G__8425__1.call(this, self__);
      case 2:
        return G__8425__2.call(this, self__, a);
      case 3:
        return G__8425__3.call(this, self__, a, b);
      case 4:
        return G__8425__4.call(this, self__, a, b, c);
      case 5:
        return G__8425__5.call(this, self__, a, b, c, d);
      case 6:
        return G__8425__6.call(this, self__, a, b, c, d, e);
      case 7:
        return G__8425__7.call(this, self__, a, b, c, d, e, f);
      case 8:
        return G__8425__8.call(this, self__, a, b, c, d, e, f, g);
      case 9:
        return G__8425__9.call(this, self__, a, b, c, d, e, f, g, h);
      case 10:
        return G__8425__10.call(this, self__, a, b, c, d, e, f, g, h, i);
      case 11:
        return G__8425__11.call(this, self__, a, b, c, d, e, f, g, h, i, j);
      case 12:
        return G__8425__12.call(this, self__, a, b, c, d, e, f, g, h, i, j, k);
      case 13:
        return G__8425__13.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l);
      case 14:
        return G__8425__14.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m);
      case 15:
        return G__8425__15.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n);
      case 16:
        return G__8425__16.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
      case 17:
        return G__8425__17.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
      case 18:
        return G__8425__18.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q);
      case 19:
        return G__8425__19.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r);
      case 20:
        return G__8425__20.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s);
      case 21:
        return G__8425__21.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t);
      case 22:
        return G__8425__22.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest);
    }
    throw new Error("Invalid arity: " + arguments.length);
  };
  G__8425.cljs$core$IFn$_invoke$arity$1 = G__8425__1;
  G__8425.cljs$core$IFn$_invoke$arity$2 = G__8425__2;
  G__8425.cljs$core$IFn$_invoke$arity$3 = G__8425__3;
  G__8425.cljs$core$IFn$_invoke$arity$4 = G__8425__4;
  G__8425.cljs$core$IFn$_invoke$arity$5 = G__8425__5;
  G__8425.cljs$core$IFn$_invoke$arity$6 = G__8425__6;
  G__8425.cljs$core$IFn$_invoke$arity$7 = G__8425__7;
  G__8425.cljs$core$IFn$_invoke$arity$8 = G__8425__8;
  G__8425.cljs$core$IFn$_invoke$arity$9 = G__8425__9;
  G__8425.cljs$core$IFn$_invoke$arity$10 = G__8425__10;
  G__8425.cljs$core$IFn$_invoke$arity$11 = G__8425__11;
  G__8425.cljs$core$IFn$_invoke$arity$12 = G__8425__12;
  G__8425.cljs$core$IFn$_invoke$arity$13 = G__8425__13;
  G__8425.cljs$core$IFn$_invoke$arity$14 = G__8425__14;
  G__8425.cljs$core$IFn$_invoke$arity$15 = G__8425__15;
  G__8425.cljs$core$IFn$_invoke$arity$16 = G__8425__16;
  G__8425.cljs$core$IFn$_invoke$arity$17 = G__8425__17;
  G__8425.cljs$core$IFn$_invoke$arity$18 = G__8425__18;
  G__8425.cljs$core$IFn$_invoke$arity$19 = G__8425__19;
  G__8425.cljs$core$IFn$_invoke$arity$20 = G__8425__20;
  G__8425.cljs$core$IFn$_invoke$arity$21 = G__8425__21;
  G__8425.cljs$core$IFn$_invoke$arity$22 = G__8425__22;
  return G__8425;
}();
cljs.core.Var.prototype.apply = function(self__, args8378) {
  var self__ = this;
  var self____$1 = this;
  return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args8378)));
};
cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$0 = function() {
  var self__ = this;
  var _ = this;
  return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null);
};
cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$1 = function(a) {
  var self__ = this;
  var _ = this;
  return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a);
};
cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
  var self__ = this;
  var _ = this;
  return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b);
};
cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$3 = function(a, b, c) {
  var self__ = this;
  var _ = this;
  return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c);
};
cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$4 = function(a, b, c, d) {
  var self__ = this;
  var _ = this;
  return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d);
};
cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$5 = function(a, b, c, d, e) {
  var self__ = this;
  var _ = this;
  return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e);
};
cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$6 = function(a, b, c, d, e, f) {
  var self__ = this;
  var _ = this;
  return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f);
};
cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$7 = function(a, b, c, d, e, f, g) {
  var self__ = this;
  var _ = this;
  return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g);
};
cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$8 = function(a, b, c, d, e, f, g, h) {
  var self__ = this;
  var _ = this;
  return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h);
};
cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$9 = function(a, b, c, d, e, f, g, h, i) {
  var self__ = this;
  var _ = this;
  return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i);
};
cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$10 = function(a, b, c, d, e, f, g, h, i, j) {
  var self__ = this;
  var _ = this;
  return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i, j);
};
cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$11 = function(a, b, c, d, e, f, g, h, i, j, k) {
  var self__ = this;
  var _ = this;
  return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i, j, k);
};
cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$12 = function(a, b, c, d, e, f, g, h, i, j, k, l) {
  var self__ = this;
  var _ = this;
  return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i, j, k, l);
};
cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$13 = function(a, b, c, d, e, f, g, h, i, j, k, l, m) {
  var self__ = this;
  var _ = this;
  return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i, j, k, l, m);
};
cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$14 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n) {
  var self__ = this;
  var _ = this;
  return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n);
};
cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$15 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) {
  var self__ = this;
  var _ = this;
  return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
};
cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$16 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
  var self__ = this;
  var _ = this;
  return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
};
cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$17 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) {
  var self__ = this;
  var _ = this;
  return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q);
};
cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$18 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) {
  var self__ = this;
  var _ = this;
  return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r);
};
cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$19 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) {
  var self__ = this;
  var _ = this;
  return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s);
};
cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$20 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) {
  var self__ = this;
  var _ = this;
  return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t);
};
cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$21 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest) {
  var self__ = this;
  var _ = this;
  var G__8403 = self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null);
  var G__8404 = a;
  var G__8405 = b;
  var G__8406 = c;
  var G__8407 = d;
  var G__8408 = e;
  var G__8409 = f;
  var G__8410 = g;
  var G__8411 = h;
  var G__8412 = i;
  var G__8413 = j;
  var G__8414 = k;
  var G__8415 = l;
  var G__8416 = m;
  var G__8417 = n;
  var G__8418 = o;
  var G__8419 = p;
  var G__8420 = q;
  var G__8421 = r;
  var G__8422 = s;
  var G__8423 = t;
  var G__8424 = rest;
  return cljs.core.apply.cljs$core$IFn$_invoke$arity$22 ? cljs.core.apply.cljs$core$IFn$_invoke$arity$22(G__8403, G__8404, G__8405, G__8406, G__8407, G__8408, G__8409, G__8410, G__8411, G__8412, G__8413, G__8414, G__8415, G__8416, G__8417, G__8418, G__8419, G__8420, G__8421, G__8422, G__8423, G__8424) : cljs.core.apply.call(null, G__8403, G__8404, G__8405, G__8406, G__8407, G__8408, G__8409, G__8410, G__8411, G__8412, G__8413, G__8414, G__8415, G__8416, G__8417, G__8418, G__8419, G__8420, G__8421, 
  G__8422, G__8423, G__8424);
};
cljs.core.Var.getBasis = function() {
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "val", "val", 1769233139, null), new cljs.core.Symbol(null, "sym", "sym", 195671222, null), new cljs.core.Symbol(null, "_meta", "_meta", -1716892533, null)], null);
};
cljs.core.Var.cljs$lang$type = true;
cljs.core.Var.cljs$lang$ctorStr = "cljs.core/Var";
cljs.core.Var.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/Var");
};
cljs.core.__GT_Var = function cljs$core$__GT_Var(val, sym, _meta) {
  return new cljs.core.Var(val, sym, _meta);
};
cljs.core.var_QMARK_ = function cljs$core$var_QMARK_(v) {
  return v instanceof cljs.core.Var;
};
cljs.core.iterable_QMARK_ = function cljs$core$iterable_QMARK_(x) {
  if (!(x == null)) {
    if (false || x.cljs$core$IIterable$) {
      return true;
    } else {
      if (!x.cljs$lang$protocol_mask$partition$) {
        return cljs.core.native_satisfies_QMARK_(cljs.core.IIterable, x);
      } else {
        return false;
      }
    }
  } else {
    return cljs.core.native_satisfies_QMARK_(cljs.core.IIterable, x);
  }
};
cljs.core.clone = function cljs$core$clone(value) {
  return cljs.core._clone(value);
};
cljs.core.cloneable_QMARK_ = function cljs$core$cloneable_QMARK_(value) {
  if (!(value == null)) {
    if (value.cljs$lang$protocol_mask$partition1$ & 8192 || value.cljs$core$ICloneable$) {
      return true;
    } else {
      if (!value.cljs$lang$protocol_mask$partition1$) {
        return cljs.core.native_satisfies_QMARK_(cljs.core.ICloneable, value);
      } else {
        return false;
      }
    }
  } else {
    return cljs.core.native_satisfies_QMARK_(cljs.core.ICloneable, value);
  }
};
cljs.core.seq = function cljs$core$seq(coll) {
  if (coll == null) {
    return null;
  } else {
    if (!(coll == null) ? coll.cljs$lang$protocol_mask$partition0$ & 8388608 || coll.cljs$core$ISeqable$ ? true : false : false) {
      return coll.cljs$core$ISeqable$_seq$arity$1(null);
    } else {
      if (cljs.core.array_QMARK_(coll)) {
        if (coll.length === 0) {
          return null;
        } else {
          return new cljs.core.IndexedSeq(coll, 0);
        }
      } else {
        if (typeof coll === "string") {
          if (coll.length === 0) {
            return null;
          } else {
            return new cljs.core.IndexedSeq(coll, 0);
          }
        } else {
          if (cljs.core.native_satisfies_QMARK_(cljs.core.ISeqable, coll)) {
            return cljs.core._seq(coll);
          } else {
            throw new Error([cljs.core.str(coll), cljs.core.str(" is not ISeqable")].join(""));
          }
        }
      }
    }
  }
};
cljs.core.first = function cljs$core$first(coll) {
  if (coll == null) {
    return null;
  } else {
    if (!(coll == null) ? coll.cljs$lang$protocol_mask$partition0$ & 64 || coll.cljs$core$ISeq$ ? true : false : false) {
      return coll.cljs$core$ISeq$_first$arity$1(null);
    } else {
      var s = cljs.core.seq(coll);
      if (s == null) {
        return null;
      } else {
        return cljs.core._first(s);
      }
    }
  }
};
cljs.core.rest = function cljs$core$rest(coll) {
  if (!(coll == null)) {
    if (!(coll == null) ? coll.cljs$lang$protocol_mask$partition0$ & 64 || coll.cljs$core$ISeq$ ? true : false : false) {
      return coll.cljs$core$ISeq$_rest$arity$1(null);
    } else {
      var s = cljs.core.seq(coll);
      if (s) {
        return cljs.core._rest(s);
      } else {
        return cljs.core.List.EMPTY;
      }
    }
  } else {
    return cljs.core.List.EMPTY;
  }
};
cljs.core.next = function cljs$core$next(coll) {
  if (coll == null) {
    return null;
  } else {
    if (!(coll == null) ? coll.cljs$lang$protocol_mask$partition0$ & 128 || coll.cljs$core$INext$ ? true : false : false) {
      return coll.cljs$core$INext$_next$arity$1(null);
    } else {
      return cljs.core.seq(cljs.core.rest(coll));
    }
  }
};
cljs.core._EQ_ = function cljs$core$_EQ_(var_args) {
  var args8438 = [];
  var len__7198__auto___8444 = arguments.length;
  var i__7199__auto___8445 = 0;
  while (true) {
    if (i__7199__auto___8445 < len__7198__auto___8444) {
      args8438.push(arguments[i__7199__auto___8445]);
      var G__8446 = i__7199__auto___8445 + 1;
      i__7199__auto___8445 = G__8446;
      continue;
    } else {
    }
    break;
  }
  var G__8443 = args8438.length;
  switch(G__8443) {
    case 1:
      return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8438.slice(2), 0);
      return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core._EQ_.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return true;
};
cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  if (x == null) {
    return y == null;
  } else {
    return x === y || cljs.core._equiv(x, y);
  }
};
cljs.core._EQ_.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  while (true) {
    if (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(x, y)) {
      if (cljs.core.next(more)) {
        var G__8448 = y;
        var G__8449 = cljs.core.first(more);
        var G__8450 = cljs.core.next(more);
        x = G__8448;
        y = G__8449;
        more = G__8450;
        continue;
      } else {
        return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(y, cljs.core.first(more));
      }
    } else {
      return false;
    }
    break;
  }
};
cljs.core._EQ_.cljs$lang$applyTo = function(seq8439) {
  var G__8440 = cljs.core.first(seq8439);
  var seq8439__$1 = cljs.core.next(seq8439);
  var G__8441 = cljs.core.first(seq8439__$1);
  var seq8439__$2 = cljs.core.next(seq8439__$1);
  return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$variadic(G__8440, G__8441, seq8439__$2);
};
cljs.core._EQ_.cljs$lang$maxFixedArity = 2;
cljs.core.ES6Iterator = function(s) {
  this.s = s;
};
cljs.core.ES6Iterator.prototype.next = function() {
  var self__ = this;
  var _ = this;
  if (!(self__.s == null)) {
    var x = cljs.core.first(self__.s);
    self__.s = cljs.core.next(self__.s);
    return {"value":x, "done":false};
  } else {
    return {"value":null, "done":true};
  }
};
cljs.core.ES6Iterator.getBasis = function() {
  return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "s", "s", -948495851, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.ES6Iterator.cljs$lang$type = true;
cljs.core.ES6Iterator.cljs$lang$ctorStr = "cljs.core/ES6Iterator";
cljs.core.ES6Iterator.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/ES6Iterator");
};
cljs.core.__GT_ES6Iterator = function cljs$core$__GT_ES6Iterator(s) {
  return new cljs.core.ES6Iterator(s);
};
cljs.core.es6_iterator = function cljs$core$es6_iterator(coll) {
  return new cljs.core.ES6Iterator(cljs.core.seq(coll));
};
cljs.core.ES6IteratorSeq = function(value, iter, _rest) {
  this.value = value;
  this.iter = iter;
  this._rest = _rest;
  this.cljs$lang$protocol_mask$partition0$ = 8388672;
  this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.ES6IteratorSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  return this$__$1;
};
cljs.core.ES6IteratorSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return self__.value;
};
cljs.core.ES6IteratorSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  if (self__._rest == null) {
    self__._rest = cljs.core.es6_iterator_seq.cljs$core$IFn$_invoke$arity$1 ? cljs.core.es6_iterator_seq.cljs$core$IFn$_invoke$arity$1(self__.iter) : cljs.core.es6_iterator_seq.call(null, self__.iter);
  } else {
  }
  return self__._rest;
};
cljs.core.ES6IteratorSeq.getBasis = function() {
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "value", "value", 1946509744, null), new cljs.core.Symbol(null, "iter", "iter", -1346195486, null), cljs.core.with_meta(new cljs.core.Symbol(null, "_rest", "_rest", -2100466189, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.ES6IteratorSeq.cljs$lang$type = true;
cljs.core.ES6IteratorSeq.cljs$lang$ctorStr = "cljs.core/ES6IteratorSeq";
cljs.core.ES6IteratorSeq.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/ES6IteratorSeq");
};
cljs.core.__GT_ES6IteratorSeq = function cljs$core$__GT_ES6IteratorSeq(value, iter, _rest) {
  return new cljs.core.ES6IteratorSeq(value, iter, _rest);
};
cljs.core.es6_iterator_seq = function cljs$core$es6_iterator_seq(iter) {
  var v = iter.next();
  if (cljs.core.truth_(v.done)) {
    return cljs.core.List.EMPTY;
  } else {
    return new cljs.core.ES6IteratorSeq(v.value, iter, null);
  }
};
cljs.core.mix_collection_hash = function cljs$core$mix_collection_hash(hash_basis, count) {
  var h1 = cljs.core.m3_seed;
  var k1 = cljs.core.m3_mix_K1(hash_basis);
  var h1__$1 = cljs.core.m3_mix_H1(h1, k1);
  return cljs.core.m3_fmix(h1__$1, count);
};
cljs.core.hash_ordered_coll = function cljs$core$hash_ordered_coll(coll) {
  var n = 0;
  var hash_code = 1;
  var coll__$1 = cljs.core.seq(coll);
  while (true) {
    if (!(coll__$1 == null)) {
      var G__8451 = n + 1;
      var G__8452 = cljs.core.imul(31, hash_code) + cljs.core.hash(cljs.core.first(coll__$1)) | 0;
      var G__8453 = cljs.core.next(coll__$1);
      n = G__8451;
      hash_code = G__8452;
      coll__$1 = G__8453;
      continue;
    } else {
      return cljs.core.mix_collection_hash(hash_code, n);
    }
    break;
  }
};
cljs.core.empty_ordered_hash = cljs.core.mix_collection_hash(1, 0);
cljs.core.hash_unordered_coll = function cljs$core$hash_unordered_coll(coll) {
  var n = 0;
  var hash_code = 0;
  var coll__$1 = cljs.core.seq(coll);
  while (true) {
    if (!(coll__$1 == null)) {
      var G__8454 = n + 1;
      var G__8455 = hash_code + cljs.core.hash(cljs.core.first(coll__$1)) | 0;
      var G__8456 = cljs.core.next(coll__$1);
      n = G__8454;
      hash_code = G__8455;
      coll__$1 = G__8456;
      continue;
    } else {
      return cljs.core.mix_collection_hash(hash_code, n);
    }
    break;
  }
};
cljs.core.empty_unordered_hash = cljs.core.mix_collection_hash(0, 0);
cljs.core.ICounted["null"] = true;
cljs.core._count["null"] = function(_) {
  return 0;
};
Date.prototype.cljs$core$IEquiv$ = true;
Date.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(o, other) {
  var o__$1 = this;
  return other instanceof Date && o__$1.valueOf() === other.valueOf();
};
Date.prototype.cljs$core$IComparable$ = true;
Date.prototype.cljs$core$IComparable$_compare$arity$2 = function(this$, other) {
  var this$__$1 = this;
  if (other instanceof Date) {
    var G__8457 = this$__$1.valueOf();
    var G__8458 = other.valueOf();
    return goog.array.defaultCompare(G__8457, G__8458);
  } else {
    throw new Error([cljs.core.str("Cannot compare "), cljs.core.str(this$__$1), cljs.core.str(" to "), cljs.core.str(other)].join(""));
  }
};
cljs.core.IEquiv["number"] = true;
cljs.core._equiv["number"] = function(x, o) {
  return x === o;
};
cljs.core.Fn["function"] = true;
cljs.core.IMeta["function"] = true;
cljs.core._meta["function"] = function(_) {
  return null;
};
cljs.core.IHash["_"] = true;
cljs.core._hash["_"] = function(o) {
  return goog.getUid(o);
};
cljs.core.inc = function cljs$core$inc(x) {
  return x + 1;
};
cljs.core.Reduced = function(val) {
  this.val = val;
  this.cljs$lang$protocol_mask$partition0$ = 32768;
  this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.Reduced.prototype.cljs$core$IDeref$_deref$arity$1 = function(o) {
  var self__ = this;
  var o__$1 = this;
  return self__.val;
};
cljs.core.Reduced.getBasis = function() {
  return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "val", "val", 1769233139, null)], null);
};
cljs.core.Reduced.cljs$lang$type = true;
cljs.core.Reduced.cljs$lang$ctorStr = "cljs.core/Reduced";
cljs.core.Reduced.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/Reduced");
};
cljs.core.__GT_Reduced = function cljs$core$__GT_Reduced(val) {
  return new cljs.core.Reduced(val);
};
cljs.core.reduced = function cljs$core$reduced(x) {
  return new cljs.core.Reduced(x);
};
cljs.core.reduced_QMARK_ = function cljs$core$reduced_QMARK_(r) {
  return r instanceof cljs.core.Reduced;
};
cljs.core.ensure_reduced = function cljs$core$ensure_reduced(x) {
  if (cljs.core.reduced_QMARK_(x)) {
    return x;
  } else {
    return cljs.core.reduced(x);
  }
};
cljs.core.unreduced = function cljs$core$unreduced(x) {
  if (cljs.core.reduced_QMARK_(x)) {
    return cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(x) : cljs.core.deref.call(null, x);
  } else {
    return x;
  }
};
cljs.core.deref = function cljs$core$deref(o) {
  return cljs.core._deref(o);
};
cljs.core.ci_reduce = function cljs$core$ci_reduce(var_args) {
  var args8459 = [];
  var len__7198__auto___8468 = arguments.length;
  var i__7199__auto___8469 = 0;
  while (true) {
    if (i__7199__auto___8469 < len__7198__auto___8468) {
      args8459.push(arguments[i__7199__auto___8469]);
      var G__8470 = i__7199__auto___8469 + 1;
      i__7199__auto___8469 = G__8470;
      continue;
    } else {
    }
    break;
  }
  var G__8461 = args8459.length;
  switch(G__8461) {
    case 2:
      return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 4:
      return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args8459.length)].join(""));;
  }
};
cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$2 = function(cicoll, f) {
  var cnt = cljs.core._count(cicoll);
  if (cnt === 0) {
    return f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null);
  } else {
    var val = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(cicoll, 0);
    var n = 1;
    while (true) {
      if (n < cnt) {
        var nval = function() {
          var G__8462 = val;
          var G__8463 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(cicoll, n);
          return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__8462, G__8463) : f.call(null, G__8462, G__8463);
        }();
        if (cljs.core.reduced_QMARK_(nval)) {
          return cljs.core.deref(nval);
        } else {
          var G__8472 = nval;
          var G__8473 = n + 1;
          val = G__8472;
          n = G__8473;
          continue;
        }
      } else {
        return val;
      }
      break;
    }
  }
};
cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$3 = function(cicoll, f, val) {
  var cnt = cljs.core._count(cicoll);
  var val__$1 = val;
  var n = 0;
  while (true) {
    if (n < cnt) {
      var nval = function() {
        var G__8464 = val__$1;
        var G__8465 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(cicoll, n);
        return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__8464, G__8465) : f.call(null, G__8464, G__8465);
      }();
      if (cljs.core.reduced_QMARK_(nval)) {
        return cljs.core.deref(nval);
      } else {
        var G__8474 = nval;
        var G__8475 = n + 1;
        val__$1 = G__8474;
        n = G__8475;
        continue;
      }
    } else {
      return val__$1;
    }
    break;
  }
};
cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$4 = function(cicoll, f, val, idx) {
  var cnt = cljs.core._count(cicoll);
  var val__$1 = val;
  var n = idx;
  while (true) {
    if (n < cnt) {
      var nval = function() {
        var G__8466 = val__$1;
        var G__8467 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(cicoll, n);
        return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__8466, G__8467) : f.call(null, G__8466, G__8467);
      }();
      if (cljs.core.reduced_QMARK_(nval)) {
        return cljs.core.deref(nval);
      } else {
        var G__8476 = nval;
        var G__8477 = n + 1;
        val__$1 = G__8476;
        n = G__8477;
        continue;
      }
    } else {
      return val__$1;
    }
    break;
  }
};
cljs.core.ci_reduce.cljs$lang$maxFixedArity = 4;
cljs.core.array_reduce = function cljs$core$array_reduce(var_args) {
  var args8478 = [];
  var len__7198__auto___8487 = arguments.length;
  var i__7199__auto___8488 = 0;
  while (true) {
    if (i__7199__auto___8488 < len__7198__auto___8487) {
      args8478.push(arguments[i__7199__auto___8488]);
      var G__8489 = i__7199__auto___8488 + 1;
      i__7199__auto___8488 = G__8489;
      continue;
    } else {
    }
    break;
  }
  var G__8480 = args8478.length;
  switch(G__8480) {
    case 2:
      return cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 4:
      return cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args8478.length)].join(""));;
  }
};
cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$2 = function(arr, f) {
  var cnt = arr.length;
  if (arr.length === 0) {
    return f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null);
  } else {
    var val = arr[0];
    var n = 1;
    while (true) {
      if (n < cnt) {
        var nval = function() {
          var G__8481 = val;
          var G__8482 = arr[n];
          return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__8481, G__8482) : f.call(null, G__8481, G__8482);
        }();
        if (cljs.core.reduced_QMARK_(nval)) {
          return cljs.core.deref(nval);
        } else {
          var G__8491 = nval;
          var G__8492 = n + 1;
          val = G__8491;
          n = G__8492;
          continue;
        }
      } else {
        return val;
      }
      break;
    }
  }
};
cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$3 = function(arr, f, val) {
  var cnt = arr.length;
  var val__$1 = val;
  var n = 0;
  while (true) {
    if (n < cnt) {
      var nval = function() {
        var G__8483 = val__$1;
        var G__8484 = arr[n];
        return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__8483, G__8484) : f.call(null, G__8483, G__8484);
      }();
      if (cljs.core.reduced_QMARK_(nval)) {
        return cljs.core.deref(nval);
      } else {
        var G__8493 = nval;
        var G__8494 = n + 1;
        val__$1 = G__8493;
        n = G__8494;
        continue;
      }
    } else {
      return val__$1;
    }
    break;
  }
};
cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$4 = function(arr, f, val, idx) {
  var cnt = arr.length;
  var val__$1 = val;
  var n = idx;
  while (true) {
    if (n < cnt) {
      var nval = function() {
        var G__8485 = val__$1;
        var G__8486 = arr[n];
        return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__8485, G__8486) : f.call(null, G__8485, G__8486);
      }();
      if (cljs.core.reduced_QMARK_(nval)) {
        return cljs.core.deref(nval);
      } else {
        var G__8495 = nval;
        var G__8496 = n + 1;
        val__$1 = G__8495;
        n = G__8496;
        continue;
      }
    } else {
      return val__$1;
    }
    break;
  }
};
cljs.core.array_reduce.cljs$lang$maxFixedArity = 4;
cljs.core.counted_QMARK_ = function cljs$core$counted_QMARK_(x) {
  if (!(x == null)) {
    if (x.cljs$lang$protocol_mask$partition0$ & 2 || x.cljs$core$ICounted$) {
      return true;
    } else {
      if (!x.cljs$lang$protocol_mask$partition0$) {
        return cljs.core.native_satisfies_QMARK_(cljs.core.ICounted, x);
      } else {
        return false;
      }
    }
  } else {
    return cljs.core.native_satisfies_QMARK_(cljs.core.ICounted, x);
  }
};
cljs.core.indexed_QMARK_ = function cljs$core$indexed_QMARK_(x) {
  if (!(x == null)) {
    if (x.cljs$lang$protocol_mask$partition0$ & 16 || x.cljs$core$IIndexed$) {
      return true;
    } else {
      if (!x.cljs$lang$protocol_mask$partition0$) {
        return cljs.core.native_satisfies_QMARK_(cljs.core.IIndexed, x);
      } else {
        return false;
      }
    }
  } else {
    return cljs.core.native_satisfies_QMARK_(cljs.core.IIndexed, x);
  }
};
cljs.core.IndexedSeqIterator = function(arr, i) {
  this.arr = arr;
  this.i = i;
};
cljs.core.IndexedSeqIterator.prototype.hasNext = function() {
  var self__ = this;
  var _ = this;
  return self__.i < self__.arr.length;
};
cljs.core.IndexedSeqIterator.prototype.next = function() {
  var self__ = this;
  var _ = this;
  var ret = self__.arr[self__.i];
  self__.i = self__.i + 1;
  return ret;
};
cljs.core.IndexedSeqIterator.getBasis = function() {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "arr", "arr", 2115492975, null), cljs.core.with_meta(new cljs.core.Symbol(null, "i", "i", 253690212, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.IndexedSeqIterator.cljs$lang$type = true;
cljs.core.IndexedSeqIterator.cljs$lang$ctorStr = "cljs.core/IndexedSeqIterator";
cljs.core.IndexedSeqIterator.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/IndexedSeqIterator");
};
cljs.core.__GT_IndexedSeqIterator = function cljs$core$__GT_IndexedSeqIterator(arr, i) {
  return new cljs.core.IndexedSeqIterator(arr, i);
};
cljs.core.IndexedSeq = function(arr, i) {
  this.arr = arr;
  this.i = i;
  this.cljs$lang$protocol_mask$partition0$ = 166199550;
  this.cljs$lang$protocol_mask$partition1$ = 8192;
};
cljs.core.IndexedSeq.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.IndexedSeq.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.IndexedSeq.prototype.cljs$core$IIndexed$_nth$arity$2 = function(coll, n) {
  var self__ = this;
  var coll__$1 = this;
  var i__$1 = n + self__.i;
  if (i__$1 < self__.arr.length) {
    return self__.arr[i__$1];
  } else {
    return null;
  }
};
cljs.core.IndexedSeq.prototype.cljs$core$IIndexed$_nth$arity$3 = function(coll, n, not_found) {
  var self__ = this;
  var coll__$1 = this;
  var i__$1 = n + self__.i;
  if (i__$1 < self__.arr.length) {
    return self__.arr[i__$1];
  } else {
    return not_found;
  }
};
cljs.core.IndexedSeq.prototype.cljs$core$IIterable$ = true;
cljs.core.IndexedSeq.prototype.cljs$core$IIterable$_iterator$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.IndexedSeqIterator(self__.arr, self__.i);
};
cljs.core.IndexedSeq.prototype.cljs$core$ICloneable$_clone$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return new cljs.core.IndexedSeq(self__.arr, self__.i);
};
cljs.core.IndexedSeq.prototype.cljs$core$INext$_next$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  if (self__.i + 1 < self__.arr.length) {
    return new cljs.core.IndexedSeq(self__.arr, self__.i + 1);
  } else {
    return null;
  }
};
cljs.core.IndexedSeq.prototype.cljs$core$ICounted$_count$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  var x__6471__auto__ = 0;
  var y__6472__auto__ = self__.arr.length - self__.i;
  return x__6471__auto__ > y__6472__auto__ ? x__6471__auto__ : y__6472__auto__;
};
cljs.core.IndexedSeq.prototype.cljs$core$IReversible$_rseq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var c = cljs.core._count(coll__$1);
  if (c > 0) {
    return new cljs.core.RSeq(coll__$1, c - 1, null);
  } else {
    return null;
  }
};
cljs.core.IndexedSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.hash_ordered_coll(coll__$1);
};
cljs.core.IndexedSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.equiv_sequential.cljs$core$IFn$_invoke$arity$2 ? cljs.core.equiv_sequential.cljs$core$IFn$_invoke$arity$2(coll__$1, other) : cljs.core.equiv_sequential.call(null, coll__$1, other);
};
cljs.core.IndexedSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.List.EMPTY;
};
cljs.core.IndexedSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(coll, f) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$4(self__.arr, f, self__.arr[self__.i], self__.i + 1);
};
cljs.core.IndexedSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(coll, f, start) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$4(self__.arr, f, start, self__.i);
};
cljs.core.IndexedSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return self__.arr[self__.i];
};
cljs.core.IndexedSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  if (self__.i + 1 < self__.arr.length) {
    return new cljs.core.IndexedSeq(self__.arr, self__.i + 1);
  } else {
    return cljs.core.List.EMPTY;
  }
};
cljs.core.IndexedSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  if (self__.i < self__.arr.length) {
    return this$__$1;
  } else {
    return null;
  }
};
cljs.core.IndexedSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.cons.cljs$core$IFn$_invoke$arity$2 ? cljs.core.cons.cljs$core$IFn$_invoke$arity$2(o, coll__$1) : cljs.core.cons.call(null, o, coll__$1);
};
cljs.core.IndexedSeq.getBasis = function() {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "arr", "arr", 2115492975, null), new cljs.core.Symbol(null, "i", "i", 253690212, null)], null);
};
cljs.core.IndexedSeq.cljs$lang$type = true;
cljs.core.IndexedSeq.cljs$lang$ctorStr = "cljs.core/IndexedSeq";
cljs.core.IndexedSeq.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/IndexedSeq");
};
cljs.core.__GT_IndexedSeq = function cljs$core$__GT_IndexedSeq(arr, i) {
  return new cljs.core.IndexedSeq(arr, i);
};
cljs.core.IndexedSeq.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.prim_seq = function cljs$core$prim_seq(var_args) {
  var args8501 = [];
  var len__7198__auto___8504 = arguments.length;
  var i__7199__auto___8505 = 0;
  while (true) {
    if (i__7199__auto___8505 < len__7198__auto___8504) {
      args8501.push(arguments[i__7199__auto___8505]);
      var G__8506 = i__7199__auto___8505 + 1;
      i__7199__auto___8505 = G__8506;
      continue;
    } else {
    }
    break;
  }
  var G__8503 = args8501.length;
  switch(G__8503) {
    case 1:
      return cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args8501.length)].join(""));;
  }
};
cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$1 = function(prim) {
  return cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(prim, 0);
};
cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2 = function(prim, i) {
  if (i < prim.length) {
    return new cljs.core.IndexedSeq(prim, i);
  } else {
    return null;
  }
};
cljs.core.prim_seq.cljs$lang$maxFixedArity = 2;
cljs.core.array_seq = function cljs$core$array_seq(var_args) {
  var args8508 = [];
  var len__7198__auto___8511 = arguments.length;
  var i__7199__auto___8512 = 0;
  while (true) {
    if (i__7199__auto___8512 < len__7198__auto___8511) {
      args8508.push(arguments[i__7199__auto___8512]);
      var G__8513 = i__7199__auto___8512 + 1;
      i__7199__auto___8512 = G__8513;
      continue;
    } else {
    }
    break;
  }
  var G__8510 = args8508.length;
  switch(G__8510) {
    case 1:
      return cljs.core.array_seq.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.array_seq.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args8508.length)].join(""));;
  }
};
cljs.core.array_seq.cljs$core$IFn$_invoke$arity$1 = function(array) {
  return cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(array, 0);
};
cljs.core.array_seq.cljs$core$IFn$_invoke$arity$2 = function(array, i) {
  return cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(array, i);
};
cljs.core.array_seq.cljs$lang$maxFixedArity = 2;
cljs.core.RSeq = function(ci, i, meta) {
  this.ci = ci;
  this.i = i;
  this.meta = meta;
  this.cljs$lang$protocol_mask$partition0$ = 32374990;
  this.cljs$lang$protocol_mask$partition1$ = 8192;
};
cljs.core.RSeq.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.RSeq.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.RSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.meta;
};
cljs.core.RSeq.prototype.cljs$core$ICloneable$_clone$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return new cljs.core.RSeq(self__.ci, self__.i, self__.meta);
};
cljs.core.RSeq.prototype.cljs$core$INext$_next$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.i > 0) {
    return new cljs.core.RSeq(self__.ci, self__.i - 1, null);
  } else {
    return null;
  }
};
cljs.core.RSeq.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.i + 1;
};
cljs.core.RSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.hash_ordered_coll(coll__$1);
};
cljs.core.RSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.equiv_sequential.cljs$core$IFn$_invoke$arity$2 ? cljs.core.equiv_sequential.cljs$core$IFn$_invoke$arity$2(coll__$1, other) : cljs.core.equiv_sequential.call(null, coll__$1, other);
};
cljs.core.RSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var G__8515 = cljs.core.List.EMPTY;
  var G__8516 = self__.meta;
  return cljs.core.with_meta.cljs$core$IFn$_invoke$arity$2 ? cljs.core.with_meta.cljs$core$IFn$_invoke$arity$2(G__8515, G__8516) : cljs.core.with_meta.call(null, G__8515, G__8516);
};
cljs.core.RSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(col, f) {
  var self__ = this;
  var col__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2 ? cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f, col__$1) : cljs.core.seq_reduce.call(null, f, col__$1);
};
cljs.core.RSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(col, f, start) {
  var self__ = this;
  var col__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3 ? cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f, start, col__$1) : cljs.core.seq_reduce.call(null, f, start, col__$1);
};
cljs.core.RSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core._nth.cljs$core$IFn$_invoke$arity$2(self__.ci, self__.i);
};
cljs.core.RSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.i > 0) {
    return new cljs.core.RSeq(self__.ci, self__.i - 1, null);
  } else {
    return cljs.core.List.EMPTY;
  }
};
cljs.core.RSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return coll__$1;
};
cljs.core.RSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, new_meta) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.RSeq(self__.ci, self__.i, new_meta);
};
cljs.core.RSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.cons.cljs$core$IFn$_invoke$arity$2 ? cljs.core.cons.cljs$core$IFn$_invoke$arity$2(o, coll__$1) : cljs.core.cons.call(null, o, coll__$1);
};
cljs.core.RSeq.getBasis = function() {
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "ci", "ci", 2049808339, null), new cljs.core.Symbol(null, "i", "i", 253690212, null), new cljs.core.Symbol(null, "meta", "meta", -1154898805, null)], null);
};
cljs.core.RSeq.cljs$lang$type = true;
cljs.core.RSeq.cljs$lang$ctorStr = "cljs.core/RSeq";
cljs.core.RSeq.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/RSeq");
};
cljs.core.__GT_RSeq = function cljs$core$__GT_RSeq(ci, i, meta) {
  return new cljs.core.RSeq(ci, i, meta);
};
cljs.core.RSeq.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.second = function cljs$core$second(coll) {
  return cljs.core.first(cljs.core.next(coll));
};
cljs.core.ffirst = function cljs$core$ffirst(coll) {
  return cljs.core.first(cljs.core.first(coll));
};
cljs.core.nfirst = function cljs$core$nfirst(coll) {
  return cljs.core.next(cljs.core.first(coll));
};
cljs.core.fnext = function cljs$core$fnext(coll) {
  return cljs.core.first(cljs.core.next(coll));
};
cljs.core.nnext = function cljs$core$nnext(coll) {
  return cljs.core.next(cljs.core.next(coll));
};
cljs.core.last = function cljs$core$last(s) {
  while (true) {
    var sn = cljs.core.next(s);
    if (!(sn == null)) {
      var G__8517 = sn;
      s = G__8517;
      continue;
    } else {
      return cljs.core.first(s);
    }
    break;
  }
};
cljs.core.IEquiv["_"] = true;
cljs.core._equiv["_"] = function(x, o) {
  return x === o;
};
cljs.core.conj = function cljs$core$conj(var_args) {
  var args8518 = [];
  var len__7198__auto___8524 = arguments.length;
  var i__7199__auto___8525 = 0;
  while (true) {
    if (i__7199__auto___8525 < len__7198__auto___8524) {
      args8518.push(arguments[i__7199__auto___8525]);
      var G__8526 = i__7199__auto___8525 + 1;
      i__7199__auto___8525 = G__8526;
      continue;
    } else {
    }
    break;
  }
  var G__8523 = args8518.length;
  switch(G__8523) {
    case 0:
      return cljs.core.conj.cljs$core$IFn$_invoke$arity$0();
      break;
    case 1:
      return cljs.core.conj.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8518.slice(2), 0);
      return cljs.core.conj.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.conj.cljs$core$IFn$_invoke$arity$0 = function() {
  return cljs.core.PersistentVector.EMPTY;
};
cljs.core.conj.cljs$core$IFn$_invoke$arity$1 = function(coll) {
  return coll;
};
cljs.core.conj.cljs$core$IFn$_invoke$arity$2 = function(coll, x) {
  if (!(coll == null)) {
    return cljs.core._conj(coll, x);
  } else {
    return cljs.core._conj(cljs.core.List.EMPTY, x);
  }
};
cljs.core.conj.cljs$core$IFn$_invoke$arity$variadic = function(coll, x, xs) {
  while (true) {
    if (cljs.core.truth_(xs)) {
      var G__8528 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(coll, x);
      var G__8529 = cljs.core.first(xs);
      var G__8530 = cljs.core.next(xs);
      coll = G__8528;
      x = G__8529;
      xs = G__8530;
      continue;
    } else {
      return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(coll, x);
    }
    break;
  }
};
cljs.core.conj.cljs$lang$applyTo = function(seq8519) {
  var G__8520 = cljs.core.first(seq8519);
  var seq8519__$1 = cljs.core.next(seq8519);
  var G__8521 = cljs.core.first(seq8519__$1);
  var seq8519__$2 = cljs.core.next(seq8519__$1);
  return cljs.core.conj.cljs$core$IFn$_invoke$arity$variadic(G__8520, G__8521, seq8519__$2);
};
cljs.core.conj.cljs$lang$maxFixedArity = 2;
cljs.core.empty = function cljs$core$empty(coll) {
  if (coll == null) {
    return null;
  } else {
    return cljs.core._empty(coll);
  }
};
cljs.core.accumulating_seq_count = function cljs$core$accumulating_seq_count(coll) {
  var s = cljs.core.seq(coll);
  var acc = 0;
  while (true) {
    if (cljs.core.counted_QMARK_(s)) {
      return acc + cljs.core._count(s);
    } else {
      var G__8531 = cljs.core.next(s);
      var G__8532 = acc + 1;
      s = G__8531;
      acc = G__8532;
      continue;
    }
    break;
  }
};
cljs.core.count = function cljs$core$count(coll) {
  if (!(coll == null)) {
    if (!(coll == null) ? coll.cljs$lang$protocol_mask$partition0$ & 2 || coll.cljs$core$ICounted$ ? true : false : false) {
      return coll.cljs$core$ICounted$_count$arity$1(null);
    } else {
      if (cljs.core.array_QMARK_(coll)) {
        return coll.length;
      } else {
        if (typeof coll === "string") {
          return coll.length;
        } else {
          if (!(coll == null) ? coll.cljs$lang$protocol_mask$partition0$ & 8388608 || coll.cljs$core$ISeqable$ ? true : false : false) {
            return cljs.core.accumulating_seq_count(coll);
          } else {
            return cljs.core._count(coll);
          }
        }
      }
    }
  } else {
    return 0;
  }
};
cljs.core.linear_traversal_nth = function cljs$core$linear_traversal_nth(var_args) {
  var args8537 = [];
  var len__7198__auto___8540 = arguments.length;
  var i__7199__auto___8541 = 0;
  while (true) {
    if (i__7199__auto___8541 < len__7198__auto___8540) {
      args8537.push(arguments[i__7199__auto___8541]);
      var G__8542 = i__7199__auto___8541 + 1;
      i__7199__auto___8541 = G__8542;
      continue;
    } else {
    }
    break;
  }
  var G__8539 = args8537.length;
  switch(G__8539) {
    case 2:
      return cljs.core.linear_traversal_nth.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.linear_traversal_nth.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args8537.length)].join(""));;
  }
};
cljs.core.linear_traversal_nth.cljs$core$IFn$_invoke$arity$2 = function(coll, n) {
  while (true) {
    if (coll == null) {
      throw new Error("Index out of bounds");
    } else {
      if (n === 0) {
        if (cljs.core.seq(coll)) {
          return cljs.core.first(coll);
        } else {
          throw new Error("Index out of bounds");
        }
      } else {
        if (cljs.core.indexed_QMARK_(coll)) {
          return cljs.core._nth.cljs$core$IFn$_invoke$arity$2(coll, n);
        } else {
          if (cljs.core.seq(coll)) {
            var G__8544 = cljs.core.next(coll);
            var G__8545 = n - 1;
            coll = G__8544;
            n = G__8545;
            continue;
          } else {
            throw new Error("Index out of bounds");
          }
        }
      }
    }
    break;
  }
};
cljs.core.linear_traversal_nth.cljs$core$IFn$_invoke$arity$3 = function(coll, n, not_found) {
  while (true) {
    if (coll == null) {
      return not_found;
    } else {
      if (n === 0) {
        if (cljs.core.seq(coll)) {
          return cljs.core.first(coll);
        } else {
          return not_found;
        }
      } else {
        if (cljs.core.indexed_QMARK_(coll)) {
          return cljs.core._nth.cljs$core$IFn$_invoke$arity$3(coll, n, not_found);
        } else {
          if (cljs.core.seq(coll)) {
            var G__8546 = cljs.core.next(coll);
            var G__8547 = n - 1;
            var G__8548 = not_found;
            coll = G__8546;
            n = G__8547;
            not_found = G__8548;
            continue;
          } else {
            return not_found;
          }
        }
      }
    }
    break;
  }
};
cljs.core.linear_traversal_nth.cljs$lang$maxFixedArity = 3;
cljs.core.nth = function cljs$core$nth(var_args) {
  var args8549 = [];
  var len__7198__auto___8556 = arguments.length;
  var i__7199__auto___8557 = 0;
  while (true) {
    if (i__7199__auto___8557 < len__7198__auto___8556) {
      args8549.push(arguments[i__7199__auto___8557]);
      var G__8558 = i__7199__auto___8557 + 1;
      i__7199__auto___8557 = G__8558;
      continue;
    } else {
    }
    break;
  }
  var G__8551 = args8549.length;
  switch(G__8551) {
    case 2:
      return cljs.core.nth.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.nth.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args8549.length)].join(""));;
  }
};
cljs.core.nth.cljs$core$IFn$_invoke$arity$2 = function(coll, n) {
  if (!(typeof n === "number")) {
    throw new Error("index argument to nth must be a number");
  } else {
    if (coll == null) {
      return coll;
    } else {
      if (!(coll == null) ? coll.cljs$lang$protocol_mask$partition0$ & 16 || coll.cljs$core$IIndexed$ ? true : false : false) {
        return coll.cljs$core$IIndexed$_nth$arity$2(null, n);
      } else {
        if (cljs.core.array_QMARK_(coll)) {
          if (n < coll.length) {
            return coll[n];
          } else {
            return null;
          }
        } else {
          if (typeof coll === "string") {
            if (n < coll.length) {
              return coll.charAt(n);
            } else {
              return null;
            }
          } else {
            if (!(coll == null) ? coll.cljs$lang$protocol_mask$partition0$ & 64 || coll.cljs$core$ISeq$ ? true : false : false) {
              return cljs.core.linear_traversal_nth.cljs$core$IFn$_invoke$arity$2(coll, n);
            } else {
              if (cljs.core.native_satisfies_QMARK_(cljs.core.IIndexed, coll)) {
                return cljs.core._nth.cljs$core$IFn$_invoke$arity$2(coll, n);
              } else {
                throw new Error([cljs.core.str("nth not supported on this type "), cljs.core.str(cljs.core.type__GT_str(cljs.core.type(coll)))].join(""));
              }
            }
          }
        }
      }
    }
  }
};
cljs.core.nth.cljs$core$IFn$_invoke$arity$3 = function(coll, n, not_found) {
  if (!(typeof n === "number")) {
    throw new Error("index argument to nth must be a number.");
  } else {
    if (coll == null) {
      return not_found;
    } else {
      if (!(coll == null) ? coll.cljs$lang$protocol_mask$partition0$ & 16 || coll.cljs$core$IIndexed$ ? true : false : false) {
        return coll.cljs$core$IIndexed$_nth$arity$3(null, n, not_found);
      } else {
        if (cljs.core.array_QMARK_(coll)) {
          if (n < coll.length) {
            return coll[n];
          } else {
            return not_found;
          }
        } else {
          if (typeof coll === "string") {
            if (n < coll.length) {
              return coll.charAt(n);
            } else {
              return not_found;
            }
          } else {
            if (!(coll == null) ? coll.cljs$lang$protocol_mask$partition0$ & 64 || coll.cljs$core$ISeq$ ? true : false : false) {
              return cljs.core.linear_traversal_nth.cljs$core$IFn$_invoke$arity$3(coll, n, not_found);
            } else {
              if (cljs.core.native_satisfies_QMARK_(cljs.core.IIndexed, coll)) {
                return cljs.core._nth.cljs$core$IFn$_invoke$arity$2(coll, n);
              } else {
                throw new Error([cljs.core.str("nth not supported on this type "), cljs.core.str(cljs.core.type__GT_str(cljs.core.type(coll)))].join(""));
              }
            }
          }
        }
      }
    }
  }
};
cljs.core.nth.cljs$lang$maxFixedArity = 3;
cljs.core.nthrest = function cljs$core$nthrest(coll, n) {
  var n__$1 = n;
  var xs = coll;
  while (true) {
    if (n__$1 > 0 && cljs.core.seq(xs)) {
      var G__8560 = n__$1 - 1;
      var G__8561 = cljs.core.rest(xs);
      n__$1 = G__8560;
      xs = G__8561;
      continue;
    } else {
      return xs;
    }
    break;
  }
};
cljs.core.get = function cljs$core$get(var_args) {
  var args8562 = [];
  var len__7198__auto___8567 = arguments.length;
  var i__7199__auto___8568 = 0;
  while (true) {
    if (i__7199__auto___8568 < len__7198__auto___8567) {
      args8562.push(arguments[i__7199__auto___8568]);
      var G__8569 = i__7199__auto___8568 + 1;
      i__7199__auto___8568 = G__8569;
      continue;
    } else {
    }
    break;
  }
  var G__8564 = args8562.length;
  switch(G__8564) {
    case 2:
      return cljs.core.get.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.get.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args8562.length)].join(""));;
  }
};
cljs.core.get.cljs$core$IFn$_invoke$arity$2 = function(o, k) {
  if (o == null) {
    return null;
  } else {
    if (!(o == null) ? o.cljs$lang$protocol_mask$partition0$ & 256 || o.cljs$core$ILookup$ ? true : false : false) {
      return o.cljs$core$ILookup$_lookup$arity$2(null, k);
    } else {
      if (cljs.core.array_QMARK_(o)) {
        if (k < o.length) {
          return o[k | 0];
        } else {
          return null;
        }
      } else {
        if (typeof o === "string") {
          if (k < o.length) {
            return o[k | 0];
          } else {
            return null;
          }
        } else {
          if (cljs.core.native_satisfies_QMARK_(cljs.core.ILookup, o)) {
            return cljs.core._lookup.cljs$core$IFn$_invoke$arity$2(o, k);
          } else {
            return null;
          }
        }
      }
    }
  }
};
cljs.core.get.cljs$core$IFn$_invoke$arity$3 = function(o, k, not_found) {
  if (!(o == null)) {
    if (!(o == null) ? o.cljs$lang$protocol_mask$partition0$ & 256 || o.cljs$core$ILookup$ ? true : false : false) {
      return o.cljs$core$ILookup$_lookup$arity$3(null, k, not_found);
    } else {
      if (cljs.core.array_QMARK_(o)) {
        if (k < o.length) {
          return o[k];
        } else {
          return not_found;
        }
      } else {
        if (typeof o === "string") {
          if (k < o.length) {
            return o[k];
          } else {
            return not_found;
          }
        } else {
          if (cljs.core.native_satisfies_QMARK_(cljs.core.ILookup, o)) {
            return cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(o, k, not_found);
          } else {
            return not_found;
          }
        }
      }
    }
  } else {
    return not_found;
  }
};
cljs.core.get.cljs$lang$maxFixedArity = 3;
cljs.core.assoc = function cljs$core$assoc(var_args) {
  var args8571 = [];
  var len__7198__auto___8578 = arguments.length;
  var i__7199__auto___8579 = 0;
  while (true) {
    if (i__7199__auto___8579 < len__7198__auto___8578) {
      args8571.push(arguments[i__7199__auto___8579]);
      var G__8580 = i__7199__auto___8579 + 1;
      i__7199__auto___8579 = G__8580;
      continue;
    } else {
    }
    break;
  }
  var G__8577 = args8571.length;
  switch(G__8577) {
    case 3:
      return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8571.slice(3), 0);
      return cljs.core.assoc.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], argseq__7217__auto__);
  }
};
cljs.core.assoc.cljs$core$IFn$_invoke$arity$3 = function(coll, k, v) {
  if (!(coll == null)) {
    return cljs.core._assoc(coll, k, v);
  } else {
    return cljs.core.PersistentHashMap.fromArrays([k], [v]);
  }
};
cljs.core.assoc.cljs$core$IFn$_invoke$arity$variadic = function(coll, k, v, kvs) {
  while (true) {
    var ret = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(coll, k, v);
    if (cljs.core.truth_(kvs)) {
      var G__8582 = ret;
      var G__8583 = cljs.core.first(kvs);
      var G__8584 = cljs.core.second(kvs);
      var G__8585 = cljs.core.nnext(kvs);
      coll = G__8582;
      k = G__8583;
      v = G__8584;
      kvs = G__8585;
      continue;
    } else {
      return ret;
    }
    break;
  }
};
cljs.core.assoc.cljs$lang$applyTo = function(seq8572) {
  var G__8573 = cljs.core.first(seq8572);
  var seq8572__$1 = cljs.core.next(seq8572);
  var G__8574 = cljs.core.first(seq8572__$1);
  var seq8572__$2 = cljs.core.next(seq8572__$1);
  var G__8575 = cljs.core.first(seq8572__$2);
  var seq8572__$3 = cljs.core.next(seq8572__$2);
  return cljs.core.assoc.cljs$core$IFn$_invoke$arity$variadic(G__8573, G__8574, G__8575, seq8572__$3);
};
cljs.core.assoc.cljs$lang$maxFixedArity = 3;
cljs.core.dissoc = function cljs$core$dissoc(var_args) {
  var args8586 = [];
  var len__7198__auto___8592 = arguments.length;
  var i__7199__auto___8593 = 0;
  while (true) {
    if (i__7199__auto___8593 < len__7198__auto___8592) {
      args8586.push(arguments[i__7199__auto___8593]);
      var G__8594 = i__7199__auto___8593 + 1;
      i__7199__auto___8593 = G__8594;
      continue;
    } else {
    }
    break;
  }
  var G__8591 = args8586.length;
  switch(G__8591) {
    case 1:
      return cljs.core.dissoc.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8586.slice(2), 0);
      return cljs.core.dissoc.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.dissoc.cljs$core$IFn$_invoke$arity$1 = function(coll) {
  return coll;
};
cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2 = function(coll, k) {
  if (coll == null) {
    return null;
  } else {
    return cljs.core._dissoc(coll, k);
  }
};
cljs.core.dissoc.cljs$core$IFn$_invoke$arity$variadic = function(coll, k, ks) {
  while (true) {
    if (coll == null) {
      return null;
    } else {
      var ret = cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(coll, k);
      if (cljs.core.truth_(ks)) {
        var G__8596 = ret;
        var G__8597 = cljs.core.first(ks);
        var G__8598 = cljs.core.next(ks);
        coll = G__8596;
        k = G__8597;
        ks = G__8598;
        continue;
      } else {
        return ret;
      }
    }
    break;
  }
};
cljs.core.dissoc.cljs$lang$applyTo = function(seq8587) {
  var G__8588 = cljs.core.first(seq8587);
  var seq8587__$1 = cljs.core.next(seq8587);
  var G__8589 = cljs.core.first(seq8587__$1);
  var seq8587__$2 = cljs.core.next(seq8587__$1);
  return cljs.core.dissoc.cljs$core$IFn$_invoke$arity$variadic(G__8588, G__8589, seq8587__$2);
};
cljs.core.dissoc.cljs$lang$maxFixedArity = 2;
cljs.core.fn_QMARK_ = function cljs$core$fn_QMARK_(f) {
  var or__6140__auto__ = goog.isFunction(f);
  if (or__6140__auto__) {
    return or__6140__auto__;
  } else {
    if (!(f == null)) {
      if (false || f.cljs$core$Fn$) {
        return true;
      } else {
        if (!f.cljs$lang$protocol_mask$partition$) {
          return cljs.core.native_satisfies_QMARK_(cljs.core.Fn, f);
        } else {
          return false;
        }
      }
    } else {
      return cljs.core.native_satisfies_QMARK_(cljs.core.Fn, f);
    }
  }
};
cljs.core.MetaFn = function(afn, meta) {
  this.afn = afn;
  this.meta = meta;
  this.cljs$lang$protocol_mask$partition0$ = 393217;
  this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.MetaFn.prototype.cljs$core$IMeta$_meta$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return self__.meta;
};
cljs.core.MetaFn.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(_, new_meta) {
  var self__ = this;
  var ___$1 = this;
  return new cljs.core.MetaFn(self__.afn, new_meta);
};
cljs.core.MetaFn.prototype.cljs$core$Fn$ = true;
cljs.core.MetaFn.prototype.call = function() {
  var G__8604 = null;
  var G__8604__1 = function(self__) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return self__.afn.cljs$core$IFn$_invoke$arity$0 ? self__.afn.cljs$core$IFn$_invoke$arity$0() : self__.afn.call(null);
  };
  var G__8604__2 = function(self__, a) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return self__.afn.cljs$core$IFn$_invoke$arity$1 ? self__.afn.cljs$core$IFn$_invoke$arity$1(a) : self__.afn.call(null, a);
  };
  var G__8604__3 = function(self__, a, b) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return self__.afn.cljs$core$IFn$_invoke$arity$2 ? self__.afn.cljs$core$IFn$_invoke$arity$2(a, b) : self__.afn.call(null, a, b);
  };
  var G__8604__4 = function(self__, a, b, c) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return self__.afn.cljs$core$IFn$_invoke$arity$3 ? self__.afn.cljs$core$IFn$_invoke$arity$3(a, b, c) : self__.afn.call(null, a, b, c);
  };
  var G__8604__5 = function(self__, a, b, c, d) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return self__.afn.cljs$core$IFn$_invoke$arity$4 ? self__.afn.cljs$core$IFn$_invoke$arity$4(a, b, c, d) : self__.afn.call(null, a, b, c, d);
  };
  var G__8604__6 = function(self__, a, b, c, d, e) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return self__.afn.cljs$core$IFn$_invoke$arity$5 ? self__.afn.cljs$core$IFn$_invoke$arity$5(a, b, c, d, e) : self__.afn.call(null, a, b, c, d, e);
  };
  var G__8604__7 = function(self__, a, b, c, d, e, f) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return self__.afn.cljs$core$IFn$_invoke$arity$6 ? self__.afn.cljs$core$IFn$_invoke$arity$6(a, b, c, d, e, f) : self__.afn.call(null, a, b, c, d, e, f);
  };
  var G__8604__8 = function(self__, a, b, c, d, e, f, g) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return self__.afn.cljs$core$IFn$_invoke$arity$7 ? self__.afn.cljs$core$IFn$_invoke$arity$7(a, b, c, d, e, f, g) : self__.afn.call(null, a, b, c, d, e, f, g);
  };
  var G__8604__9 = function(self__, a, b, c, d, e, f, g, h) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return self__.afn.cljs$core$IFn$_invoke$arity$8 ? self__.afn.cljs$core$IFn$_invoke$arity$8(a, b, c, d, e, f, g, h) : self__.afn.call(null, a, b, c, d, e, f, g, h);
  };
  var G__8604__10 = function(self__, a, b, c, d, e, f, g, h, i) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return self__.afn.cljs$core$IFn$_invoke$arity$9 ? self__.afn.cljs$core$IFn$_invoke$arity$9(a, b, c, d, e, f, g, h, i) : self__.afn.call(null, a, b, c, d, e, f, g, h, i);
  };
  var G__8604__11 = function(self__, a, b, c, d, e, f, g, h, i, j) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return self__.afn.cljs$core$IFn$_invoke$arity$10 ? self__.afn.cljs$core$IFn$_invoke$arity$10(a, b, c, d, e, f, g, h, i, j) : self__.afn.call(null, a, b, c, d, e, f, g, h, i, j);
  };
  var G__8604__12 = function(self__, a, b, c, d, e, f, g, h, i, j, k) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return self__.afn.cljs$core$IFn$_invoke$arity$11 ? self__.afn.cljs$core$IFn$_invoke$arity$11(a, b, c, d, e, f, g, h, i, j, k) : self__.afn.call(null, a, b, c, d, e, f, g, h, i, j, k);
  };
  var G__8604__13 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return self__.afn.cljs$core$IFn$_invoke$arity$12 ? self__.afn.cljs$core$IFn$_invoke$arity$12(a, b, c, d, e, f, g, h, i, j, k, l) : self__.afn.call(null, a, b, c, d, e, f, g, h, i, j, k, l);
  };
  var G__8604__14 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return self__.afn.cljs$core$IFn$_invoke$arity$13 ? self__.afn.cljs$core$IFn$_invoke$arity$13(a, b, c, d, e, f, g, h, i, j, k, l, m) : self__.afn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m);
  };
  var G__8604__15 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return self__.afn.cljs$core$IFn$_invoke$arity$14 ? self__.afn.cljs$core$IFn$_invoke$arity$14(a, b, c, d, e, f, g, h, i, j, k, l, m, n) : self__.afn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n);
  };
  var G__8604__16 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return self__.afn.cljs$core$IFn$_invoke$arity$15 ? self__.afn.cljs$core$IFn$_invoke$arity$15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) : self__.afn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
  };
  var G__8604__17 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return self__.afn.cljs$core$IFn$_invoke$arity$16 ? self__.afn.cljs$core$IFn$_invoke$arity$16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) : self__.afn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
  };
  var G__8604__18 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return self__.afn.cljs$core$IFn$_invoke$arity$17 ? self__.afn.cljs$core$IFn$_invoke$arity$17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) : self__.afn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q);
  };
  var G__8604__19 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return self__.afn.cljs$core$IFn$_invoke$arity$18 ? self__.afn.cljs$core$IFn$_invoke$arity$18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) : self__.afn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r);
  };
  var G__8604__20 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return self__.afn.cljs$core$IFn$_invoke$arity$19 ? self__.afn.cljs$core$IFn$_invoke$arity$19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) : self__.afn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s);
  };
  var G__8604__21 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return self__.afn.cljs$core$IFn$_invoke$arity$20 ? self__.afn.cljs$core$IFn$_invoke$arity$20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) : self__.afn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t);
  };
  var G__8604__22 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest) {
    var self__ = this;
    var self____$1 = this;
    var _ = self____$1;
    return cljs.core.apply.cljs$core$IFn$_invoke$arity$22 ? cljs.core.apply.cljs$core$IFn$_invoke$arity$22(self__.afn, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest) : cljs.core.apply.call(null, self__.afn, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest);
  };
  G__8604 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest) {
    switch(arguments.length) {
      case 1:
        return G__8604__1.call(this, self__);
      case 2:
        return G__8604__2.call(this, self__, a);
      case 3:
        return G__8604__3.call(this, self__, a, b);
      case 4:
        return G__8604__4.call(this, self__, a, b, c);
      case 5:
        return G__8604__5.call(this, self__, a, b, c, d);
      case 6:
        return G__8604__6.call(this, self__, a, b, c, d, e);
      case 7:
        return G__8604__7.call(this, self__, a, b, c, d, e, f);
      case 8:
        return G__8604__8.call(this, self__, a, b, c, d, e, f, g);
      case 9:
        return G__8604__9.call(this, self__, a, b, c, d, e, f, g, h);
      case 10:
        return G__8604__10.call(this, self__, a, b, c, d, e, f, g, h, i);
      case 11:
        return G__8604__11.call(this, self__, a, b, c, d, e, f, g, h, i, j);
      case 12:
        return G__8604__12.call(this, self__, a, b, c, d, e, f, g, h, i, j, k);
      case 13:
        return G__8604__13.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l);
      case 14:
        return G__8604__14.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m);
      case 15:
        return G__8604__15.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n);
      case 16:
        return G__8604__16.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
      case 17:
        return G__8604__17.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
      case 18:
        return G__8604__18.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q);
      case 19:
        return G__8604__19.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r);
      case 20:
        return G__8604__20.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s);
      case 21:
        return G__8604__21.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t);
      case 22:
        return G__8604__22.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest);
    }
    throw new Error("Invalid arity: " + arguments.length);
  };
  G__8604.cljs$core$IFn$_invoke$arity$1 = G__8604__1;
  G__8604.cljs$core$IFn$_invoke$arity$2 = G__8604__2;
  G__8604.cljs$core$IFn$_invoke$arity$3 = G__8604__3;
  G__8604.cljs$core$IFn$_invoke$arity$4 = G__8604__4;
  G__8604.cljs$core$IFn$_invoke$arity$5 = G__8604__5;
  G__8604.cljs$core$IFn$_invoke$arity$6 = G__8604__6;
  G__8604.cljs$core$IFn$_invoke$arity$7 = G__8604__7;
  G__8604.cljs$core$IFn$_invoke$arity$8 = G__8604__8;
  G__8604.cljs$core$IFn$_invoke$arity$9 = G__8604__9;
  G__8604.cljs$core$IFn$_invoke$arity$10 = G__8604__10;
  G__8604.cljs$core$IFn$_invoke$arity$11 = G__8604__11;
  G__8604.cljs$core$IFn$_invoke$arity$12 = G__8604__12;
  G__8604.cljs$core$IFn$_invoke$arity$13 = G__8604__13;
  G__8604.cljs$core$IFn$_invoke$arity$14 = G__8604__14;
  G__8604.cljs$core$IFn$_invoke$arity$15 = G__8604__15;
  G__8604.cljs$core$IFn$_invoke$arity$16 = G__8604__16;
  G__8604.cljs$core$IFn$_invoke$arity$17 = G__8604__17;
  G__8604.cljs$core$IFn$_invoke$arity$18 = G__8604__18;
  G__8604.cljs$core$IFn$_invoke$arity$19 = G__8604__19;
  G__8604.cljs$core$IFn$_invoke$arity$20 = G__8604__20;
  G__8604.cljs$core$IFn$_invoke$arity$21 = G__8604__21;
  G__8604.cljs$core$IFn$_invoke$arity$22 = G__8604__22;
  return G__8604;
}();
cljs.core.MetaFn.prototype.apply = function(self__, args8603) {
  var self__ = this;
  var self____$1 = this;
  return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args8603)));
};
cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$0 = function() {
  var self__ = this;
  var _ = this;
  return self__.afn.cljs$core$IFn$_invoke$arity$0 ? self__.afn.cljs$core$IFn$_invoke$arity$0() : self__.afn.call(null);
};
cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$1 = function(a) {
  var self__ = this;
  var _ = this;
  return self__.afn.cljs$core$IFn$_invoke$arity$1 ? self__.afn.cljs$core$IFn$_invoke$arity$1(a) : self__.afn.call(null, a);
};
cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
  var self__ = this;
  var _ = this;
  return self__.afn.cljs$core$IFn$_invoke$arity$2 ? self__.afn.cljs$core$IFn$_invoke$arity$2(a, b) : self__.afn.call(null, a, b);
};
cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$3 = function(a, b, c) {
  var self__ = this;
  var _ = this;
  return self__.afn.cljs$core$IFn$_invoke$arity$3 ? self__.afn.cljs$core$IFn$_invoke$arity$3(a, b, c) : self__.afn.call(null, a, b, c);
};
cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$4 = function(a, b, c, d) {
  var self__ = this;
  var _ = this;
  return self__.afn.cljs$core$IFn$_invoke$arity$4 ? self__.afn.cljs$core$IFn$_invoke$arity$4(a, b, c, d) : self__.afn.call(null, a, b, c, d);
};
cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$5 = function(a, b, c, d, e) {
  var self__ = this;
  var _ = this;
  return self__.afn.cljs$core$IFn$_invoke$arity$5 ? self__.afn.cljs$core$IFn$_invoke$arity$5(a, b, c, d, e) : self__.afn.call(null, a, b, c, d, e);
};
cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$6 = function(a, b, c, d, e, f) {
  var self__ = this;
  var _ = this;
  return self__.afn.cljs$core$IFn$_invoke$arity$6 ? self__.afn.cljs$core$IFn$_invoke$arity$6(a, b, c, d, e, f) : self__.afn.call(null, a, b, c, d, e, f);
};
cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$7 = function(a, b, c, d, e, f, g) {
  var self__ = this;
  var _ = this;
  return self__.afn.cljs$core$IFn$_invoke$arity$7 ? self__.afn.cljs$core$IFn$_invoke$arity$7(a, b, c, d, e, f, g) : self__.afn.call(null, a, b, c, d, e, f, g);
};
cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$8 = function(a, b, c, d, e, f, g, h) {
  var self__ = this;
  var _ = this;
  return self__.afn.cljs$core$IFn$_invoke$arity$8 ? self__.afn.cljs$core$IFn$_invoke$arity$8(a, b, c, d, e, f, g, h) : self__.afn.call(null, a, b, c, d, e, f, g, h);
};
cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$9 = function(a, b, c, d, e, f, g, h, i) {
  var self__ = this;
  var _ = this;
  return self__.afn.cljs$core$IFn$_invoke$arity$9 ? self__.afn.cljs$core$IFn$_invoke$arity$9(a, b, c, d, e, f, g, h, i) : self__.afn.call(null, a, b, c, d, e, f, g, h, i);
};
cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$10 = function(a, b, c, d, e, f, g, h, i, j) {
  var self__ = this;
  var _ = this;
  return self__.afn.cljs$core$IFn$_invoke$arity$10 ? self__.afn.cljs$core$IFn$_invoke$arity$10(a, b, c, d, e, f, g, h, i, j) : self__.afn.call(null, a, b, c, d, e, f, g, h, i, j);
};
cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$11 = function(a, b, c, d, e, f, g, h, i, j, k) {
  var self__ = this;
  var _ = this;
  return self__.afn.cljs$core$IFn$_invoke$arity$11 ? self__.afn.cljs$core$IFn$_invoke$arity$11(a, b, c, d, e, f, g, h, i, j, k) : self__.afn.call(null, a, b, c, d, e, f, g, h, i, j, k);
};
cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$12 = function(a, b, c, d, e, f, g, h, i, j, k, l) {
  var self__ = this;
  var _ = this;
  return self__.afn.cljs$core$IFn$_invoke$arity$12 ? self__.afn.cljs$core$IFn$_invoke$arity$12(a, b, c, d, e, f, g, h, i, j, k, l) : self__.afn.call(null, a, b, c, d, e, f, g, h, i, j, k, l);
};
cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$13 = function(a, b, c, d, e, f, g, h, i, j, k, l, m) {
  var self__ = this;
  var _ = this;
  return self__.afn.cljs$core$IFn$_invoke$arity$13 ? self__.afn.cljs$core$IFn$_invoke$arity$13(a, b, c, d, e, f, g, h, i, j, k, l, m) : self__.afn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m);
};
cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$14 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n) {
  var self__ = this;
  var _ = this;
  return self__.afn.cljs$core$IFn$_invoke$arity$14 ? self__.afn.cljs$core$IFn$_invoke$arity$14(a, b, c, d, e, f, g, h, i, j, k, l, m, n) : self__.afn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n);
};
cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$15 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) {
  var self__ = this;
  var _ = this;
  return self__.afn.cljs$core$IFn$_invoke$arity$15 ? self__.afn.cljs$core$IFn$_invoke$arity$15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) : self__.afn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
};
cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$16 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
  var self__ = this;
  var _ = this;
  return self__.afn.cljs$core$IFn$_invoke$arity$16 ? self__.afn.cljs$core$IFn$_invoke$arity$16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) : self__.afn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
};
cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$17 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) {
  var self__ = this;
  var _ = this;
  return self__.afn.cljs$core$IFn$_invoke$arity$17 ? self__.afn.cljs$core$IFn$_invoke$arity$17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) : self__.afn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q);
};
cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$18 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) {
  var self__ = this;
  var _ = this;
  return self__.afn.cljs$core$IFn$_invoke$arity$18 ? self__.afn.cljs$core$IFn$_invoke$arity$18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) : self__.afn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r);
};
cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$19 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) {
  var self__ = this;
  var _ = this;
  return self__.afn.cljs$core$IFn$_invoke$arity$19 ? self__.afn.cljs$core$IFn$_invoke$arity$19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) : self__.afn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s);
};
cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$20 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) {
  var self__ = this;
  var _ = this;
  return self__.afn.cljs$core$IFn$_invoke$arity$20 ? self__.afn.cljs$core$IFn$_invoke$arity$20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) : self__.afn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t);
};
cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$21 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest) {
  var self__ = this;
  var _ = this;
  return cljs.core.apply.cljs$core$IFn$_invoke$arity$22 ? cljs.core.apply.cljs$core$IFn$_invoke$arity$22(self__.afn, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest) : cljs.core.apply.call(null, self__.afn, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest);
};
cljs.core.MetaFn.getBasis = function() {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "afn", "afn", 216963467, null), new cljs.core.Symbol(null, "meta", "meta", -1154898805, null)], null);
};
cljs.core.MetaFn.cljs$lang$type = true;
cljs.core.MetaFn.cljs$lang$ctorStr = "cljs.core/MetaFn";
cljs.core.MetaFn.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/MetaFn");
};
cljs.core.__GT_MetaFn = function cljs$core$__GT_MetaFn(afn, meta) {
  return new cljs.core.MetaFn(afn, meta);
};
cljs.core.with_meta = function cljs$core$with_meta(o, meta) {
  if (goog.isFunction(o)) {
    return new cljs.core.MetaFn(o, meta);
  } else {
    if (o == null) {
      return null;
    } else {
      return cljs.core._with_meta(o, meta);
    }
  }
};
cljs.core.meta = function cljs$core$meta(o) {
  if (function() {
    var and__6128__auto__ = !(o == null);
    if (and__6128__auto__) {
      if (!(o == null)) {
        if (o.cljs$lang$protocol_mask$partition0$ & 131072 || o.cljs$core$IMeta$) {
          return true;
        } else {
          if (!o.cljs$lang$protocol_mask$partition0$) {
            return cljs.core.native_satisfies_QMARK_(cljs.core.IMeta, o);
          } else {
            return false;
          }
        }
      } else {
        return cljs.core.native_satisfies_QMARK_(cljs.core.IMeta, o);
      }
    } else {
      return and__6128__auto__;
    }
  }()) {
    return cljs.core._meta(o);
  } else {
    return null;
  }
};
cljs.core.peek = function cljs$core$peek(coll) {
  if (coll == null) {
    return null;
  } else {
    return cljs.core._peek(coll);
  }
};
cljs.core.pop = function cljs$core$pop(coll) {
  if (coll == null) {
    return null;
  } else {
    return cljs.core._pop(coll);
  }
};
cljs.core.disj = function cljs$core$disj(var_args) {
  var args8609 = [];
  var len__7198__auto___8615 = arguments.length;
  var i__7199__auto___8616 = 0;
  while (true) {
    if (i__7199__auto___8616 < len__7198__auto___8615) {
      args8609.push(arguments[i__7199__auto___8616]);
      var G__8617 = i__7199__auto___8616 + 1;
      i__7199__auto___8616 = G__8617;
      continue;
    } else {
    }
    break;
  }
  var G__8614 = args8609.length;
  switch(G__8614) {
    case 1:
      return cljs.core.disj.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.disj.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8609.slice(2), 0);
      return cljs.core.disj.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.disj.cljs$core$IFn$_invoke$arity$1 = function(coll) {
  return coll;
};
cljs.core.disj.cljs$core$IFn$_invoke$arity$2 = function(coll, k) {
  if (coll == null) {
    return null;
  } else {
    return cljs.core._disjoin(coll, k);
  }
};
cljs.core.disj.cljs$core$IFn$_invoke$arity$variadic = function(coll, k, ks) {
  while (true) {
    if (coll == null) {
      return null;
    } else {
      var ret = cljs.core.disj.cljs$core$IFn$_invoke$arity$2(coll, k);
      if (cljs.core.truth_(ks)) {
        var G__8619 = ret;
        var G__8620 = cljs.core.first(ks);
        var G__8621 = cljs.core.next(ks);
        coll = G__8619;
        k = G__8620;
        ks = G__8621;
        continue;
      } else {
        return ret;
      }
    }
    break;
  }
};
cljs.core.disj.cljs$lang$applyTo = function(seq8610) {
  var G__8611 = cljs.core.first(seq8610);
  var seq8610__$1 = cljs.core.next(seq8610);
  var G__8612 = cljs.core.first(seq8610__$1);
  var seq8610__$2 = cljs.core.next(seq8610__$1);
  return cljs.core.disj.cljs$core$IFn$_invoke$arity$variadic(G__8611, G__8612, seq8610__$2);
};
cljs.core.disj.cljs$lang$maxFixedArity = 2;
cljs.core.empty_QMARK_ = function cljs$core$empty_QMARK_(coll) {
  return coll == null || cljs.core.not(cljs.core.seq(coll));
};
cljs.core.coll_QMARK_ = function cljs$core$coll_QMARK_(x) {
  if (x == null) {
    return false;
  } else {
    if (!(x == null)) {
      if (x.cljs$lang$protocol_mask$partition0$ & 8 || x.cljs$core$ICollection$) {
        return true;
      } else {
        if (!x.cljs$lang$protocol_mask$partition0$) {
          return cljs.core.native_satisfies_QMARK_(cljs.core.ICollection, x);
        } else {
          return false;
        }
      }
    } else {
      return cljs.core.native_satisfies_QMARK_(cljs.core.ICollection, x);
    }
  }
};
cljs.core.set_QMARK_ = function cljs$core$set_QMARK_(x) {
  if (x == null) {
    return false;
  } else {
    if (!(x == null)) {
      if (x.cljs$lang$protocol_mask$partition0$ & 4096 || x.cljs$core$ISet$) {
        return true;
      } else {
        if (!x.cljs$lang$protocol_mask$partition0$) {
          return cljs.core.native_satisfies_QMARK_(cljs.core.ISet, x);
        } else {
          return false;
        }
      }
    } else {
      return cljs.core.native_satisfies_QMARK_(cljs.core.ISet, x);
    }
  }
};
cljs.core.associative_QMARK_ = function cljs$core$associative_QMARK_(x) {
  if (!(x == null)) {
    if (x.cljs$lang$protocol_mask$partition0$ & 512 || x.cljs$core$IAssociative$) {
      return true;
    } else {
      if (!x.cljs$lang$protocol_mask$partition0$) {
        return cljs.core.native_satisfies_QMARK_(cljs.core.IAssociative, x);
      } else {
        return false;
      }
    }
  } else {
    return cljs.core.native_satisfies_QMARK_(cljs.core.IAssociative, x);
  }
};
cljs.core.sequential_QMARK_ = function cljs$core$sequential_QMARK_(x) {
  if (!(x == null)) {
    if (x.cljs$lang$protocol_mask$partition0$ & 16777216 || x.cljs$core$ISequential$) {
      return true;
    } else {
      if (!x.cljs$lang$protocol_mask$partition0$) {
        return cljs.core.native_satisfies_QMARK_(cljs.core.ISequential, x);
      } else {
        return false;
      }
    }
  } else {
    return cljs.core.native_satisfies_QMARK_(cljs.core.ISequential, x);
  }
};
cljs.core.sorted_QMARK_ = function cljs$core$sorted_QMARK_(x) {
  if (!(x == null)) {
    if (x.cljs$lang$protocol_mask$partition0$ & 268435456 || x.cljs$core$ISorted$) {
      return true;
    } else {
      if (!x.cljs$lang$protocol_mask$partition0$) {
        return cljs.core.native_satisfies_QMARK_(cljs.core.ISorted, x);
      } else {
        return false;
      }
    }
  } else {
    return cljs.core.native_satisfies_QMARK_(cljs.core.ISorted, x);
  }
};
cljs.core.reduceable_QMARK_ = function cljs$core$reduceable_QMARK_(x) {
  if (!(x == null)) {
    if (x.cljs$lang$protocol_mask$partition0$ & 524288 || x.cljs$core$IReduce$) {
      return true;
    } else {
      if (!x.cljs$lang$protocol_mask$partition0$) {
        return cljs.core.native_satisfies_QMARK_(cljs.core.IReduce, x);
      } else {
        return false;
      }
    }
  } else {
    return cljs.core.native_satisfies_QMARK_(cljs.core.IReduce, x);
  }
};
cljs.core.map_QMARK_ = function cljs$core$map_QMARK_(x) {
  if (x == null) {
    return false;
  } else {
    if (!(x == null)) {
      if (x.cljs$lang$protocol_mask$partition0$ & 1024 || x.cljs$core$IMap$) {
        return true;
      } else {
        if (!x.cljs$lang$protocol_mask$partition0$) {
          return cljs.core.native_satisfies_QMARK_(cljs.core.IMap, x);
        } else {
          return false;
        }
      }
    } else {
      return cljs.core.native_satisfies_QMARK_(cljs.core.IMap, x);
    }
  }
};
cljs.core.record_QMARK_ = function cljs$core$record_QMARK_(x) {
  if (!(x == null)) {
    if (x.cljs$lang$protocol_mask$partition0$ & 67108864 || x.cljs$core$IRecord$) {
      return true;
    } else {
      if (!x.cljs$lang$protocol_mask$partition0$) {
        return cljs.core.native_satisfies_QMARK_(cljs.core.IRecord, x);
      } else {
        return false;
      }
    }
  } else {
    return cljs.core.native_satisfies_QMARK_(cljs.core.IRecord, x);
  }
};
cljs.core.vector_QMARK_ = function cljs$core$vector_QMARK_(x) {
  if (!(x == null)) {
    if (x.cljs$lang$protocol_mask$partition0$ & 16384 || x.cljs$core$IVector$) {
      return true;
    } else {
      if (!x.cljs$lang$protocol_mask$partition0$) {
        return cljs.core.native_satisfies_QMARK_(cljs.core.IVector, x);
      } else {
        return false;
      }
    }
  } else {
    return cljs.core.native_satisfies_QMARK_(cljs.core.IVector, x);
  }
};
cljs.core.chunked_seq_QMARK_ = function cljs$core$chunked_seq_QMARK_(x) {
  if (!(x == null)) {
    if (x.cljs$lang$protocol_mask$partition1$ & 512 || x.cljs$core$IChunkedSeq$) {
      return true;
    } else {
      return false;
    }
  } else {
    return false;
  }
};
cljs.core.js_obj = function cljs$core$js_obj(var_args) {
  var args8642 = [];
  var len__7198__auto___8648 = arguments.length;
  var i__7199__auto___8649 = 0;
  while (true) {
    if (i__7199__auto___8649 < len__7198__auto___8648) {
      args8642.push(arguments[i__7199__auto___8649]);
      var G__8650 = i__7199__auto___8649 + 1;
      i__7199__auto___8649 = G__8650;
      continue;
    } else {
    }
    break;
  }
  var G__8645 = args8642.length;
  switch(G__8645) {
    case 0:
      return cljs.core.js_obj.cljs$core$IFn$_invoke$arity$0();
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8642.slice(0), 0);
      return cljs.core.js_obj.cljs$core$IFn$_invoke$arity$variadic(argseq__7217__auto__);
  }
};
cljs.core.js_obj.cljs$core$IFn$_invoke$arity$0 = function() {
  return {};
};
cljs.core.js_obj.cljs$core$IFn$_invoke$arity$variadic = function(keyvals) {
  return cljs.core.apply.cljs$core$IFn$_invoke$arity$2 ? cljs.core.apply.cljs$core$IFn$_invoke$arity$2(goog.object.create, keyvals) : cljs.core.apply.call(null, goog.object.create, keyvals);
};
cljs.core.js_obj.cljs$lang$applyTo = function(seq8643) {
  return cljs.core.js_obj.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq8643));
};
cljs.core.js_obj.cljs$lang$maxFixedArity = 0;
cljs.core.js_keys = function cljs$core$js_keys(obj) {
  var keys = [];
  var G__8654_8656 = obj;
  var G__8655_8657 = function(G__8654_8656, keys) {
    return function(val, key, obj__$1) {
      return keys.push(key);
    };
  }(G__8654_8656, keys);
  goog.object.forEach(G__8654_8656, G__8655_8657);
  return keys;
};
cljs.core.js_delete = function cljs$core$js_delete(obj, key) {
  return delete obj[key];
};
cljs.core.array_copy = function cljs$core$array_copy(from, i, to, j, len) {
  var i__$1 = i;
  var j__$1 = j;
  var len__$1 = len;
  while (true) {
    if (len__$1 === 0) {
      return to;
    } else {
      to[j__$1] = from[i__$1];
      var G__8658 = i__$1 + 1;
      var G__8659 = j__$1 + 1;
      var G__8660 = len__$1 - 1;
      i__$1 = G__8658;
      j__$1 = G__8659;
      len__$1 = G__8660;
      continue;
    }
    break;
  }
};
cljs.core.array_copy_downward = function cljs$core$array_copy_downward(from, i, to, j, len) {
  var i__$1 = i + (len - 1);
  var j__$1 = j + (len - 1);
  var len__$1 = len;
  while (true) {
    if (len__$1 === 0) {
      return to;
    } else {
      to[j__$1] = from[i__$1];
      var G__8661 = i__$1 - 1;
      var G__8662 = j__$1 - 1;
      var G__8663 = len__$1 - 1;
      i__$1 = G__8661;
      j__$1 = G__8662;
      len__$1 = G__8663;
      continue;
    }
    break;
  }
};
cljs.core.lookup_sentinel = {};
cljs.core.false_QMARK_ = function cljs$core$false_QMARK_(x) {
  return x === false;
};
cljs.core.true_QMARK_ = function cljs$core$true_QMARK_(x) {
  return x === true;
};
cljs.core.undefined_QMARK_ = function cljs$core$undefined_QMARK_(x) {
  return void 0 === x;
};
cljs.core.seq_QMARK_ = function cljs$core$seq_QMARK_(s) {
  if (s == null) {
    return false;
  } else {
    if (!(s == null)) {
      if (s.cljs$lang$protocol_mask$partition0$ & 64 || s.cljs$core$ISeq$) {
        return true;
      } else {
        if (!s.cljs$lang$protocol_mask$partition0$) {
          return cljs.core.native_satisfies_QMARK_(cljs.core.ISeq, s);
        } else {
          return false;
        }
      }
    } else {
      return cljs.core.native_satisfies_QMARK_(cljs.core.ISeq, s);
    }
  }
};
cljs.core.seqable_QMARK_ = function cljs$core$seqable_QMARK_(s) {
  if (!(s == null)) {
    if (s.cljs$lang$protocol_mask$partition0$ & 8388608 || s.cljs$core$ISeqable$) {
      return true;
    } else {
      if (!s.cljs$lang$protocol_mask$partition0$) {
        return cljs.core.native_satisfies_QMARK_(cljs.core.ISeqable, s);
      } else {
        return false;
      }
    }
  } else {
    return cljs.core.native_satisfies_QMARK_(cljs.core.ISeqable, s);
  }
};
cljs.core.boolean$ = function cljs$core$boolean(x) {
  if (x == null) {
    return false;
  } else {
    if (x === false) {
      return false;
    } else {
      return true;
    }
  }
};
cljs.core.ifn_QMARK_ = function cljs$core$ifn_QMARK_(f) {
  var or__6140__auto__ = cljs.core.fn_QMARK_(f);
  if (or__6140__auto__) {
    return or__6140__auto__;
  } else {
    if (!(f == null)) {
      if (f.cljs$lang$protocol_mask$partition0$ & 1 || f.cljs$core$IFn$) {
        return true;
      } else {
        if (!f.cljs$lang$protocol_mask$partition0$) {
          return cljs.core.native_satisfies_QMARK_(cljs.core.IFn, f);
        } else {
          return false;
        }
      }
    } else {
      return cljs.core.native_satisfies_QMARK_(cljs.core.IFn, f);
    }
  }
};
cljs.core.integer_QMARK_ = function cljs$core$integer_QMARK_(n) {
  return typeof n === "number" && !isNaN(n) && !(n === Infinity) && parseFloat(n) === parseInt(n, 10);
};
cljs.core.contains_QMARK_ = function cljs$core$contains_QMARK_(coll, v) {
  if (cljs.core.get.cljs$core$IFn$_invoke$arity$3(coll, v, cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel) {
    return false;
  } else {
    return true;
  }
};
cljs.core.find = function cljs$core$find(coll, k) {
  if (!(coll == null) && cljs.core.associative_QMARK_(coll) && cljs.core.contains_QMARK_(coll, k)) {
    return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [k, cljs.core.get.cljs$core$IFn$_invoke$arity$2(coll, k)], null);
  } else {
    return null;
  }
};
cljs.core.distinct_QMARK_ = function cljs$core$distinct_QMARK_(var_args) {
  var args8674 = [];
  var len__7198__auto___8680 = arguments.length;
  var i__7199__auto___8681 = 0;
  while (true) {
    if (i__7199__auto___8681 < len__7198__auto___8680) {
      args8674.push(arguments[i__7199__auto___8681]);
      var G__8682 = i__7199__auto___8681 + 1;
      i__7199__auto___8681 = G__8682;
      continue;
    } else {
    }
    break;
  }
  var G__8679 = args8674.length;
  switch(G__8679) {
    case 1:
      return cljs.core.distinct_QMARK_.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.distinct_QMARK_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8674.slice(2), 0);
      return cljs.core.distinct_QMARK_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.distinct_QMARK_.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return true;
};
cljs.core.distinct_QMARK_.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return !cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(x, y);
};
cljs.core.distinct_QMARK_.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  if (!cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(x, y)) {
    var s = cljs.core.PersistentHashSet.fromArray([x, y], true);
    var xs = more;
    while (true) {
      var x__$1 = cljs.core.first(xs);
      var etc = cljs.core.next(xs);
      if (cljs.core.truth_(xs)) {
        if (cljs.core.contains_QMARK_(s, x__$1)) {
          return false;
        } else {
          var G__8684 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(s, x__$1);
          var G__8685 = etc;
          s = G__8684;
          xs = G__8685;
          continue;
        }
      } else {
        return true;
      }
      break;
    }
  } else {
    return false;
  }
};
cljs.core.distinct_QMARK_.cljs$lang$applyTo = function(seq8675) {
  var G__8676 = cljs.core.first(seq8675);
  var seq8675__$1 = cljs.core.next(seq8675);
  var G__8677 = cljs.core.first(seq8675__$1);
  var seq8675__$2 = cljs.core.next(seq8675__$1);
  return cljs.core.distinct_QMARK_.cljs$core$IFn$_invoke$arity$variadic(G__8676, G__8677, seq8675__$2);
};
cljs.core.distinct_QMARK_.cljs$lang$maxFixedArity = 2;
cljs.core.compare = function cljs$core$compare(x, y) {
  if (x === y) {
    return 0;
  } else {
    if (x == null) {
      return -1;
    } else {
      if (y == null) {
        return 1;
      } else {
        if (typeof x === "number") {
          if (typeof y === "number") {
            return goog.array.defaultCompare(x, y);
          } else {
            throw new Error([cljs.core.str("Cannot compare "), cljs.core.str(x), cljs.core.str(" to "), cljs.core.str(y)].join(""));
          }
        } else {
          if (!(x == null) ? x.cljs$lang$protocol_mask$partition1$ & 2048 || x.cljs$core$IComparable$ ? true : !x.cljs$lang$protocol_mask$partition1$ ? cljs.core.native_satisfies_QMARK_(cljs.core.IComparable, x) : false : cljs.core.native_satisfies_QMARK_(cljs.core.IComparable, x)) {
            return cljs.core._compare(x, y);
          } else {
            if ((typeof x === "string" || cljs.core.array_QMARK_(x) || x === true || x === false) && cljs.core.type(x) === cljs.core.type(y)) {
              return goog.array.defaultCompare(x, y);
            } else {
              throw new Error([cljs.core.str("Cannot compare "), cljs.core.str(x), cljs.core.str(" to "), cljs.core.str(y)].join(""));
            }
          }
        }
      }
    }
  }
};
cljs.core.compare_indexed = function cljs$core$compare_indexed(var_args) {
  var args8688 = [];
  var len__7198__auto___8691 = arguments.length;
  var i__7199__auto___8692 = 0;
  while (true) {
    if (i__7199__auto___8692 < len__7198__auto___8691) {
      args8688.push(arguments[i__7199__auto___8692]);
      var G__8693 = i__7199__auto___8692 + 1;
      i__7199__auto___8692 = G__8693;
      continue;
    } else {
    }
    break;
  }
  var G__8690 = args8688.length;
  switch(G__8690) {
    case 2:
      return cljs.core.compare_indexed.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 4:
      return cljs.core.compare_indexed.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args8688.length)].join(""));;
  }
};
cljs.core.compare_indexed.cljs$core$IFn$_invoke$arity$2 = function(xs, ys) {
  var xl = cljs.core.count(xs);
  var yl = cljs.core.count(ys);
  if (xl < yl) {
    return -1;
  } else {
    if (xl > yl) {
      return 1;
    } else {
      if (xl === 0) {
        return 0;
      } else {
        return cljs.core.compare_indexed.cljs$core$IFn$_invoke$arity$4(xs, ys, xl, 0);
      }
    }
  }
};
cljs.core.compare_indexed.cljs$core$IFn$_invoke$arity$4 = function(xs, ys, len, n) {
  while (true) {
    var d = cljs.core.compare(cljs.core.nth.cljs$core$IFn$_invoke$arity$2(xs, n), cljs.core.nth.cljs$core$IFn$_invoke$arity$2(ys, n));
    if (d === 0 && n + 1 < len) {
      var G__8695 = xs;
      var G__8696 = ys;
      var G__8697 = len;
      var G__8698 = n + 1;
      xs = G__8695;
      ys = G__8696;
      len = G__8697;
      n = G__8698;
      continue;
    } else {
      return d;
    }
    break;
  }
};
cljs.core.compare_indexed.cljs$lang$maxFixedArity = 4;
cljs.core.fn__GT_comparator = function cljs$core$fn__GT_comparator(f) {
  if (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(f, cljs.core.compare)) {
    return cljs.core.compare;
  } else {
    return function(x, y) {
      var r = f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(x, y) : f.call(null, x, y);
      if (typeof r === "number") {
        return r;
      } else {
        if (cljs.core.truth_(r)) {
          return -1;
        } else {
          if (cljs.core.truth_(f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(y, x) : f.call(null, y, x))) {
            return 1;
          } else {
            return 0;
          }
        }
      }
    };
  }
};
cljs.core.sort = function cljs$core$sort(var_args) {
  var args8699 = [];
  var len__7198__auto___8704 = arguments.length;
  var i__7199__auto___8705 = 0;
  while (true) {
    if (i__7199__auto___8705 < len__7198__auto___8704) {
      args8699.push(arguments[i__7199__auto___8705]);
      var G__8706 = i__7199__auto___8705 + 1;
      i__7199__auto___8705 = G__8706;
      continue;
    } else {
    }
    break;
  }
  var G__8701 = args8699.length;
  switch(G__8701) {
    case 1:
      return cljs.core.sort.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.sort.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args8699.length)].join(""));;
  }
};
cljs.core.sort.cljs$core$IFn$_invoke$arity$1 = function(coll) {
  return cljs.core.sort.cljs$core$IFn$_invoke$arity$2(cljs.core.compare, coll);
};
cljs.core.sort.cljs$core$IFn$_invoke$arity$2 = function(comp, coll) {
  if (cljs.core.seq(coll)) {
    var a = cljs.core.to_array.cljs$core$IFn$_invoke$arity$1 ? cljs.core.to_array.cljs$core$IFn$_invoke$arity$1(coll) : cljs.core.to_array.call(null, coll);
    var G__8702_8708 = a;
    var G__8703_8709 = cljs.core.fn__GT_comparator(comp);
    goog.array.stableSort(G__8702_8708, G__8703_8709);
    return cljs.core.seq(a);
  } else {
    return cljs.core.List.EMPTY;
  }
};
cljs.core.sort.cljs$lang$maxFixedArity = 2;
cljs.core.sort_by = function cljs$core$sort_by(var_args) {
  var args8710 = [];
  var len__7198__auto___8713 = arguments.length;
  var i__7199__auto___8714 = 0;
  while (true) {
    if (i__7199__auto___8714 < len__7198__auto___8713) {
      args8710.push(arguments[i__7199__auto___8714]);
      var G__8715 = i__7199__auto___8714 + 1;
      i__7199__auto___8714 = G__8715;
      continue;
    } else {
    }
    break;
  }
  var G__8712 = args8710.length;
  switch(G__8712) {
    case 2:
      return cljs.core.sort_by.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.sort_by.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args8710.length)].join(""));;
  }
};
cljs.core.sort_by.cljs$core$IFn$_invoke$arity$2 = function(keyfn, coll) {
  return cljs.core.sort_by.cljs$core$IFn$_invoke$arity$3(keyfn, cljs.core.compare, coll);
};
cljs.core.sort_by.cljs$core$IFn$_invoke$arity$3 = function(keyfn, comp, coll) {
  return cljs.core.sort.cljs$core$IFn$_invoke$arity$2(function(x, y) {
    return cljs.core.fn__GT_comparator(comp).call(null, keyfn.cljs$core$IFn$_invoke$arity$1 ? keyfn.cljs$core$IFn$_invoke$arity$1(x) : keyfn.call(null, x), keyfn.cljs$core$IFn$_invoke$arity$1 ? keyfn.cljs$core$IFn$_invoke$arity$1(y) : keyfn.call(null, y));
  }, coll);
};
cljs.core.sort_by.cljs$lang$maxFixedArity = 3;
cljs.core.seq_reduce = function cljs$core$seq_reduce(var_args) {
  var args8717 = [];
  var len__7198__auto___8725 = arguments.length;
  var i__7199__auto___8726 = 0;
  while (true) {
    if (i__7199__auto___8726 < len__7198__auto___8725) {
      args8717.push(arguments[i__7199__auto___8726]);
      var G__8727 = i__7199__auto___8726 + 1;
      i__7199__auto___8726 = G__8727;
      continue;
    } else {
    }
    break;
  }
  var G__8719 = args8717.length;
  switch(G__8719) {
    case 2:
      return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args8717.length)].join(""));;
  }
};
cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2 = function(f, coll) {
  var temp__4423__auto__ = cljs.core.seq(coll);
  if (temp__4423__auto__) {
    var s = temp__4423__auto__;
    var G__8720 = f;
    var G__8721 = cljs.core.first(s);
    var G__8722 = cljs.core.next(s);
    return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3 ? cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(G__8720, G__8721, G__8722) : cljs.core.reduce.call(null, G__8720, G__8721, G__8722);
  } else {
    return f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null);
  }
};
cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3 = function(f, val, coll) {
  var val__$1 = val;
  var coll__$1 = cljs.core.seq(coll);
  while (true) {
    if (coll__$1) {
      var nval = function() {
        var G__8723 = val__$1;
        var G__8724 = cljs.core.first(coll__$1);
        return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__8723, G__8724) : f.call(null, G__8723, G__8724);
      }();
      if (cljs.core.reduced_QMARK_(nval)) {
        return cljs.core.deref(nval);
      } else {
        var G__8729 = nval;
        var G__8730 = cljs.core.next(coll__$1);
        val__$1 = G__8729;
        coll__$1 = G__8730;
        continue;
      }
    } else {
      return val__$1;
    }
    break;
  }
};
cljs.core.seq_reduce.cljs$lang$maxFixedArity = 3;
cljs.core.shuffle = function cljs$core$shuffle(coll) {
  var a = cljs.core.to_array.cljs$core$IFn$_invoke$arity$1 ? cljs.core.to_array.cljs$core$IFn$_invoke$arity$1(coll) : cljs.core.to_array.call(null, coll);
  goog.array.shuffle(a);
  return cljs.core.vec.cljs$core$IFn$_invoke$arity$1 ? cljs.core.vec.cljs$core$IFn$_invoke$arity$1(a) : cljs.core.vec.call(null, a);
};
cljs.core.reduce = function cljs$core$reduce(var_args) {
  var args8731 = [];
  var len__7198__auto___8736 = arguments.length;
  var i__7199__auto___8737 = 0;
  while (true) {
    if (i__7199__auto___8737 < len__7198__auto___8736) {
      args8731.push(arguments[i__7199__auto___8737]);
      var G__8738 = i__7199__auto___8737 + 1;
      i__7199__auto___8737 = G__8738;
      continue;
    } else {
    }
    break;
  }
  var G__8733 = args8731.length;
  switch(G__8733) {
    case 2:
      return cljs.core.reduce.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args8731.length)].join(""));;
  }
};
cljs.core.reduce.cljs$core$IFn$_invoke$arity$2 = function(f, coll) {
  if (!(coll == null) ? coll.cljs$lang$protocol_mask$partition0$ & 524288 || coll.cljs$core$IReduce$ ? true : false : false) {
    return coll.cljs$core$IReduce$_reduce$arity$2(null, f);
  } else {
    if (cljs.core.array_QMARK_(coll)) {
      return cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$2(coll, f);
    } else {
      if (typeof coll === "string") {
        return cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$2(coll, f);
      } else {
        if (cljs.core.native_satisfies_QMARK_(cljs.core.IReduce, coll)) {
          return cljs.core._reduce.cljs$core$IFn$_invoke$arity$2(coll, f);
        } else {
          return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f, coll);
        }
      }
    }
  }
};
cljs.core.reduce.cljs$core$IFn$_invoke$arity$3 = function(f, val, coll) {
  if (!(coll == null) ? coll.cljs$lang$protocol_mask$partition0$ & 524288 || coll.cljs$core$IReduce$ ? true : false : false) {
    return coll.cljs$core$IReduce$_reduce$arity$3(null, f, val);
  } else {
    if (cljs.core.array_QMARK_(coll)) {
      return cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$3(coll, f, val);
    } else {
      if (typeof coll === "string") {
        return cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$3(coll, f, val);
      } else {
        if (cljs.core.native_satisfies_QMARK_(cljs.core.IReduce, coll)) {
          return cljs.core._reduce.cljs$core$IFn$_invoke$arity$3(coll, f, val);
        } else {
          return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f, val, coll);
        }
      }
    }
  }
};
cljs.core.reduce.cljs$lang$maxFixedArity = 3;
cljs.core.reduce_kv = function cljs$core$reduce_kv(f, init, coll) {
  if (!(coll == null)) {
    return cljs.core._kv_reduce(coll, f, init);
  } else {
    return init;
  }
};
cljs.core.identity = function cljs$core$identity(x) {
  return x;
};
cljs.core.completing = function cljs$core$completing(var_args) {
  var args8740 = [];
  var len__7198__auto___8743 = arguments.length;
  var i__7199__auto___8744 = 0;
  while (true) {
    if (i__7199__auto___8744 < len__7198__auto___8743) {
      args8740.push(arguments[i__7199__auto___8744]);
      var G__8745 = i__7199__auto___8744 + 1;
      i__7199__auto___8744 = G__8745;
      continue;
    } else {
    }
    break;
  }
  var G__8742 = args8740.length;
  switch(G__8742) {
    case 1:
      return cljs.core.completing.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.completing.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args8740.length)].join(""));;
  }
};
cljs.core.completing.cljs$core$IFn$_invoke$arity$1 = function(f) {
  return cljs.core.completing.cljs$core$IFn$_invoke$arity$2(f, cljs.core.identity);
};
cljs.core.completing.cljs$core$IFn$_invoke$arity$2 = function(f, cf) {
  return function() {
    var G__8747 = null;
    var G__8747__0 = function() {
      return f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null);
    };
    var G__8747__1 = function(x) {
      return cf.cljs$core$IFn$_invoke$arity$1 ? cf.cljs$core$IFn$_invoke$arity$1(x) : cf.call(null, x);
    };
    var G__8747__2 = function(x, y) {
      return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(x, y) : f.call(null, x, y);
    };
    G__8747 = function(x, y) {
      switch(arguments.length) {
        case 0:
          return G__8747__0.call(this);
        case 1:
          return G__8747__1.call(this, x);
        case 2:
          return G__8747__2.call(this, x, y);
      }
      throw new Error("Invalid arity: " + arguments.length);
    };
    G__8747.cljs$core$IFn$_invoke$arity$0 = G__8747__0;
    G__8747.cljs$core$IFn$_invoke$arity$1 = G__8747__1;
    G__8747.cljs$core$IFn$_invoke$arity$2 = G__8747__2;
    return G__8747;
  }();
};
cljs.core.completing.cljs$lang$maxFixedArity = 2;
cljs.core.transduce = function cljs$core$transduce(var_args) {
  var args8748 = [];
  var len__7198__auto___8751 = arguments.length;
  var i__7199__auto___8752 = 0;
  while (true) {
    if (i__7199__auto___8752 < len__7198__auto___8751) {
      args8748.push(arguments[i__7199__auto___8752]);
      var G__8753 = i__7199__auto___8752 + 1;
      i__7199__auto___8752 = G__8753;
      continue;
    } else {
    }
    break;
  }
  var G__8750 = args8748.length;
  switch(G__8750) {
    case 3:
      return cljs.core.transduce.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 4:
      return cljs.core.transduce.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args8748.length)].join(""));;
  }
};
cljs.core.transduce.cljs$core$IFn$_invoke$arity$3 = function(xform, f, coll) {
  return cljs.core.transduce.cljs$core$IFn$_invoke$arity$4(xform, f, f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null), coll);
};
cljs.core.transduce.cljs$core$IFn$_invoke$arity$4 = function(xform, f, init, coll) {
  var f__$1 = xform.cljs$core$IFn$_invoke$arity$1 ? xform.cljs$core$IFn$_invoke$arity$1(f) : xform.call(null, f);
  var ret = cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(f__$1, init, coll);
  return f__$1.cljs$core$IFn$_invoke$arity$1 ? f__$1.cljs$core$IFn$_invoke$arity$1(ret) : f__$1.call(null, ret);
};
cljs.core.transduce.cljs$lang$maxFixedArity = 4;
cljs.core._PLUS_ = function cljs$core$_PLUS_(var_args) {
  var args8755 = [];
  var len__7198__auto___8761 = arguments.length;
  var i__7199__auto___8762 = 0;
  while (true) {
    if (i__7199__auto___8762 < len__7198__auto___8761) {
      args8755.push(arguments[i__7199__auto___8762]);
      var G__8763 = i__7199__auto___8762 + 1;
      i__7199__auto___8762 = G__8763;
      continue;
    } else {
    }
    break;
  }
  var G__8760 = args8755.length;
  switch(G__8760) {
    case 0:
      return cljs.core._PLUS_.cljs$core$IFn$_invoke$arity$0();
      break;
    case 1:
      return cljs.core._PLUS_.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core._PLUS_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8755.slice(2), 0);
      return cljs.core._PLUS_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core._PLUS_.cljs$core$IFn$_invoke$arity$0 = function() {
  return 0;
};
cljs.core._PLUS_.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return x;
};
cljs.core._PLUS_.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return x + y;
};
cljs.core._PLUS_.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._PLUS_, x + y, more);
};
cljs.core._PLUS_.cljs$lang$applyTo = function(seq8756) {
  var G__8757 = cljs.core.first(seq8756);
  var seq8756__$1 = cljs.core.next(seq8756);
  var G__8758 = cljs.core.first(seq8756__$1);
  var seq8756__$2 = cljs.core.next(seq8756__$1);
  return cljs.core._PLUS_.cljs$core$IFn$_invoke$arity$variadic(G__8757, G__8758, seq8756__$2);
};
cljs.core._PLUS_.cljs$lang$maxFixedArity = 2;
cljs.core._ = function cljs$core$_(var_args) {
  var args8765 = [];
  var len__7198__auto___8771 = arguments.length;
  var i__7199__auto___8772 = 0;
  while (true) {
    if (i__7199__auto___8772 < len__7198__auto___8771) {
      args8765.push(arguments[i__7199__auto___8772]);
      var G__8773 = i__7199__auto___8772 + 1;
      i__7199__auto___8772 = G__8773;
      continue;
    } else {
    }
    break;
  }
  var G__8770 = args8765.length;
  switch(G__8770) {
    case 1:
      return cljs.core._.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core._.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8765.slice(2), 0);
      return cljs.core._.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core._.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return -x;
};
cljs.core._.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return x - y;
};
cljs.core._.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._, x - y, more);
};
cljs.core._.cljs$lang$applyTo = function(seq8766) {
  var G__8767 = cljs.core.first(seq8766);
  var seq8766__$1 = cljs.core.next(seq8766);
  var G__8768 = cljs.core.first(seq8766__$1);
  var seq8766__$2 = cljs.core.next(seq8766__$1);
  return cljs.core._.cljs$core$IFn$_invoke$arity$variadic(G__8767, G__8768, seq8766__$2);
};
cljs.core._.cljs$lang$maxFixedArity = 2;
cljs.core._STAR_ = function cljs$core$_STAR_(var_args) {
  var args8775 = [];
  var len__7198__auto___8781 = arguments.length;
  var i__7199__auto___8782 = 0;
  while (true) {
    if (i__7199__auto___8782 < len__7198__auto___8781) {
      args8775.push(arguments[i__7199__auto___8782]);
      var G__8783 = i__7199__auto___8782 + 1;
      i__7199__auto___8782 = G__8783;
      continue;
    } else {
    }
    break;
  }
  var G__8780 = args8775.length;
  switch(G__8780) {
    case 0:
      return cljs.core._STAR_.cljs$core$IFn$_invoke$arity$0();
      break;
    case 1:
      return cljs.core._STAR_.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core._STAR_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8775.slice(2), 0);
      return cljs.core._STAR_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core._STAR_.cljs$core$IFn$_invoke$arity$0 = function() {
  return 1;
};
cljs.core._STAR_.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return x;
};
cljs.core._STAR_.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return x * y;
};
cljs.core._STAR_.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._STAR_, x * y, more);
};
cljs.core._STAR_.cljs$lang$applyTo = function(seq8776) {
  var G__8777 = cljs.core.first(seq8776);
  var seq8776__$1 = cljs.core.next(seq8776);
  var G__8778 = cljs.core.first(seq8776__$1);
  var seq8776__$2 = cljs.core.next(seq8776__$1);
  return cljs.core._STAR_.cljs$core$IFn$_invoke$arity$variadic(G__8777, G__8778, seq8776__$2);
};
cljs.core._STAR_.cljs$lang$maxFixedArity = 2;
cljs.core._SLASH_ = function cljs$core$_SLASH_(var_args) {
  var args8785 = [];
  var len__7198__auto___8791 = arguments.length;
  var i__7199__auto___8792 = 0;
  while (true) {
    if (i__7199__auto___8792 < len__7198__auto___8791) {
      args8785.push(arguments[i__7199__auto___8792]);
      var G__8793 = i__7199__auto___8792 + 1;
      i__7199__auto___8792 = G__8793;
      continue;
    } else {
    }
    break;
  }
  var G__8790 = args8785.length;
  switch(G__8790) {
    case 1:
      return cljs.core._SLASH_.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core._SLASH_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8785.slice(2), 0);
      return cljs.core._SLASH_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core._SLASH_.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return 1 / x;
};
cljs.core._SLASH_.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return x / y;
};
cljs.core._SLASH_.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._SLASH_, x / y, more);
};
cljs.core._SLASH_.cljs$lang$applyTo = function(seq8786) {
  var G__8787 = cljs.core.first(seq8786);
  var seq8786__$1 = cljs.core.next(seq8786);
  var G__8788 = cljs.core.first(seq8786__$1);
  var seq8786__$2 = cljs.core.next(seq8786__$1);
  return cljs.core._SLASH_.cljs$core$IFn$_invoke$arity$variadic(G__8787, G__8788, seq8786__$2);
};
cljs.core._SLASH_.cljs$lang$maxFixedArity = 2;
cljs.core._LT_ = function cljs$core$_LT_(var_args) {
  var args8795 = [];
  var len__7198__auto___8801 = arguments.length;
  var i__7199__auto___8802 = 0;
  while (true) {
    if (i__7199__auto___8802 < len__7198__auto___8801) {
      args8795.push(arguments[i__7199__auto___8802]);
      var G__8803 = i__7199__auto___8802 + 1;
      i__7199__auto___8802 = G__8803;
      continue;
    } else {
    }
    break;
  }
  var G__8800 = args8795.length;
  switch(G__8800) {
    case 1:
      return cljs.core._LT_.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core._LT_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8795.slice(2), 0);
      return cljs.core._LT_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core._LT_.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return true;
};
cljs.core._LT_.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return x < y;
};
cljs.core._LT_.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  while (true) {
    if (x < y) {
      if (cljs.core.next(more)) {
        var G__8805 = y;
        var G__8806 = cljs.core.first(more);
        var G__8807 = cljs.core.next(more);
        x = G__8805;
        y = G__8806;
        more = G__8807;
        continue;
      } else {
        return y < cljs.core.first(more);
      }
    } else {
      return false;
    }
    break;
  }
};
cljs.core._LT_.cljs$lang$applyTo = function(seq8796) {
  var G__8797 = cljs.core.first(seq8796);
  var seq8796__$1 = cljs.core.next(seq8796);
  var G__8798 = cljs.core.first(seq8796__$1);
  var seq8796__$2 = cljs.core.next(seq8796__$1);
  return cljs.core._LT_.cljs$core$IFn$_invoke$arity$variadic(G__8797, G__8798, seq8796__$2);
};
cljs.core._LT_.cljs$lang$maxFixedArity = 2;
cljs.core._LT__EQ_ = function cljs$core$_LT__EQ_(var_args) {
  var args8808 = [];
  var len__7198__auto___8814 = arguments.length;
  var i__7199__auto___8815 = 0;
  while (true) {
    if (i__7199__auto___8815 < len__7198__auto___8814) {
      args8808.push(arguments[i__7199__auto___8815]);
      var G__8816 = i__7199__auto___8815 + 1;
      i__7199__auto___8815 = G__8816;
      continue;
    } else {
    }
    break;
  }
  var G__8813 = args8808.length;
  switch(G__8813) {
    case 1:
      return cljs.core._LT__EQ_.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core._LT__EQ_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8808.slice(2), 0);
      return cljs.core._LT__EQ_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core._LT__EQ_.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return true;
};
cljs.core._LT__EQ_.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return x <= y;
};
cljs.core._LT__EQ_.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  while (true) {
    if (x <= y) {
      if (cljs.core.next(more)) {
        var G__8818 = y;
        var G__8819 = cljs.core.first(more);
        var G__8820 = cljs.core.next(more);
        x = G__8818;
        y = G__8819;
        more = G__8820;
        continue;
      } else {
        return y <= cljs.core.first(more);
      }
    } else {
      return false;
    }
    break;
  }
};
cljs.core._LT__EQ_.cljs$lang$applyTo = function(seq8809) {
  var G__8810 = cljs.core.first(seq8809);
  var seq8809__$1 = cljs.core.next(seq8809);
  var G__8811 = cljs.core.first(seq8809__$1);
  var seq8809__$2 = cljs.core.next(seq8809__$1);
  return cljs.core._LT__EQ_.cljs$core$IFn$_invoke$arity$variadic(G__8810, G__8811, seq8809__$2);
};
cljs.core._LT__EQ_.cljs$lang$maxFixedArity = 2;
cljs.core._GT_ = function cljs$core$_GT_(var_args) {
  var args8821 = [];
  var len__7198__auto___8827 = arguments.length;
  var i__7199__auto___8828 = 0;
  while (true) {
    if (i__7199__auto___8828 < len__7198__auto___8827) {
      args8821.push(arguments[i__7199__auto___8828]);
      var G__8829 = i__7199__auto___8828 + 1;
      i__7199__auto___8828 = G__8829;
      continue;
    } else {
    }
    break;
  }
  var G__8826 = args8821.length;
  switch(G__8826) {
    case 1:
      return cljs.core._GT_.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core._GT_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8821.slice(2), 0);
      return cljs.core._GT_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core._GT_.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return true;
};
cljs.core._GT_.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return x > y;
};
cljs.core._GT_.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  while (true) {
    if (x > y) {
      if (cljs.core.next(more)) {
        var G__8831 = y;
        var G__8832 = cljs.core.first(more);
        var G__8833 = cljs.core.next(more);
        x = G__8831;
        y = G__8832;
        more = G__8833;
        continue;
      } else {
        return y > cljs.core.first(more);
      }
    } else {
      return false;
    }
    break;
  }
};
cljs.core._GT_.cljs$lang$applyTo = function(seq8822) {
  var G__8823 = cljs.core.first(seq8822);
  var seq8822__$1 = cljs.core.next(seq8822);
  var G__8824 = cljs.core.first(seq8822__$1);
  var seq8822__$2 = cljs.core.next(seq8822__$1);
  return cljs.core._GT_.cljs$core$IFn$_invoke$arity$variadic(G__8823, G__8824, seq8822__$2);
};
cljs.core._GT_.cljs$lang$maxFixedArity = 2;
cljs.core._GT__EQ_ = function cljs$core$_GT__EQ_(var_args) {
  var args8834 = [];
  var len__7198__auto___8840 = arguments.length;
  var i__7199__auto___8841 = 0;
  while (true) {
    if (i__7199__auto___8841 < len__7198__auto___8840) {
      args8834.push(arguments[i__7199__auto___8841]);
      var G__8842 = i__7199__auto___8841 + 1;
      i__7199__auto___8841 = G__8842;
      continue;
    } else {
    }
    break;
  }
  var G__8839 = args8834.length;
  switch(G__8839) {
    case 1:
      return cljs.core._GT__EQ_.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core._GT__EQ_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8834.slice(2), 0);
      return cljs.core._GT__EQ_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core._GT__EQ_.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return true;
};
cljs.core._GT__EQ_.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return x >= y;
};
cljs.core._GT__EQ_.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  while (true) {
    if (x >= y) {
      if (cljs.core.next(more)) {
        var G__8844 = y;
        var G__8845 = cljs.core.first(more);
        var G__8846 = cljs.core.next(more);
        x = G__8844;
        y = G__8845;
        more = G__8846;
        continue;
      } else {
        return y >= cljs.core.first(more);
      }
    } else {
      return false;
    }
    break;
  }
};
cljs.core._GT__EQ_.cljs$lang$applyTo = function(seq8835) {
  var G__8836 = cljs.core.first(seq8835);
  var seq8835__$1 = cljs.core.next(seq8835);
  var G__8837 = cljs.core.first(seq8835__$1);
  var seq8835__$2 = cljs.core.next(seq8835__$1);
  return cljs.core._GT__EQ_.cljs$core$IFn$_invoke$arity$variadic(G__8836, G__8837, seq8835__$2);
};
cljs.core._GT__EQ_.cljs$lang$maxFixedArity = 2;
cljs.core.dec = function cljs$core$dec(x) {
  return x - 1;
};
cljs.core.max = function cljs$core$max(var_args) {
  var args8847 = [];
  var len__7198__auto___8853 = arguments.length;
  var i__7199__auto___8854 = 0;
  while (true) {
    if (i__7199__auto___8854 < len__7198__auto___8853) {
      args8847.push(arguments[i__7199__auto___8854]);
      var G__8855 = i__7199__auto___8854 + 1;
      i__7199__auto___8854 = G__8855;
      continue;
    } else {
    }
    break;
  }
  var G__8852 = args8847.length;
  switch(G__8852) {
    case 1:
      return cljs.core.max.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.max.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8847.slice(2), 0);
      return cljs.core.max.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.max.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return x;
};
cljs.core.max.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  var x__6471__auto__ = x;
  var y__6472__auto__ = y;
  return x__6471__auto__ > y__6472__auto__ ? x__6471__auto__ : y__6472__auto__;
};
cljs.core.max.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.max, function() {
    var x__6471__auto__ = x;
    var y__6472__auto__ = y;
    return x__6471__auto__ > y__6472__auto__ ? x__6471__auto__ : y__6472__auto__;
  }(), more);
};
cljs.core.max.cljs$lang$applyTo = function(seq8848) {
  var G__8849 = cljs.core.first(seq8848);
  var seq8848__$1 = cljs.core.next(seq8848);
  var G__8850 = cljs.core.first(seq8848__$1);
  var seq8848__$2 = cljs.core.next(seq8848__$1);
  return cljs.core.max.cljs$core$IFn$_invoke$arity$variadic(G__8849, G__8850, seq8848__$2);
};
cljs.core.max.cljs$lang$maxFixedArity = 2;
cljs.core.min = function cljs$core$min(var_args) {
  var args8857 = [];
  var len__7198__auto___8863 = arguments.length;
  var i__7199__auto___8864 = 0;
  while (true) {
    if (i__7199__auto___8864 < len__7198__auto___8863) {
      args8857.push(arguments[i__7199__auto___8864]);
      var G__8865 = i__7199__auto___8864 + 1;
      i__7199__auto___8864 = G__8865;
      continue;
    } else {
    }
    break;
  }
  var G__8862 = args8857.length;
  switch(G__8862) {
    case 1:
      return cljs.core.min.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.min.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8857.slice(2), 0);
      return cljs.core.min.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.min.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return x;
};
cljs.core.min.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  var x__6478__auto__ = x;
  var y__6479__auto__ = y;
  return x__6478__auto__ < y__6479__auto__ ? x__6478__auto__ : y__6479__auto__;
};
cljs.core.min.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.min, function() {
    var x__6478__auto__ = x;
    var y__6479__auto__ = y;
    return x__6478__auto__ < y__6479__auto__ ? x__6478__auto__ : y__6479__auto__;
  }(), more);
};
cljs.core.min.cljs$lang$applyTo = function(seq8858) {
  var G__8859 = cljs.core.first(seq8858);
  var seq8858__$1 = cljs.core.next(seq8858);
  var G__8860 = cljs.core.first(seq8858__$1);
  var seq8858__$2 = cljs.core.next(seq8858__$1);
  return cljs.core.min.cljs$core$IFn$_invoke$arity$variadic(G__8859, G__8860, seq8858__$2);
};
cljs.core.min.cljs$lang$maxFixedArity = 2;
cljs.core.byte$ = function cljs$core$byte(x) {
  return x;
};
cljs.core.char$ = function cljs$core$char(x) {
  if (typeof x === "number") {
    return String.fromCharCode(x);
  } else {
    if (typeof x === "string" && x.length === 1) {
      return x;
    } else {
      throw new Error("Argument to char must be a character or number");
    }
  }
};
cljs.core.short$ = function cljs$core$short(x) {
  return x;
};
cljs.core.float$ = function cljs$core$float(x) {
  return x;
};
cljs.core.double$ = function cljs$core$double(x) {
  return x;
};
cljs.core.unchecked_byte = function cljs$core$unchecked_byte(x) {
  return x;
};
cljs.core.unchecked_char = function cljs$core$unchecked_char(x) {
  return x;
};
cljs.core.unchecked_short = function cljs$core$unchecked_short(x) {
  return x;
};
cljs.core.unchecked_float = function cljs$core$unchecked_float(x) {
  return x;
};
cljs.core.unchecked_double = function cljs$core$unchecked_double(x) {
  return x;
};
cljs.core.unchecked_add = function cljs$core$unchecked_add(var_args) {
  var args8867 = [];
  var len__7198__auto___8873 = arguments.length;
  var i__7199__auto___8874 = 0;
  while (true) {
    if (i__7199__auto___8874 < len__7198__auto___8873) {
      args8867.push(arguments[i__7199__auto___8874]);
      var G__8875 = i__7199__auto___8874 + 1;
      i__7199__auto___8874 = G__8875;
      continue;
    } else {
    }
    break;
  }
  var G__8872 = args8867.length;
  switch(G__8872) {
    case 0:
      return cljs.core.unchecked_add.cljs$core$IFn$_invoke$arity$0();
      break;
    case 1:
      return cljs.core.unchecked_add.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.unchecked_add.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8867.slice(2), 0);
      return cljs.core.unchecked_add.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.unchecked_add.cljs$core$IFn$_invoke$arity$0 = function() {
  return 0;
};
cljs.core.unchecked_add.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return x;
};
cljs.core.unchecked_add.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return x + y;
};
cljs.core.unchecked_add.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.unchecked_add, x + y, more);
};
cljs.core.unchecked_add.cljs$lang$applyTo = function(seq8868) {
  var G__8869 = cljs.core.first(seq8868);
  var seq8868__$1 = cljs.core.next(seq8868);
  var G__8870 = cljs.core.first(seq8868__$1);
  var seq8868__$2 = cljs.core.next(seq8868__$1);
  return cljs.core.unchecked_add.cljs$core$IFn$_invoke$arity$variadic(G__8869, G__8870, seq8868__$2);
};
cljs.core.unchecked_add.cljs$lang$maxFixedArity = 2;
cljs.core.unchecked_add_int = function cljs$core$unchecked_add_int(var_args) {
  var args8877 = [];
  var len__7198__auto___8883 = arguments.length;
  var i__7199__auto___8884 = 0;
  while (true) {
    if (i__7199__auto___8884 < len__7198__auto___8883) {
      args8877.push(arguments[i__7199__auto___8884]);
      var G__8885 = i__7199__auto___8884 + 1;
      i__7199__auto___8884 = G__8885;
      continue;
    } else {
    }
    break;
  }
  var G__8882 = args8877.length;
  switch(G__8882) {
    case 0:
      return cljs.core.unchecked_add_int.cljs$core$IFn$_invoke$arity$0();
      break;
    case 1:
      return cljs.core.unchecked_add_int.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.unchecked_add_int.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8877.slice(2), 0);
      return cljs.core.unchecked_add_int.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.unchecked_add_int.cljs$core$IFn$_invoke$arity$0 = function() {
  return 0;
};
cljs.core.unchecked_add_int.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return x;
};
cljs.core.unchecked_add_int.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return x + y;
};
cljs.core.unchecked_add_int.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.unchecked_add_int, x + y, more);
};
cljs.core.unchecked_add_int.cljs$lang$applyTo = function(seq8878) {
  var G__8879 = cljs.core.first(seq8878);
  var seq8878__$1 = cljs.core.next(seq8878);
  var G__8880 = cljs.core.first(seq8878__$1);
  var seq8878__$2 = cljs.core.next(seq8878__$1);
  return cljs.core.unchecked_add_int.cljs$core$IFn$_invoke$arity$variadic(G__8879, G__8880, seq8878__$2);
};
cljs.core.unchecked_add_int.cljs$lang$maxFixedArity = 2;
cljs.core.unchecked_dec = function cljs$core$unchecked_dec(x) {
  return x - 1;
};
cljs.core.unchecked_dec_int = function cljs$core$unchecked_dec_int(x) {
  return x - 1;
};
cljs.core.unchecked_divide_int = function cljs$core$unchecked_divide_int(var_args) {
  var args8887 = [];
  var len__7198__auto___8893 = arguments.length;
  var i__7199__auto___8894 = 0;
  while (true) {
    if (i__7199__auto___8894 < len__7198__auto___8893) {
      args8887.push(arguments[i__7199__auto___8894]);
      var G__8895 = i__7199__auto___8894 + 1;
      i__7199__auto___8894 = G__8895;
      continue;
    } else {
    }
    break;
  }
  var G__8892 = args8887.length;
  switch(G__8892) {
    case 1:
      return cljs.core.unchecked_divide_int.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.unchecked_divide_int.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8887.slice(2), 0);
      return cljs.core.unchecked_divide_int.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.unchecked_divide_int.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return 1 / x;
};
cljs.core.unchecked_divide_int.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return x / y;
};
cljs.core.unchecked_divide_int.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.unchecked_divide_int, x / y, more);
};
cljs.core.unchecked_divide_int.cljs$lang$applyTo = function(seq8888) {
  var G__8889 = cljs.core.first(seq8888);
  var seq8888__$1 = cljs.core.next(seq8888);
  var G__8890 = cljs.core.first(seq8888__$1);
  var seq8888__$2 = cljs.core.next(seq8888__$1);
  return cljs.core.unchecked_divide_int.cljs$core$IFn$_invoke$arity$variadic(G__8889, G__8890, seq8888__$2);
};
cljs.core.unchecked_divide_int.cljs$lang$maxFixedArity = 2;
cljs.core.unchecked_inc = function cljs$core$unchecked_inc(x) {
  return x + 1;
};
cljs.core.unchecked_inc_int = function cljs$core$unchecked_inc_int(x) {
  return x + 1;
};
cljs.core.unchecked_multiply = function cljs$core$unchecked_multiply(var_args) {
  var args8897 = [];
  var len__7198__auto___8903 = arguments.length;
  var i__7199__auto___8904 = 0;
  while (true) {
    if (i__7199__auto___8904 < len__7198__auto___8903) {
      args8897.push(arguments[i__7199__auto___8904]);
      var G__8905 = i__7199__auto___8904 + 1;
      i__7199__auto___8904 = G__8905;
      continue;
    } else {
    }
    break;
  }
  var G__8902 = args8897.length;
  switch(G__8902) {
    case 0:
      return cljs.core.unchecked_multiply.cljs$core$IFn$_invoke$arity$0();
      break;
    case 1:
      return cljs.core.unchecked_multiply.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.unchecked_multiply.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8897.slice(2), 0);
      return cljs.core.unchecked_multiply.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.unchecked_multiply.cljs$core$IFn$_invoke$arity$0 = function() {
  return 1;
};
cljs.core.unchecked_multiply.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return x;
};
cljs.core.unchecked_multiply.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return x * y;
};
cljs.core.unchecked_multiply.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.unchecked_multiply, x * y, more);
};
cljs.core.unchecked_multiply.cljs$lang$applyTo = function(seq8898) {
  var G__8899 = cljs.core.first(seq8898);
  var seq8898__$1 = cljs.core.next(seq8898);
  var G__8900 = cljs.core.first(seq8898__$1);
  var seq8898__$2 = cljs.core.next(seq8898__$1);
  return cljs.core.unchecked_multiply.cljs$core$IFn$_invoke$arity$variadic(G__8899, G__8900, seq8898__$2);
};
cljs.core.unchecked_multiply.cljs$lang$maxFixedArity = 2;
cljs.core.unchecked_multiply_int = function cljs$core$unchecked_multiply_int(var_args) {
  var args8907 = [];
  var len__7198__auto___8913 = arguments.length;
  var i__7199__auto___8914 = 0;
  while (true) {
    if (i__7199__auto___8914 < len__7198__auto___8913) {
      args8907.push(arguments[i__7199__auto___8914]);
      var G__8915 = i__7199__auto___8914 + 1;
      i__7199__auto___8914 = G__8915;
      continue;
    } else {
    }
    break;
  }
  var G__8912 = args8907.length;
  switch(G__8912) {
    case 0:
      return cljs.core.unchecked_multiply_int.cljs$core$IFn$_invoke$arity$0();
      break;
    case 1:
      return cljs.core.unchecked_multiply_int.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.unchecked_multiply_int.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8907.slice(2), 0);
      return cljs.core.unchecked_multiply_int.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.unchecked_multiply_int.cljs$core$IFn$_invoke$arity$0 = function() {
  return 1;
};
cljs.core.unchecked_multiply_int.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return x;
};
cljs.core.unchecked_multiply_int.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return x * y;
};
cljs.core.unchecked_multiply_int.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.unchecked_multiply_int, x * y, more);
};
cljs.core.unchecked_multiply_int.cljs$lang$applyTo = function(seq8908) {
  var G__8909 = cljs.core.first(seq8908);
  var seq8908__$1 = cljs.core.next(seq8908);
  var G__8910 = cljs.core.first(seq8908__$1);
  var seq8908__$2 = cljs.core.next(seq8908__$1);
  return cljs.core.unchecked_multiply_int.cljs$core$IFn$_invoke$arity$variadic(G__8909, G__8910, seq8908__$2);
};
cljs.core.unchecked_multiply_int.cljs$lang$maxFixedArity = 2;
cljs.core.unchecked_negate = function cljs$core$unchecked_negate(x) {
  return -x;
};
cljs.core.unchecked_negate_int = function cljs$core$unchecked_negate_int(x) {
  return -x;
};
cljs.core.unchecked_remainder_int = function cljs$core$unchecked_remainder_int(x, n) {
  return cljs.core.mod.cljs$core$IFn$_invoke$arity$2 ? cljs.core.mod.cljs$core$IFn$_invoke$arity$2(x, n) : cljs.core.mod.call(null, x, n);
};
cljs.core.unchecked_subtract = function cljs$core$unchecked_subtract(var_args) {
  var args8917 = [];
  var len__7198__auto___8923 = arguments.length;
  var i__7199__auto___8924 = 0;
  while (true) {
    if (i__7199__auto___8924 < len__7198__auto___8923) {
      args8917.push(arguments[i__7199__auto___8924]);
      var G__8925 = i__7199__auto___8924 + 1;
      i__7199__auto___8924 = G__8925;
      continue;
    } else {
    }
    break;
  }
  var G__8922 = args8917.length;
  switch(G__8922) {
    case 1:
      return cljs.core.unchecked_subtract.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.unchecked_subtract.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8917.slice(2), 0);
      return cljs.core.unchecked_subtract.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.unchecked_subtract.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return -x;
};
cljs.core.unchecked_subtract.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return x - y;
};
cljs.core.unchecked_subtract.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.unchecked_subtract, x - y, more);
};
cljs.core.unchecked_subtract.cljs$lang$applyTo = function(seq8918) {
  var G__8919 = cljs.core.first(seq8918);
  var seq8918__$1 = cljs.core.next(seq8918);
  var G__8920 = cljs.core.first(seq8918__$1);
  var seq8918__$2 = cljs.core.next(seq8918__$1);
  return cljs.core.unchecked_subtract.cljs$core$IFn$_invoke$arity$variadic(G__8919, G__8920, seq8918__$2);
};
cljs.core.unchecked_subtract.cljs$lang$maxFixedArity = 2;
cljs.core.unchecked_subtract_int = function cljs$core$unchecked_subtract_int(var_args) {
  var args8927 = [];
  var len__7198__auto___8933 = arguments.length;
  var i__7199__auto___8934 = 0;
  while (true) {
    if (i__7199__auto___8934 < len__7198__auto___8933) {
      args8927.push(arguments[i__7199__auto___8934]);
      var G__8935 = i__7199__auto___8934 + 1;
      i__7199__auto___8934 = G__8935;
      continue;
    } else {
    }
    break;
  }
  var G__8932 = args8927.length;
  switch(G__8932) {
    case 1:
      return cljs.core.unchecked_subtract_int.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.unchecked_subtract_int.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8927.slice(2), 0);
      return cljs.core.unchecked_subtract_int.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.unchecked_subtract_int.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return -x;
};
cljs.core.unchecked_subtract_int.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return x - y;
};
cljs.core.unchecked_subtract_int.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.unchecked_subtract_int, x - y, more);
};
cljs.core.unchecked_subtract_int.cljs$lang$applyTo = function(seq8928) {
  var G__8929 = cljs.core.first(seq8928);
  var seq8928__$1 = cljs.core.next(seq8928);
  var G__8930 = cljs.core.first(seq8928__$1);
  var seq8928__$2 = cljs.core.next(seq8928__$1);
  return cljs.core.unchecked_subtract_int.cljs$core$IFn$_invoke$arity$variadic(G__8929, G__8930, seq8928__$2);
};
cljs.core.unchecked_subtract_int.cljs$lang$maxFixedArity = 2;
cljs.core.fix = function cljs$core$fix(q) {
  if (q >= 0) {
    return Math.floor(q);
  } else {
    return Math.ceil(q);
  }
};
cljs.core.int$ = function cljs$core$int(x) {
  return x | 0;
};
cljs.core.unchecked_int = function cljs$core$unchecked_int(x) {
  return cljs.core.fix(x);
};
cljs.core.long$ = function cljs$core$long(x) {
  return cljs.core.fix(x);
};
cljs.core.unchecked_long = function cljs$core$unchecked_long(x) {
  return cljs.core.fix(x);
};
cljs.core.booleans = function cljs$core$booleans(x) {
  return x;
};
cljs.core.bytes = function cljs$core$bytes(x) {
  return x;
};
cljs.core.chars = function cljs$core$chars(x) {
  return x;
};
cljs.core.shorts = function cljs$core$shorts(x) {
  return x;
};
cljs.core.ints = function cljs$core$ints(x) {
  return x;
};
cljs.core.floats = function cljs$core$floats(x) {
  return x;
};
cljs.core.doubles = function cljs$core$doubles(x) {
  return x;
};
cljs.core.longs = function cljs$core$longs(x) {
  return x;
};
cljs.core.js_mod = function cljs$core$js_mod(n, d) {
  return n % d;
};
cljs.core.mod = function cljs$core$mod(n, d) {
  return (n % d + d) % d;
};
cljs.core.quot = function cljs$core$quot(n, d) {
  var rem = n % d;
  return cljs.core.fix((n - rem) / d);
};
cljs.core.rem = function cljs$core$rem(n, d) {
  var q = cljs.core.quot(n, d);
  return n - d * q;
};
cljs.core.bit_xor = function cljs$core$bit_xor(var_args) {
  var args8937 = [];
  var len__7198__auto___8943 = arguments.length;
  var i__7199__auto___8944 = 0;
  while (true) {
    if (i__7199__auto___8944 < len__7198__auto___8943) {
      args8937.push(arguments[i__7199__auto___8944]);
      var G__8945 = i__7199__auto___8944 + 1;
      i__7199__auto___8944 = G__8945;
      continue;
    } else {
    }
    break;
  }
  var G__8942 = args8937.length;
  switch(G__8942) {
    case 2:
      return cljs.core.bit_xor.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8937.slice(2), 0);
      return cljs.core.bit_xor.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.bit_xor.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return x ^ y;
};
cljs.core.bit_xor.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.bit_xor, x ^ y, more);
};
cljs.core.bit_xor.cljs$lang$applyTo = function(seq8938) {
  var G__8939 = cljs.core.first(seq8938);
  var seq8938__$1 = cljs.core.next(seq8938);
  var G__8940 = cljs.core.first(seq8938__$1);
  var seq8938__$2 = cljs.core.next(seq8938__$1);
  return cljs.core.bit_xor.cljs$core$IFn$_invoke$arity$variadic(G__8939, G__8940, seq8938__$2);
};
cljs.core.bit_xor.cljs$lang$maxFixedArity = 2;
cljs.core.bit_and = function cljs$core$bit_and(var_args) {
  var args8947 = [];
  var len__7198__auto___8953 = arguments.length;
  var i__7199__auto___8954 = 0;
  while (true) {
    if (i__7199__auto___8954 < len__7198__auto___8953) {
      args8947.push(arguments[i__7199__auto___8954]);
      var G__8955 = i__7199__auto___8954 + 1;
      i__7199__auto___8954 = G__8955;
      continue;
    } else {
    }
    break;
  }
  var G__8952 = args8947.length;
  switch(G__8952) {
    case 2:
      return cljs.core.bit_and.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8947.slice(2), 0);
      return cljs.core.bit_and.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.bit_and.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return x & y;
};
cljs.core.bit_and.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.bit_and, x & y, more);
};
cljs.core.bit_and.cljs$lang$applyTo = function(seq8948) {
  var G__8949 = cljs.core.first(seq8948);
  var seq8948__$1 = cljs.core.next(seq8948);
  var G__8950 = cljs.core.first(seq8948__$1);
  var seq8948__$2 = cljs.core.next(seq8948__$1);
  return cljs.core.bit_and.cljs$core$IFn$_invoke$arity$variadic(G__8949, G__8950, seq8948__$2);
};
cljs.core.bit_and.cljs$lang$maxFixedArity = 2;
cljs.core.bit_or = function cljs$core$bit_or(var_args) {
  var args8957 = [];
  var len__7198__auto___8963 = arguments.length;
  var i__7199__auto___8964 = 0;
  while (true) {
    if (i__7199__auto___8964 < len__7198__auto___8963) {
      args8957.push(arguments[i__7199__auto___8964]);
      var G__8965 = i__7199__auto___8964 + 1;
      i__7199__auto___8964 = G__8965;
      continue;
    } else {
    }
    break;
  }
  var G__8962 = args8957.length;
  switch(G__8962) {
    case 2:
      return cljs.core.bit_or.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8957.slice(2), 0);
      return cljs.core.bit_or.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.bit_or.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return x | y;
};
cljs.core.bit_or.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.bit_or, x | y, more);
};
cljs.core.bit_or.cljs$lang$applyTo = function(seq8958) {
  var G__8959 = cljs.core.first(seq8958);
  var seq8958__$1 = cljs.core.next(seq8958);
  var G__8960 = cljs.core.first(seq8958__$1);
  var seq8958__$2 = cljs.core.next(seq8958__$1);
  return cljs.core.bit_or.cljs$core$IFn$_invoke$arity$variadic(G__8959, G__8960, seq8958__$2);
};
cljs.core.bit_or.cljs$lang$maxFixedArity = 2;
cljs.core.bit_and_not = function cljs$core$bit_and_not(var_args) {
  var args8967 = [];
  var len__7198__auto___8973 = arguments.length;
  var i__7199__auto___8974 = 0;
  while (true) {
    if (i__7199__auto___8974 < len__7198__auto___8973) {
      args8967.push(arguments[i__7199__auto___8974]);
      var G__8975 = i__7199__auto___8974 + 1;
      i__7199__auto___8974 = G__8975;
      continue;
    } else {
    }
    break;
  }
  var G__8972 = args8967.length;
  switch(G__8972) {
    case 2:
      return cljs.core.bit_and_not.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8967.slice(2), 0);
      return cljs.core.bit_and_not.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.bit_and_not.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return x & ~y;
};
cljs.core.bit_and_not.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.bit_and_not, x & ~y, more);
};
cljs.core.bit_and_not.cljs$lang$applyTo = function(seq8968) {
  var G__8969 = cljs.core.first(seq8968);
  var seq8968__$1 = cljs.core.next(seq8968);
  var G__8970 = cljs.core.first(seq8968__$1);
  var seq8968__$2 = cljs.core.next(seq8968__$1);
  return cljs.core.bit_and_not.cljs$core$IFn$_invoke$arity$variadic(G__8969, G__8970, seq8968__$2);
};
cljs.core.bit_and_not.cljs$lang$maxFixedArity = 2;
cljs.core.bit_clear = function cljs$core$bit_clear(x, n) {
  return x & ~(1 << n);
};
cljs.core.bit_flip = function cljs$core$bit_flip(x, n) {
  return x ^ 1 << n;
};
cljs.core.bit_not = function cljs$core$bit_not(x) {
  return ~x;
};
cljs.core.bit_set = function cljs$core$bit_set(x, n) {
  return x | 1 << n;
};
cljs.core.bit_test = function cljs$core$bit_test(x, n) {
  return (x & 1 << n) != 0;
};
cljs.core.bit_shift_left = function cljs$core$bit_shift_left(x, n) {
  return x << n;
};
cljs.core.bit_shift_right = function cljs$core$bit_shift_right(x, n) {
  return x >> n;
};
cljs.core.bit_shift_right_zero_fill = function cljs$core$bit_shift_right_zero_fill(x, n) {
  return x >>> n;
};
cljs.core.unsigned_bit_shift_right = function cljs$core$unsigned_bit_shift_right(x, n) {
  return x >>> n;
};
cljs.core.bit_count = function cljs$core$bit_count(v) {
  var v__$1 = v - (v >> 1 & 1431655765);
  var v__$2 = (v__$1 & 858993459) + (v__$1 >> 2 & 858993459);
  return (v__$2 + (v__$2 >> 4) & 252645135) * 16843009 >> 24;
};
cljs.core._EQ__EQ_ = function cljs$core$_EQ__EQ_(var_args) {
  var args8977 = [];
  var len__7198__auto___8983 = arguments.length;
  var i__7199__auto___8984 = 0;
  while (true) {
    if (i__7199__auto___8984 < len__7198__auto___8983) {
      args8977.push(arguments[i__7199__auto___8984]);
      var G__8985 = i__7199__auto___8984 + 1;
      i__7199__auto___8984 = G__8985;
      continue;
    } else {
    }
    break;
  }
  var G__8982 = args8977.length;
  switch(G__8982) {
    case 1:
      return cljs.core._EQ__EQ_.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core._EQ__EQ_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8977.slice(2), 0);
      return cljs.core._EQ__EQ_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core._EQ__EQ_.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return true;
};
cljs.core._EQ__EQ_.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return cljs.core._equiv(x, y);
};
cljs.core._EQ__EQ_.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  while (true) {
    if (x === y) {
      if (cljs.core.next(more)) {
        var G__8987 = y;
        var G__8988 = cljs.core.first(more);
        var G__8989 = cljs.core.next(more);
        x = G__8987;
        y = G__8988;
        more = G__8989;
        continue;
      } else {
        return y === cljs.core.first(more);
      }
    } else {
      return false;
    }
    break;
  }
};
cljs.core._EQ__EQ_.cljs$lang$applyTo = function(seq8978) {
  var G__8979 = cljs.core.first(seq8978);
  var seq8978__$1 = cljs.core.next(seq8978);
  var G__8980 = cljs.core.first(seq8978__$1);
  var seq8978__$2 = cljs.core.next(seq8978__$1);
  return cljs.core._EQ__EQ_.cljs$core$IFn$_invoke$arity$variadic(G__8979, G__8980, seq8978__$2);
};
cljs.core._EQ__EQ_.cljs$lang$maxFixedArity = 2;
cljs.core.pos_QMARK_ = function cljs$core$pos_QMARK_(n) {
  return n > 0;
};
cljs.core.zero_QMARK_ = function cljs$core$zero_QMARK_(n) {
  return n === 0;
};
cljs.core.neg_QMARK_ = function cljs$core$neg_QMARK_(x) {
  return x < 0;
};
cljs.core.nthnext = function cljs$core$nthnext(coll, n) {
  var n__$1 = n;
  var xs = cljs.core.seq(coll);
  while (true) {
    if (xs && n__$1 > 0) {
      var G__8990 = n__$1 - 1;
      var G__8991 = cljs.core.next(xs);
      n__$1 = G__8990;
      xs = G__8991;
      continue;
    } else {
      return xs;
    }
    break;
  }
};
cljs.core.str = function cljs$core$str(var_args) {
  var args8992 = [];
  var len__7198__auto___8997 = arguments.length;
  var i__7199__auto___8998 = 0;
  while (true) {
    if (i__7199__auto___8998 < len__7198__auto___8997) {
      args8992.push(arguments[i__7199__auto___8998]);
      var G__8999 = i__7199__auto___8998 + 1;
      i__7199__auto___8998 = G__8999;
      continue;
    } else {
    }
    break;
  }
  var G__8996 = args8992.length;
  switch(G__8996) {
    case 0:
      return cljs.core.str.cljs$core$IFn$_invoke$arity$0();
      break;
    case 1:
      return cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args8992.slice(1), 0);
      return cljs.core.str.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7217__auto__);
  }
};
cljs.core.str.cljs$core$IFn$_invoke$arity$0 = function() {
  return "";
};
cljs.core.str.cljs$core$IFn$_invoke$arity$1 = function(x) {
  if (x == null) {
    return "";
  } else {
    return [x].join("");
  }
};
cljs.core.str.cljs$core$IFn$_invoke$arity$variadic = function(x, ys) {
  var sb = new goog.string.StringBuffer([cljs.core.str(x)].join(""));
  var more = ys;
  while (true) {
    if (cljs.core.truth_(more)) {
      var G__9001 = sb.append([cljs.core.str(cljs.core.first(more))].join(""));
      var G__9002 = cljs.core.next(more);
      sb = G__9001;
      more = G__9002;
      continue;
    } else {
      return sb.toString();
    }
    break;
  }
};
cljs.core.str.cljs$lang$applyTo = function(seq8993) {
  var G__8994 = cljs.core.first(seq8993);
  var seq8993__$1 = cljs.core.next(seq8993);
  return cljs.core.str.cljs$core$IFn$_invoke$arity$variadic(G__8994, seq8993__$1);
};
cljs.core.str.cljs$lang$maxFixedArity = 1;
cljs.core.subs = function cljs$core$subs(var_args) {
  var args9003 = [];
  var len__7198__auto___9006 = arguments.length;
  var i__7199__auto___9007 = 0;
  while (true) {
    if (i__7199__auto___9007 < len__7198__auto___9006) {
      args9003.push(arguments[i__7199__auto___9007]);
      var G__9008 = i__7199__auto___9007 + 1;
      i__7199__auto___9007 = G__9008;
      continue;
    } else {
    }
    break;
  }
  var G__9005 = args9003.length;
  switch(G__9005) {
    case 2:
      return cljs.core.subs.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.subs.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9003.length)].join(""));;
  }
};
cljs.core.subs.cljs$core$IFn$_invoke$arity$2 = function(s, start) {
  return s.substring(start);
};
cljs.core.subs.cljs$core$IFn$_invoke$arity$3 = function(s, start, end) {
  return s.substring(start, end);
};
cljs.core.subs.cljs$lang$maxFixedArity = 3;
cljs.core.equiv_sequential = function cljs$core$equiv_sequential(x, y) {
  return cljs.core.boolean$(cljs.core.sequential_QMARK_(y) ? cljs.core.counted_QMARK_(x) && cljs.core.counted_QMARK_(y) && !(cljs.core.count(x) === cljs.core.count(y)) ? false : function() {
    var xs = cljs.core.seq(x);
    var ys = cljs.core.seq(y);
    while (true) {
      if (xs == null) {
        return ys == null;
      } else {
        if (ys == null) {
          return false;
        } else {
          if (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(cljs.core.first(xs), cljs.core.first(ys))) {
            var G__9010 = cljs.core.next(xs);
            var G__9011 = cljs.core.next(ys);
            xs = G__9010;
            ys = G__9011;
            continue;
          } else {
            return false;
          }
        }
      }
      break;
    }
  }() : null);
};
cljs.core.hash_coll = function cljs$core$hash_coll(coll) {
  if (cljs.core.seq(coll)) {
    var res = cljs.core.hash(cljs.core.first(coll));
    var s = cljs.core.next(coll);
    while (true) {
      if (s == null) {
        return res;
      } else {
        var G__9012 = cljs.core.hash_combine(res, cljs.core.hash(cljs.core.first(s)));
        var G__9013 = cljs.core.next(s);
        res = G__9012;
        s = G__9013;
        continue;
      }
      break;
    }
  } else {
    return 0;
  }
};
cljs.core.hash_imap = function cljs$core$hash_imap(m) {
  var h = 0;
  var s = cljs.core.seq(m);
  while (true) {
    if (s) {
      var e = cljs.core.first(s);
      var G__9014 = (h + (cljs.core.hash(cljs.core.key.cljs$core$IFn$_invoke$arity$1 ? cljs.core.key.cljs$core$IFn$_invoke$arity$1(e) : cljs.core.key.call(null, e)) ^ cljs.core.hash(cljs.core.val.cljs$core$IFn$_invoke$arity$1 ? cljs.core.val.cljs$core$IFn$_invoke$arity$1(e) : cljs.core.val.call(null, e)))) % 4503599627370496;
      var G__9015 = cljs.core.next(s);
      h = G__9014;
      s = G__9015;
      continue;
    } else {
      return h;
    }
    break;
  }
};
cljs.core.hash_iset = function cljs$core$hash_iset(s) {
  var h = 0;
  var s__$1 = cljs.core.seq(s);
  while (true) {
    if (s__$1) {
      var e = cljs.core.first(s__$1);
      var G__9016 = (h + cljs.core.hash(e)) % 4503599627370496;
      var G__9017 = cljs.core.next(s__$1);
      h = G__9016;
      s__$1 = G__9017;
      continue;
    } else {
      return h;
    }
    break;
  }
};
cljs.core.extend_object_BANG_ = function cljs$core$extend_object_BANG_(obj, fn_map) {
  var seq__9024_9030 = cljs.core.seq(fn_map);
  var chunk__9025_9031 = null;
  var count__9026_9032 = 0;
  var i__9027_9033 = 0;
  while (true) {
    if (i__9027_9033 < count__9026_9032) {
      var vec__9028_9034 = chunk__9025_9031.cljs$core$IIndexed$_nth$arity$2(null, i__9027_9033);
      var key_name_9035 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9028_9034, 0, null);
      var f_9036 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9028_9034, 1, null);
      var str_name_9037 = cljs.core.name.cljs$core$IFn$_invoke$arity$1 ? cljs.core.name.cljs$core$IFn$_invoke$arity$1(key_name_9035) : cljs.core.name.call(null, key_name_9035);
      obj[str_name_9037] = f_9036;
      var G__9038 = seq__9024_9030;
      var G__9039 = chunk__9025_9031;
      var G__9040 = count__9026_9032;
      var G__9041 = i__9027_9033 + 1;
      seq__9024_9030 = G__9038;
      chunk__9025_9031 = G__9039;
      count__9026_9032 = G__9040;
      i__9027_9033 = G__9041;
      continue;
    } else {
      var temp__4425__auto___9042 = cljs.core.seq(seq__9024_9030);
      if (temp__4425__auto___9042) {
        var seq__9024_9043__$1 = temp__4425__auto___9042;
        if (cljs.core.chunked_seq_QMARK_(seq__9024_9043__$1)) {
          var c__6943__auto___9044 = cljs.core.chunk_first.cljs$core$IFn$_invoke$arity$1 ? cljs.core.chunk_first.cljs$core$IFn$_invoke$arity$1(seq__9024_9043__$1) : cljs.core.chunk_first.call(null, seq__9024_9043__$1);
          var G__9045 = cljs.core.chunk_rest.cljs$core$IFn$_invoke$arity$1 ? cljs.core.chunk_rest.cljs$core$IFn$_invoke$arity$1(seq__9024_9043__$1) : cljs.core.chunk_rest.call(null, seq__9024_9043__$1);
          var G__9046 = c__6943__auto___9044;
          var G__9047 = cljs.core.count(c__6943__auto___9044);
          var G__9048 = 0;
          seq__9024_9030 = G__9045;
          chunk__9025_9031 = G__9046;
          count__9026_9032 = G__9047;
          i__9027_9033 = G__9048;
          continue;
        } else {
          var vec__9029_9049 = cljs.core.first(seq__9024_9043__$1);
          var key_name_9050 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9029_9049, 0, null);
          var f_9051 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9029_9049, 1, null);
          var str_name_9052 = cljs.core.name.cljs$core$IFn$_invoke$arity$1 ? cljs.core.name.cljs$core$IFn$_invoke$arity$1(key_name_9050) : cljs.core.name.call(null, key_name_9050);
          obj[str_name_9052] = f_9051;
          var G__9053 = cljs.core.next(seq__9024_9043__$1);
          var G__9054 = null;
          var G__9055 = 0;
          var G__9056 = 0;
          seq__9024_9030 = G__9053;
          chunk__9025_9031 = G__9054;
          count__9026_9032 = G__9055;
          i__9027_9033 = G__9056;
          continue;
        }
      } else {
      }
    }
    break;
  }
  return obj;
};
cljs.core.List = function(meta, first, rest, count, __hash) {
  this.meta = meta;
  this.first = first;
  this.rest = rest;
  this.count = count;
  this.__hash = __hash;
  this.cljs$lang$protocol_mask$partition0$ = 65937646;
  this.cljs$lang$protocol_mask$partition1$ = 8192;
};
cljs.core.List.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.List.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.List.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.meta;
};
cljs.core.List.prototype.cljs$core$ICloneable$_clone$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return new cljs.core.List(self__.meta, self__.first, self__.rest, self__.count, self__.__hash);
};
cljs.core.List.prototype.cljs$core$INext$_next$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.count === 1) {
    return null;
  } else {
    return self__.rest;
  }
};
cljs.core.List.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.count;
};
cljs.core.List.prototype.cljs$core$IStack$_peek$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.first;
};
cljs.core.List.prototype.cljs$core$IStack$_pop$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core._rest(coll__$1);
};
cljs.core.List.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var h__6575__auto__ = self__.__hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
    self__.__hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.List.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.equiv_sequential(coll__$1, other);
};
cljs.core.List.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core._with_meta(cljs.core.List.EMPTY, self__.meta);
};
cljs.core.List.prototype.cljs$core$IReduce$_reduce$arity$2 = function(coll, f) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f, coll__$1);
};
cljs.core.List.prototype.cljs$core$IReduce$_reduce$arity$3 = function(coll, f, start) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f, start, coll__$1);
};
cljs.core.List.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.first;
};
cljs.core.List.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.count === 1) {
    return cljs.core.List.EMPTY;
  } else {
    return self__.rest;
  }
};
cljs.core.List.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return coll__$1;
};
cljs.core.List.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.List(meta__$1, self__.first, self__.rest, self__.count, self__.__hash);
};
cljs.core.List.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.List(self__.meta, o, coll__$1, self__.count + 1, null);
};
cljs.core.List.getBasis = function() {
  return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "meta", "meta", -1154898805, null), new cljs.core.Symbol(null, "first", "first", 996428481, null), new cljs.core.Symbol(null, "rest", "rest", 398835108, null), new cljs.core.Symbol(null, "count", "count", -514511684, null), cljs.core.with_meta(new cljs.core.Symbol(null, "__hash", "__hash", -1328796629, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
  "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.List.cljs$lang$type = true;
cljs.core.List.cljs$lang$ctorStr = "cljs.core/List";
cljs.core.List.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/List");
};
cljs.core.__GT_List = function cljs$core$__GT_List(meta, first, rest, count, __hash) {
  return new cljs.core.List(meta, first, rest, count, __hash);
};
cljs.core.list_QMARK_ = function cljs$core$list_QMARK_(x) {
  if (!(x == null)) {
    if (x.cljs$lang$protocol_mask$partition0$ & 33554432 || x.cljs$core$IList$) {
      return true;
    } else {
      if (!x.cljs$lang$protocol_mask$partition0$) {
        return cljs.core.native_satisfies_QMARK_(cljs.core.IList, x);
      } else {
        return false;
      }
    }
  } else {
    return cljs.core.native_satisfies_QMARK_(cljs.core.IList, x);
  }
};
cljs.core.List.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.EmptyList = function(meta) {
  this.meta = meta;
  this.cljs$lang$protocol_mask$partition0$ = 65937614;
  this.cljs$lang$protocol_mask$partition1$ = 8192;
};
cljs.core.EmptyList.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.EmptyList.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.EmptyList.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.meta;
};
cljs.core.EmptyList.prototype.cljs$core$ICloneable$_clone$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return new cljs.core.EmptyList(self__.meta);
};
cljs.core.EmptyList.prototype.cljs$core$INext$_next$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return null;
};
cljs.core.EmptyList.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return 0;
};
cljs.core.EmptyList.prototype.cljs$core$IStack$_peek$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return null;
};
cljs.core.EmptyList.prototype.cljs$core$IStack$_pop$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  throw new Error("Can't pop empty list");
};
cljs.core.EmptyList.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.empty_ordered_hash;
};
cljs.core.EmptyList.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  if (cljs.core.list_QMARK_(other) || cljs.core.sequential_QMARK_(other)) {
    return cljs.core.seq(other) == null;
  } else {
    return false;
  }
};
cljs.core.EmptyList.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return coll__$1;
};
cljs.core.EmptyList.prototype.cljs$core$IReduce$_reduce$arity$2 = function(coll, f) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f, coll__$1);
};
cljs.core.EmptyList.prototype.cljs$core$IReduce$_reduce$arity$3 = function(coll, f, start) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f, start, coll__$1);
};
cljs.core.EmptyList.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return null;
};
cljs.core.EmptyList.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.List.EMPTY;
};
cljs.core.EmptyList.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return null;
};
cljs.core.EmptyList.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.EmptyList(meta__$1);
};
cljs.core.EmptyList.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.List(self__.meta, o, null, 1, null);
};
cljs.core.EmptyList.getBasis = function() {
  return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "meta", "meta", -1154898805, null)], null);
};
cljs.core.EmptyList.cljs$lang$type = true;
cljs.core.EmptyList.cljs$lang$ctorStr = "cljs.core/EmptyList";
cljs.core.EmptyList.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/EmptyList");
};
cljs.core.__GT_EmptyList = function cljs$core$__GT_EmptyList(meta) {
  return new cljs.core.EmptyList(meta);
};
cljs.core.List.EMPTY = new cljs.core.EmptyList(null);
cljs.core.EmptyList.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.reversible_QMARK_ = function cljs$core$reversible_QMARK_(coll) {
  if (!(coll == null)) {
    if (coll.cljs$lang$protocol_mask$partition0$ & 134217728 || coll.cljs$core$IReversible$) {
      return true;
    } else {
      if (!coll.cljs$lang$protocol_mask$partition0$) {
        return cljs.core.native_satisfies_QMARK_(cljs.core.IReversible, coll);
      } else {
        return false;
      }
    }
  } else {
    return cljs.core.native_satisfies_QMARK_(cljs.core.IReversible, coll);
  }
};
cljs.core.rseq = function cljs$core$rseq(rev) {
  return cljs.core._rseq(rev);
};
cljs.core.reverse = function cljs$core$reverse(coll) {
  if (cljs.core.reversible_QMARK_(coll)) {
    return cljs.core.rseq(coll);
  } else {
    return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.conj, cljs.core.List.EMPTY, coll);
  }
};
cljs.core.list = function cljs$core$list(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___9062 = arguments.length;
  var i__7199__auto___9063 = 0;
  while (true) {
    if (i__7199__auto___9063 < len__7198__auto___9062) {
      args__7205__auto__.push(arguments[i__7199__auto___9063]);
      var G__9064 = i__7199__auto___9063 + 1;
      i__7199__auto___9063 = G__9064;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return cljs.core.list.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
cljs.core.list.cljs$core$IFn$_invoke$arity$variadic = function(xs) {
  var arr = xs instanceof cljs.core.IndexedSeq && xs.i === 0 ? xs.arr : function() {
    var arr = [];
    var xs__$1 = xs;
    while (true) {
      if (!(xs__$1 == null)) {
        arr.push(xs__$1.cljs$core$ISeq$_first$arity$1(null));
        var G__9065 = xs__$1.cljs$core$INext$_next$arity$1(null);
        xs__$1 = G__9065;
        continue;
      } else {
        return arr;
      }
      break;
    }
  }();
  var i = arr.length;
  var r = cljs.core.List.EMPTY;
  while (true) {
    if (i > 0) {
      var G__9066 = i - 1;
      var G__9067 = r.cljs$core$ICollection$_conj$arity$2(null, arr[i - 1]);
      i = G__9066;
      r = G__9067;
      continue;
    } else {
      return r;
    }
    break;
  }
};
cljs.core.list.cljs$lang$maxFixedArity = 0;
cljs.core.list.cljs$lang$applyTo = function(seq9061) {
  return cljs.core.list.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq9061));
};
cljs.core.Cons = function(meta, first, rest, __hash) {
  this.meta = meta;
  this.first = first;
  this.rest = rest;
  this.__hash = __hash;
  this.cljs$lang$protocol_mask$partition0$ = 65929452;
  this.cljs$lang$protocol_mask$partition1$ = 8192;
};
cljs.core.Cons.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.Cons.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.Cons.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.meta;
};
cljs.core.Cons.prototype.cljs$core$ICloneable$_clone$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return new cljs.core.Cons(self__.meta, self__.first, self__.rest, self__.__hash);
};
cljs.core.Cons.prototype.cljs$core$INext$_next$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.rest == null) {
    return null;
  } else {
    return cljs.core.seq(self__.rest);
  }
};
cljs.core.Cons.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var h__6575__auto__ = self__.__hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
    self__.__hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.Cons.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.equiv_sequential(coll__$1, other);
};
cljs.core.Cons.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.with_meta(cljs.core.List.EMPTY, self__.meta);
};
cljs.core.Cons.prototype.cljs$core$IReduce$_reduce$arity$2 = function(coll, f) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f, coll__$1);
};
cljs.core.Cons.prototype.cljs$core$IReduce$_reduce$arity$3 = function(coll, f, start) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f, start, coll__$1);
};
cljs.core.Cons.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.first;
};
cljs.core.Cons.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.rest == null) {
    return cljs.core.List.EMPTY;
  } else {
    return self__.rest;
  }
};
cljs.core.Cons.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return coll__$1;
};
cljs.core.Cons.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.Cons(meta__$1, self__.first, self__.rest, self__.__hash);
};
cljs.core.Cons.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.Cons(null, o, coll__$1, null);
};
cljs.core.Cons.getBasis = function() {
  return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "meta", "meta", -1154898805, null), new cljs.core.Symbol(null, "first", "first", 996428481, null), new cljs.core.Symbol(null, "rest", "rest", 398835108, null), cljs.core.with_meta(new cljs.core.Symbol(null, "__hash", "__hash", -1328796629, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.Cons.cljs$lang$type = true;
cljs.core.Cons.cljs$lang$ctorStr = "cljs.core/Cons";
cljs.core.Cons.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/Cons");
};
cljs.core.__GT_Cons = function cljs$core$__GT_Cons(meta, first, rest, __hash) {
  return new cljs.core.Cons(meta, first, rest, __hash);
};
cljs.core.Cons.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.cons = function cljs$core$cons(x, coll) {
  if (function() {
    var or__6140__auto__ = coll == null;
    if (or__6140__auto__) {
      return or__6140__auto__;
    } else {
      if (!(coll == null)) {
        if (coll.cljs$lang$protocol_mask$partition0$ & 64 || coll.cljs$core$ISeq$) {
          return true;
        } else {
          return false;
        }
      } else {
        return false;
      }
    }
  }()) {
    return new cljs.core.Cons(null, x, coll, null);
  } else {
    return new cljs.core.Cons(null, x, cljs.core.seq(coll), null);
  }
};
cljs.core.hash_keyword = function cljs$core$hash_keyword(k) {
  return cljs.core.hash_symbol(k) + 2654435769 | 0;
};
cljs.core.compare_keywords = function cljs$core$compare_keywords(a, b) {
  if (a.fqn === b.fqn) {
    return 0;
  } else {
    if (cljs.core.truth_(function() {
      var and__6128__auto__ = cljs.core.not(a.ns);
      if (and__6128__auto__) {
        return b.ns;
      } else {
        return and__6128__auto__;
      }
    }())) {
      return -1;
    } else {
      if (cljs.core.truth_(a.ns)) {
        if (cljs.core.not(b.ns)) {
          return 1;
        } else {
          var nsc = function() {
            var G__9078 = a.ns;
            var G__9079 = b.ns;
            return goog.array.defaultCompare(G__9078, G__9079);
          }();
          if (0 === nsc) {
            var G__9080 = a.name;
            var G__9081 = b.name;
            return goog.array.defaultCompare(G__9080, G__9081);
          } else {
            return nsc;
          }
        }
      } else {
        var G__9082 = a.name;
        var G__9083 = b.name;
        return goog.array.defaultCompare(G__9082, G__9083);
      }
    }
  }
};
cljs.core.Keyword = function(ns, name, fqn, _hash) {
  this.ns = ns;
  this.name = name;
  this.fqn = fqn;
  this._hash = _hash;
  this.cljs$lang$protocol_mask$partition0$ = 2153775105;
  this.cljs$lang$protocol_mask$partition1$ = 4096;
};
cljs.core.Keyword.prototype.toString = function() {
  var self__ = this;
  var _ = this;
  return [cljs.core.str(":"), cljs.core.str(self__.fqn)].join("");
};
cljs.core.Keyword.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.Keyword.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(_, other) {
  var self__ = this;
  var ___$1 = this;
  if (other instanceof cljs.core.Keyword) {
    return self__.fqn === other.fqn;
  } else {
    return false;
  }
};
cljs.core.Keyword.prototype.call = function() {
  var G__9085 = null;
  var G__9085__2 = function(self__, coll) {
    var self__ = this;
    var self____$1 = this;
    var kw = self____$1;
    return cljs.core.get.cljs$core$IFn$_invoke$arity$2(coll, kw);
  };
  var G__9085__3 = function(self__, coll, not_found) {
    var self__ = this;
    var self____$1 = this;
    var kw = self____$1;
    return cljs.core.get.cljs$core$IFn$_invoke$arity$3(coll, kw, not_found);
  };
  G__9085 = function(self__, coll, not_found) {
    switch(arguments.length) {
      case 2:
        return G__9085__2.call(this, self__, coll);
      case 3:
        return G__9085__3.call(this, self__, coll, not_found);
    }
    throw new Error("Invalid arity: " + arguments.length);
  };
  G__9085.cljs$core$IFn$_invoke$arity$2 = G__9085__2;
  G__9085.cljs$core$IFn$_invoke$arity$3 = G__9085__3;
  return G__9085;
}();
cljs.core.Keyword.prototype.apply = function(self__, args9084) {
  var self__ = this;
  var self____$1 = this;
  return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args9084)));
};
cljs.core.Keyword.prototype.cljs$core$IFn$_invoke$arity$1 = function(coll) {
  var self__ = this;
  var kw = this;
  return cljs.core.get.cljs$core$IFn$_invoke$arity$2(coll, kw);
};
cljs.core.Keyword.prototype.cljs$core$IFn$_invoke$arity$2 = function(coll, not_found) {
  var self__ = this;
  var kw = this;
  return cljs.core.get.cljs$core$IFn$_invoke$arity$3(coll, kw, not_found);
};
cljs.core.Keyword.prototype.cljs$core$IHash$_hash$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  var h__6575__auto__ = self__._hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_keyword(this$__$1);
    self__._hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.Keyword.prototype.cljs$core$INamed$_name$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return self__.name;
};
cljs.core.Keyword.prototype.cljs$core$INamed$_namespace$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return self__.ns;
};
cljs.core.Keyword.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(o, writer, _) {
  var self__ = this;
  var o__$1 = this;
  return cljs.core._write(writer, [cljs.core.str(":"), cljs.core.str(self__.fqn)].join(""));
};
cljs.core.Keyword.getBasis = function() {
  return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "ns", "ns", 2082130287, null), new cljs.core.Symbol(null, "name", "name", -810760592, null), new cljs.core.Symbol(null, "fqn", "fqn", -1749334463, null), cljs.core.with_meta(new cljs.core.Symbol(null, "_hash", "_hash", -2130838312, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.Keyword.cljs$lang$type = true;
cljs.core.Keyword.cljs$lang$ctorStr = "cljs.core/Keyword";
cljs.core.Keyword.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/Keyword");
};
cljs.core.__GT_Keyword = function cljs$core$__GT_Keyword(ns, name, fqn, _hash) {
  return new cljs.core.Keyword(ns, name, fqn, _hash);
};
cljs.core.keyword_QMARK_ = function cljs$core$keyword_QMARK_(x) {
  return x instanceof cljs.core.Keyword;
};
cljs.core.keyword_identical_QMARK_ = function cljs$core$keyword_identical_QMARK_(x, y) {
  if (x === y) {
    return true;
  } else {
    if (x instanceof cljs.core.Keyword && y instanceof cljs.core.Keyword) {
      return x.fqn === y.fqn;
    } else {
      return false;
    }
  }
};
cljs.core.symbol_identical_QMARK_ = function cljs$core$symbol_identical_QMARK_(x, y) {
  if (x === y) {
    return true;
  } else {
    if (x instanceof cljs.core.Symbol && y instanceof cljs.core.Symbol) {
      return x.str === y.str;
    } else {
      return false;
    }
  }
};
cljs.core.namespace = function cljs$core$namespace(x) {
  if (!(x == null) ? x.cljs$lang$protocol_mask$partition1$ & 4096 || x.cljs$core$INamed$ ? true : false : false) {
    return x.cljs$core$INamed$_namespace$arity$1(null);
  } else {
    throw new Error([cljs.core.str("Doesn't support namespace: "), cljs.core.str(x)].join(""));
  }
};
cljs.core.keyword = function cljs$core$keyword(var_args) {
  var args9088 = [];
  var len__7198__auto___9091 = arguments.length;
  var i__7199__auto___9092 = 0;
  while (true) {
    if (i__7199__auto___9092 < len__7198__auto___9091) {
      args9088.push(arguments[i__7199__auto___9092]);
      var G__9093 = i__7199__auto___9092 + 1;
      i__7199__auto___9092 = G__9093;
      continue;
    } else {
    }
    break;
  }
  var G__9090 = args9088.length;
  switch(G__9090) {
    case 1:
      return cljs.core.keyword.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.keyword.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9088.length)].join(""));;
  }
};
cljs.core.keyword.cljs$core$IFn$_invoke$arity$1 = function(name) {
  if (name instanceof cljs.core.Keyword) {
    return name;
  } else {
    if (name instanceof cljs.core.Symbol) {
      return new cljs.core.Keyword(cljs.core.namespace(name), cljs.core.name.cljs$core$IFn$_invoke$arity$1 ? cljs.core.name.cljs$core$IFn$_invoke$arity$1(name) : cljs.core.name.call(null, name), name.str, null);
    } else {
      if (typeof name === "string") {
        var parts = name.split("/");
        if (parts.length === 2) {
          return new cljs.core.Keyword(parts[0], parts[1], name, null);
        } else {
          return new cljs.core.Keyword(null, parts[0], name, null);
        }
      } else {
        return null;
      }
    }
  }
};
cljs.core.keyword.cljs$core$IFn$_invoke$arity$2 = function(ns, name) {
  return new cljs.core.Keyword(ns, name, [cljs.core.str(cljs.core.truth_(ns) ? [cljs.core.str(ns), cljs.core.str("/")].join("") : null), cljs.core.str(name)].join(""), null);
};
cljs.core.keyword.cljs$lang$maxFixedArity = 2;
cljs.core.LazySeq = function(meta, fn, s, __hash) {
  this.meta = meta;
  this.fn = fn;
  this.s = s;
  this.__hash = __hash;
  this.cljs$lang$protocol_mask$partition0$ = 32374988;
  this.cljs$lang$protocol_mask$partition1$ = 1;
};
cljs.core.LazySeq.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.LazySeq.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.LazySeq.prototype.sval = function() {
  var self__ = this;
  var coll = this;
  if (self__.fn == null) {
    return self__.s;
  } else {
    self__.s = self__.fn.cljs$core$IFn$_invoke$arity$0 ? self__.fn.cljs$core$IFn$_invoke$arity$0() : self__.fn.call(null);
    self__.fn = null;
    return self__.s;
  }
};
cljs.core.LazySeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.meta;
};
cljs.core.LazySeq.prototype.cljs$core$INext$_next$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  cljs.core._seq(coll__$1);
  if (self__.s == null) {
    return null;
  } else {
    return cljs.core.next(self__.s);
  }
};
cljs.core.LazySeq.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var h__6575__auto__ = self__.__hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
    self__.__hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.LazySeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.equiv_sequential(coll__$1, other);
};
cljs.core.LazySeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.with_meta(cljs.core.List.EMPTY, self__.meta);
};
cljs.core.LazySeq.prototype.cljs$core$IPending$_realized_QMARK_$arity$1 = function(x) {
  var self__ = this;
  var x__$1 = this;
  return cljs.core.not(self__.fn);
};
cljs.core.LazySeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(coll, f) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f, coll__$1);
};
cljs.core.LazySeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(coll, f, start) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f, start, coll__$1);
};
cljs.core.LazySeq.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  cljs.core._seq(coll__$1);
  if (self__.s == null) {
    return null;
  } else {
    return cljs.core.first(self__.s);
  }
};
cljs.core.LazySeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  cljs.core._seq(coll__$1);
  if (!(self__.s == null)) {
    return cljs.core.rest(self__.s);
  } else {
    return cljs.core.List.EMPTY;
  }
};
cljs.core.LazySeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  coll__$1.sval();
  if (self__.s == null) {
    return null;
  } else {
    var ls = self__.s;
    while (true) {
      if (ls instanceof cljs.core.LazySeq) {
        var G__9095 = ls.sval();
        ls = G__9095;
        continue;
      } else {
        self__.s = ls;
        return cljs.core.seq(self__.s);
      }
      break;
    }
  }
};
cljs.core.LazySeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.LazySeq(meta__$1, self__.fn, self__.s, self__.__hash);
};
cljs.core.LazySeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.cons(o, coll__$1);
};
cljs.core.LazySeq.getBasis = function() {
  return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "meta", "meta", -1154898805, null), cljs.core.with_meta(new cljs.core.Symbol(null, "fn", "fn", 465265323, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, "s", "s", -948495851, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", 
  "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, "__hash", "__hash", -1328796629, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.LazySeq.cljs$lang$type = true;
cljs.core.LazySeq.cljs$lang$ctorStr = "cljs.core/LazySeq";
cljs.core.LazySeq.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/LazySeq");
};
cljs.core.__GT_LazySeq = function cljs$core$__GT_LazySeq(meta, fn, s, __hash) {
  return new cljs.core.LazySeq(meta, fn, s, __hash);
};
cljs.core.LazySeq.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.ChunkBuffer = function(buf, end) {
  this.buf = buf;
  this.end = end;
  this.cljs$lang$protocol_mask$partition0$ = 2;
  this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.ChunkBuffer.prototype.add = function(o) {
  var self__ = this;
  var _ = this;
  self__.buf[self__.end] = o;
  return self__.end = self__.end + 1;
};
cljs.core.ChunkBuffer.prototype.chunk = function(o) {
  var self__ = this;
  var _ = this;
  var ret = new cljs.core.ArrayChunk(self__.buf, 0, self__.end);
  self__.buf = null;
  return ret;
};
cljs.core.ChunkBuffer.prototype.cljs$core$ICounted$_count$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return self__.end;
};
cljs.core.ChunkBuffer.getBasis = function() {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "buf", "buf", 1426618187, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, "end", "end", 1372345569, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.ChunkBuffer.cljs$lang$type = true;
cljs.core.ChunkBuffer.cljs$lang$ctorStr = "cljs.core/ChunkBuffer";
cljs.core.ChunkBuffer.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/ChunkBuffer");
};
cljs.core.__GT_ChunkBuffer = function cljs$core$__GT_ChunkBuffer(buf, end) {
  return new cljs.core.ChunkBuffer(buf, end);
};
cljs.core.chunk_buffer = function cljs$core$chunk_buffer(capacity) {
  return new cljs.core.ChunkBuffer(new Array(capacity), 0);
};
cljs.core.ArrayChunk = function(arr, off, end) {
  this.arr = arr;
  this.off = off;
  this.end = end;
  this.cljs$lang$protocol_mask$partition0$ = 524306;
  this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.ArrayChunk.prototype.cljs$core$ICounted$_count$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return self__.end - self__.off;
};
cljs.core.ArrayChunk.prototype.cljs$core$IIndexed$_nth$arity$2 = function(coll, i) {
  var self__ = this;
  var coll__$1 = this;
  return self__.arr[self__.off + i];
};
cljs.core.ArrayChunk.prototype.cljs$core$IIndexed$_nth$arity$3 = function(coll, i, not_found) {
  var self__ = this;
  var coll__$1 = this;
  if (i >= 0 && i < self__.end - self__.off) {
    return self__.arr[self__.off + i];
  } else {
    return not_found;
  }
};
cljs.core.ArrayChunk.prototype.cljs$core$IChunk$ = true;
cljs.core.ArrayChunk.prototype.cljs$core$IChunk$_drop_first$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.off === self__.end) {
    throw new Error("-drop-first of empty chunk");
  } else {
    return new cljs.core.ArrayChunk(self__.arr, self__.off + 1, self__.end);
  }
};
cljs.core.ArrayChunk.prototype.cljs$core$IReduce$_reduce$arity$2 = function(coll, f) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$4(self__.arr, f, self__.arr[self__.off], self__.off + 1);
};
cljs.core.ArrayChunk.prototype.cljs$core$IReduce$_reduce$arity$3 = function(coll, f, start) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$4(self__.arr, f, start, self__.off);
};
cljs.core.ArrayChunk.getBasis = function() {
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "arr", "arr", 2115492975, null), new cljs.core.Symbol(null, "off", "off", -2047994980, null), new cljs.core.Symbol(null, "end", "end", 1372345569, null)], null);
};
cljs.core.ArrayChunk.cljs$lang$type = true;
cljs.core.ArrayChunk.cljs$lang$ctorStr = "cljs.core/ArrayChunk";
cljs.core.ArrayChunk.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/ArrayChunk");
};
cljs.core.__GT_ArrayChunk = function cljs$core$__GT_ArrayChunk(arr, off, end) {
  return new cljs.core.ArrayChunk(arr, off, end);
};
cljs.core.array_chunk = function cljs$core$array_chunk(var_args) {
  var args9096 = [];
  var len__7198__auto___9099 = arguments.length;
  var i__7199__auto___9100 = 0;
  while (true) {
    if (i__7199__auto___9100 < len__7198__auto___9099) {
      args9096.push(arguments[i__7199__auto___9100]);
      var G__9101 = i__7199__auto___9100 + 1;
      i__7199__auto___9100 = G__9101;
      continue;
    } else {
    }
    break;
  }
  var G__9098 = args9096.length;
  switch(G__9098) {
    case 1:
      return cljs.core.array_chunk.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.array_chunk.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.array_chunk.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9096.length)].join(""));;
  }
};
cljs.core.array_chunk.cljs$core$IFn$_invoke$arity$1 = function(arr) {
  return new cljs.core.ArrayChunk(arr, 0, arr.length);
};
cljs.core.array_chunk.cljs$core$IFn$_invoke$arity$2 = function(arr, off) {
  return new cljs.core.ArrayChunk(arr, off, arr.length);
};
cljs.core.array_chunk.cljs$core$IFn$_invoke$arity$3 = function(arr, off, end) {
  return new cljs.core.ArrayChunk(arr, off, end);
};
cljs.core.array_chunk.cljs$lang$maxFixedArity = 3;
cljs.core.ChunkedCons = function(chunk, more, meta, __hash) {
  this.chunk = chunk;
  this.more = more;
  this.meta = meta;
  this.__hash = __hash;
  this.cljs$lang$protocol_mask$partition0$ = 31850732;
  this.cljs$lang$protocol_mask$partition1$ = 1536;
};
cljs.core.ChunkedCons.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.ChunkedCons.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.ChunkedCons.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.meta;
};
cljs.core.ChunkedCons.prototype.cljs$core$INext$_next$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (cljs.core._count(self__.chunk) > 1) {
    return new cljs.core.ChunkedCons(cljs.core._drop_first(self__.chunk), self__.more, self__.meta, null);
  } else {
    var more__$1 = cljs.core._seq(self__.more);
    if (more__$1 == null) {
      return null;
    } else {
      return more__$1;
    }
  }
};
cljs.core.ChunkedCons.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var h__6575__auto__ = self__.__hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
    self__.__hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.ChunkedCons.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.equiv_sequential(coll__$1, other);
};
cljs.core.ChunkedCons.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.with_meta(cljs.core.List.EMPTY, self__.meta);
};
cljs.core.ChunkedCons.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core._nth.cljs$core$IFn$_invoke$arity$2(self__.chunk, 0);
};
cljs.core.ChunkedCons.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (cljs.core._count(self__.chunk) > 1) {
    return new cljs.core.ChunkedCons(cljs.core._drop_first(self__.chunk), self__.more, self__.meta, null);
  } else {
    if (self__.more == null) {
      return cljs.core.List.EMPTY;
    } else {
      return self__.more;
    }
  }
};
cljs.core.ChunkedCons.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return coll__$1;
};
cljs.core.ChunkedCons.prototype.cljs$core$IChunkedSeq$_chunked_first$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.chunk;
};
cljs.core.ChunkedCons.prototype.cljs$core$IChunkedSeq$_chunked_rest$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.more == null) {
    return cljs.core.List.EMPTY;
  } else {
    return self__.more;
  }
};
cljs.core.ChunkedCons.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, m) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.ChunkedCons(self__.chunk, self__.more, m, self__.__hash);
};
cljs.core.ChunkedCons.prototype.cljs$core$ICollection$_conj$arity$2 = function(this$, o) {
  var self__ = this;
  var this$__$1 = this;
  return cljs.core.cons(o, this$__$1);
};
cljs.core.ChunkedCons.prototype.cljs$core$IChunkedNext$_chunked_next$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.more == null) {
    return null;
  } else {
    return self__.more;
  }
};
cljs.core.ChunkedCons.getBasis = function() {
  return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "chunk", "chunk", 449371907, null), new cljs.core.Symbol(null, "more", "more", -418290273, null), new cljs.core.Symbol(null, "meta", "meta", -1154898805, null), cljs.core.with_meta(new cljs.core.Symbol(null, "__hash", "__hash", -1328796629, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.ChunkedCons.cljs$lang$type = true;
cljs.core.ChunkedCons.cljs$lang$ctorStr = "cljs.core/ChunkedCons";
cljs.core.ChunkedCons.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/ChunkedCons");
};
cljs.core.__GT_ChunkedCons = function cljs$core$__GT_ChunkedCons(chunk, more, meta, __hash) {
  return new cljs.core.ChunkedCons(chunk, more, meta, __hash);
};
cljs.core.ChunkedCons.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.chunk_cons = function cljs$core$chunk_cons(chunk, rest) {
  if (cljs.core._count(chunk) === 0) {
    return rest;
  } else {
    return new cljs.core.ChunkedCons(chunk, rest, null, null);
  }
};
cljs.core.chunk_append = function cljs$core$chunk_append(b, x) {
  return b.add(x);
};
cljs.core.chunk = function cljs$core$chunk(b) {
  return b.chunk();
};
cljs.core.chunk_first = function cljs$core$chunk_first(s) {
  return cljs.core._chunked_first(s);
};
cljs.core.chunk_rest = function cljs$core$chunk_rest(s) {
  return cljs.core._chunked_rest(s);
};
cljs.core.chunk_next = function cljs$core$chunk_next(s) {
  if (!(s == null) ? s.cljs$lang$protocol_mask$partition1$ & 1024 || s.cljs$core$IChunkedNext$ ? true : false : false) {
    return cljs.core._chunked_next(s);
  } else {
    return cljs.core.seq(cljs.core._chunked_rest(s));
  }
};
cljs.core.to_array = function cljs$core$to_array(s) {
  var ary = [];
  var s__$1 = s;
  while (true) {
    if (cljs.core.seq(s__$1)) {
      ary.push(cljs.core.first(s__$1));
      var G__9105 = cljs.core.next(s__$1);
      s__$1 = G__9105;
      continue;
    } else {
      return ary;
    }
    break;
  }
};
cljs.core.to_array_2d = function cljs$core$to_array_2d(coll) {
  var ret = new Array(cljs.core.count(coll));
  var i_9106 = 0;
  var xs_9107 = cljs.core.seq(coll);
  while (true) {
    if (xs_9107) {
      ret[i_9106] = cljs.core.to_array(cljs.core.first(xs_9107));
      var G__9108 = i_9106 + 1;
      var G__9109 = cljs.core.next(xs_9107);
      i_9106 = G__9108;
      xs_9107 = G__9109;
      continue;
    } else {
    }
    break;
  }
  return ret;
};
cljs.core.int_array = function cljs$core$int_array(var_args) {
  var args9110 = [];
  var len__7198__auto___9113 = arguments.length;
  var i__7199__auto___9114 = 0;
  while (true) {
    if (i__7199__auto___9114 < len__7198__auto___9113) {
      args9110.push(arguments[i__7199__auto___9114]);
      var G__9115 = i__7199__auto___9114 + 1;
      i__7199__auto___9114 = G__9115;
      continue;
    } else {
    }
    break;
  }
  var G__9112 = args9110.length;
  switch(G__9112) {
    case 1:
      return cljs.core.int_array.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.int_array.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9110.length)].join(""));;
  }
};
cljs.core.int_array.cljs$core$IFn$_invoke$arity$1 = function(size_or_seq) {
  if (typeof size_or_seq === "number") {
    return cljs.core.int_array.cljs$core$IFn$_invoke$arity$2(size_or_seq, null);
  } else {
    return cljs.core.into_array.cljs$core$IFn$_invoke$arity$1(size_or_seq);
  }
};
cljs.core.int_array.cljs$core$IFn$_invoke$arity$2 = function(size, init_val_or_seq) {
  var a = new Array(size);
  if (cljs.core.seq_QMARK_(init_val_or_seq)) {
    var s = cljs.core.seq(init_val_or_seq);
    var i = 0;
    var s__$1 = s;
    while (true) {
      if (s__$1 && i < size) {
        a[i] = cljs.core.first(s__$1);
        var G__9117 = i + 1;
        var G__9118 = cljs.core.next(s__$1);
        i = G__9117;
        s__$1 = G__9118;
        continue;
      } else {
        return a;
      }
      break;
    }
  } else {
    var n__7043__auto___9119 = size;
    var i_9120 = 0;
    while (true) {
      if (i_9120 < n__7043__auto___9119) {
        a[i_9120] = init_val_or_seq;
        var G__9121 = i_9120 + 1;
        i_9120 = G__9121;
        continue;
      } else {
      }
      break;
    }
    return a;
  }
};
cljs.core.int_array.cljs$lang$maxFixedArity = 2;
cljs.core.long_array = function cljs$core$long_array(var_args) {
  var args9122 = [];
  var len__7198__auto___9125 = arguments.length;
  var i__7199__auto___9126 = 0;
  while (true) {
    if (i__7199__auto___9126 < len__7198__auto___9125) {
      args9122.push(arguments[i__7199__auto___9126]);
      var G__9127 = i__7199__auto___9126 + 1;
      i__7199__auto___9126 = G__9127;
      continue;
    } else {
    }
    break;
  }
  var G__9124 = args9122.length;
  switch(G__9124) {
    case 1:
      return cljs.core.long_array.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.long_array.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9122.length)].join(""));;
  }
};
cljs.core.long_array.cljs$core$IFn$_invoke$arity$1 = function(size_or_seq) {
  if (typeof size_or_seq === "number") {
    return cljs.core.long_array.cljs$core$IFn$_invoke$arity$2(size_or_seq, null);
  } else {
    return cljs.core.into_array.cljs$core$IFn$_invoke$arity$1(size_or_seq);
  }
};
cljs.core.long_array.cljs$core$IFn$_invoke$arity$2 = function(size, init_val_or_seq) {
  var a = new Array(size);
  if (cljs.core.seq_QMARK_(init_val_or_seq)) {
    var s = cljs.core.seq(init_val_or_seq);
    var i = 0;
    var s__$1 = s;
    while (true) {
      if (s__$1 && i < size) {
        a[i] = cljs.core.first(s__$1);
        var G__9129 = i + 1;
        var G__9130 = cljs.core.next(s__$1);
        i = G__9129;
        s__$1 = G__9130;
        continue;
      } else {
        return a;
      }
      break;
    }
  } else {
    var n__7043__auto___9131 = size;
    var i_9132 = 0;
    while (true) {
      if (i_9132 < n__7043__auto___9131) {
        a[i_9132] = init_val_or_seq;
        var G__9133 = i_9132 + 1;
        i_9132 = G__9133;
        continue;
      } else {
      }
      break;
    }
    return a;
  }
};
cljs.core.long_array.cljs$lang$maxFixedArity = 2;
cljs.core.double_array = function cljs$core$double_array(var_args) {
  var args9134 = [];
  var len__7198__auto___9137 = arguments.length;
  var i__7199__auto___9138 = 0;
  while (true) {
    if (i__7199__auto___9138 < len__7198__auto___9137) {
      args9134.push(arguments[i__7199__auto___9138]);
      var G__9139 = i__7199__auto___9138 + 1;
      i__7199__auto___9138 = G__9139;
      continue;
    } else {
    }
    break;
  }
  var G__9136 = args9134.length;
  switch(G__9136) {
    case 1:
      return cljs.core.double_array.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.double_array.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9134.length)].join(""));;
  }
};
cljs.core.double_array.cljs$core$IFn$_invoke$arity$1 = function(size_or_seq) {
  if (typeof size_or_seq === "number") {
    return cljs.core.double_array.cljs$core$IFn$_invoke$arity$2(size_or_seq, null);
  } else {
    return cljs.core.into_array.cljs$core$IFn$_invoke$arity$1(size_or_seq);
  }
};
cljs.core.double_array.cljs$core$IFn$_invoke$arity$2 = function(size, init_val_or_seq) {
  var a = new Array(size);
  if (cljs.core.seq_QMARK_(init_val_or_seq)) {
    var s = cljs.core.seq(init_val_or_seq);
    var i = 0;
    var s__$1 = s;
    while (true) {
      if (s__$1 && i < size) {
        a[i] = cljs.core.first(s__$1);
        var G__9141 = i + 1;
        var G__9142 = cljs.core.next(s__$1);
        i = G__9141;
        s__$1 = G__9142;
        continue;
      } else {
        return a;
      }
      break;
    }
  } else {
    var n__7043__auto___9143 = size;
    var i_9144 = 0;
    while (true) {
      if (i_9144 < n__7043__auto___9143) {
        a[i_9144] = init_val_or_seq;
        var G__9145 = i_9144 + 1;
        i_9144 = G__9145;
        continue;
      } else {
      }
      break;
    }
    return a;
  }
};
cljs.core.double_array.cljs$lang$maxFixedArity = 2;
cljs.core.object_array = function cljs$core$object_array(var_args) {
  var args9146 = [];
  var len__7198__auto___9149 = arguments.length;
  var i__7199__auto___9150 = 0;
  while (true) {
    if (i__7199__auto___9150 < len__7198__auto___9149) {
      args9146.push(arguments[i__7199__auto___9150]);
      var G__9151 = i__7199__auto___9150 + 1;
      i__7199__auto___9150 = G__9151;
      continue;
    } else {
    }
    break;
  }
  var G__9148 = args9146.length;
  switch(G__9148) {
    case 1:
      return cljs.core.object_array.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.object_array.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9146.length)].join(""));;
  }
};
cljs.core.object_array.cljs$core$IFn$_invoke$arity$1 = function(size_or_seq) {
  if (typeof size_or_seq === "number") {
    return cljs.core.object_array.cljs$core$IFn$_invoke$arity$2(size_or_seq, null);
  } else {
    return cljs.core.into_array.cljs$core$IFn$_invoke$arity$1(size_or_seq);
  }
};
cljs.core.object_array.cljs$core$IFn$_invoke$arity$2 = function(size, init_val_or_seq) {
  var a = new Array(size);
  if (cljs.core.seq_QMARK_(init_val_or_seq)) {
    var s = cljs.core.seq(init_val_or_seq);
    var i = 0;
    var s__$1 = s;
    while (true) {
      if (s__$1 && i < size) {
        a[i] = cljs.core.first(s__$1);
        var G__9153 = i + 1;
        var G__9154 = cljs.core.next(s__$1);
        i = G__9153;
        s__$1 = G__9154;
        continue;
      } else {
        return a;
      }
      break;
    }
  } else {
    var n__7043__auto___9155 = size;
    var i_9156 = 0;
    while (true) {
      if (i_9156 < n__7043__auto___9155) {
        a[i_9156] = init_val_or_seq;
        var G__9157 = i_9156 + 1;
        i_9156 = G__9157;
        continue;
      } else {
      }
      break;
    }
    return a;
  }
};
cljs.core.object_array.cljs$lang$maxFixedArity = 2;
cljs.core.bounded_count = function cljs$core$bounded_count(s, n) {
  if (cljs.core.counted_QMARK_(s)) {
    return cljs.core.count(s);
  } else {
    var s__$1 = s;
    var i = n;
    var sum = 0;
    while (true) {
      if (i > 0 && cljs.core.seq(s__$1)) {
        var G__9158 = cljs.core.next(s__$1);
        var G__9159 = i - 1;
        var G__9160 = sum + 1;
        s__$1 = G__9158;
        i = G__9159;
        sum = G__9160;
        continue;
      } else {
        return sum;
      }
      break;
    }
  }
};
cljs.core.spread = function cljs$core$spread(arglist) {
  if (arglist == null) {
    return null;
  } else {
    if (cljs.core.next(arglist) == null) {
      return cljs.core.seq(cljs.core.first(arglist));
    } else {
      return cljs.core.cons(cljs.core.first(arglist), cljs$core$spread(cljs.core.next(arglist)));
    }
  }
};
cljs.core.concat = function cljs$core$concat(var_args) {
  var args9162 = [];
  var len__7198__auto___9174 = arguments.length;
  var i__7199__auto___9175 = 0;
  while (true) {
    if (i__7199__auto___9175 < len__7198__auto___9174) {
      args9162.push(arguments[i__7199__auto___9175]);
      var G__9176 = i__7199__auto___9175 + 1;
      i__7199__auto___9175 = G__9176;
      continue;
    } else {
    }
    break;
  }
  var G__9167 = args9162.length;
  switch(G__9167) {
    case 0:
      return cljs.core.concat.cljs$core$IFn$_invoke$arity$0();
      break;
    case 1:
      return cljs.core.concat.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.concat.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args9162.slice(2), 0);
      return cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.concat.cljs$core$IFn$_invoke$arity$0 = function() {
  return new cljs.core.LazySeq(null, function() {
    return null;
  }, null, null);
};
cljs.core.concat.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return new cljs.core.LazySeq(null, function() {
    return x;
  }, null, null);
};
cljs.core.concat.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return new cljs.core.LazySeq(null, function() {
    var s = cljs.core.seq(x);
    if (s) {
      if (cljs.core.chunked_seq_QMARK_(s)) {
        return cljs.core.chunk_cons(cljs.core.chunk_first(s), cljs.core.concat.cljs$core$IFn$_invoke$arity$2(cljs.core.chunk_rest(s), y));
      } else {
        return cljs.core.cons(cljs.core.first(s), cljs.core.concat.cljs$core$IFn$_invoke$arity$2(cljs.core.rest(s), y));
      }
    } else {
      return y;
    }
  }, null, null);
};
cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic = function(x, y, zs) {
  var cat = function cljs$core$cat(xys, zs__$1) {
    return new cljs.core.LazySeq(null, function() {
      var xys__$1 = cljs.core.seq(xys);
      if (xys__$1) {
        if (cljs.core.chunked_seq_QMARK_(xys__$1)) {
          return cljs.core.chunk_cons(cljs.core.chunk_first(xys__$1), cljs$core$cat(cljs.core.chunk_rest(xys__$1), zs__$1));
        } else {
          return cljs.core.cons(cljs.core.first(xys__$1), cljs$core$cat(cljs.core.rest(xys__$1), zs__$1));
        }
      } else {
        if (cljs.core.truth_(zs__$1)) {
          return cljs$core$cat(cljs.core.first(zs__$1), cljs.core.next(zs__$1));
        } else {
          return null;
        }
      }
    }, null, null);
  };
  return cat(cljs.core.concat.cljs$core$IFn$_invoke$arity$2(x, y), zs);
};
cljs.core.concat.cljs$lang$applyTo = function(seq9163) {
  var G__9164 = cljs.core.first(seq9163);
  var seq9163__$1 = cljs.core.next(seq9163);
  var G__9165 = cljs.core.first(seq9163__$1);
  var seq9163__$2 = cljs.core.next(seq9163__$1);
  return cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic(G__9164, G__9165, seq9163__$2);
};
cljs.core.concat.cljs$lang$maxFixedArity = 2;
cljs.core.list_STAR_ = function cljs$core$list_STAR_(var_args) {
  var args9178 = [];
  var len__7198__auto___9186 = arguments.length;
  var i__7199__auto___9187 = 0;
  while (true) {
    if (i__7199__auto___9187 < len__7198__auto___9186) {
      args9178.push(arguments[i__7199__auto___9187]);
      var G__9188 = i__7199__auto___9187 + 1;
      i__7199__auto___9187 = G__9188;
      continue;
    } else {
    }
    break;
  }
  var G__9185 = args9178.length;
  switch(G__9185) {
    case 1:
      return cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 4:
      return cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args9178.slice(4), 0);
      return cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], arguments[3], argseq__7217__auto__);
  }
};
cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$1 = function(args) {
  return cljs.core.seq(args);
};
cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$2 = function(a, args) {
  return cljs.core.cons(a, args);
};
cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$3 = function(a, b, args) {
  return cljs.core.cons(a, cljs.core.cons(b, args));
};
cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$4 = function(a, b, c, args) {
  return cljs.core.cons(a, cljs.core.cons(b, cljs.core.cons(c, args)));
};
cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$variadic = function(a, b, c, d, more) {
  return cljs.core.cons(a, cljs.core.cons(b, cljs.core.cons(c, cljs.core.cons(d, cljs.core.spread(more)))));
};
cljs.core.list_STAR_.cljs$lang$applyTo = function(seq9179) {
  var G__9180 = cljs.core.first(seq9179);
  var seq9179__$1 = cljs.core.next(seq9179);
  var G__9181 = cljs.core.first(seq9179__$1);
  var seq9179__$2 = cljs.core.next(seq9179__$1);
  var G__9182 = cljs.core.first(seq9179__$2);
  var seq9179__$3 = cljs.core.next(seq9179__$2);
  var G__9183 = cljs.core.first(seq9179__$3);
  var seq9179__$4 = cljs.core.next(seq9179__$3);
  return cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$variadic(G__9180, G__9181, G__9182, G__9183, seq9179__$4);
};
cljs.core.list_STAR_.cljs$lang$maxFixedArity = 4;
cljs.core.transient$ = function cljs$core$transient(coll) {
  return cljs.core._as_transient(coll);
};
cljs.core.persistent_BANG_ = function cljs$core$persistent_BANG_(tcoll) {
  return cljs.core._persistent_BANG_(tcoll);
};
cljs.core.conj_BANG_ = function cljs$core$conj_BANG_(var_args) {
  var args9190 = [];
  var len__7198__auto___9196 = arguments.length;
  var i__7199__auto___9197 = 0;
  while (true) {
    if (i__7199__auto___9197 < len__7198__auto___9196) {
      args9190.push(arguments[i__7199__auto___9197]);
      var G__9198 = i__7199__auto___9197 + 1;
      i__7199__auto___9197 = G__9198;
      continue;
    } else {
    }
    break;
  }
  var G__9195 = args9190.length;
  switch(G__9195) {
    case 0:
      return cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$0();
      break;
    case 1:
      return cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args9190.slice(2), 0);
      return cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$0 = function() {
  return cljs.core.transient$(cljs.core.PersistentVector.EMPTY);
};
cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$1 = function(coll) {
  return coll;
};
cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$2 = function(tcoll, val) {
  return cljs.core._conj_BANG_(tcoll, val);
};
cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$variadic = function(tcoll, val, vals) {
  while (true) {
    var ntcoll = cljs.core._conj_BANG_(tcoll, val);
    if (cljs.core.truth_(vals)) {
      var G__9200 = ntcoll;
      var G__9201 = cljs.core.first(vals);
      var G__9202 = cljs.core.next(vals);
      tcoll = G__9200;
      val = G__9201;
      vals = G__9202;
      continue;
    } else {
      return ntcoll;
    }
    break;
  }
};
cljs.core.conj_BANG_.cljs$lang$applyTo = function(seq9191) {
  var G__9192 = cljs.core.first(seq9191);
  var seq9191__$1 = cljs.core.next(seq9191);
  var G__9193 = cljs.core.first(seq9191__$1);
  var seq9191__$2 = cljs.core.next(seq9191__$1);
  return cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__9192, G__9193, seq9191__$2);
};
cljs.core.conj_BANG_.cljs$lang$maxFixedArity = 2;
cljs.core.assoc_BANG_ = function cljs$core$assoc_BANG_(var_args) {
  var args9203 = [];
  var len__7198__auto___9210 = arguments.length;
  var i__7199__auto___9211 = 0;
  while (true) {
    if (i__7199__auto___9211 < len__7198__auto___9210) {
      args9203.push(arguments[i__7199__auto___9211]);
      var G__9212 = i__7199__auto___9211 + 1;
      i__7199__auto___9211 = G__9212;
      continue;
    } else {
    }
    break;
  }
  var G__9209 = args9203.length;
  switch(G__9209) {
    case 3:
      return cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args9203.slice(3), 0);
      return cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], argseq__7217__auto__);
  }
};
cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3 = function(tcoll, key, val) {
  return cljs.core._assoc_BANG_(tcoll, key, val);
};
cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$variadic = function(tcoll, key, val, kvs) {
  while (true) {
    var ntcoll = cljs.core._assoc_BANG_(tcoll, key, val);
    if (cljs.core.truth_(kvs)) {
      var G__9214 = ntcoll;
      var G__9215 = cljs.core.first(kvs);
      var G__9216 = cljs.core.second(kvs);
      var G__9217 = cljs.core.nnext(kvs);
      tcoll = G__9214;
      key = G__9215;
      val = G__9216;
      kvs = G__9217;
      continue;
    } else {
      return ntcoll;
    }
    break;
  }
};
cljs.core.assoc_BANG_.cljs$lang$applyTo = function(seq9204) {
  var G__9205 = cljs.core.first(seq9204);
  var seq9204__$1 = cljs.core.next(seq9204);
  var G__9206 = cljs.core.first(seq9204__$1);
  var seq9204__$2 = cljs.core.next(seq9204__$1);
  var G__9207 = cljs.core.first(seq9204__$2);
  var seq9204__$3 = cljs.core.next(seq9204__$2);
  return cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__9205, G__9206, G__9207, seq9204__$3);
};
cljs.core.assoc_BANG_.cljs$lang$maxFixedArity = 3;
cljs.core.dissoc_BANG_ = function cljs$core$dissoc_BANG_(var_args) {
  var args9218 = [];
  var len__7198__auto___9224 = arguments.length;
  var i__7199__auto___9225 = 0;
  while (true) {
    if (i__7199__auto___9225 < len__7198__auto___9224) {
      args9218.push(arguments[i__7199__auto___9225]);
      var G__9226 = i__7199__auto___9225 + 1;
      i__7199__auto___9225 = G__9226;
      continue;
    } else {
    }
    break;
  }
  var G__9223 = args9218.length;
  switch(G__9223) {
    case 2:
      return cljs.core.dissoc_BANG_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args9218.slice(2), 0);
      return cljs.core.dissoc_BANG_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.dissoc_BANG_.cljs$core$IFn$_invoke$arity$2 = function(tcoll, key) {
  return cljs.core._dissoc_BANG_(tcoll, key);
};
cljs.core.dissoc_BANG_.cljs$core$IFn$_invoke$arity$variadic = function(tcoll, key, ks) {
  while (true) {
    var ntcoll = cljs.core._dissoc_BANG_(tcoll, key);
    if (cljs.core.truth_(ks)) {
      var G__9228 = ntcoll;
      var G__9229 = cljs.core.first(ks);
      var G__9230 = cljs.core.next(ks);
      tcoll = G__9228;
      key = G__9229;
      ks = G__9230;
      continue;
    } else {
      return ntcoll;
    }
    break;
  }
};
cljs.core.dissoc_BANG_.cljs$lang$applyTo = function(seq9219) {
  var G__9220 = cljs.core.first(seq9219);
  var seq9219__$1 = cljs.core.next(seq9219);
  var G__9221 = cljs.core.first(seq9219__$1);
  var seq9219__$2 = cljs.core.next(seq9219__$1);
  return cljs.core.dissoc_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__9220, G__9221, seq9219__$2);
};
cljs.core.dissoc_BANG_.cljs$lang$maxFixedArity = 2;
cljs.core.pop_BANG_ = function cljs$core$pop_BANG_(tcoll) {
  return cljs.core._pop_BANG_(tcoll);
};
cljs.core.disj_BANG_ = function cljs$core$disj_BANG_(var_args) {
  var args9231 = [];
  var len__7198__auto___9237 = arguments.length;
  var i__7199__auto___9238 = 0;
  while (true) {
    if (i__7199__auto___9238 < len__7198__auto___9237) {
      args9231.push(arguments[i__7199__auto___9238]);
      var G__9239 = i__7199__auto___9238 + 1;
      i__7199__auto___9238 = G__9239;
      continue;
    } else {
    }
    break;
  }
  var G__9236 = args9231.length;
  switch(G__9236) {
    case 2:
      return cljs.core.disj_BANG_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args9231.slice(2), 0);
      return cljs.core.disj_BANG_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.disj_BANG_.cljs$core$IFn$_invoke$arity$2 = function(tcoll, val) {
  return cljs.core._disjoin_BANG_(tcoll, val);
};
cljs.core.disj_BANG_.cljs$core$IFn$_invoke$arity$variadic = function(tcoll, val, vals) {
  while (true) {
    var ntcoll = cljs.core._disjoin_BANG_(tcoll, val);
    if (cljs.core.truth_(vals)) {
      var G__9241 = ntcoll;
      var G__9242 = cljs.core.first(vals);
      var G__9243 = cljs.core.next(vals);
      tcoll = G__9241;
      val = G__9242;
      vals = G__9243;
      continue;
    } else {
      return ntcoll;
    }
    break;
  }
};
cljs.core.disj_BANG_.cljs$lang$applyTo = function(seq9232) {
  var G__9233 = cljs.core.first(seq9232);
  var seq9232__$1 = cljs.core.next(seq9232);
  var G__9234 = cljs.core.first(seq9232__$1);
  var seq9232__$2 = cljs.core.next(seq9232__$1);
  return cljs.core.disj_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__9233, G__9234, seq9232__$2);
};
cljs.core.disj_BANG_.cljs$lang$maxFixedArity = 2;
cljs.core.apply_to = function cljs$core$apply_to(f, argc, args) {
  var args__$1 = cljs.core.seq(args);
  if (argc === 0) {
    return f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null);
  } else {
    var a7087 = cljs.core._first(args__$1);
    var args__$2 = cljs.core._rest(args__$1);
    if (argc === 1) {
      if (f.cljs$core$IFn$_invoke$arity$1) {
        return f.cljs$core$IFn$_invoke$arity$1(a7087);
      } else {
        return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(a7087) : f.call(null, a7087);
      }
    } else {
      var b7088 = cljs.core._first(args__$2);
      var args__$3 = cljs.core._rest(args__$2);
      if (argc === 2) {
        if (f.cljs$core$IFn$_invoke$arity$2) {
          return f.cljs$core$IFn$_invoke$arity$2(a7087, b7088);
        } else {
          return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(a7087, b7088) : f.call(null, a7087, b7088);
        }
      } else {
        var c7089 = cljs.core._first(args__$3);
        var args__$4 = cljs.core._rest(args__$3);
        if (argc === 3) {
          if (f.cljs$core$IFn$_invoke$arity$3) {
            return f.cljs$core$IFn$_invoke$arity$3(a7087, b7088, c7089);
          } else {
            return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(a7087, b7088, c7089) : f.call(null, a7087, b7088, c7089);
          }
        } else {
          var d7090 = cljs.core._first(args__$4);
          var args__$5 = cljs.core._rest(args__$4);
          if (argc === 4) {
            if (f.cljs$core$IFn$_invoke$arity$4) {
              return f.cljs$core$IFn$_invoke$arity$4(a7087, b7088, c7089, d7090);
            } else {
              return f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(a7087, b7088, c7089, d7090) : f.call(null, a7087, b7088, c7089, d7090);
            }
          } else {
            var e7091 = cljs.core._first(args__$5);
            var args__$6 = cljs.core._rest(args__$5);
            if (argc === 5) {
              if (f.cljs$core$IFn$_invoke$arity$5) {
                return f.cljs$core$IFn$_invoke$arity$5(a7087, b7088, c7089, d7090, e7091);
              } else {
                return f.cljs$core$IFn$_invoke$arity$5 ? f.cljs$core$IFn$_invoke$arity$5(a7087, b7088, c7089, d7090, e7091) : f.call(null, a7087, b7088, c7089, d7090, e7091);
              }
            } else {
              var f7092 = cljs.core._first(args__$6);
              var args__$7 = cljs.core._rest(args__$6);
              if (argc === 6) {
                if (f.cljs$core$IFn$_invoke$arity$6) {
                  return f.cljs$core$IFn$_invoke$arity$6(a7087, b7088, c7089, d7090, e7091, f7092);
                } else {
                  return f.cljs$core$IFn$_invoke$arity$6 ? f.cljs$core$IFn$_invoke$arity$6(a7087, b7088, c7089, d7090, e7091, f7092) : f.call(null, a7087, b7088, c7089, d7090, e7091, f7092);
                }
              } else {
                var g7093 = cljs.core._first(args__$7);
                var args__$8 = cljs.core._rest(args__$7);
                if (argc === 7) {
                  if (f.cljs$core$IFn$_invoke$arity$7) {
                    return f.cljs$core$IFn$_invoke$arity$7(a7087, b7088, c7089, d7090, e7091, f7092, g7093);
                  } else {
                    return f.cljs$core$IFn$_invoke$arity$7 ? f.cljs$core$IFn$_invoke$arity$7(a7087, b7088, c7089, d7090, e7091, f7092, g7093) : f.call(null, a7087, b7088, c7089, d7090, e7091, f7092, g7093);
                  }
                } else {
                  var h7094 = cljs.core._first(args__$8);
                  var args__$9 = cljs.core._rest(args__$8);
                  if (argc === 8) {
                    if (f.cljs$core$IFn$_invoke$arity$8) {
                      return f.cljs$core$IFn$_invoke$arity$8(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094);
                    } else {
                      return f.cljs$core$IFn$_invoke$arity$8 ? f.cljs$core$IFn$_invoke$arity$8(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094) : f.call(null, a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094);
                    }
                  } else {
                    var i7095 = cljs.core._first(args__$9);
                    var args__$10 = cljs.core._rest(args__$9);
                    if (argc === 9) {
                      if (f.cljs$core$IFn$_invoke$arity$9) {
                        return f.cljs$core$IFn$_invoke$arity$9(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095);
                      } else {
                        return f.cljs$core$IFn$_invoke$arity$9 ? f.cljs$core$IFn$_invoke$arity$9(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095) : f.call(null, a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095);
                      }
                    } else {
                      var j7096 = cljs.core._first(args__$10);
                      var args__$11 = cljs.core._rest(args__$10);
                      if (argc === 10) {
                        if (f.cljs$core$IFn$_invoke$arity$10) {
                          return f.cljs$core$IFn$_invoke$arity$10(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096);
                        } else {
                          return f.cljs$core$IFn$_invoke$arity$10 ? f.cljs$core$IFn$_invoke$arity$10(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096) : f.call(null, a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096);
                        }
                      } else {
                        var k7097 = cljs.core._first(args__$11);
                        var args__$12 = cljs.core._rest(args__$11);
                        if (argc === 11) {
                          if (f.cljs$core$IFn$_invoke$arity$11) {
                            return f.cljs$core$IFn$_invoke$arity$11(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097);
                          } else {
                            return f.cljs$core$IFn$_invoke$arity$11 ? f.cljs$core$IFn$_invoke$arity$11(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097) : f.call(null, a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097);
                          }
                        } else {
                          var l7098 = cljs.core._first(args__$12);
                          var args__$13 = cljs.core._rest(args__$12);
                          if (argc === 12) {
                            if (f.cljs$core$IFn$_invoke$arity$12) {
                              return f.cljs$core$IFn$_invoke$arity$12(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098);
                            } else {
                              return f.cljs$core$IFn$_invoke$arity$12 ? f.cljs$core$IFn$_invoke$arity$12(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098) : f.call(null, a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098);
                            }
                          } else {
                            var m7099 = cljs.core._first(args__$13);
                            var args__$14 = cljs.core._rest(args__$13);
                            if (argc === 13) {
                              if (f.cljs$core$IFn$_invoke$arity$13) {
                                return f.cljs$core$IFn$_invoke$arity$13(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099);
                              } else {
                                return f.cljs$core$IFn$_invoke$arity$13 ? f.cljs$core$IFn$_invoke$arity$13(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099) : f.call(null, a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099);
                              }
                            } else {
                              var n7100 = cljs.core._first(args__$14);
                              var args__$15 = cljs.core._rest(args__$14);
                              if (argc === 14) {
                                if (f.cljs$core$IFn$_invoke$arity$14) {
                                  return f.cljs$core$IFn$_invoke$arity$14(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099, n7100);
                                } else {
                                  return f.cljs$core$IFn$_invoke$arity$14 ? f.cljs$core$IFn$_invoke$arity$14(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099, n7100) : f.call(null, a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099, n7100);
                                }
                              } else {
                                var o7101 = cljs.core._first(args__$15);
                                var args__$16 = cljs.core._rest(args__$15);
                                if (argc === 15) {
                                  if (f.cljs$core$IFn$_invoke$arity$15) {
                                    return f.cljs$core$IFn$_invoke$arity$15(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099, n7100, o7101);
                                  } else {
                                    return f.cljs$core$IFn$_invoke$arity$15 ? f.cljs$core$IFn$_invoke$arity$15(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099, n7100, o7101) : f.call(null, a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099, n7100, o7101);
                                  }
                                } else {
                                  var p7102 = cljs.core._first(args__$16);
                                  var args__$17 = cljs.core._rest(args__$16);
                                  if (argc === 16) {
                                    if (f.cljs$core$IFn$_invoke$arity$16) {
                                      return f.cljs$core$IFn$_invoke$arity$16(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099, n7100, o7101, p7102);
                                    } else {
                                      return f.cljs$core$IFn$_invoke$arity$16 ? f.cljs$core$IFn$_invoke$arity$16(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099, n7100, o7101, p7102) : f.call(null, a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099, n7100, o7101, p7102);
                                    }
                                  } else {
                                    var q7103 = cljs.core._first(args__$17);
                                    var args__$18 = cljs.core._rest(args__$17);
                                    if (argc === 17) {
                                      if (f.cljs$core$IFn$_invoke$arity$17) {
                                        return f.cljs$core$IFn$_invoke$arity$17(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099, n7100, o7101, p7102, q7103);
                                      } else {
                                        return f.cljs$core$IFn$_invoke$arity$17 ? f.cljs$core$IFn$_invoke$arity$17(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099, n7100, o7101, p7102, q7103) : f.call(null, a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099, n7100, o7101, p7102, q7103);
                                      }
                                    } else {
                                      var r7104 = cljs.core._first(args__$18);
                                      var args__$19 = cljs.core._rest(args__$18);
                                      if (argc === 18) {
                                        if (f.cljs$core$IFn$_invoke$arity$18) {
                                          return f.cljs$core$IFn$_invoke$arity$18(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099, n7100, o7101, p7102, q7103, r7104);
                                        } else {
                                          return f.cljs$core$IFn$_invoke$arity$18 ? f.cljs$core$IFn$_invoke$arity$18(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099, n7100, o7101, p7102, q7103, r7104) : f.call(null, a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099, n7100, o7101, p7102, q7103, r7104);
                                        }
                                      } else {
                                        var s7105 = cljs.core._first(args__$19);
                                        var args__$20 = cljs.core._rest(args__$19);
                                        if (argc === 19) {
                                          if (f.cljs$core$IFn$_invoke$arity$19) {
                                            return f.cljs$core$IFn$_invoke$arity$19(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099, n7100, o7101, p7102, q7103, r7104, s7105);
                                          } else {
                                            return f.cljs$core$IFn$_invoke$arity$19 ? f.cljs$core$IFn$_invoke$arity$19(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099, n7100, o7101, p7102, q7103, r7104, s7105) : f.call(null, a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099, n7100, o7101, p7102, q7103, r7104, s7105);
                                          }
                                        } else {
                                          var t7106 = cljs.core._first(args__$20);
                                          var args__$21 = cljs.core._rest(args__$20);
                                          if (argc === 20) {
                                            if (f.cljs$core$IFn$_invoke$arity$20) {
                                              return f.cljs$core$IFn$_invoke$arity$20(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099, n7100, o7101, p7102, q7103, r7104, s7105, t7106);
                                            } else {
                                              return f.cljs$core$IFn$_invoke$arity$20 ? f.cljs$core$IFn$_invoke$arity$20(a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099, n7100, o7101, p7102, q7103, r7104, s7105, t7106) : f.call(null, a7087, b7088, c7089, d7090, e7091, f7092, g7093, h7094, i7095, j7096, k7097, l7098, m7099, n7100, o7101, p7102, q7103, r7104, s7105, t7106);
                                            }
                                          } else {
                                            throw new Error("Only up to 20 arguments supported on functions");
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
};
cljs.core.apply = function cljs$core$apply(var_args) {
  var args9244 = [];
  var len__7198__auto___9253 = arguments.length;
  var i__7199__auto___9254 = 0;
  while (true) {
    if (i__7199__auto___9254 < len__7198__auto___9253) {
      args9244.push(arguments[i__7199__auto___9254]);
      var G__9255 = i__7199__auto___9254 + 1;
      i__7199__auto___9254 = G__9255;
      continue;
    } else {
    }
    break;
  }
  var G__9252 = args9244.length;
  switch(G__9252) {
    case 2:
      return cljs.core.apply.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.apply.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 4:
      return cljs.core.apply.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    case 5:
      return cljs.core.apply.cljs$core$IFn$_invoke$arity$5(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args9244.slice(5), 0);
      return cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], argseq__7217__auto__);
  }
};
cljs.core.apply.cljs$core$IFn$_invoke$arity$2 = function(f, args) {
  var fixed_arity = f.cljs$lang$maxFixedArity;
  if (f.cljs$lang$applyTo) {
    var bc = cljs.core.bounded_count(args, fixed_arity + 1);
    if (bc <= fixed_arity) {
      return cljs.core.apply_to(f, bc, args);
    } else {
      return f.cljs$lang$applyTo(args);
    }
  } else {
    return f.apply(f, cljs.core.to_array(args));
  }
};
cljs.core.apply.cljs$core$IFn$_invoke$arity$3 = function(f, x, args) {
  var arglist = cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$2(x, args);
  var fixed_arity = f.cljs$lang$maxFixedArity;
  if (f.cljs$lang$applyTo) {
    var bc = cljs.core.bounded_count(arglist, fixed_arity + 1);
    if (bc <= fixed_arity) {
      return cljs.core.apply_to(f, bc, arglist);
    } else {
      return f.cljs$lang$applyTo(arglist);
    }
  } else {
    return f.apply(f, cljs.core.to_array(arglist));
  }
};
cljs.core.apply.cljs$core$IFn$_invoke$arity$4 = function(f, x, y, args) {
  var arglist = cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$3(x, y, args);
  var fixed_arity = f.cljs$lang$maxFixedArity;
  if (f.cljs$lang$applyTo) {
    var bc = cljs.core.bounded_count(arglist, fixed_arity + 1);
    if (bc <= fixed_arity) {
      return cljs.core.apply_to(f, bc, arglist);
    } else {
      return f.cljs$lang$applyTo(arglist);
    }
  } else {
    return f.apply(f, cljs.core.to_array(arglist));
  }
};
cljs.core.apply.cljs$core$IFn$_invoke$arity$5 = function(f, x, y, z, args) {
  var arglist = cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$4(x, y, z, args);
  var fixed_arity = f.cljs$lang$maxFixedArity;
  if (f.cljs$lang$applyTo) {
    var bc = cljs.core.bounded_count(arglist, fixed_arity + 1);
    if (bc <= fixed_arity) {
      return cljs.core.apply_to(f, bc, arglist);
    } else {
      return f.cljs$lang$applyTo(arglist);
    }
  } else {
    return f.apply(f, cljs.core.to_array(arglist));
  }
};
cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic = function(f, a, b, c, d, args) {
  var arglist = cljs.core.cons(a, cljs.core.cons(b, cljs.core.cons(c, cljs.core.cons(d, cljs.core.spread(args)))));
  var fixed_arity = f.cljs$lang$maxFixedArity;
  if (f.cljs$lang$applyTo) {
    var bc = cljs.core.bounded_count(arglist, fixed_arity + 1);
    if (bc <= fixed_arity) {
      return cljs.core.apply_to(f, bc, arglist);
    } else {
      return f.cljs$lang$applyTo(arglist);
    }
  } else {
    return f.apply(f, cljs.core.to_array(arglist));
  }
};
cljs.core.apply.cljs$lang$applyTo = function(seq9245) {
  var G__9246 = cljs.core.first(seq9245);
  var seq9245__$1 = cljs.core.next(seq9245);
  var G__9247 = cljs.core.first(seq9245__$1);
  var seq9245__$2 = cljs.core.next(seq9245__$1);
  var G__9248 = cljs.core.first(seq9245__$2);
  var seq9245__$3 = cljs.core.next(seq9245__$2);
  var G__9249 = cljs.core.first(seq9245__$3);
  var seq9245__$4 = cljs.core.next(seq9245__$3);
  var G__9250 = cljs.core.first(seq9245__$4);
  var seq9245__$5 = cljs.core.next(seq9245__$4);
  return cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(G__9246, G__9247, G__9248, G__9249, G__9250, seq9245__$5);
};
cljs.core.apply.cljs$lang$maxFixedArity = 5;
cljs.core.vary_meta = function cljs$core$vary_meta(var_args) {
  var args9257 = [];
  var len__7198__auto___9282 = arguments.length;
  var i__7199__auto___9283 = 0;
  while (true) {
    if (i__7199__auto___9283 < len__7198__auto___9282) {
      args9257.push(arguments[i__7199__auto___9283]);
      var G__9284 = i__7199__auto___9283 + 1;
      i__7199__auto___9283 = G__9284;
      continue;
    } else {
    }
    break;
  }
  var G__9266 = args9257.length;
  switch(G__9266) {
    case 2:
      return cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 4:
      return cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    case 5:
      return cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$5(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);
      break;
    case 6:
      return cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$6(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args9257.slice(6), 0);
      return cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], argseq__7217__auto__);
  }
};
cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$2 = function(obj, f) {
  return cljs.core.with_meta(obj, function() {
    var G__9267 = cljs.core.meta(obj);
    return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__9267) : f.call(null, G__9267);
  }());
};
cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$3 = function(obj, f, a) {
  return cljs.core.with_meta(obj, function() {
    var G__9268 = cljs.core.meta(obj);
    var G__9269 = a;
    return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__9268, G__9269) : f.call(null, G__9268, G__9269);
  }());
};
cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$4 = function(obj, f, a, b) {
  return cljs.core.with_meta(obj, function() {
    var G__9270 = cljs.core.meta(obj);
    var G__9271 = a;
    var G__9272 = b;
    return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__9270, G__9271, G__9272) : f.call(null, G__9270, G__9271, G__9272);
  }());
};
cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$5 = function(obj, f, a, b, c) {
  return cljs.core.with_meta(obj, function() {
    var G__9273 = cljs.core.meta(obj);
    var G__9274 = a;
    var G__9275 = b;
    var G__9276 = c;
    return f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(G__9273, G__9274, G__9275, G__9276) : f.call(null, G__9273, G__9274, G__9275, G__9276);
  }());
};
cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$6 = function(obj, f, a, b, c, d) {
  return cljs.core.with_meta(obj, function() {
    var G__9277 = cljs.core.meta(obj);
    var G__9278 = a;
    var G__9279 = b;
    var G__9280 = c;
    var G__9281 = d;
    return f.cljs$core$IFn$_invoke$arity$5 ? f.cljs$core$IFn$_invoke$arity$5(G__9277, G__9278, G__9279, G__9280, G__9281) : f.call(null, G__9277, G__9278, G__9279, G__9280, G__9281);
  }());
};
cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$variadic = function(obj, f, a, b, c, d, args) {
  return cljs.core.with_meta(obj, cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(f, cljs.core.meta(obj), a, b, c, cljs.core.array_seq([d, args], 0)));
};
cljs.core.vary_meta.cljs$lang$applyTo = function(seq9258) {
  var G__9259 = cljs.core.first(seq9258);
  var seq9258__$1 = cljs.core.next(seq9258);
  var G__9260 = cljs.core.first(seq9258__$1);
  var seq9258__$2 = cljs.core.next(seq9258__$1);
  var G__9261 = cljs.core.first(seq9258__$2);
  var seq9258__$3 = cljs.core.next(seq9258__$2);
  var G__9262 = cljs.core.first(seq9258__$3);
  var seq9258__$4 = cljs.core.next(seq9258__$3);
  var G__9263 = cljs.core.first(seq9258__$4);
  var seq9258__$5 = cljs.core.next(seq9258__$4);
  var G__9264 = cljs.core.first(seq9258__$5);
  var seq9258__$6 = cljs.core.next(seq9258__$5);
  return cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$variadic(G__9259, G__9260, G__9261, G__9262, G__9263, G__9264, seq9258__$6);
};
cljs.core.vary_meta.cljs$lang$maxFixedArity = 6;
cljs.core.not_EQ_ = function cljs$core$not_EQ_(var_args) {
  var args9286 = [];
  var len__7198__auto___9292 = arguments.length;
  var i__7199__auto___9293 = 0;
  while (true) {
    if (i__7199__auto___9293 < len__7198__auto___9292) {
      args9286.push(arguments[i__7199__auto___9293]);
      var G__9294 = i__7199__auto___9293 + 1;
      i__7199__auto___9293 = G__9294;
      continue;
    } else {
    }
    break;
  }
  var G__9291 = args9286.length;
  switch(G__9291) {
    case 1:
      return cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args9286.slice(2), 0);
      return cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return false;
};
cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$2 = function(x, y) {
  return !cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(x, y);
};
cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$variadic = function(x, y, more) {
  return cljs.core.not(cljs.core.apply.cljs$core$IFn$_invoke$arity$4(cljs.core._EQ_, x, y, more));
};
cljs.core.not_EQ_.cljs$lang$applyTo = function(seq9287) {
  var G__9288 = cljs.core.first(seq9287);
  var seq9287__$1 = cljs.core.next(seq9287);
  var G__9289 = cljs.core.first(seq9287__$1);
  var seq9287__$2 = cljs.core.next(seq9287__$1);
  return cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$variadic(G__9288, G__9289, seq9287__$2);
};
cljs.core.not_EQ_.cljs$lang$maxFixedArity = 2;
cljs.core.not_empty = function cljs$core$not_empty(coll) {
  if (cljs.core.seq(coll)) {
    return coll;
  } else {
    return null;
  }
};
cljs.core.nil_iter = function cljs$core$nil_iter() {
  if (typeof cljs.core.t_cljs$core9299 !== "undefined") {
  } else {
    cljs.core.t_cljs$core9299 = function(nil_iter, meta9300) {
      this.nil_iter = nil_iter;
      this.meta9300 = meta9300;
      this.cljs$lang$protocol_mask$partition0$ = 393216;
      this.cljs$lang$protocol_mask$partition1$ = 0;
    };
    cljs.core.t_cljs$core9299.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(_9301, meta9300__$1) {
      var self__ = this;
      var _9301__$1 = this;
      return new cljs.core.t_cljs$core9299(self__.nil_iter, meta9300__$1);
    };
    cljs.core.t_cljs$core9299.prototype.cljs$core$IMeta$_meta$arity$1 = function(_9301) {
      var self__ = this;
      var _9301__$1 = this;
      return self__.meta9300;
    };
    cljs.core.t_cljs$core9299.prototype.hasNext = function() {
      var self__ = this;
      var _ = this;
      return false;
    };
    cljs.core.t_cljs$core9299.prototype.next = function() {
      var self__ = this;
      var _ = this;
      return new Error("No such element");
    };
    cljs.core.t_cljs$core9299.prototype.remove = function() {
      var self__ = this;
      var _ = this;
      return new Error("Unsupported operation");
    };
    cljs.core.t_cljs$core9299.getBasis = function() {
      return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "nil-iter", "nil-iter", 1101030523, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "arglists", "arglists", 1661989754), cljs.core.list(new cljs.core.Symbol(null, "quote", "quote", 1377916282, null), cljs.core.list(cljs.core.PersistentVector.EMPTY))], null)), new cljs.core.Symbol(null, "meta9300", "meta9300", 614985229, null)], 
      null);
    };
    cljs.core.t_cljs$core9299.cljs$lang$type = true;
    cljs.core.t_cljs$core9299.cljs$lang$ctorStr = "cljs.core/t_cljs$core9299";
    cljs.core.t_cljs$core9299.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
      return cljs.core._write(writer__6739__auto__, "cljs.core/t_cljs$core9299");
    };
    cljs.core.__GT_t_cljs$core9299 = function cljs$core$nil_iter_$___GT_t_cljs$core9299(nil_iter__$1, meta9300) {
      return new cljs.core.t_cljs$core9299(nil_iter__$1, meta9300);
    };
  }
  return new cljs.core.t_cljs$core9299(cljs$core$nil_iter, cljs.core.PersistentArrayMap.EMPTY);
};
cljs.core.StringIter = function(s, i) {
  this.s = s;
  this.i = i;
};
cljs.core.StringIter.prototype.hasNext = function() {
  var self__ = this;
  var _ = this;
  return self__.i < self__.s.length;
};
cljs.core.StringIter.prototype.next = function() {
  var self__ = this;
  var _ = this;
  var ret = self__.s.charAt(self__.i);
  self__.i = self__.i + 1;
  return ret;
};
cljs.core.StringIter.prototype.remove = function() {
  var self__ = this;
  var _ = this;
  return new Error("Unsupported operation");
};
cljs.core.StringIter.getBasis = function() {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "s", "s", -948495851, null), cljs.core.with_meta(new cljs.core.Symbol(null, "i", "i", 253690212, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.StringIter.cljs$lang$type = true;
cljs.core.StringIter.cljs$lang$ctorStr = "cljs.core/StringIter";
cljs.core.StringIter.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/StringIter");
};
cljs.core.__GT_StringIter = function cljs$core$__GT_StringIter(s, i) {
  return new cljs.core.StringIter(s, i);
};
cljs.core.string_iter = function cljs$core$string_iter(x) {
  return new cljs.core.StringIter(x, 0);
};
cljs.core.ArrayIter = function(arr, i) {
  this.arr = arr;
  this.i = i;
};
cljs.core.ArrayIter.prototype.hasNext = function() {
  var self__ = this;
  var _ = this;
  return self__.i < self__.arr.length;
};
cljs.core.ArrayIter.prototype.next = function() {
  var self__ = this;
  var _ = this;
  var ret = self__.arr[self__.i];
  self__.i = self__.i + 1;
  return ret;
};
cljs.core.ArrayIter.prototype.remove = function() {
  var self__ = this;
  var _ = this;
  return new Error("Unsupported operation");
};
cljs.core.ArrayIter.getBasis = function() {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "arr", "arr", 2115492975, null), cljs.core.with_meta(new cljs.core.Symbol(null, "i", "i", 253690212, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.ArrayIter.cljs$lang$type = true;
cljs.core.ArrayIter.cljs$lang$ctorStr = "cljs.core/ArrayIter";
cljs.core.ArrayIter.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/ArrayIter");
};
cljs.core.__GT_ArrayIter = function cljs$core$__GT_ArrayIter(arr, i) {
  return new cljs.core.ArrayIter(arr, i);
};
cljs.core.array_iter = function cljs$core$array_iter(x) {
  return new cljs.core.ArrayIter(x, 0);
};
cljs.core.INIT = {};
cljs.core.START = {};
cljs.core.SeqIter = function(_seq, _next) {
  this._seq = _seq;
  this._next = _next;
};
cljs.core.SeqIter.prototype.hasNext = function() {
  var self__ = this;
  var _ = this;
  if (self__._seq === cljs.core.INIT) {
    self__._seq = cljs.core.START;
    self__._next = cljs.core.seq(self__._next);
  } else {
    if (self__._seq === self__._next) {
      self__._next = cljs.core.next(self__._seq);
    } else {
    }
  }
  return !(self__._next == null);
};
cljs.core.SeqIter.prototype.next = function() {
  var self__ = this;
  var this$ = this;
  if (cljs.core.not(this$.hasNext())) {
    throw new Error("No such element");
  } else {
    self__._seq = self__._next;
    return cljs.core.first(self__._next);
  }
};
cljs.core.SeqIter.prototype.remove = function() {
  var self__ = this;
  var _ = this;
  return new Error("Unsupported operation");
};
cljs.core.SeqIter.getBasis = function() {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "_seq", "_seq", -449557847, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, "_next", "_next", 101877036, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.SeqIter.cljs$lang$type = true;
cljs.core.SeqIter.cljs$lang$ctorStr = "cljs.core/SeqIter";
cljs.core.SeqIter.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/SeqIter");
};
cljs.core.__GT_SeqIter = function cljs$core$__GT_SeqIter(_seq, _next) {
  return new cljs.core.SeqIter(_seq, _next);
};
cljs.core.seq_iter = function cljs$core$seq_iter(coll) {
  return new cljs.core.SeqIter(cljs.core.INIT, coll);
};
cljs.core.iter = function cljs$core$iter(coll) {
  if (coll == null) {
    return cljs.core.nil_iter();
  } else {
    if (typeof coll === "string") {
      return cljs.core.string_iter(coll);
    } else {
      if (cljs.core.array_QMARK_(coll)) {
        return cljs.core.array_iter(coll);
      } else {
        if (cljs.core.iterable_QMARK_(coll)) {
          return cljs.core._iterator(coll);
        } else {
          if (cljs.core.seqable_QMARK_(coll)) {
            return cljs.core.seq_iter(coll);
          } else {
            throw new Error([cljs.core.str("Cannot create iterator from "), cljs.core.str(coll)].join(""));
          }
        }
      }
    }
  }
};
cljs.core.lazy_transformer = function cljs$core$lazy_transformer(stepper) {
  return new cljs.core.LazyTransformer(stepper, null, null, null);
};
cljs.core.Stepper = function(xform, iter) {
  this.xform = xform;
  this.iter = iter;
};
cljs.core.Stepper.prototype.step = function(lt) {
  var self__ = this;
  var this$ = this;
  while (true) {
    if (cljs.core.truth_(function() {
      var and__6128__auto__ = !(lt.stepper == null);
      if (and__6128__auto__) {
        return self__.iter.hasNext();
      } else {
        return and__6128__auto__;
      }
    }())) {
      if (cljs.core.reduced_QMARK_(function() {
        var G__9302 = lt;
        var G__9303 = self__.iter.next();
        return self__.xform.cljs$core$IFn$_invoke$arity$2 ? self__.xform.cljs$core$IFn$_invoke$arity$2(G__9302, G__9303) : self__.xform.call(null, G__9302, G__9303);
      }())) {
        if (lt.rest == null) {
        } else {
          lt.rest.stepper = null;
        }
      } else {
        continue;
      }
    } else {
    }
    break;
  }
  if (lt.stepper == null) {
    return null;
  } else {
    return self__.xform.cljs$core$IFn$_invoke$arity$1 ? self__.xform.cljs$core$IFn$_invoke$arity$1(lt) : self__.xform.call(null, lt);
  }
};
cljs.core.Stepper.getBasis = function() {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "xform", "xform", -85179481, null), new cljs.core.Symbol(null, "iter", "iter", -1346195486, null)], null);
};
cljs.core.Stepper.cljs$lang$type = true;
cljs.core.Stepper.cljs$lang$ctorStr = "cljs.core/Stepper";
cljs.core.Stepper.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/Stepper");
};
cljs.core.__GT_Stepper = function cljs$core$__GT_Stepper(xform, iter) {
  return new cljs.core.Stepper(xform, iter);
};
cljs.core.stepper = function cljs$core$stepper(xform, iter) {
  var stepfn = function() {
    var cljs$core$stepper_$_stepfn = null;
    var cljs$core$stepper_$_stepfn__1 = function(result) {
      var lt = cljs.core.reduced_QMARK_(result) ? cljs.core.deref(result) : result;
      lt.stepper = null;
      return result;
    };
    var cljs$core$stepper_$_stepfn__2 = function(result, input) {
      var lt = result;
      lt.first = input;
      lt.rest = cljs.core.lazy_transformer(lt.stepper);
      lt.stepper = null;
      return lt.rest;
    };
    cljs$core$stepper_$_stepfn = function(result, input) {
      switch(arguments.length) {
        case 1:
          return cljs$core$stepper_$_stepfn__1.call(this, result);
        case 2:
          return cljs$core$stepper_$_stepfn__2.call(this, result, input);
      }
      throw new Error("Invalid arity: " + arguments.length);
    };
    cljs$core$stepper_$_stepfn.cljs$core$IFn$_invoke$arity$1 = cljs$core$stepper_$_stepfn__1;
    cljs$core$stepper_$_stepfn.cljs$core$IFn$_invoke$arity$2 = cljs$core$stepper_$_stepfn__2;
    return cljs$core$stepper_$_stepfn;
  }();
  return new cljs.core.Stepper(xform.cljs$core$IFn$_invoke$arity$1 ? xform.cljs$core$IFn$_invoke$arity$1(stepfn) : xform.call(null, stepfn), iter);
};
cljs.core.MultiStepper = function(xform, iters, nexts) {
  this.xform = xform;
  this.iters = iters;
  this.nexts = nexts;
};
cljs.core.MultiStepper.prototype.hasNext = function() {
  var self__ = this;
  var _ = this;
  var iters__$1 = cljs.core.seq(self__.iters);
  while (true) {
    if (!(iters__$1 == null)) {
      var iter = cljs.core.first(iters__$1);
      if (cljs.core.not(iter.hasNext())) {
        return false;
      } else {
        var G__9304 = cljs.core.next(iters__$1);
        iters__$1 = G__9304;
        continue;
      }
    } else {
      return true;
    }
    break;
  }
};
cljs.core.MultiStepper.prototype.next = function() {
  var self__ = this;
  var _ = this;
  var n__7043__auto___9305 = self__.iters.length;
  var i_9306 = 0;
  while (true) {
    if (i_9306 < n__7043__auto___9305) {
      self__.nexts[i_9306] = self__.iters[i_9306].next();
      var G__9307 = i_9306 + 1;
      i_9306 = G__9307;
      continue;
    } else {
    }
    break;
  }
  return cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(self__.nexts, 0);
};
cljs.core.MultiStepper.prototype.step = function(lt) {
  var self__ = this;
  var this$ = this;
  while (true) {
    if (cljs.core.truth_(function() {
      var and__6128__auto__ = !(lt.stepper == null);
      if (and__6128__auto__) {
        return this$.hasNext();
      } else {
        return and__6128__auto__;
      }
    }())) {
      if (cljs.core.reduced_QMARK_(cljs.core.apply.cljs$core$IFn$_invoke$arity$2(self__.xform, cljs.core.cons(lt, this$.next())))) {
        if (lt.rest == null) {
        } else {
          lt.rest.stepper = null;
        }
      } else {
        continue;
      }
    } else {
    }
    break;
  }
  if (lt.stepper == null) {
    return null;
  } else {
    return self__.xform.cljs$core$IFn$_invoke$arity$1 ? self__.xform.cljs$core$IFn$_invoke$arity$1(lt) : self__.xform.call(null, lt);
  }
};
cljs.core.MultiStepper.getBasis = function() {
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "xform", "xform", -85179481, null), new cljs.core.Symbol(null, "iters", "iters", 719353031, null), new cljs.core.Symbol(null, "nexts", "nexts", -1683579407, null)], null);
};
cljs.core.MultiStepper.cljs$lang$type = true;
cljs.core.MultiStepper.cljs$lang$ctorStr = "cljs.core/MultiStepper";
cljs.core.MultiStepper.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/MultiStepper");
};
cljs.core.__GT_MultiStepper = function cljs$core$__GT_MultiStepper(xform, iters, nexts) {
  return new cljs.core.MultiStepper(xform, iters, nexts);
};
cljs.core.multi_stepper = function cljs$core$multi_stepper(var_args) {
  var args9308 = [];
  var len__7198__auto___9311 = arguments.length;
  var i__7199__auto___9312 = 0;
  while (true) {
    if (i__7199__auto___9312 < len__7198__auto___9311) {
      args9308.push(arguments[i__7199__auto___9312]);
      var G__9313 = i__7199__auto___9312 + 1;
      i__7199__auto___9312 = G__9313;
      continue;
    } else {
    }
    break;
  }
  var G__9310 = args9308.length;
  switch(G__9310) {
    case 2:
      return cljs.core.multi_stepper.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.multi_stepper.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9308.length)].join(""));;
  }
};
cljs.core.multi_stepper.cljs$core$IFn$_invoke$arity$2 = function(xform, iters) {
  return cljs.core.multi_stepper.cljs$core$IFn$_invoke$arity$3(xform, iters, new Array(iters.length));
};
cljs.core.multi_stepper.cljs$core$IFn$_invoke$arity$3 = function(xform, iters, nexts) {
  var stepfn = function() {
    var cljs$core$stepfn = null;
    var cljs$core$stepfn__1 = function(result) {
      var lt = cljs.core.reduced_QMARK_(result) ? cljs.core.deref(result) : result;
      lt.stepper = null;
      return lt;
    };
    var cljs$core$stepfn__2 = function(result, input) {
      var lt = result;
      lt.first = input;
      lt.rest = cljs.core.lazy_transformer(lt.stepper);
      lt.stepper = null;
      return lt.rest;
    };
    cljs$core$stepfn = function(result, input) {
      switch(arguments.length) {
        case 1:
          return cljs$core$stepfn__1.call(this, result);
        case 2:
          return cljs$core$stepfn__2.call(this, result, input);
      }
      throw new Error("Invalid arity: " + arguments.length);
    };
    cljs$core$stepfn.cljs$core$IFn$_invoke$arity$1 = cljs$core$stepfn__1;
    cljs$core$stepfn.cljs$core$IFn$_invoke$arity$2 = cljs$core$stepfn__2;
    return cljs$core$stepfn;
  }();
  return new cljs.core.MultiStepper(xform.cljs$core$IFn$_invoke$arity$1 ? xform.cljs$core$IFn$_invoke$arity$1(stepfn) : xform.call(null, stepfn), iters, nexts);
};
cljs.core.multi_stepper.cljs$lang$maxFixedArity = 3;
cljs.core.LazyTransformer = function(stepper, first, rest, meta) {
  this.stepper = stepper;
  this.first = first;
  this.rest = rest;
  this.meta = meta;
  this.cljs$lang$protocol_mask$partition0$ = 31719628;
  this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.LazyTransformer.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(this$, new_meta) {
  var self__ = this;
  var this$__$1 = this;
  return new cljs.core.LazyTransformer(self__.stepper, self__.first, self__.rest, new_meta);
};
cljs.core.LazyTransformer.prototype.cljs$core$ICollection$_conj$arity$2 = function(this$, o) {
  var self__ = this;
  var this$__$1 = this;
  return cljs.core.cons(o, cljs.core._seq(this$__$1));
};
cljs.core.LazyTransformer.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  return cljs.core.List.EMPTY;
};
cljs.core.LazyTransformer.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(this$, other) {
  var self__ = this;
  var this$__$1 = this;
  var s = cljs.core._seq(this$__$1);
  if (!(s == null)) {
    return cljs.core.equiv_sequential(this$__$1, other);
  } else {
    return cljs.core.sequential_QMARK_(other) && cljs.core.seq(other) == null;
  }
};
cljs.core.LazyTransformer.prototype.cljs$core$IHash$_hash$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  return cljs.core.hash_ordered_coll(this$__$1);
};
cljs.core.LazyTransformer.prototype.cljs$core$ISeqable$_seq$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  if (self__.stepper == null) {
  } else {
    self__.stepper.step(this$__$1);
  }
  if (self__.rest == null) {
    return null;
  } else {
    return this$__$1;
  }
};
cljs.core.LazyTransformer.prototype.cljs$core$ISeq$_first$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  if (self__.stepper == null) {
  } else {
    cljs.core._seq(this$__$1);
  }
  if (self__.rest == null) {
    return null;
  } else {
    return self__.first;
  }
};
cljs.core.LazyTransformer.prototype.cljs$core$ISeq$_rest$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  if (self__.stepper == null) {
  } else {
    cljs.core._seq(this$__$1);
  }
  if (self__.rest == null) {
    return cljs.core.List.EMPTY;
  } else {
    return self__.rest;
  }
};
cljs.core.LazyTransformer.prototype.cljs$core$INext$_next$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  if (self__.stepper == null) {
  } else {
    cljs.core._seq(this$__$1);
  }
  if (self__.rest == null) {
    return null;
  } else {
    return cljs.core._seq(self__.rest);
  }
};
cljs.core.LazyTransformer.getBasis = function() {
  return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "stepper", "stepper", 1159163296, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, "first", "first", 996428481, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), 
  cljs.core.with_meta(new cljs.core.Symbol(null, "rest", "rest", 398835108, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), new cljs.core.Symbol(null, "meta", "meta", -1154898805, null)], null);
};
cljs.core.LazyTransformer.cljs$lang$type = true;
cljs.core.LazyTransformer.cljs$lang$ctorStr = "cljs.core/LazyTransformer";
cljs.core.LazyTransformer.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/LazyTransformer");
};
cljs.core.__GT_LazyTransformer = function cljs$core$__GT_LazyTransformer(stepper, first, rest, meta) {
  return new cljs.core.LazyTransformer(stepper, first, rest, meta);
};
cljs.core.LazyTransformer.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.LazyTransformer.create = function(xform, coll) {
  return new cljs.core.LazyTransformer(cljs.core.stepper(xform, cljs.core.iter(coll)), null, null, null);
};
cljs.core.LazyTransformer.createMulti = function(xform, colls) {
  var iters = [];
  var seq__9315_9319 = cljs.core.seq(colls);
  var chunk__9316_9320 = null;
  var count__9317_9321 = 0;
  var i__9318_9322 = 0;
  while (true) {
    if (i__9318_9322 < count__9317_9321) {
      var coll_9323 = chunk__9316_9320.cljs$core$IIndexed$_nth$arity$2(null, i__9318_9322);
      iters.push(cljs.core.iter(coll_9323));
      var G__9324 = seq__9315_9319;
      var G__9325 = chunk__9316_9320;
      var G__9326 = count__9317_9321;
      var G__9327 = i__9318_9322 + 1;
      seq__9315_9319 = G__9324;
      chunk__9316_9320 = G__9325;
      count__9317_9321 = G__9326;
      i__9318_9322 = G__9327;
      continue;
    } else {
      var temp__4425__auto___9328 = cljs.core.seq(seq__9315_9319);
      if (temp__4425__auto___9328) {
        var seq__9315_9329__$1 = temp__4425__auto___9328;
        if (cljs.core.chunked_seq_QMARK_(seq__9315_9329__$1)) {
          var c__6943__auto___9330 = cljs.core.chunk_first(seq__9315_9329__$1);
          var G__9331 = cljs.core.chunk_rest(seq__9315_9329__$1);
          var G__9332 = c__6943__auto___9330;
          var G__9333 = cljs.core.count(c__6943__auto___9330);
          var G__9334 = 0;
          seq__9315_9319 = G__9331;
          chunk__9316_9320 = G__9332;
          count__9317_9321 = G__9333;
          i__9318_9322 = G__9334;
          continue;
        } else {
          var coll_9335 = cljs.core.first(seq__9315_9329__$1);
          iters.push(cljs.core.iter(coll_9335));
          var G__9336 = cljs.core.next(seq__9315_9329__$1);
          var G__9337 = null;
          var G__9338 = 0;
          var G__9339 = 0;
          seq__9315_9319 = G__9336;
          chunk__9316_9320 = G__9337;
          count__9317_9321 = G__9338;
          i__9318_9322 = G__9339;
          continue;
        }
      } else {
      }
    }
    break;
  }
  return new cljs.core.LazyTransformer(cljs.core.multi_stepper.cljs$core$IFn$_invoke$arity$3(xform, iters, new Array(iters.length)), null, null, null);
};
cljs.core.sequence = function cljs$core$sequence(var_args) {
  var args9340 = [];
  var len__7198__auto___9346 = arguments.length;
  var i__7199__auto___9347 = 0;
  while (true) {
    if (i__7199__auto___9347 < len__7198__auto___9346) {
      args9340.push(arguments[i__7199__auto___9347]);
      var G__9348 = i__7199__auto___9347 + 1;
      i__7199__auto___9347 = G__9348;
      continue;
    } else {
    }
    break;
  }
  var G__9345 = args9340.length;
  switch(G__9345) {
    case 1:
      return cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.sequence.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args9340.slice(2), 0);
      return cljs.core.sequence.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.sequence.cljs$core$IFn$_invoke$arity$1 = function(coll) {
  if (cljs.core.seq_QMARK_(coll)) {
    return coll;
  } else {
    var or__6140__auto__ = cljs.core.seq(coll);
    if (or__6140__auto__) {
      return or__6140__auto__;
    } else {
      return cljs.core.List.EMPTY;
    }
  }
};
cljs.core.sequence.cljs$core$IFn$_invoke$arity$2 = function(xform, coll) {
  return cljs.core.LazyTransformer.create(xform, coll);
};
cljs.core.sequence.cljs$core$IFn$_invoke$arity$variadic = function(xform, coll, colls) {
  return cljs.core.LazyTransformer.createMulti(xform, cljs.core.to_array(cljs.core.cons(coll, colls)));
};
cljs.core.sequence.cljs$lang$applyTo = function(seq9341) {
  var G__9342 = cljs.core.first(seq9341);
  var seq9341__$1 = cljs.core.next(seq9341);
  var G__9343 = cljs.core.first(seq9341__$1);
  var seq9341__$2 = cljs.core.next(seq9341__$1);
  return cljs.core.sequence.cljs$core$IFn$_invoke$arity$variadic(G__9342, G__9343, seq9341__$2);
};
cljs.core.sequence.cljs$lang$maxFixedArity = 2;
cljs.core.every_QMARK_ = function cljs$core$every_QMARK_(pred, coll) {
  while (true) {
    if (cljs.core.seq(coll) == null) {
      return true;
    } else {
      if (cljs.core.truth_(function() {
        var G__9351 = cljs.core.first(coll);
        return pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(G__9351) : pred.call(null, G__9351);
      }())) {
        var G__9352 = pred;
        var G__9353 = cljs.core.next(coll);
        pred = G__9352;
        coll = G__9353;
        continue;
      } else {
        return false;
      }
    }
    break;
  }
};
cljs.core.not_every_QMARK_ = function cljs$core$not_every_QMARK_(pred, coll) {
  return !cljs.core.every_QMARK_(pred, coll);
};
cljs.core.some = function cljs$core$some(pred, coll) {
  while (true) {
    if (cljs.core.seq(coll)) {
      var or__6140__auto__ = function() {
        var G__9357 = cljs.core.first(coll);
        return pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(G__9357) : pred.call(null, G__9357);
      }();
      if (cljs.core.truth_(or__6140__auto__)) {
        return or__6140__auto__;
      } else {
        var G__9358 = pred;
        var G__9359 = cljs.core.next(coll);
        pred = G__9358;
        coll = G__9359;
        continue;
      }
    } else {
      return null;
    }
    break;
  }
};
cljs.core.not_any_QMARK_ = function cljs$core$not_any_QMARK_(pred, coll) {
  return cljs.core.not(cljs.core.some(pred, coll));
};
cljs.core.even_QMARK_ = function cljs$core$even_QMARK_(n) {
  if (cljs.core.integer_QMARK_(n)) {
    return (n & 1) === 0;
  } else {
    throw new Error([cljs.core.str("Argument must be an integer: "), cljs.core.str(n)].join(""));
  }
};
cljs.core.odd_QMARK_ = function cljs$core$odd_QMARK_(n) {
  return !cljs.core.even_QMARK_(n);
};
cljs.core.complement = function cljs$core$complement(f) {
  return function() {
    var G__9360 = null;
    var G__9360__0 = function() {
      return cljs.core.not(f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null));
    };
    var G__9360__1 = function(x) {
      return cljs.core.not(f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(x) : f.call(null, x));
    };
    var G__9360__2 = function(x, y) {
      return cljs.core.not(f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(x, y) : f.call(null, x, y));
    };
    var G__9360__3 = function() {
      var G__9361__delegate = function(x, y, zs) {
        return cljs.core.not(cljs.core.apply.cljs$core$IFn$_invoke$arity$4(f, x, y, zs));
      };
      var G__9361 = function(x, y, var_args) {
        var zs = null;
        if (arguments.length > 2) {
          var G__9362__i = 0, G__9362__a = new Array(arguments.length - 2);
          while (G__9362__i < G__9362__a.length) {
            G__9362__a[G__9362__i] = arguments[G__9362__i + 2];
            ++G__9362__i;
          }
          zs = new cljs.core.IndexedSeq(G__9362__a, 0);
        }
        return G__9361__delegate.call(this, x, y, zs);
      };
      G__9361.cljs$lang$maxFixedArity = 2;
      G__9361.cljs$lang$applyTo = function(arglist__9363) {
        var x = cljs.core.first(arglist__9363);
        arglist__9363 = cljs.core.next(arglist__9363);
        var y = cljs.core.first(arglist__9363);
        var zs = cljs.core.rest(arglist__9363);
        return G__9361__delegate(x, y, zs);
      };
      G__9361.cljs$core$IFn$_invoke$arity$variadic = G__9361__delegate;
      return G__9361;
    }();
    G__9360 = function(x, y, var_args) {
      var zs = var_args;
      switch(arguments.length) {
        case 0:
          return G__9360__0.call(this);
        case 1:
          return G__9360__1.call(this, x);
        case 2:
          return G__9360__2.call(this, x, y);
        default:
          var G__9364 = null;
          if (arguments.length > 2) {
            var G__9365__i = 0, G__9365__a = new Array(arguments.length - 2);
            while (G__9365__i < G__9365__a.length) {
              G__9365__a[G__9365__i] = arguments[G__9365__i + 2];
              ++G__9365__i;
            }
            G__9364 = new cljs.core.IndexedSeq(G__9365__a, 0);
          }
          return G__9360__3.cljs$core$IFn$_invoke$arity$variadic(x, y, G__9364);
      }
      throw new Error("Invalid arity: " + arguments.length);
    };
    G__9360.cljs$lang$maxFixedArity = 2;
    G__9360.cljs$lang$applyTo = G__9360__3.cljs$lang$applyTo;
    G__9360.cljs$core$IFn$_invoke$arity$0 = G__9360__0;
    G__9360.cljs$core$IFn$_invoke$arity$1 = G__9360__1;
    G__9360.cljs$core$IFn$_invoke$arity$2 = G__9360__2;
    G__9360.cljs$core$IFn$_invoke$arity$variadic = G__9360__3.cljs$core$IFn$_invoke$arity$variadic;
    return G__9360;
  }();
};
cljs.core.constantly = function cljs$core$constantly(x) {
  return function() {
    var G__9366__delegate = function(args) {
      return x;
    };
    var G__9366 = function(var_args) {
      var args = null;
      if (arguments.length > 0) {
        var G__9367__i = 0, G__9367__a = new Array(arguments.length - 0);
        while (G__9367__i < G__9367__a.length) {
          G__9367__a[G__9367__i] = arguments[G__9367__i + 0];
          ++G__9367__i;
        }
        args = new cljs.core.IndexedSeq(G__9367__a, 0);
      }
      return G__9366__delegate.call(this, args);
    };
    G__9366.cljs$lang$maxFixedArity = 0;
    G__9366.cljs$lang$applyTo = function(arglist__9368) {
      var args = cljs.core.seq(arglist__9368);
      return G__9366__delegate(args);
    };
    G__9366.cljs$core$IFn$_invoke$arity$variadic = G__9366__delegate;
    return G__9366;
  }();
};
cljs.core.comp = function cljs$core$comp(var_args) {
  var args9369 = [];
  var len__7198__auto___9396 = arguments.length;
  var i__7199__auto___9397 = 0;
  while (true) {
    if (i__7199__auto___9397 < len__7198__auto___9396) {
      args9369.push(arguments[i__7199__auto___9397]);
      var G__9398 = i__7199__auto___9397 + 1;
      i__7199__auto___9397 = G__9398;
      continue;
    } else {
    }
    break;
  }
  var G__9375 = args9369.length;
  switch(G__9375) {
    case 0:
      return cljs.core.comp.cljs$core$IFn$_invoke$arity$0();
      break;
    case 1:
      return cljs.core.comp.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.comp.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.comp.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args9369.slice(3), 0);
      return cljs.core.comp.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], argseq__7217__auto__);
  }
};
cljs.core.comp.cljs$core$IFn$_invoke$arity$0 = function() {
  return cljs.core.identity;
};
cljs.core.comp.cljs$core$IFn$_invoke$arity$1 = function(f) {
  return f;
};
cljs.core.comp.cljs$core$IFn$_invoke$arity$2 = function(f, g) {
  return function() {
    var G__9400 = null;
    var G__9400__0 = function() {
      var G__9376 = g.cljs$core$IFn$_invoke$arity$0 ? g.cljs$core$IFn$_invoke$arity$0() : g.call(null);
      return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__9376) : f.call(null, G__9376);
    };
    var G__9400__1 = function(x) {
      var G__9377 = g.cljs$core$IFn$_invoke$arity$1 ? g.cljs$core$IFn$_invoke$arity$1(x) : g.call(null, x);
      return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__9377) : f.call(null, G__9377);
    };
    var G__9400__2 = function(x, y) {
      var G__9378 = g.cljs$core$IFn$_invoke$arity$2 ? g.cljs$core$IFn$_invoke$arity$2(x, y) : g.call(null, x, y);
      return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__9378) : f.call(null, G__9378);
    };
    var G__9400__3 = function(x, y, z) {
      var G__9379 = g.cljs$core$IFn$_invoke$arity$3 ? g.cljs$core$IFn$_invoke$arity$3(x, y, z) : g.call(null, x, y, z);
      return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__9379) : f.call(null, G__9379);
    };
    var G__9400__4 = function() {
      var G__9401__delegate = function(x, y, z, args) {
        var G__9380 = cljs.core.apply.cljs$core$IFn$_invoke$arity$5(g, x, y, z, args);
        return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__9380) : f.call(null, G__9380);
      };
      var G__9401 = function(x, y, z, var_args) {
        var args = null;
        if (arguments.length > 3) {
          var G__9402__i = 0, G__9402__a = new Array(arguments.length - 3);
          while (G__9402__i < G__9402__a.length) {
            G__9402__a[G__9402__i] = arguments[G__9402__i + 3];
            ++G__9402__i;
          }
          args = new cljs.core.IndexedSeq(G__9402__a, 0);
        }
        return G__9401__delegate.call(this, x, y, z, args);
      };
      G__9401.cljs$lang$maxFixedArity = 3;
      G__9401.cljs$lang$applyTo = function(arglist__9403) {
        var x = cljs.core.first(arglist__9403);
        arglist__9403 = cljs.core.next(arglist__9403);
        var y = cljs.core.first(arglist__9403);
        arglist__9403 = cljs.core.next(arglist__9403);
        var z = cljs.core.first(arglist__9403);
        var args = cljs.core.rest(arglist__9403);
        return G__9401__delegate(x, y, z, args);
      };
      G__9401.cljs$core$IFn$_invoke$arity$variadic = G__9401__delegate;
      return G__9401;
    }();
    G__9400 = function(x, y, z, var_args) {
      var args = var_args;
      switch(arguments.length) {
        case 0:
          return G__9400__0.call(this);
        case 1:
          return G__9400__1.call(this, x);
        case 2:
          return G__9400__2.call(this, x, y);
        case 3:
          return G__9400__3.call(this, x, y, z);
        default:
          var G__9404 = null;
          if (arguments.length > 3) {
            var G__9405__i = 0, G__9405__a = new Array(arguments.length - 3);
            while (G__9405__i < G__9405__a.length) {
              G__9405__a[G__9405__i] = arguments[G__9405__i + 3];
              ++G__9405__i;
            }
            G__9404 = new cljs.core.IndexedSeq(G__9405__a, 0);
          }
          return G__9400__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__9404);
      }
      throw new Error("Invalid arity: " + arguments.length);
    };
    G__9400.cljs$lang$maxFixedArity = 3;
    G__9400.cljs$lang$applyTo = G__9400__4.cljs$lang$applyTo;
    G__9400.cljs$core$IFn$_invoke$arity$0 = G__9400__0;
    G__9400.cljs$core$IFn$_invoke$arity$1 = G__9400__1;
    G__9400.cljs$core$IFn$_invoke$arity$2 = G__9400__2;
    G__9400.cljs$core$IFn$_invoke$arity$3 = G__9400__3;
    G__9400.cljs$core$IFn$_invoke$arity$variadic = G__9400__4.cljs$core$IFn$_invoke$arity$variadic;
    return G__9400;
  }();
};
cljs.core.comp.cljs$core$IFn$_invoke$arity$3 = function(f, g, h) {
  return function() {
    var G__9406 = null;
    var G__9406__0 = function() {
      var G__9382 = function() {
        var G__9383 = h.cljs$core$IFn$_invoke$arity$0 ? h.cljs$core$IFn$_invoke$arity$0() : h.call(null);
        return g.cljs$core$IFn$_invoke$arity$1 ? g.cljs$core$IFn$_invoke$arity$1(G__9383) : g.call(null, G__9383);
      }();
      return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__9382) : f.call(null, G__9382);
    };
    var G__9406__1 = function(x) {
      var G__9385 = function() {
        var G__9386 = h.cljs$core$IFn$_invoke$arity$1 ? h.cljs$core$IFn$_invoke$arity$1(x) : h.call(null, x);
        return g.cljs$core$IFn$_invoke$arity$1 ? g.cljs$core$IFn$_invoke$arity$1(G__9386) : g.call(null, G__9386);
      }();
      return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__9385) : f.call(null, G__9385);
    };
    var G__9406__2 = function(x, y) {
      var G__9388 = function() {
        var G__9389 = h.cljs$core$IFn$_invoke$arity$2 ? h.cljs$core$IFn$_invoke$arity$2(x, y) : h.call(null, x, y);
        return g.cljs$core$IFn$_invoke$arity$1 ? g.cljs$core$IFn$_invoke$arity$1(G__9389) : g.call(null, G__9389);
      }();
      return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__9388) : f.call(null, G__9388);
    };
    var G__9406__3 = function(x, y, z) {
      var G__9391 = function() {
        var G__9392 = h.cljs$core$IFn$_invoke$arity$3 ? h.cljs$core$IFn$_invoke$arity$3(x, y, z) : h.call(null, x, y, z);
        return g.cljs$core$IFn$_invoke$arity$1 ? g.cljs$core$IFn$_invoke$arity$1(G__9392) : g.call(null, G__9392);
      }();
      return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__9391) : f.call(null, G__9391);
    };
    var G__9406__4 = function() {
      var G__9407__delegate = function(x, y, z, args) {
        var G__9394 = function() {
          var G__9395 = cljs.core.apply.cljs$core$IFn$_invoke$arity$5(h, x, y, z, args);
          return g.cljs$core$IFn$_invoke$arity$1 ? g.cljs$core$IFn$_invoke$arity$1(G__9395) : g.call(null, G__9395);
        }();
        return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__9394) : f.call(null, G__9394);
      };
      var G__9407 = function(x, y, z, var_args) {
        var args = null;
        if (arguments.length > 3) {
          var G__9408__i = 0, G__9408__a = new Array(arguments.length - 3);
          while (G__9408__i < G__9408__a.length) {
            G__9408__a[G__9408__i] = arguments[G__9408__i + 3];
            ++G__9408__i;
          }
          args = new cljs.core.IndexedSeq(G__9408__a, 0);
        }
        return G__9407__delegate.call(this, x, y, z, args);
      };
      G__9407.cljs$lang$maxFixedArity = 3;
      G__9407.cljs$lang$applyTo = function(arglist__9409) {
        var x = cljs.core.first(arglist__9409);
        arglist__9409 = cljs.core.next(arglist__9409);
        var y = cljs.core.first(arglist__9409);
        arglist__9409 = cljs.core.next(arglist__9409);
        var z = cljs.core.first(arglist__9409);
        var args = cljs.core.rest(arglist__9409);
        return G__9407__delegate(x, y, z, args);
      };
      G__9407.cljs$core$IFn$_invoke$arity$variadic = G__9407__delegate;
      return G__9407;
    }();
    G__9406 = function(x, y, z, var_args) {
      var args = var_args;
      switch(arguments.length) {
        case 0:
          return G__9406__0.call(this);
        case 1:
          return G__9406__1.call(this, x);
        case 2:
          return G__9406__2.call(this, x, y);
        case 3:
          return G__9406__3.call(this, x, y, z);
        default:
          var G__9410 = null;
          if (arguments.length > 3) {
            var G__9411__i = 0, G__9411__a = new Array(arguments.length - 3);
            while (G__9411__i < G__9411__a.length) {
              G__9411__a[G__9411__i] = arguments[G__9411__i + 3];
              ++G__9411__i;
            }
            G__9410 = new cljs.core.IndexedSeq(G__9411__a, 0);
          }
          return G__9406__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__9410);
      }
      throw new Error("Invalid arity: " + arguments.length);
    };
    G__9406.cljs$lang$maxFixedArity = 3;
    G__9406.cljs$lang$applyTo = G__9406__4.cljs$lang$applyTo;
    G__9406.cljs$core$IFn$_invoke$arity$0 = G__9406__0;
    G__9406.cljs$core$IFn$_invoke$arity$1 = G__9406__1;
    G__9406.cljs$core$IFn$_invoke$arity$2 = G__9406__2;
    G__9406.cljs$core$IFn$_invoke$arity$3 = G__9406__3;
    G__9406.cljs$core$IFn$_invoke$arity$variadic = G__9406__4.cljs$core$IFn$_invoke$arity$variadic;
    return G__9406;
  }();
};
cljs.core.comp.cljs$core$IFn$_invoke$arity$variadic = function(f1, f2, f3, fs) {
  var fs__$1 = cljs.core.reverse(cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$4(f1, f2, f3, fs));
  return function(fs__$1) {
    return function() {
      var G__9412__delegate = function(args) {
        var ret = cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.first(fs__$1), args);
        var fs__$2 = cljs.core.next(fs__$1);
        while (true) {
          if (fs__$2) {
            var G__9413 = cljs.core.first(fs__$2).call(null, ret);
            var G__9414 = cljs.core.next(fs__$2);
            ret = G__9413;
            fs__$2 = G__9414;
            continue;
          } else {
            return ret;
          }
          break;
        }
      };
      var G__9412 = function(var_args) {
        var args = null;
        if (arguments.length > 0) {
          var G__9415__i = 0, G__9415__a = new Array(arguments.length - 0);
          while (G__9415__i < G__9415__a.length) {
            G__9415__a[G__9415__i] = arguments[G__9415__i + 0];
            ++G__9415__i;
          }
          args = new cljs.core.IndexedSeq(G__9415__a, 0);
        }
        return G__9412__delegate.call(this, args);
      };
      G__9412.cljs$lang$maxFixedArity = 0;
      G__9412.cljs$lang$applyTo = function(arglist__9416) {
        var args = cljs.core.seq(arglist__9416);
        return G__9412__delegate(args);
      };
      G__9412.cljs$core$IFn$_invoke$arity$variadic = G__9412__delegate;
      return G__9412;
    }();
  }(fs__$1);
};
cljs.core.comp.cljs$lang$applyTo = function(seq9370) {
  var G__9371 = cljs.core.first(seq9370);
  var seq9370__$1 = cljs.core.next(seq9370);
  var G__9372 = cljs.core.first(seq9370__$1);
  var seq9370__$2 = cljs.core.next(seq9370__$1);
  var G__9373 = cljs.core.first(seq9370__$2);
  var seq9370__$3 = cljs.core.next(seq9370__$2);
  return cljs.core.comp.cljs$core$IFn$_invoke$arity$variadic(G__9371, G__9372, G__9373, seq9370__$3);
};
cljs.core.comp.cljs$lang$maxFixedArity = 3;
cljs.core.partial = function cljs$core$partial(var_args) {
  var args9417 = [];
  var len__7198__auto___9425 = arguments.length;
  var i__7199__auto___9426 = 0;
  while (true) {
    if (i__7199__auto___9426 < len__7198__auto___9425) {
      args9417.push(arguments[i__7199__auto___9426]);
      var G__9427 = i__7199__auto___9426 + 1;
      i__7199__auto___9426 = G__9427;
      continue;
    } else {
    }
    break;
  }
  var G__9424 = args9417.length;
  switch(G__9424) {
    case 1:
      return cljs.core.partial.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.partial.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.partial.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 4:
      return cljs.core.partial.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args9417.slice(4), 0);
      return cljs.core.partial.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], arguments[3], argseq__7217__auto__);
  }
};
cljs.core.partial.cljs$core$IFn$_invoke$arity$1 = function(f) {
  return f;
};
cljs.core.partial.cljs$core$IFn$_invoke$arity$2 = function(f, arg1) {
  return function() {
    var G__9429 = null;
    var G__9429__0 = function() {
      return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(arg1) : f.call(null, arg1);
    };
    var G__9429__1 = function(x) {
      return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(arg1, x) : f.call(null, arg1, x);
    };
    var G__9429__2 = function(x, y) {
      return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(arg1, x, y) : f.call(null, arg1, x, y);
    };
    var G__9429__3 = function(x, y, z) {
      return f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(arg1, x, y, z) : f.call(null, arg1, x, y, z);
    };
    var G__9429__4 = function() {
      var G__9430__delegate = function(x, y, z, args) {
        return cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(f, arg1, x, y, z, cljs.core.array_seq([args], 0));
      };
      var G__9430 = function(x, y, z, var_args) {
        var args = null;
        if (arguments.length > 3) {
          var G__9431__i = 0, G__9431__a = new Array(arguments.length - 3);
          while (G__9431__i < G__9431__a.length) {
            G__9431__a[G__9431__i] = arguments[G__9431__i + 3];
            ++G__9431__i;
          }
          args = new cljs.core.IndexedSeq(G__9431__a, 0);
        }
        return G__9430__delegate.call(this, x, y, z, args);
      };
      G__9430.cljs$lang$maxFixedArity = 3;
      G__9430.cljs$lang$applyTo = function(arglist__9432) {
        var x = cljs.core.first(arglist__9432);
        arglist__9432 = cljs.core.next(arglist__9432);
        var y = cljs.core.first(arglist__9432);
        arglist__9432 = cljs.core.next(arglist__9432);
        var z = cljs.core.first(arglist__9432);
        var args = cljs.core.rest(arglist__9432);
        return G__9430__delegate(x, y, z, args);
      };
      G__9430.cljs$core$IFn$_invoke$arity$variadic = G__9430__delegate;
      return G__9430;
    }();
    G__9429 = function(x, y, z, var_args) {
      var args = var_args;
      switch(arguments.length) {
        case 0:
          return G__9429__0.call(this);
        case 1:
          return G__9429__1.call(this, x);
        case 2:
          return G__9429__2.call(this, x, y);
        case 3:
          return G__9429__3.call(this, x, y, z);
        default:
          var G__9433 = null;
          if (arguments.length > 3) {
            var G__9434__i = 0, G__9434__a = new Array(arguments.length - 3);
            while (G__9434__i < G__9434__a.length) {
              G__9434__a[G__9434__i] = arguments[G__9434__i + 3];
              ++G__9434__i;
            }
            G__9433 = new cljs.core.IndexedSeq(G__9434__a, 0);
          }
          return G__9429__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__9433);
      }
      throw new Error("Invalid arity: " + arguments.length);
    };
    G__9429.cljs$lang$maxFixedArity = 3;
    G__9429.cljs$lang$applyTo = G__9429__4.cljs$lang$applyTo;
    G__9429.cljs$core$IFn$_invoke$arity$0 = G__9429__0;
    G__9429.cljs$core$IFn$_invoke$arity$1 = G__9429__1;
    G__9429.cljs$core$IFn$_invoke$arity$2 = G__9429__2;
    G__9429.cljs$core$IFn$_invoke$arity$3 = G__9429__3;
    G__9429.cljs$core$IFn$_invoke$arity$variadic = G__9429__4.cljs$core$IFn$_invoke$arity$variadic;
    return G__9429;
  }();
};
cljs.core.partial.cljs$core$IFn$_invoke$arity$3 = function(f, arg1, arg2) {
  return function() {
    var G__9435 = null;
    var G__9435__0 = function() {
      return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(arg1, arg2) : f.call(null, arg1, arg2);
    };
    var G__9435__1 = function(x) {
      return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(arg1, arg2, x) : f.call(null, arg1, arg2, x);
    };
    var G__9435__2 = function(x, y) {
      return f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(arg1, arg2, x, y) : f.call(null, arg1, arg2, x, y);
    };
    var G__9435__3 = function(x, y, z) {
      return f.cljs$core$IFn$_invoke$arity$5 ? f.cljs$core$IFn$_invoke$arity$5(arg1, arg2, x, y, z) : f.call(null, arg1, arg2, x, y, z);
    };
    var G__9435__4 = function() {
      var G__9436__delegate = function(x, y, z, args) {
        return cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(f, arg1, arg2, x, y, cljs.core.array_seq([z, args], 0));
      };
      var G__9436 = function(x, y, z, var_args) {
        var args = null;
        if (arguments.length > 3) {
          var G__9437__i = 0, G__9437__a = new Array(arguments.length - 3);
          while (G__9437__i < G__9437__a.length) {
            G__9437__a[G__9437__i] = arguments[G__9437__i + 3];
            ++G__9437__i;
          }
          args = new cljs.core.IndexedSeq(G__9437__a, 0);
        }
        return G__9436__delegate.call(this, x, y, z, args);
      };
      G__9436.cljs$lang$maxFixedArity = 3;
      G__9436.cljs$lang$applyTo = function(arglist__9438) {
        var x = cljs.core.first(arglist__9438);
        arglist__9438 = cljs.core.next(arglist__9438);
        var y = cljs.core.first(arglist__9438);
        arglist__9438 = cljs.core.next(arglist__9438);
        var z = cljs.core.first(arglist__9438);
        var args = cljs.core.rest(arglist__9438);
        return G__9436__delegate(x, y, z, args);
      };
      G__9436.cljs$core$IFn$_invoke$arity$variadic = G__9436__delegate;
      return G__9436;
    }();
    G__9435 = function(x, y, z, var_args) {
      var args = var_args;
      switch(arguments.length) {
        case 0:
          return G__9435__0.call(this);
        case 1:
          return G__9435__1.call(this, x);
        case 2:
          return G__9435__2.call(this, x, y);
        case 3:
          return G__9435__3.call(this, x, y, z);
        default:
          var G__9439 = null;
          if (arguments.length > 3) {
            var G__9440__i = 0, G__9440__a = new Array(arguments.length - 3);
            while (G__9440__i < G__9440__a.length) {
              G__9440__a[G__9440__i] = arguments[G__9440__i + 3];
              ++G__9440__i;
            }
            G__9439 = new cljs.core.IndexedSeq(G__9440__a, 0);
          }
          return G__9435__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__9439);
      }
      throw new Error("Invalid arity: " + arguments.length);
    };
    G__9435.cljs$lang$maxFixedArity = 3;
    G__9435.cljs$lang$applyTo = G__9435__4.cljs$lang$applyTo;
    G__9435.cljs$core$IFn$_invoke$arity$0 = G__9435__0;
    G__9435.cljs$core$IFn$_invoke$arity$1 = G__9435__1;
    G__9435.cljs$core$IFn$_invoke$arity$2 = G__9435__2;
    G__9435.cljs$core$IFn$_invoke$arity$3 = G__9435__3;
    G__9435.cljs$core$IFn$_invoke$arity$variadic = G__9435__4.cljs$core$IFn$_invoke$arity$variadic;
    return G__9435;
  }();
};
cljs.core.partial.cljs$core$IFn$_invoke$arity$4 = function(f, arg1, arg2, arg3) {
  return function() {
    var G__9441 = null;
    var G__9441__0 = function() {
      return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(arg1, arg2, arg3) : f.call(null, arg1, arg2, arg3);
    };
    var G__9441__1 = function(x) {
      return f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(arg1, arg2, arg3, x) : f.call(null, arg1, arg2, arg3, x);
    };
    var G__9441__2 = function(x, y) {
      return f.cljs$core$IFn$_invoke$arity$5 ? f.cljs$core$IFn$_invoke$arity$5(arg1, arg2, arg3, x, y) : f.call(null, arg1, arg2, arg3, x, y);
    };
    var G__9441__3 = function(x, y, z) {
      return f.cljs$core$IFn$_invoke$arity$6 ? f.cljs$core$IFn$_invoke$arity$6(arg1, arg2, arg3, x, y, z) : f.call(null, arg1, arg2, arg3, x, y, z);
    };
    var G__9441__4 = function() {
      var G__9442__delegate = function(x, y, z, args) {
        return cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(f, arg1, arg2, arg3, x, cljs.core.array_seq([y, z, args], 0));
      };
      var G__9442 = function(x, y, z, var_args) {
        var args = null;
        if (arguments.length > 3) {
          var G__9443__i = 0, G__9443__a = new Array(arguments.length - 3);
          while (G__9443__i < G__9443__a.length) {
            G__9443__a[G__9443__i] = arguments[G__9443__i + 3];
            ++G__9443__i;
          }
          args = new cljs.core.IndexedSeq(G__9443__a, 0);
        }
        return G__9442__delegate.call(this, x, y, z, args);
      };
      G__9442.cljs$lang$maxFixedArity = 3;
      G__9442.cljs$lang$applyTo = function(arglist__9444) {
        var x = cljs.core.first(arglist__9444);
        arglist__9444 = cljs.core.next(arglist__9444);
        var y = cljs.core.first(arglist__9444);
        arglist__9444 = cljs.core.next(arglist__9444);
        var z = cljs.core.first(arglist__9444);
        var args = cljs.core.rest(arglist__9444);
        return G__9442__delegate(x, y, z, args);
      };
      G__9442.cljs$core$IFn$_invoke$arity$variadic = G__9442__delegate;
      return G__9442;
    }();
    G__9441 = function(x, y, z, var_args) {
      var args = var_args;
      switch(arguments.length) {
        case 0:
          return G__9441__0.call(this);
        case 1:
          return G__9441__1.call(this, x);
        case 2:
          return G__9441__2.call(this, x, y);
        case 3:
          return G__9441__3.call(this, x, y, z);
        default:
          var G__9445 = null;
          if (arguments.length > 3) {
            var G__9446__i = 0, G__9446__a = new Array(arguments.length - 3);
            while (G__9446__i < G__9446__a.length) {
              G__9446__a[G__9446__i] = arguments[G__9446__i + 3];
              ++G__9446__i;
            }
            G__9445 = new cljs.core.IndexedSeq(G__9446__a, 0);
          }
          return G__9441__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__9445);
      }
      throw new Error("Invalid arity: " + arguments.length);
    };
    G__9441.cljs$lang$maxFixedArity = 3;
    G__9441.cljs$lang$applyTo = G__9441__4.cljs$lang$applyTo;
    G__9441.cljs$core$IFn$_invoke$arity$0 = G__9441__0;
    G__9441.cljs$core$IFn$_invoke$arity$1 = G__9441__1;
    G__9441.cljs$core$IFn$_invoke$arity$2 = G__9441__2;
    G__9441.cljs$core$IFn$_invoke$arity$3 = G__9441__3;
    G__9441.cljs$core$IFn$_invoke$arity$variadic = G__9441__4.cljs$core$IFn$_invoke$arity$variadic;
    return G__9441;
  }();
};
cljs.core.partial.cljs$core$IFn$_invoke$arity$variadic = function(f, arg1, arg2, arg3, more) {
  return function() {
    var G__9447__delegate = function(args) {
      return cljs.core.apply.cljs$core$IFn$_invoke$arity$5(f, arg1, arg2, arg3, cljs.core.concat.cljs$core$IFn$_invoke$arity$2(more, args));
    };
    var G__9447 = function(var_args) {
      var args = null;
      if (arguments.length > 0) {
        var G__9448__i = 0, G__9448__a = new Array(arguments.length - 0);
        while (G__9448__i < G__9448__a.length) {
          G__9448__a[G__9448__i] = arguments[G__9448__i + 0];
          ++G__9448__i;
        }
        args = new cljs.core.IndexedSeq(G__9448__a, 0);
      }
      return G__9447__delegate.call(this, args);
    };
    G__9447.cljs$lang$maxFixedArity = 0;
    G__9447.cljs$lang$applyTo = function(arglist__9449) {
      var args = cljs.core.seq(arglist__9449);
      return G__9447__delegate(args);
    };
    G__9447.cljs$core$IFn$_invoke$arity$variadic = G__9447__delegate;
    return G__9447;
  }();
};
cljs.core.partial.cljs$lang$applyTo = function(seq9418) {
  var G__9419 = cljs.core.first(seq9418);
  var seq9418__$1 = cljs.core.next(seq9418);
  var G__9420 = cljs.core.first(seq9418__$1);
  var seq9418__$2 = cljs.core.next(seq9418__$1);
  var G__9421 = cljs.core.first(seq9418__$2);
  var seq9418__$3 = cljs.core.next(seq9418__$2);
  var G__9422 = cljs.core.first(seq9418__$3);
  var seq9418__$4 = cljs.core.next(seq9418__$3);
  return cljs.core.partial.cljs$core$IFn$_invoke$arity$variadic(G__9419, G__9420, G__9421, G__9422, seq9418__$4);
};
cljs.core.partial.cljs$lang$maxFixedArity = 4;
cljs.core.fnil = function cljs$core$fnil(var_args) {
  var args9450 = [];
  var len__7198__auto___9469 = arguments.length;
  var i__7199__auto___9470 = 0;
  while (true) {
    if (i__7199__auto___9470 < len__7198__auto___9469) {
      args9450.push(arguments[i__7199__auto___9470]);
      var G__9471 = i__7199__auto___9470 + 1;
      i__7199__auto___9470 = G__9471;
      continue;
    } else {
    }
    break;
  }
  var G__9452 = args9450.length;
  switch(G__9452) {
    case 2:
      return cljs.core.fnil.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.fnil.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 4:
      return cljs.core.fnil.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9450.length)].join(""));;
  }
};
cljs.core.fnil.cljs$core$IFn$_invoke$arity$2 = function(f, x) {
  return function() {
    var G__9473 = null;
    var G__9473__1 = function(a) {
      var G__9453 = a == null ? x : a;
      return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__9453) : f.call(null, G__9453);
    };
    var G__9473__2 = function(a, b) {
      var G__9454 = a == null ? x : a;
      var G__9455 = b;
      return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__9454, G__9455) : f.call(null, G__9454, G__9455);
    };
    var G__9473__3 = function(a, b, c) {
      var G__9456 = a == null ? x : a;
      var G__9457 = b;
      var G__9458 = c;
      return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__9456, G__9457, G__9458) : f.call(null, G__9456, G__9457, G__9458);
    };
    var G__9473__4 = function() {
      var G__9474__delegate = function(a, b, c, ds) {
        return cljs.core.apply.cljs$core$IFn$_invoke$arity$5(f, a == null ? x : a, b, c, ds);
      };
      var G__9474 = function(a, b, c, var_args) {
        var ds = null;
        if (arguments.length > 3) {
          var G__9475__i = 0, G__9475__a = new Array(arguments.length - 3);
          while (G__9475__i < G__9475__a.length) {
            G__9475__a[G__9475__i] = arguments[G__9475__i + 3];
            ++G__9475__i;
          }
          ds = new cljs.core.IndexedSeq(G__9475__a, 0);
        }
        return G__9474__delegate.call(this, a, b, c, ds);
      };
      G__9474.cljs$lang$maxFixedArity = 3;
      G__9474.cljs$lang$applyTo = function(arglist__9476) {
        var a = cljs.core.first(arglist__9476);
        arglist__9476 = cljs.core.next(arglist__9476);
        var b = cljs.core.first(arglist__9476);
        arglist__9476 = cljs.core.next(arglist__9476);
        var c = cljs.core.first(arglist__9476);
        var ds = cljs.core.rest(arglist__9476);
        return G__9474__delegate(a, b, c, ds);
      };
      G__9474.cljs$core$IFn$_invoke$arity$variadic = G__9474__delegate;
      return G__9474;
    }();
    G__9473 = function(a, b, c, var_args) {
      var ds = var_args;
      switch(arguments.length) {
        case 1:
          return G__9473__1.call(this, a);
        case 2:
          return G__9473__2.call(this, a, b);
        case 3:
          return G__9473__3.call(this, a, b, c);
        default:
          var G__9477 = null;
          if (arguments.length > 3) {
            var G__9478__i = 0, G__9478__a = new Array(arguments.length - 3);
            while (G__9478__i < G__9478__a.length) {
              G__9478__a[G__9478__i] = arguments[G__9478__i + 3];
              ++G__9478__i;
            }
            G__9477 = new cljs.core.IndexedSeq(G__9478__a, 0);
          }
          return G__9473__4.cljs$core$IFn$_invoke$arity$variadic(a, b, c, G__9477);
      }
      throw new Error("Invalid arity: " + arguments.length);
    };
    G__9473.cljs$lang$maxFixedArity = 3;
    G__9473.cljs$lang$applyTo = G__9473__4.cljs$lang$applyTo;
    G__9473.cljs$core$IFn$_invoke$arity$1 = G__9473__1;
    G__9473.cljs$core$IFn$_invoke$arity$2 = G__9473__2;
    G__9473.cljs$core$IFn$_invoke$arity$3 = G__9473__3;
    G__9473.cljs$core$IFn$_invoke$arity$variadic = G__9473__4.cljs$core$IFn$_invoke$arity$variadic;
    return G__9473;
  }();
};
cljs.core.fnil.cljs$core$IFn$_invoke$arity$3 = function(f, x, y) {
  return function() {
    var G__9479 = null;
    var G__9479__2 = function(a, b) {
      var G__9459 = a == null ? x : a;
      var G__9460 = b == null ? y : b;
      return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__9459, G__9460) : f.call(null, G__9459, G__9460);
    };
    var G__9479__3 = function(a, b, c) {
      var G__9461 = a == null ? x : a;
      var G__9462 = b == null ? y : b;
      var G__9463 = c;
      return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__9461, G__9462, G__9463) : f.call(null, G__9461, G__9462, G__9463);
    };
    var G__9479__4 = function() {
      var G__9480__delegate = function(a, b, c, ds) {
        return cljs.core.apply.cljs$core$IFn$_invoke$arity$5(f, a == null ? x : a, b == null ? y : b, c, ds);
      };
      var G__9480 = function(a, b, c, var_args) {
        var ds = null;
        if (arguments.length > 3) {
          var G__9481__i = 0, G__9481__a = new Array(arguments.length - 3);
          while (G__9481__i < G__9481__a.length) {
            G__9481__a[G__9481__i] = arguments[G__9481__i + 3];
            ++G__9481__i;
          }
          ds = new cljs.core.IndexedSeq(G__9481__a, 0);
        }
        return G__9480__delegate.call(this, a, b, c, ds);
      };
      G__9480.cljs$lang$maxFixedArity = 3;
      G__9480.cljs$lang$applyTo = function(arglist__9482) {
        var a = cljs.core.first(arglist__9482);
        arglist__9482 = cljs.core.next(arglist__9482);
        var b = cljs.core.first(arglist__9482);
        arglist__9482 = cljs.core.next(arglist__9482);
        var c = cljs.core.first(arglist__9482);
        var ds = cljs.core.rest(arglist__9482);
        return G__9480__delegate(a, b, c, ds);
      };
      G__9480.cljs$core$IFn$_invoke$arity$variadic = G__9480__delegate;
      return G__9480;
    }();
    G__9479 = function(a, b, c, var_args) {
      var ds = var_args;
      switch(arguments.length) {
        case 2:
          return G__9479__2.call(this, a, b);
        case 3:
          return G__9479__3.call(this, a, b, c);
        default:
          var G__9483 = null;
          if (arguments.length > 3) {
            var G__9484__i = 0, G__9484__a = new Array(arguments.length - 3);
            while (G__9484__i < G__9484__a.length) {
              G__9484__a[G__9484__i] = arguments[G__9484__i + 3];
              ++G__9484__i;
            }
            G__9483 = new cljs.core.IndexedSeq(G__9484__a, 0);
          }
          return G__9479__4.cljs$core$IFn$_invoke$arity$variadic(a, b, c, G__9483);
      }
      throw new Error("Invalid arity: " + arguments.length);
    };
    G__9479.cljs$lang$maxFixedArity = 3;
    G__9479.cljs$lang$applyTo = G__9479__4.cljs$lang$applyTo;
    G__9479.cljs$core$IFn$_invoke$arity$2 = G__9479__2;
    G__9479.cljs$core$IFn$_invoke$arity$3 = G__9479__3;
    G__9479.cljs$core$IFn$_invoke$arity$variadic = G__9479__4.cljs$core$IFn$_invoke$arity$variadic;
    return G__9479;
  }();
};
cljs.core.fnil.cljs$core$IFn$_invoke$arity$4 = function(f, x, y, z) {
  return function() {
    var G__9485 = null;
    var G__9485__2 = function(a, b) {
      var G__9464 = a == null ? x : a;
      var G__9465 = b == null ? y : b;
      return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__9464, G__9465) : f.call(null, G__9464, G__9465);
    };
    var G__9485__3 = function(a, b, c) {
      var G__9466 = a == null ? x : a;
      var G__9467 = b == null ? y : b;
      var G__9468 = c == null ? z : c;
      return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__9466, G__9467, G__9468) : f.call(null, G__9466, G__9467, G__9468);
    };
    var G__9485__4 = function() {
      var G__9486__delegate = function(a, b, c, ds) {
        return cljs.core.apply.cljs$core$IFn$_invoke$arity$5(f, a == null ? x : a, b == null ? y : b, c == null ? z : c, ds);
      };
      var G__9486 = function(a, b, c, var_args) {
        var ds = null;
        if (arguments.length > 3) {
          var G__9487__i = 0, G__9487__a = new Array(arguments.length - 3);
          while (G__9487__i < G__9487__a.length) {
            G__9487__a[G__9487__i] = arguments[G__9487__i + 3];
            ++G__9487__i;
          }
          ds = new cljs.core.IndexedSeq(G__9487__a, 0);
        }
        return G__9486__delegate.call(this, a, b, c, ds);
      };
      G__9486.cljs$lang$maxFixedArity = 3;
      G__9486.cljs$lang$applyTo = function(arglist__9488) {
        var a = cljs.core.first(arglist__9488);
        arglist__9488 = cljs.core.next(arglist__9488);
        var b = cljs.core.first(arglist__9488);
        arglist__9488 = cljs.core.next(arglist__9488);
        var c = cljs.core.first(arglist__9488);
        var ds = cljs.core.rest(arglist__9488);
        return G__9486__delegate(a, b, c, ds);
      };
      G__9486.cljs$core$IFn$_invoke$arity$variadic = G__9486__delegate;
      return G__9486;
    }();
    G__9485 = function(a, b, c, var_args) {
      var ds = var_args;
      switch(arguments.length) {
        case 2:
          return G__9485__2.call(this, a, b);
        case 3:
          return G__9485__3.call(this, a, b, c);
        default:
          var G__9489 = null;
          if (arguments.length > 3) {
            var G__9490__i = 0, G__9490__a = new Array(arguments.length - 3);
            while (G__9490__i < G__9490__a.length) {
              G__9490__a[G__9490__i] = arguments[G__9490__i + 3];
              ++G__9490__i;
            }
            G__9489 = new cljs.core.IndexedSeq(G__9490__a, 0);
          }
          return G__9485__4.cljs$core$IFn$_invoke$arity$variadic(a, b, c, G__9489);
      }
      throw new Error("Invalid arity: " + arguments.length);
    };
    G__9485.cljs$lang$maxFixedArity = 3;
    G__9485.cljs$lang$applyTo = G__9485__4.cljs$lang$applyTo;
    G__9485.cljs$core$IFn$_invoke$arity$2 = G__9485__2;
    G__9485.cljs$core$IFn$_invoke$arity$3 = G__9485__3;
    G__9485.cljs$core$IFn$_invoke$arity$variadic = G__9485__4.cljs$core$IFn$_invoke$arity$variadic;
    return G__9485;
  }();
};
cljs.core.fnil.cljs$lang$maxFixedArity = 4;
cljs.core.map_indexed = function cljs$core$map_indexed(var_args) {
  var args9491 = [];
  var len__7198__auto___9524 = arguments.length;
  var i__7199__auto___9525 = 0;
  while (true) {
    if (i__7199__auto___9525 < len__7198__auto___9524) {
      args9491.push(arguments[i__7199__auto___9525]);
      var G__9526 = i__7199__auto___9525 + 1;
      i__7199__auto___9525 = G__9526;
      continue;
    } else {
    }
    break;
  }
  var G__9493 = args9491.length;
  switch(G__9493) {
    case 1:
      return cljs.core.map_indexed.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.map_indexed.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9491.length)].join(""));;
  }
};
cljs.core.map_indexed.cljs$core$IFn$_invoke$arity$1 = function(f) {
  return function(rf) {
    var i = cljs.core.volatile_BANG_.cljs$core$IFn$_invoke$arity$1 ? cljs.core.volatile_BANG_.cljs$core$IFn$_invoke$arity$1(-1) : cljs.core.volatile_BANG_.call(null, -1);
    return function(i) {
      return function() {
        var G__9528 = null;
        var G__9528__0 = function() {
          return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
        };
        var G__9528__1 = function(result) {
          return rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null, result);
        };
        var G__9528__2 = function(result, input) {
          var G__9496 = result;
          var G__9497 = function() {
            var G__9498 = cljs.core._vreset_BANG_(i, cljs.core._deref(i) + 1);
            var G__9499 = input;
            return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__9498, G__9499) : f.call(null, G__9498, G__9499);
          }();
          return rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(G__9496, G__9497) : rf.call(null, G__9496, G__9497);
        };
        G__9528 = function(result, input) {
          switch(arguments.length) {
            case 0:
              return G__9528__0.call(this);
            case 1:
              return G__9528__1.call(this, result);
            case 2:
              return G__9528__2.call(this, result, input);
          }
          throw new Error("Invalid arity: " + arguments.length);
        };
        G__9528.cljs$core$IFn$_invoke$arity$0 = G__9528__0;
        G__9528.cljs$core$IFn$_invoke$arity$1 = G__9528__1;
        G__9528.cljs$core$IFn$_invoke$arity$2 = G__9528__2;
        return G__9528;
      }();
    }(i);
  };
};
cljs.core.map_indexed.cljs$core$IFn$_invoke$arity$2 = function(f, coll) {
  var mapi = function cljs$core$mapi(idx, coll__$1) {
    return new cljs.core.LazySeq(null, function() {
      var temp__4425__auto__ = cljs.core.seq(coll__$1);
      if (temp__4425__auto__) {
        var s = temp__4425__auto__;
        if (cljs.core.chunked_seq_QMARK_(s)) {
          var c = cljs.core.chunk_first(s);
          var size = cljs.core.count(c);
          var b = cljs.core.chunk_buffer(size);
          var n__7043__auto___9529 = size;
          var i_9530 = 0;
          while (true) {
            if (i_9530 < n__7043__auto___9529) {
              cljs.core.chunk_append(b, function() {
                var G__9520 = idx + i_9530;
                var G__9521 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(c, i_9530);
                return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__9520, G__9521) : f.call(null, G__9520, G__9521);
              }());
              var G__9531 = i_9530 + 1;
              i_9530 = G__9531;
              continue;
            } else {
            }
            break;
          }
          return cljs.core.chunk_cons(cljs.core.chunk(b), cljs$core$mapi(idx + size, cljs.core.chunk_rest(s)));
        } else {
          return cljs.core.cons(function() {
            var G__9522 = idx;
            var G__9523 = cljs.core.first(s);
            return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__9522, G__9523) : f.call(null, G__9522, G__9523);
          }(), cljs$core$mapi(idx + 1, cljs.core.rest(s)));
        }
      } else {
        return null;
      }
    }, null, null);
  };
  return mapi(0, coll);
};
cljs.core.map_indexed.cljs$lang$maxFixedArity = 2;
cljs.core.keep = function cljs$core$keep(var_args) {
  var args9532 = [];
  var len__7198__auto___9537 = arguments.length;
  var i__7199__auto___9538 = 0;
  while (true) {
    if (i__7199__auto___9538 < len__7198__auto___9537) {
      args9532.push(arguments[i__7199__auto___9538]);
      var G__9539 = i__7199__auto___9538 + 1;
      i__7199__auto___9538 = G__9539;
      continue;
    } else {
    }
    break;
  }
  var G__9534 = args9532.length;
  switch(G__9534) {
    case 1:
      return cljs.core.keep.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.keep.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9532.length)].join(""));;
  }
};
cljs.core.keep.cljs$core$IFn$_invoke$arity$1 = function(f) {
  return function(rf) {
    return function() {
      var G__9541 = null;
      var G__9541__0 = function() {
        return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
      };
      var G__9541__1 = function(result) {
        return rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null, result);
      };
      var G__9541__2 = function(result, input) {
        var v = f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(input) : f.call(null, input);
        if (v == null) {
          return result;
        } else {
          return rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result, v) : rf.call(null, result, v);
        }
      };
      G__9541 = function(result, input) {
        switch(arguments.length) {
          case 0:
            return G__9541__0.call(this);
          case 1:
            return G__9541__1.call(this, result);
          case 2:
            return G__9541__2.call(this, result, input);
        }
        throw new Error("Invalid arity: " + arguments.length);
      };
      G__9541.cljs$core$IFn$_invoke$arity$0 = G__9541__0;
      G__9541.cljs$core$IFn$_invoke$arity$1 = G__9541__1;
      G__9541.cljs$core$IFn$_invoke$arity$2 = G__9541__2;
      return G__9541;
    }();
  };
};
cljs.core.keep.cljs$core$IFn$_invoke$arity$2 = function(f, coll) {
  return new cljs.core.LazySeq(null, function() {
    var temp__4425__auto__ = cljs.core.seq(coll);
    if (temp__4425__auto__) {
      var s = temp__4425__auto__;
      if (cljs.core.chunked_seq_QMARK_(s)) {
        var c = cljs.core.chunk_first(s);
        var size = cljs.core.count(c);
        var b = cljs.core.chunk_buffer(size);
        var n__7043__auto___9542 = size;
        var i_9543 = 0;
        while (true) {
          if (i_9543 < n__7043__auto___9542) {
            var x_9544 = function() {
              var G__9535 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(c, i_9543);
              return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__9535) : f.call(null, G__9535);
            }();
            if (x_9544 == null) {
            } else {
              cljs.core.chunk_append(b, x_9544);
            }
            var G__9545 = i_9543 + 1;
            i_9543 = G__9545;
            continue;
          } else {
          }
          break;
        }
        return cljs.core.chunk_cons(cljs.core.chunk(b), cljs.core.keep.cljs$core$IFn$_invoke$arity$2(f, cljs.core.chunk_rest(s)));
      } else {
        var x = function() {
          var G__9536 = cljs.core.first(s);
          return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__9536) : f.call(null, G__9536);
        }();
        if (x == null) {
          return cljs.core.keep.cljs$core$IFn$_invoke$arity$2(f, cljs.core.rest(s));
        } else {
          return cljs.core.cons(x, cljs.core.keep.cljs$core$IFn$_invoke$arity$2(f, cljs.core.rest(s)));
        }
      }
    } else {
      return null;
    }
  }, null, null);
};
cljs.core.keep.cljs$lang$maxFixedArity = 2;
cljs.core.Atom = function(state, meta, validator, watches) {
  this.state = state;
  this.meta = meta;
  this.validator = validator;
  this.watches = watches;
  this.cljs$lang$protocol_mask$partition1$ = 16386;
  this.cljs$lang$protocol_mask$partition0$ = 6455296;
};
cljs.core.Atom.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.Atom.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(o, other) {
  var self__ = this;
  var o__$1 = this;
  return o__$1 === other;
};
cljs.core.Atom.prototype.cljs$core$IDeref$_deref$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return self__.state;
};
cljs.core.Atom.prototype.cljs$core$IMeta$_meta$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return self__.meta;
};
cljs.core.Atom.prototype.cljs$core$IWatchable$_notify_watches$arity$3 = function(this$, oldval, newval) {
  var self__ = this;
  var this$__$1 = this;
  var seq__9546 = cljs.core.seq(self__.watches);
  var chunk__9547 = null;
  var count__9548 = 0;
  var i__9549 = 0;
  while (true) {
    if (i__9549 < count__9548) {
      var vec__9550 = chunk__9547.cljs$core$IIndexed$_nth$arity$2(null, i__9549);
      var key = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9550, 0, null);
      var f = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9550, 1, null);
      f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(key, this$__$1, oldval, newval) : f.call(null, key, this$__$1, oldval, newval);
      var G__9552 = seq__9546;
      var G__9553 = chunk__9547;
      var G__9554 = count__9548;
      var G__9555 = i__9549 + 1;
      seq__9546 = G__9552;
      chunk__9547 = G__9553;
      count__9548 = G__9554;
      i__9549 = G__9555;
      continue;
    } else {
      var temp__4425__auto__ = cljs.core.seq(seq__9546);
      if (temp__4425__auto__) {
        var seq__9546__$1 = temp__4425__auto__;
        if (cljs.core.chunked_seq_QMARK_(seq__9546__$1)) {
          var c__6943__auto__ = cljs.core.chunk_first(seq__9546__$1);
          var G__9556 = cljs.core.chunk_rest(seq__9546__$1);
          var G__9557 = c__6943__auto__;
          var G__9558 = cljs.core.count(c__6943__auto__);
          var G__9559 = 0;
          seq__9546 = G__9556;
          chunk__9547 = G__9557;
          count__9548 = G__9558;
          i__9549 = G__9559;
          continue;
        } else {
          var vec__9551 = cljs.core.first(seq__9546__$1);
          var key = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9551, 0, null);
          var f = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9551, 1, null);
          f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(key, this$__$1, oldval, newval) : f.call(null, key, this$__$1, oldval, newval);
          var G__9560 = cljs.core.next(seq__9546__$1);
          var G__9561 = null;
          var G__9562 = 0;
          var G__9563 = 0;
          seq__9546 = G__9560;
          chunk__9547 = G__9561;
          count__9548 = G__9562;
          i__9549 = G__9563;
          continue;
        }
      } else {
        return null;
      }
    }
    break;
  }
};
cljs.core.Atom.prototype.cljs$core$IWatchable$_add_watch$arity$3 = function(this$, key, f) {
  var self__ = this;
  var this$__$1 = this;
  this$__$1.watches = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(self__.watches, key, f);
  return this$__$1;
};
cljs.core.Atom.prototype.cljs$core$IWatchable$_remove_watch$arity$2 = function(this$, key) {
  var self__ = this;
  var this$__$1 = this;
  return this$__$1.watches = cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(self__.watches, key);
};
cljs.core.Atom.prototype.cljs$core$IHash$_hash$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  return goog.getUid(this$__$1);
};
cljs.core.Atom.getBasis = function() {
  return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "state", "state", -348086572, null), new cljs.core.Symbol(null, "meta", "meta", -1154898805, null), new cljs.core.Symbol(null, "validator", "validator", -325659154, null), new cljs.core.Symbol(null, "watches", "watches", 1367433992, null)], null);
};
cljs.core.Atom.cljs$lang$type = true;
cljs.core.Atom.cljs$lang$ctorStr = "cljs.core/Atom";
cljs.core.Atom.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/Atom");
};
cljs.core.__GT_Atom = function cljs$core$__GT_Atom(state, meta, validator, watches) {
  return new cljs.core.Atom(state, meta, validator, watches);
};
cljs.core.atom = function cljs$core$atom(var_args) {
  var args9564 = [];
  var len__7198__auto___9572 = arguments.length;
  var i__7199__auto___9573 = 0;
  while (true) {
    if (i__7199__auto___9573 < len__7198__auto___9572) {
      args9564.push(arguments[i__7199__auto___9573]);
      var G__9574 = i__7199__auto___9573 + 1;
      i__7199__auto___9573 = G__9574;
      continue;
    } else {
    }
    break;
  }
  var G__9568 = args9564.length;
  switch(G__9568) {
    case 1:
      return cljs.core.atom.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args9564.slice(1), 0);
      return cljs.core.atom.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7217__auto__);
  }
};
cljs.core.atom.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return new cljs.core.Atom(x, null, null, null);
};
cljs.core.atom.cljs$core$IFn$_invoke$arity$variadic = function(x, p__9569) {
  var map__9570 = p__9569;
  var map__9570__$1 = (!(map__9570 == null) ? map__9570.cljs$lang$protocol_mask$partition0$ & 64 || map__9570.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map, map__9570) : map__9570;
  var meta = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__9570__$1, new cljs.core.Keyword(null, "meta", "meta", 1499536964));
  var validator = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__9570__$1, new cljs.core.Keyword(null, "validator", "validator", -1966190681));
  return new cljs.core.Atom(x, meta, validator, null);
};
cljs.core.atom.cljs$lang$applyTo = function(seq9565) {
  var G__9566 = cljs.core.first(seq9565);
  var seq9565__$1 = cljs.core.next(seq9565);
  return cljs.core.atom.cljs$core$IFn$_invoke$arity$variadic(G__9566, seq9565__$1);
};
cljs.core.atom.cljs$lang$maxFixedArity = 1;
cljs.core.reset_BANG_ = function cljs$core$reset_BANG_(a, new_value) {
  if (a instanceof cljs.core.Atom) {
    var validate = a.validator;
    if (validate == null) {
    } else {
      if (cljs.core.truth_(validate.cljs$core$IFn$_invoke$arity$1 ? validate.cljs$core$IFn$_invoke$arity$1(new_value) : validate.call(null, new_value))) {
      } else {
        throw new Error([cljs.core.str("Assert failed: "), cljs.core.str("Validator rejected reference state"), cljs.core.str("\n"), cljs.core.str(function() {
          var G__9577 = cljs.core.list(new cljs.core.Symbol(null, "validate", "validate", 1439230700, null), new cljs.core.Symbol(null, "new-value", "new-value", -1567397401, null));
          return cljs.core.pr_str.cljs$core$IFn$_invoke$arity$1 ? cljs.core.pr_str.cljs$core$IFn$_invoke$arity$1(G__9577) : cljs.core.pr_str.call(null, G__9577);
        }())].join(""));
      }
    }
    var old_value = a.state;
    a.state = new_value;
    if (a.watches == null) {
    } else {
      cljs.core._notify_watches(a, old_value, new_value);
    }
    return new_value;
  } else {
    return cljs.core._reset_BANG_(a, new_value);
  }
};
cljs.core.swap_BANG_ = function cljs$core$swap_BANG_(var_args) {
  var args9578 = [];
  var len__7198__auto___9592 = arguments.length;
  var i__7199__auto___9593 = 0;
  while (true) {
    if (i__7199__auto___9593 < len__7198__auto___9592) {
      args9578.push(arguments[i__7199__auto___9593]);
      var G__9594 = i__7199__auto___9593 + 1;
      i__7199__auto___9593 = G__9594;
      continue;
    } else {
    }
    break;
  }
  var G__9585 = args9578.length;
  switch(G__9585) {
    case 2:
      return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 4:
      return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args9578.slice(4), 0);
      return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], arguments[3], argseq__7217__auto__);
  }
};
cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2 = function(a, f) {
  if (a instanceof cljs.core.Atom) {
    return cljs.core.reset_BANG_(a, function() {
      var G__9586 = a.state;
      return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__9586) : f.call(null, G__9586);
    }());
  } else {
    return cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$2(a, f);
  }
};
cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$3 = function(a, f, x) {
  if (a instanceof cljs.core.Atom) {
    return cljs.core.reset_BANG_(a, function() {
      var G__9587 = a.state;
      var G__9588 = x;
      return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__9587, G__9588) : f.call(null, G__9587, G__9588);
    }());
  } else {
    return cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$3(a, f, x);
  }
};
cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4 = function(a, f, x, y) {
  if (a instanceof cljs.core.Atom) {
    return cljs.core.reset_BANG_(a, function() {
      var G__9589 = a.state;
      var G__9590 = x;
      var G__9591 = y;
      return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__9589, G__9590, G__9591) : f.call(null, G__9589, G__9590, G__9591);
    }());
  } else {
    return cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$4(a, f, x, y);
  }
};
cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$variadic = function(a, f, x, y, more) {
  if (a instanceof cljs.core.Atom) {
    return cljs.core.reset_BANG_(a, cljs.core.apply.cljs$core$IFn$_invoke$arity$5(f, a.state, x, y, more));
  } else {
    return cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$5(a, f, x, y, more);
  }
};
cljs.core.swap_BANG_.cljs$lang$applyTo = function(seq9579) {
  var G__9580 = cljs.core.first(seq9579);
  var seq9579__$1 = cljs.core.next(seq9579);
  var G__9581 = cljs.core.first(seq9579__$1);
  var seq9579__$2 = cljs.core.next(seq9579__$1);
  var G__9582 = cljs.core.first(seq9579__$2);
  var seq9579__$3 = cljs.core.next(seq9579__$2);
  var G__9583 = cljs.core.first(seq9579__$3);
  var seq9579__$4 = cljs.core.next(seq9579__$3);
  return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__9580, G__9581, G__9582, G__9583, seq9579__$4);
};
cljs.core.swap_BANG_.cljs$lang$maxFixedArity = 4;
cljs.core.compare_and_set_BANG_ = function cljs$core$compare_and_set_BANG_(a, oldval, newval) {
  if (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(a.cljs$core$IDeref$_deref$arity$1(null), oldval)) {
    cljs.core.reset_BANG_(a, newval);
    return true;
  } else {
    return false;
  }
};
cljs.core.set_validator_BANG_ = function cljs$core$set_validator_BANG_(iref, val) {
  return iref.validator = val;
};
cljs.core.get_validator = function cljs$core$get_validator(iref) {
  return iref.validator;
};
cljs.core.Volatile = function(state) {
  this.state = state;
  this.cljs$lang$protocol_mask$partition0$ = 32768;
  this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.Volatile.prototype.cljs$core$IVolatile$ = true;
cljs.core.Volatile.prototype.cljs$core$IVolatile$_vreset_BANG_$arity$2 = function(_, new_state) {
  var self__ = this;
  var ___$1 = this;
  return self__.state = new_state;
};
cljs.core.Volatile.prototype.cljs$core$IDeref$_deref$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return self__.state;
};
cljs.core.Volatile.getBasis = function() {
  return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "state", "state", -348086572, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.Volatile.cljs$lang$type = true;
cljs.core.Volatile.cljs$lang$ctorStr = "cljs.core/Volatile";
cljs.core.Volatile.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/Volatile");
};
cljs.core.__GT_Volatile = function cljs$core$__GT_Volatile(state) {
  return new cljs.core.Volatile(state);
};
cljs.core.volatile_BANG_ = function cljs$core$volatile_BANG_(val) {
  return new cljs.core.Volatile(val);
};
cljs.core.volatile_QMARK_ = function cljs$core$volatile_QMARK_(x) {
  return x instanceof cljs.core.Volatile;
};
cljs.core.vreset_BANG_ = function cljs$core$vreset_BANG_(vol, newval) {
  return cljs.core._vreset_BANG_(vol, newval);
};
cljs.core.keep_indexed = function cljs$core$keep_indexed(var_args) {
  var args9596 = [];
  var len__7198__auto___9627 = arguments.length;
  var i__7199__auto___9628 = 0;
  while (true) {
    if (i__7199__auto___9628 < len__7198__auto___9627) {
      args9596.push(arguments[i__7199__auto___9628]);
      var G__9629 = i__7199__auto___9628 + 1;
      i__7199__auto___9628 = G__9629;
      continue;
    } else {
    }
    break;
  }
  var G__9598 = args9596.length;
  switch(G__9598) {
    case 1:
      return cljs.core.keep_indexed.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.keep_indexed.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9596.length)].join(""));;
  }
};
cljs.core.keep_indexed.cljs$core$IFn$_invoke$arity$1 = function(f) {
  return function(rf) {
    var ia = cljs.core.volatile_BANG_(-1);
    return function(ia) {
      return function() {
        var G__9631 = null;
        var G__9631__0 = function() {
          return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
        };
        var G__9631__1 = function(result) {
          return rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null, result);
        };
        var G__9631__2 = function(result, input) {
          var i = cljs.core._vreset_BANG_(ia, cljs.core._deref(ia) + 1);
          var v = f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(i, input) : f.call(null, i, input);
          if (v == null) {
            return result;
          } else {
            return rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result, v) : rf.call(null, result, v);
          }
        };
        G__9631 = function(result, input) {
          switch(arguments.length) {
            case 0:
              return G__9631__0.call(this);
            case 1:
              return G__9631__1.call(this, result);
            case 2:
              return G__9631__2.call(this, result, input);
          }
          throw new Error("Invalid arity: " + arguments.length);
        };
        G__9631.cljs$core$IFn$_invoke$arity$0 = G__9631__0;
        G__9631.cljs$core$IFn$_invoke$arity$1 = G__9631__1;
        G__9631.cljs$core$IFn$_invoke$arity$2 = G__9631__2;
        return G__9631;
      }();
    }(ia);
  };
};
cljs.core.keep_indexed.cljs$core$IFn$_invoke$arity$2 = function(f, coll) {
  var keepi = function cljs$core$keepi(idx, coll__$1) {
    return new cljs.core.LazySeq(null, function() {
      var temp__4425__auto__ = cljs.core.seq(coll__$1);
      if (temp__4425__auto__) {
        var s = temp__4425__auto__;
        if (cljs.core.chunked_seq_QMARK_(s)) {
          var c = cljs.core.chunk_first(s);
          var size = cljs.core.count(c);
          var b = cljs.core.chunk_buffer(size);
          var n__7043__auto___9632 = size;
          var i_9633 = 0;
          while (true) {
            if (i_9633 < n__7043__auto___9632) {
              var x_9634 = function() {
                var G__9623 = idx + i_9633;
                var G__9624 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(c, i_9633);
                return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__9623, G__9624) : f.call(null, G__9623, G__9624);
              }();
              if (x_9634 == null) {
              } else {
                cljs.core.chunk_append(b, x_9634);
              }
              var G__9635 = i_9633 + 1;
              i_9633 = G__9635;
              continue;
            } else {
            }
            break;
          }
          return cljs.core.chunk_cons(cljs.core.chunk(b), cljs$core$keepi(idx + size, cljs.core.chunk_rest(s)));
        } else {
          var x = function() {
            var G__9625 = idx;
            var G__9626 = cljs.core.first(s);
            return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__9625, G__9626) : f.call(null, G__9625, G__9626);
          }();
          if (x == null) {
            return cljs$core$keepi(idx + 1, cljs.core.rest(s));
          } else {
            return cljs.core.cons(x, cljs$core$keepi(idx + 1, cljs.core.rest(s)));
          }
        }
      } else {
        return null;
      }
    }, null, null);
  };
  return keepi(0, coll);
};
cljs.core.keep_indexed.cljs$lang$maxFixedArity = 2;
cljs.core.every_pred = function cljs$core$every_pred(var_args) {
  var args9642 = [];
  var len__7198__auto___9649 = arguments.length;
  var i__7199__auto___9650 = 0;
  while (true) {
    if (i__7199__auto___9650 < len__7198__auto___9649) {
      args9642.push(arguments[i__7199__auto___9650]);
      var G__9651 = i__7199__auto___9650 + 1;
      i__7199__auto___9650 = G__9651;
      continue;
    } else {
    }
    break;
  }
  var G__9648 = args9642.length;
  switch(G__9648) {
    case 1:
      return cljs.core.every_pred.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.every_pred.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.every_pred.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args9642.slice(3), 0);
      return cljs.core.every_pred.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], argseq__7217__auto__);
  }
};
cljs.core.every_pred.cljs$core$IFn$_invoke$arity$1 = function(p) {
  return function() {
    var cljs$core$ep1 = null;
    var cljs$core$ep1__0 = function() {
      return true;
    };
    var cljs$core$ep1__1 = function(x) {
      return cljs.core.boolean$(p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(x) : p.call(null, x));
    };
    var cljs$core$ep1__2 = function(x, y) {
      return cljs.core.boolean$(function() {
        var and__6128__auto__ = p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(x) : p.call(null, x);
        if (cljs.core.truth_(and__6128__auto__)) {
          return p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(y) : p.call(null, y);
        } else {
          return and__6128__auto__;
        }
      }());
    };
    var cljs$core$ep1__3 = function(x, y, z) {
      return cljs.core.boolean$(function() {
        var and__6128__auto__ = p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(x) : p.call(null, x);
        if (cljs.core.truth_(and__6128__auto__)) {
          var and__6128__auto____$1 = p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(y) : p.call(null, y);
          if (cljs.core.truth_(and__6128__auto____$1)) {
            return p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(z) : p.call(null, z);
          } else {
            return and__6128__auto____$1;
          }
        } else {
          return and__6128__auto__;
        }
      }());
    };
    var cljs$core$ep1__4 = function() {
      var G__9653__delegate = function(x, y, z, args) {
        return cljs.core.boolean$(function() {
          var and__6128__auto__ = cljs$core$ep1.cljs$core$IFn$_invoke$arity$3(x, y, z);
          if (cljs.core.truth_(and__6128__auto__)) {
            return cljs.core.every_QMARK_(p, args);
          } else {
            return and__6128__auto__;
          }
        }());
      };
      var G__9653 = function(x, y, z, var_args) {
        var args = null;
        if (arguments.length > 3) {
          var G__9654__i = 0, G__9654__a = new Array(arguments.length - 3);
          while (G__9654__i < G__9654__a.length) {
            G__9654__a[G__9654__i] = arguments[G__9654__i + 3];
            ++G__9654__i;
          }
          args = new cljs.core.IndexedSeq(G__9654__a, 0);
        }
        return G__9653__delegate.call(this, x, y, z, args);
      };
      G__9653.cljs$lang$maxFixedArity = 3;
      G__9653.cljs$lang$applyTo = function(arglist__9655) {
        var x = cljs.core.first(arglist__9655);
        arglist__9655 = cljs.core.next(arglist__9655);
        var y = cljs.core.first(arglist__9655);
        arglist__9655 = cljs.core.next(arglist__9655);
        var z = cljs.core.first(arglist__9655);
        var args = cljs.core.rest(arglist__9655);
        return G__9653__delegate(x, y, z, args);
      };
      G__9653.cljs$core$IFn$_invoke$arity$variadic = G__9653__delegate;
      return G__9653;
    }();
    cljs$core$ep1 = function(x, y, z, var_args) {
      var args = var_args;
      switch(arguments.length) {
        case 0:
          return cljs$core$ep1__0.call(this);
        case 1:
          return cljs$core$ep1__1.call(this, x);
        case 2:
          return cljs$core$ep1__2.call(this, x, y);
        case 3:
          return cljs$core$ep1__3.call(this, x, y, z);
        default:
          var G__9656 = null;
          if (arguments.length > 3) {
            var G__9657__i = 0, G__9657__a = new Array(arguments.length - 3);
            while (G__9657__i < G__9657__a.length) {
              G__9657__a[G__9657__i] = arguments[G__9657__i + 3];
              ++G__9657__i;
            }
            G__9656 = new cljs.core.IndexedSeq(G__9657__a, 0);
          }
          return cljs$core$ep1__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__9656);
      }
      throw new Error("Invalid arity: " + arguments.length);
    };
    cljs$core$ep1.cljs$lang$maxFixedArity = 3;
    cljs$core$ep1.cljs$lang$applyTo = cljs$core$ep1__4.cljs$lang$applyTo;
    cljs$core$ep1.cljs$core$IFn$_invoke$arity$0 = cljs$core$ep1__0;
    cljs$core$ep1.cljs$core$IFn$_invoke$arity$1 = cljs$core$ep1__1;
    cljs$core$ep1.cljs$core$IFn$_invoke$arity$2 = cljs$core$ep1__2;
    cljs$core$ep1.cljs$core$IFn$_invoke$arity$3 = cljs$core$ep1__3;
    cljs$core$ep1.cljs$core$IFn$_invoke$arity$variadic = cljs$core$ep1__4.cljs$core$IFn$_invoke$arity$variadic;
    return cljs$core$ep1;
  }();
};
cljs.core.every_pred.cljs$core$IFn$_invoke$arity$2 = function(p1, p2) {
  return function() {
    var cljs$core$ep2 = null;
    var cljs$core$ep2__0 = function() {
      return true;
    };
    var cljs$core$ep2__1 = function(x) {
      return cljs.core.boolean$(function() {
        var and__6128__auto__ = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null, x);
        if (cljs.core.truth_(and__6128__auto__)) {
          return p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null, x);
        } else {
          return and__6128__auto__;
        }
      }());
    };
    var cljs$core$ep2__2 = function(x, y) {
      return cljs.core.boolean$(function() {
        var and__6128__auto__ = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null, x);
        if (cljs.core.truth_(and__6128__auto__)) {
          var and__6128__auto____$1 = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(y) : p1.call(null, y);
          if (cljs.core.truth_(and__6128__auto____$1)) {
            var and__6128__auto____$2 = p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null, x);
            if (cljs.core.truth_(and__6128__auto____$2)) {
              return p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(y) : p2.call(null, y);
            } else {
              return and__6128__auto____$2;
            }
          } else {
            return and__6128__auto____$1;
          }
        } else {
          return and__6128__auto__;
        }
      }());
    };
    var cljs$core$ep2__3 = function(x, y, z) {
      return cljs.core.boolean$(function() {
        var and__6128__auto__ = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null, x);
        if (cljs.core.truth_(and__6128__auto__)) {
          var and__6128__auto____$1 = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(y) : p1.call(null, y);
          if (cljs.core.truth_(and__6128__auto____$1)) {
            var and__6128__auto____$2 = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(z) : p1.call(null, z);
            if (cljs.core.truth_(and__6128__auto____$2)) {
              var and__6128__auto____$3 = p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null, x);
              if (cljs.core.truth_(and__6128__auto____$3)) {
                var and__6128__auto____$4 = p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(y) : p2.call(null, y);
                if (cljs.core.truth_(and__6128__auto____$4)) {
                  return p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(z) : p2.call(null, z);
                } else {
                  return and__6128__auto____$4;
                }
              } else {
                return and__6128__auto____$3;
              }
            } else {
              return and__6128__auto____$2;
            }
          } else {
            return and__6128__auto____$1;
          }
        } else {
          return and__6128__auto__;
        }
      }());
    };
    var cljs$core$ep2__4 = function() {
      var G__9658__delegate = function(x, y, z, args) {
        return cljs.core.boolean$(function() {
          var and__6128__auto__ = cljs$core$ep2.cljs$core$IFn$_invoke$arity$3(x, y, z);
          if (cljs.core.truth_(and__6128__auto__)) {
            return cljs.core.every_QMARK_(function(and__6128__auto__) {
              return function(p1__9636_SHARP_) {
                var and__6128__auto____$1 = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(p1__9636_SHARP_) : p1.call(null, p1__9636_SHARP_);
                if (cljs.core.truth_(and__6128__auto____$1)) {
                  return p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(p1__9636_SHARP_) : p2.call(null, p1__9636_SHARP_);
                } else {
                  return and__6128__auto____$1;
                }
              };
            }(and__6128__auto__), args);
          } else {
            return and__6128__auto__;
          }
        }());
      };
      var G__9658 = function(x, y, z, var_args) {
        var args = null;
        if (arguments.length > 3) {
          var G__9659__i = 0, G__9659__a = new Array(arguments.length - 3);
          while (G__9659__i < G__9659__a.length) {
            G__9659__a[G__9659__i] = arguments[G__9659__i + 3];
            ++G__9659__i;
          }
          args = new cljs.core.IndexedSeq(G__9659__a, 0);
        }
        return G__9658__delegate.call(this, x, y, z, args);
      };
      G__9658.cljs$lang$maxFixedArity = 3;
      G__9658.cljs$lang$applyTo = function(arglist__9660) {
        var x = cljs.core.first(arglist__9660);
        arglist__9660 = cljs.core.next(arglist__9660);
        var y = cljs.core.first(arglist__9660);
        arglist__9660 = cljs.core.next(arglist__9660);
        var z = cljs.core.first(arglist__9660);
        var args = cljs.core.rest(arglist__9660);
        return G__9658__delegate(x, y, z, args);
      };
      G__9658.cljs$core$IFn$_invoke$arity$variadic = G__9658__delegate;
      return G__9658;
    }();
    cljs$core$ep2 = function(x, y, z, var_args) {
      var args = var_args;
      switch(arguments.length) {
        case 0:
          return cljs$core$ep2__0.call(this);
        case 1:
          return cljs$core$ep2__1.call(this, x);
        case 2:
          return cljs$core$ep2__2.call(this, x, y);
        case 3:
          return cljs$core$ep2__3.call(this, x, y, z);
        default:
          var G__9661 = null;
          if (arguments.length > 3) {
            var G__9662__i = 0, G__9662__a = new Array(arguments.length - 3);
            while (G__9662__i < G__9662__a.length) {
              G__9662__a[G__9662__i] = arguments[G__9662__i + 3];
              ++G__9662__i;
            }
            G__9661 = new cljs.core.IndexedSeq(G__9662__a, 0);
          }
          return cljs$core$ep2__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__9661);
      }
      throw new Error("Invalid arity: " + arguments.length);
    };
    cljs$core$ep2.cljs$lang$maxFixedArity = 3;
    cljs$core$ep2.cljs$lang$applyTo = cljs$core$ep2__4.cljs$lang$applyTo;
    cljs$core$ep2.cljs$core$IFn$_invoke$arity$0 = cljs$core$ep2__0;
    cljs$core$ep2.cljs$core$IFn$_invoke$arity$1 = cljs$core$ep2__1;
    cljs$core$ep2.cljs$core$IFn$_invoke$arity$2 = cljs$core$ep2__2;
    cljs$core$ep2.cljs$core$IFn$_invoke$arity$3 = cljs$core$ep2__3;
    cljs$core$ep2.cljs$core$IFn$_invoke$arity$variadic = cljs$core$ep2__4.cljs$core$IFn$_invoke$arity$variadic;
    return cljs$core$ep2;
  }();
};
cljs.core.every_pred.cljs$core$IFn$_invoke$arity$3 = function(p1, p2, p3) {
  return function() {
    var cljs$core$ep3 = null;
    var cljs$core$ep3__0 = function() {
      return true;
    };
    var cljs$core$ep3__1 = function(x) {
      return cljs.core.boolean$(function() {
        var and__6128__auto__ = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null, x);
        if (cljs.core.truth_(and__6128__auto__)) {
          var and__6128__auto____$1 = p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null, x);
          if (cljs.core.truth_(and__6128__auto____$1)) {
            return p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(x) : p3.call(null, x);
          } else {
            return and__6128__auto____$1;
          }
        } else {
          return and__6128__auto__;
        }
      }());
    };
    var cljs$core$ep3__2 = function(x, y) {
      return cljs.core.boolean$(function() {
        var and__6128__auto__ = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null, x);
        if (cljs.core.truth_(and__6128__auto__)) {
          var and__6128__auto____$1 = p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null, x);
          if (cljs.core.truth_(and__6128__auto____$1)) {
            var and__6128__auto____$2 = p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(x) : p3.call(null, x);
            if (cljs.core.truth_(and__6128__auto____$2)) {
              var and__6128__auto____$3 = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(y) : p1.call(null, y);
              if (cljs.core.truth_(and__6128__auto____$3)) {
                var and__6128__auto____$4 = p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(y) : p2.call(null, y);
                if (cljs.core.truth_(and__6128__auto____$4)) {
                  return p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(y) : p3.call(null, y);
                } else {
                  return and__6128__auto____$4;
                }
              } else {
                return and__6128__auto____$3;
              }
            } else {
              return and__6128__auto____$2;
            }
          } else {
            return and__6128__auto____$1;
          }
        } else {
          return and__6128__auto__;
        }
      }());
    };
    var cljs$core$ep3__3 = function(x, y, z) {
      return cljs.core.boolean$(function() {
        var and__6128__auto__ = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null, x);
        if (cljs.core.truth_(and__6128__auto__)) {
          var and__6128__auto____$1 = p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null, x);
          if (cljs.core.truth_(and__6128__auto____$1)) {
            var and__6128__auto____$2 = p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(x) : p3.call(null, x);
            if (cljs.core.truth_(and__6128__auto____$2)) {
              var and__6128__auto____$3 = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(y) : p1.call(null, y);
              if (cljs.core.truth_(and__6128__auto____$3)) {
                var and__6128__auto____$4 = p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(y) : p2.call(null, y);
                if (cljs.core.truth_(and__6128__auto____$4)) {
                  var and__6128__auto____$5 = p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(y) : p3.call(null, y);
                  if (cljs.core.truth_(and__6128__auto____$5)) {
                    var and__6128__auto____$6 = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(z) : p1.call(null, z);
                    if (cljs.core.truth_(and__6128__auto____$6)) {
                      var and__6128__auto____$7 = p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(z) : p2.call(null, z);
                      if (cljs.core.truth_(and__6128__auto____$7)) {
                        return p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(z) : p3.call(null, z);
                      } else {
                        return and__6128__auto____$7;
                      }
                    } else {
                      return and__6128__auto____$6;
                    }
                  } else {
                    return and__6128__auto____$5;
                  }
                } else {
                  return and__6128__auto____$4;
                }
              } else {
                return and__6128__auto____$3;
              }
            } else {
              return and__6128__auto____$2;
            }
          } else {
            return and__6128__auto____$1;
          }
        } else {
          return and__6128__auto__;
        }
      }());
    };
    var cljs$core$ep3__4 = function() {
      var G__9663__delegate = function(x, y, z, args) {
        return cljs.core.boolean$(function() {
          var and__6128__auto__ = cljs$core$ep3.cljs$core$IFn$_invoke$arity$3(x, y, z);
          if (cljs.core.truth_(and__6128__auto__)) {
            return cljs.core.every_QMARK_(function(and__6128__auto__) {
              return function(p1__9637_SHARP_) {
                var and__6128__auto____$1 = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(p1__9637_SHARP_) : p1.call(null, p1__9637_SHARP_);
                if (cljs.core.truth_(and__6128__auto____$1)) {
                  var and__6128__auto____$2 = p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(p1__9637_SHARP_) : p2.call(null, p1__9637_SHARP_);
                  if (cljs.core.truth_(and__6128__auto____$2)) {
                    return p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(p1__9637_SHARP_) : p3.call(null, p1__9637_SHARP_);
                  } else {
                    return and__6128__auto____$2;
                  }
                } else {
                  return and__6128__auto____$1;
                }
              };
            }(and__6128__auto__), args);
          } else {
            return and__6128__auto__;
          }
        }());
      };
      var G__9663 = function(x, y, z, var_args) {
        var args = null;
        if (arguments.length > 3) {
          var G__9664__i = 0, G__9664__a = new Array(arguments.length - 3);
          while (G__9664__i < G__9664__a.length) {
            G__9664__a[G__9664__i] = arguments[G__9664__i + 3];
            ++G__9664__i;
          }
          args = new cljs.core.IndexedSeq(G__9664__a, 0);
        }
        return G__9663__delegate.call(this, x, y, z, args);
      };
      G__9663.cljs$lang$maxFixedArity = 3;
      G__9663.cljs$lang$applyTo = function(arglist__9665) {
        var x = cljs.core.first(arglist__9665);
        arglist__9665 = cljs.core.next(arglist__9665);
        var y = cljs.core.first(arglist__9665);
        arglist__9665 = cljs.core.next(arglist__9665);
        var z = cljs.core.first(arglist__9665);
        var args = cljs.core.rest(arglist__9665);
        return G__9663__delegate(x, y, z, args);
      };
      G__9663.cljs$core$IFn$_invoke$arity$variadic = G__9663__delegate;
      return G__9663;
    }();
    cljs$core$ep3 = function(x, y, z, var_args) {
      var args = var_args;
      switch(arguments.length) {
        case 0:
          return cljs$core$ep3__0.call(this);
        case 1:
          return cljs$core$ep3__1.call(this, x);
        case 2:
          return cljs$core$ep3__2.call(this, x, y);
        case 3:
          return cljs$core$ep3__3.call(this, x, y, z);
        default:
          var G__9666 = null;
          if (arguments.length > 3) {
            var G__9667__i = 0, G__9667__a = new Array(arguments.length - 3);
            while (G__9667__i < G__9667__a.length) {
              G__9667__a[G__9667__i] = arguments[G__9667__i + 3];
              ++G__9667__i;
            }
            G__9666 = new cljs.core.IndexedSeq(G__9667__a, 0);
          }
          return cljs$core$ep3__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__9666);
      }
      throw new Error("Invalid arity: " + arguments.length);
    };
    cljs$core$ep3.cljs$lang$maxFixedArity = 3;
    cljs$core$ep3.cljs$lang$applyTo = cljs$core$ep3__4.cljs$lang$applyTo;
    cljs$core$ep3.cljs$core$IFn$_invoke$arity$0 = cljs$core$ep3__0;
    cljs$core$ep3.cljs$core$IFn$_invoke$arity$1 = cljs$core$ep3__1;
    cljs$core$ep3.cljs$core$IFn$_invoke$arity$2 = cljs$core$ep3__2;
    cljs$core$ep3.cljs$core$IFn$_invoke$arity$3 = cljs$core$ep3__3;
    cljs$core$ep3.cljs$core$IFn$_invoke$arity$variadic = cljs$core$ep3__4.cljs$core$IFn$_invoke$arity$variadic;
    return cljs$core$ep3;
  }();
};
cljs.core.every_pred.cljs$core$IFn$_invoke$arity$variadic = function(p1, p2, p3, ps) {
  var ps__$1 = cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$4(p1, p2, p3, ps);
  return function(ps__$1) {
    return function() {
      var cljs$core$epn = null;
      var cljs$core$epn__0 = function() {
        return true;
      };
      var cljs$core$epn__1 = function(x) {
        return cljs.core.every_QMARK_(function(ps__$1) {
          return function(p1__9638_SHARP_) {
            return p1__9638_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__9638_SHARP_.cljs$core$IFn$_invoke$arity$1(x) : p1__9638_SHARP_.call(null, x);
          };
        }(ps__$1), ps__$1);
      };
      var cljs$core$epn__2 = function(x, y) {
        return cljs.core.every_QMARK_(function(ps__$1) {
          return function(p1__9639_SHARP_) {
            var and__6128__auto__ = p1__9639_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__9639_SHARP_.cljs$core$IFn$_invoke$arity$1(x) : p1__9639_SHARP_.call(null, x);
            if (cljs.core.truth_(and__6128__auto__)) {
              return p1__9639_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__9639_SHARP_.cljs$core$IFn$_invoke$arity$1(y) : p1__9639_SHARP_.call(null, y);
            } else {
              return and__6128__auto__;
            }
          };
        }(ps__$1), ps__$1);
      };
      var cljs$core$epn__3 = function(x, y, z) {
        return cljs.core.every_QMARK_(function(ps__$1) {
          return function(p1__9640_SHARP_) {
            var and__6128__auto__ = p1__9640_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__9640_SHARP_.cljs$core$IFn$_invoke$arity$1(x) : p1__9640_SHARP_.call(null, x);
            if (cljs.core.truth_(and__6128__auto__)) {
              var and__6128__auto____$1 = p1__9640_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__9640_SHARP_.cljs$core$IFn$_invoke$arity$1(y) : p1__9640_SHARP_.call(null, y);
              if (cljs.core.truth_(and__6128__auto____$1)) {
                return p1__9640_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__9640_SHARP_.cljs$core$IFn$_invoke$arity$1(z) : p1__9640_SHARP_.call(null, z);
              } else {
                return and__6128__auto____$1;
              }
            } else {
              return and__6128__auto__;
            }
          };
        }(ps__$1), ps__$1);
      };
      var cljs$core$epn__4 = function() {
        var G__9668__delegate = function(x, y, z, args) {
          return cljs.core.boolean$(function() {
            var and__6128__auto__ = cljs$core$epn.cljs$core$IFn$_invoke$arity$3(x, y, z);
            if (cljs.core.truth_(and__6128__auto__)) {
              return cljs.core.every_QMARK_(function(and__6128__auto__, ps__$1) {
                return function(p1__9641_SHARP_) {
                  return cljs.core.every_QMARK_(p1__9641_SHARP_, args);
                };
              }(and__6128__auto__, ps__$1), ps__$1);
            } else {
              return and__6128__auto__;
            }
          }());
        };
        var G__9668 = function(x, y, z, var_args) {
          var args = null;
          if (arguments.length > 3) {
            var G__9669__i = 0, G__9669__a = new Array(arguments.length - 3);
            while (G__9669__i < G__9669__a.length) {
              G__9669__a[G__9669__i] = arguments[G__9669__i + 3];
              ++G__9669__i;
            }
            args = new cljs.core.IndexedSeq(G__9669__a, 0);
          }
          return G__9668__delegate.call(this, x, y, z, args);
        };
        G__9668.cljs$lang$maxFixedArity = 3;
        G__9668.cljs$lang$applyTo = function(arglist__9670) {
          var x = cljs.core.first(arglist__9670);
          arglist__9670 = cljs.core.next(arglist__9670);
          var y = cljs.core.first(arglist__9670);
          arglist__9670 = cljs.core.next(arglist__9670);
          var z = cljs.core.first(arglist__9670);
          var args = cljs.core.rest(arglist__9670);
          return G__9668__delegate(x, y, z, args);
        };
        G__9668.cljs$core$IFn$_invoke$arity$variadic = G__9668__delegate;
        return G__9668;
      }();
      cljs$core$epn = function(x, y, z, var_args) {
        var args = var_args;
        switch(arguments.length) {
          case 0:
            return cljs$core$epn__0.call(this);
          case 1:
            return cljs$core$epn__1.call(this, x);
          case 2:
            return cljs$core$epn__2.call(this, x, y);
          case 3:
            return cljs$core$epn__3.call(this, x, y, z);
          default:
            var G__9671 = null;
            if (arguments.length > 3) {
              var G__9672__i = 0, G__9672__a = new Array(arguments.length - 3);
              while (G__9672__i < G__9672__a.length) {
                G__9672__a[G__9672__i] = arguments[G__9672__i + 3];
                ++G__9672__i;
              }
              G__9671 = new cljs.core.IndexedSeq(G__9672__a, 0);
            }
            return cljs$core$epn__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__9671);
        }
        throw new Error("Invalid arity: " + arguments.length);
      };
      cljs$core$epn.cljs$lang$maxFixedArity = 3;
      cljs$core$epn.cljs$lang$applyTo = cljs$core$epn__4.cljs$lang$applyTo;
      cljs$core$epn.cljs$core$IFn$_invoke$arity$0 = cljs$core$epn__0;
      cljs$core$epn.cljs$core$IFn$_invoke$arity$1 = cljs$core$epn__1;
      cljs$core$epn.cljs$core$IFn$_invoke$arity$2 = cljs$core$epn__2;
      cljs$core$epn.cljs$core$IFn$_invoke$arity$3 = cljs$core$epn__3;
      cljs$core$epn.cljs$core$IFn$_invoke$arity$variadic = cljs$core$epn__4.cljs$core$IFn$_invoke$arity$variadic;
      return cljs$core$epn;
    }();
  }(ps__$1);
};
cljs.core.every_pred.cljs$lang$applyTo = function(seq9643) {
  var G__9644 = cljs.core.first(seq9643);
  var seq9643__$1 = cljs.core.next(seq9643);
  var G__9645 = cljs.core.first(seq9643__$1);
  var seq9643__$2 = cljs.core.next(seq9643__$1);
  var G__9646 = cljs.core.first(seq9643__$2);
  var seq9643__$3 = cljs.core.next(seq9643__$2);
  return cljs.core.every_pred.cljs$core$IFn$_invoke$arity$variadic(G__9644, G__9645, G__9646, seq9643__$3);
};
cljs.core.every_pred.cljs$lang$maxFixedArity = 3;
cljs.core.some_fn = function cljs$core$some_fn(var_args) {
  var args9679 = [];
  var len__7198__auto___9686 = arguments.length;
  var i__7199__auto___9687 = 0;
  while (true) {
    if (i__7199__auto___9687 < len__7198__auto___9686) {
      args9679.push(arguments[i__7199__auto___9687]);
      var G__9688 = i__7199__auto___9687 + 1;
      i__7199__auto___9687 = G__9688;
      continue;
    } else {
    }
    break;
  }
  var G__9685 = args9679.length;
  switch(G__9685) {
    case 1:
      return cljs.core.some_fn.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.some_fn.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.some_fn.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args9679.slice(3), 0);
      return cljs.core.some_fn.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], argseq__7217__auto__);
  }
};
cljs.core.some_fn.cljs$core$IFn$_invoke$arity$1 = function(p) {
  return function() {
    var cljs$core$sp1 = null;
    var cljs$core$sp1__0 = function() {
      return null;
    };
    var cljs$core$sp1__1 = function(x) {
      return p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(x) : p.call(null, x);
    };
    var cljs$core$sp1__2 = function(x, y) {
      var or__6140__auto__ = p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(x) : p.call(null, x);
      if (cljs.core.truth_(or__6140__auto__)) {
        return or__6140__auto__;
      } else {
        return p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(y) : p.call(null, y);
      }
    };
    var cljs$core$sp1__3 = function(x, y, z) {
      var or__6140__auto__ = p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(x) : p.call(null, x);
      if (cljs.core.truth_(or__6140__auto__)) {
        return or__6140__auto__;
      } else {
        var or__6140__auto____$1 = p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(y) : p.call(null, y);
        if (cljs.core.truth_(or__6140__auto____$1)) {
          return or__6140__auto____$1;
        } else {
          return p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(z) : p.call(null, z);
        }
      }
    };
    var cljs$core$sp1__4 = function() {
      var G__9690__delegate = function(x, y, z, args) {
        var or__6140__auto__ = cljs$core$sp1.cljs$core$IFn$_invoke$arity$3(x, y, z);
        if (cljs.core.truth_(or__6140__auto__)) {
          return or__6140__auto__;
        } else {
          return cljs.core.some(p, args);
        }
      };
      var G__9690 = function(x, y, z, var_args) {
        var args = null;
        if (arguments.length > 3) {
          var G__9691__i = 0, G__9691__a = new Array(arguments.length - 3);
          while (G__9691__i < G__9691__a.length) {
            G__9691__a[G__9691__i] = arguments[G__9691__i + 3];
            ++G__9691__i;
          }
          args = new cljs.core.IndexedSeq(G__9691__a, 0);
        }
        return G__9690__delegate.call(this, x, y, z, args);
      };
      G__9690.cljs$lang$maxFixedArity = 3;
      G__9690.cljs$lang$applyTo = function(arglist__9692) {
        var x = cljs.core.first(arglist__9692);
        arglist__9692 = cljs.core.next(arglist__9692);
        var y = cljs.core.first(arglist__9692);
        arglist__9692 = cljs.core.next(arglist__9692);
        var z = cljs.core.first(arglist__9692);
        var args = cljs.core.rest(arglist__9692);
        return G__9690__delegate(x, y, z, args);
      };
      G__9690.cljs$core$IFn$_invoke$arity$variadic = G__9690__delegate;
      return G__9690;
    }();
    cljs$core$sp1 = function(x, y, z, var_args) {
      var args = var_args;
      switch(arguments.length) {
        case 0:
          return cljs$core$sp1__0.call(this);
        case 1:
          return cljs$core$sp1__1.call(this, x);
        case 2:
          return cljs$core$sp1__2.call(this, x, y);
        case 3:
          return cljs$core$sp1__3.call(this, x, y, z);
        default:
          var G__9693 = null;
          if (arguments.length > 3) {
            var G__9694__i = 0, G__9694__a = new Array(arguments.length - 3);
            while (G__9694__i < G__9694__a.length) {
              G__9694__a[G__9694__i] = arguments[G__9694__i + 3];
              ++G__9694__i;
            }
            G__9693 = new cljs.core.IndexedSeq(G__9694__a, 0);
          }
          return cljs$core$sp1__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__9693);
      }
      throw new Error("Invalid arity: " + arguments.length);
    };
    cljs$core$sp1.cljs$lang$maxFixedArity = 3;
    cljs$core$sp1.cljs$lang$applyTo = cljs$core$sp1__4.cljs$lang$applyTo;
    cljs$core$sp1.cljs$core$IFn$_invoke$arity$0 = cljs$core$sp1__0;
    cljs$core$sp1.cljs$core$IFn$_invoke$arity$1 = cljs$core$sp1__1;
    cljs$core$sp1.cljs$core$IFn$_invoke$arity$2 = cljs$core$sp1__2;
    cljs$core$sp1.cljs$core$IFn$_invoke$arity$3 = cljs$core$sp1__3;
    cljs$core$sp1.cljs$core$IFn$_invoke$arity$variadic = cljs$core$sp1__4.cljs$core$IFn$_invoke$arity$variadic;
    return cljs$core$sp1;
  }();
};
cljs.core.some_fn.cljs$core$IFn$_invoke$arity$2 = function(p1, p2) {
  return function() {
    var cljs$core$sp2 = null;
    var cljs$core$sp2__0 = function() {
      return null;
    };
    var cljs$core$sp2__1 = function(x) {
      var or__6140__auto__ = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null, x);
      if (cljs.core.truth_(or__6140__auto__)) {
        return or__6140__auto__;
      } else {
        return p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null, x);
      }
    };
    var cljs$core$sp2__2 = function(x, y) {
      var or__6140__auto__ = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null, x);
      if (cljs.core.truth_(or__6140__auto__)) {
        return or__6140__auto__;
      } else {
        var or__6140__auto____$1 = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(y) : p1.call(null, y);
        if (cljs.core.truth_(or__6140__auto____$1)) {
          return or__6140__auto____$1;
        } else {
          var or__6140__auto____$2 = p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null, x);
          if (cljs.core.truth_(or__6140__auto____$2)) {
            return or__6140__auto____$2;
          } else {
            return p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(y) : p2.call(null, y);
          }
        }
      }
    };
    var cljs$core$sp2__3 = function(x, y, z) {
      var or__6140__auto__ = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null, x);
      if (cljs.core.truth_(or__6140__auto__)) {
        return or__6140__auto__;
      } else {
        var or__6140__auto____$1 = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(y) : p1.call(null, y);
        if (cljs.core.truth_(or__6140__auto____$1)) {
          return or__6140__auto____$1;
        } else {
          var or__6140__auto____$2 = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(z) : p1.call(null, z);
          if (cljs.core.truth_(or__6140__auto____$2)) {
            return or__6140__auto____$2;
          } else {
            var or__6140__auto____$3 = p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null, x);
            if (cljs.core.truth_(or__6140__auto____$3)) {
              return or__6140__auto____$3;
            } else {
              var or__6140__auto____$4 = p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(y) : p2.call(null, y);
              if (cljs.core.truth_(or__6140__auto____$4)) {
                return or__6140__auto____$4;
              } else {
                return p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(z) : p2.call(null, z);
              }
            }
          }
        }
      }
    };
    var cljs$core$sp2__4 = function() {
      var G__9695__delegate = function(x, y, z, args) {
        var or__6140__auto__ = cljs$core$sp2.cljs$core$IFn$_invoke$arity$3(x, y, z);
        if (cljs.core.truth_(or__6140__auto__)) {
          return or__6140__auto__;
        } else {
          return cljs.core.some(function(or__6140__auto__) {
            return function(p1__9673_SHARP_) {
              var or__6140__auto____$1 = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(p1__9673_SHARP_) : p1.call(null, p1__9673_SHARP_);
              if (cljs.core.truth_(or__6140__auto____$1)) {
                return or__6140__auto____$1;
              } else {
                return p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(p1__9673_SHARP_) : p2.call(null, p1__9673_SHARP_);
              }
            };
          }(or__6140__auto__), args);
        }
      };
      var G__9695 = function(x, y, z, var_args) {
        var args = null;
        if (arguments.length > 3) {
          var G__9696__i = 0, G__9696__a = new Array(arguments.length - 3);
          while (G__9696__i < G__9696__a.length) {
            G__9696__a[G__9696__i] = arguments[G__9696__i + 3];
            ++G__9696__i;
          }
          args = new cljs.core.IndexedSeq(G__9696__a, 0);
        }
        return G__9695__delegate.call(this, x, y, z, args);
      };
      G__9695.cljs$lang$maxFixedArity = 3;
      G__9695.cljs$lang$applyTo = function(arglist__9697) {
        var x = cljs.core.first(arglist__9697);
        arglist__9697 = cljs.core.next(arglist__9697);
        var y = cljs.core.first(arglist__9697);
        arglist__9697 = cljs.core.next(arglist__9697);
        var z = cljs.core.first(arglist__9697);
        var args = cljs.core.rest(arglist__9697);
        return G__9695__delegate(x, y, z, args);
      };
      G__9695.cljs$core$IFn$_invoke$arity$variadic = G__9695__delegate;
      return G__9695;
    }();
    cljs$core$sp2 = function(x, y, z, var_args) {
      var args = var_args;
      switch(arguments.length) {
        case 0:
          return cljs$core$sp2__0.call(this);
        case 1:
          return cljs$core$sp2__1.call(this, x);
        case 2:
          return cljs$core$sp2__2.call(this, x, y);
        case 3:
          return cljs$core$sp2__3.call(this, x, y, z);
        default:
          var G__9698 = null;
          if (arguments.length > 3) {
            var G__9699__i = 0, G__9699__a = new Array(arguments.length - 3);
            while (G__9699__i < G__9699__a.length) {
              G__9699__a[G__9699__i] = arguments[G__9699__i + 3];
              ++G__9699__i;
            }
            G__9698 = new cljs.core.IndexedSeq(G__9699__a, 0);
          }
          return cljs$core$sp2__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__9698);
      }
      throw new Error("Invalid arity: " + arguments.length);
    };
    cljs$core$sp2.cljs$lang$maxFixedArity = 3;
    cljs$core$sp2.cljs$lang$applyTo = cljs$core$sp2__4.cljs$lang$applyTo;
    cljs$core$sp2.cljs$core$IFn$_invoke$arity$0 = cljs$core$sp2__0;
    cljs$core$sp2.cljs$core$IFn$_invoke$arity$1 = cljs$core$sp2__1;
    cljs$core$sp2.cljs$core$IFn$_invoke$arity$2 = cljs$core$sp2__2;
    cljs$core$sp2.cljs$core$IFn$_invoke$arity$3 = cljs$core$sp2__3;
    cljs$core$sp2.cljs$core$IFn$_invoke$arity$variadic = cljs$core$sp2__4.cljs$core$IFn$_invoke$arity$variadic;
    return cljs$core$sp2;
  }();
};
cljs.core.some_fn.cljs$core$IFn$_invoke$arity$3 = function(p1, p2, p3) {
  return function() {
    var cljs$core$sp3 = null;
    var cljs$core$sp3__0 = function() {
      return null;
    };
    var cljs$core$sp3__1 = function(x) {
      var or__6140__auto__ = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null, x);
      if (cljs.core.truth_(or__6140__auto__)) {
        return or__6140__auto__;
      } else {
        var or__6140__auto____$1 = p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null, x);
        if (cljs.core.truth_(or__6140__auto____$1)) {
          return or__6140__auto____$1;
        } else {
          return p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(x) : p3.call(null, x);
        }
      }
    };
    var cljs$core$sp3__2 = function(x, y) {
      var or__6140__auto__ = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null, x);
      if (cljs.core.truth_(or__6140__auto__)) {
        return or__6140__auto__;
      } else {
        var or__6140__auto____$1 = p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null, x);
        if (cljs.core.truth_(or__6140__auto____$1)) {
          return or__6140__auto____$1;
        } else {
          var or__6140__auto____$2 = p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(x) : p3.call(null, x);
          if (cljs.core.truth_(or__6140__auto____$2)) {
            return or__6140__auto____$2;
          } else {
            var or__6140__auto____$3 = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(y) : p1.call(null, y);
            if (cljs.core.truth_(or__6140__auto____$3)) {
              return or__6140__auto____$3;
            } else {
              var or__6140__auto____$4 = p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(y) : p2.call(null, y);
              if (cljs.core.truth_(or__6140__auto____$4)) {
                return or__6140__auto____$4;
              } else {
                return p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(y) : p3.call(null, y);
              }
            }
          }
        }
      }
    };
    var cljs$core$sp3__3 = function(x, y, z) {
      var or__6140__auto__ = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null, x);
      if (cljs.core.truth_(or__6140__auto__)) {
        return or__6140__auto__;
      } else {
        var or__6140__auto____$1 = p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null, x);
        if (cljs.core.truth_(or__6140__auto____$1)) {
          return or__6140__auto____$1;
        } else {
          var or__6140__auto____$2 = p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(x) : p3.call(null, x);
          if (cljs.core.truth_(or__6140__auto____$2)) {
            return or__6140__auto____$2;
          } else {
            var or__6140__auto____$3 = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(y) : p1.call(null, y);
            if (cljs.core.truth_(or__6140__auto____$3)) {
              return or__6140__auto____$3;
            } else {
              var or__6140__auto____$4 = p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(y) : p2.call(null, y);
              if (cljs.core.truth_(or__6140__auto____$4)) {
                return or__6140__auto____$4;
              } else {
                var or__6140__auto____$5 = p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(y) : p3.call(null, y);
                if (cljs.core.truth_(or__6140__auto____$5)) {
                  return or__6140__auto____$5;
                } else {
                  var or__6140__auto____$6 = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(z) : p1.call(null, z);
                  if (cljs.core.truth_(or__6140__auto____$6)) {
                    return or__6140__auto____$6;
                  } else {
                    var or__6140__auto____$7 = p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(z) : p2.call(null, z);
                    if (cljs.core.truth_(or__6140__auto____$7)) {
                      return or__6140__auto____$7;
                    } else {
                      return p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(z) : p3.call(null, z);
                    }
                  }
                }
              }
            }
          }
        }
      }
    };
    var cljs$core$sp3__4 = function() {
      var G__9700__delegate = function(x, y, z, args) {
        var or__6140__auto__ = cljs$core$sp3.cljs$core$IFn$_invoke$arity$3(x, y, z);
        if (cljs.core.truth_(or__6140__auto__)) {
          return or__6140__auto__;
        } else {
          return cljs.core.some(function(or__6140__auto__) {
            return function(p1__9674_SHARP_) {
              var or__6140__auto____$1 = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(p1__9674_SHARP_) : p1.call(null, p1__9674_SHARP_);
              if (cljs.core.truth_(or__6140__auto____$1)) {
                return or__6140__auto____$1;
              } else {
                var or__6140__auto____$2 = p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(p1__9674_SHARP_) : p2.call(null, p1__9674_SHARP_);
                if (cljs.core.truth_(or__6140__auto____$2)) {
                  return or__6140__auto____$2;
                } else {
                  return p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(p1__9674_SHARP_) : p3.call(null, p1__9674_SHARP_);
                }
              }
            };
          }(or__6140__auto__), args);
        }
      };
      var G__9700 = function(x, y, z, var_args) {
        var args = null;
        if (arguments.length > 3) {
          var G__9701__i = 0, G__9701__a = new Array(arguments.length - 3);
          while (G__9701__i < G__9701__a.length) {
            G__9701__a[G__9701__i] = arguments[G__9701__i + 3];
            ++G__9701__i;
          }
          args = new cljs.core.IndexedSeq(G__9701__a, 0);
        }
        return G__9700__delegate.call(this, x, y, z, args);
      };
      G__9700.cljs$lang$maxFixedArity = 3;
      G__9700.cljs$lang$applyTo = function(arglist__9702) {
        var x = cljs.core.first(arglist__9702);
        arglist__9702 = cljs.core.next(arglist__9702);
        var y = cljs.core.first(arglist__9702);
        arglist__9702 = cljs.core.next(arglist__9702);
        var z = cljs.core.first(arglist__9702);
        var args = cljs.core.rest(arglist__9702);
        return G__9700__delegate(x, y, z, args);
      };
      G__9700.cljs$core$IFn$_invoke$arity$variadic = G__9700__delegate;
      return G__9700;
    }();
    cljs$core$sp3 = function(x, y, z, var_args) {
      var args = var_args;
      switch(arguments.length) {
        case 0:
          return cljs$core$sp3__0.call(this);
        case 1:
          return cljs$core$sp3__1.call(this, x);
        case 2:
          return cljs$core$sp3__2.call(this, x, y);
        case 3:
          return cljs$core$sp3__3.call(this, x, y, z);
        default:
          var G__9703 = null;
          if (arguments.length > 3) {
            var G__9704__i = 0, G__9704__a = new Array(arguments.length - 3);
            while (G__9704__i < G__9704__a.length) {
              G__9704__a[G__9704__i] = arguments[G__9704__i + 3];
              ++G__9704__i;
            }
            G__9703 = new cljs.core.IndexedSeq(G__9704__a, 0);
          }
          return cljs$core$sp3__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__9703);
      }
      throw new Error("Invalid arity: " + arguments.length);
    };
    cljs$core$sp3.cljs$lang$maxFixedArity = 3;
    cljs$core$sp3.cljs$lang$applyTo = cljs$core$sp3__4.cljs$lang$applyTo;
    cljs$core$sp3.cljs$core$IFn$_invoke$arity$0 = cljs$core$sp3__0;
    cljs$core$sp3.cljs$core$IFn$_invoke$arity$1 = cljs$core$sp3__1;
    cljs$core$sp3.cljs$core$IFn$_invoke$arity$2 = cljs$core$sp3__2;
    cljs$core$sp3.cljs$core$IFn$_invoke$arity$3 = cljs$core$sp3__3;
    cljs$core$sp3.cljs$core$IFn$_invoke$arity$variadic = cljs$core$sp3__4.cljs$core$IFn$_invoke$arity$variadic;
    return cljs$core$sp3;
  }();
};
cljs.core.some_fn.cljs$core$IFn$_invoke$arity$variadic = function(p1, p2, p3, ps) {
  var ps__$1 = cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$4(p1, p2, p3, ps);
  return function(ps__$1) {
    return function() {
      var cljs$core$spn = null;
      var cljs$core$spn__0 = function() {
        return null;
      };
      var cljs$core$spn__1 = function(x) {
        return cljs.core.some(function(ps__$1) {
          return function(p1__9675_SHARP_) {
            return p1__9675_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__9675_SHARP_.cljs$core$IFn$_invoke$arity$1(x) : p1__9675_SHARP_.call(null, x);
          };
        }(ps__$1), ps__$1);
      };
      var cljs$core$spn__2 = function(x, y) {
        return cljs.core.some(function(ps__$1) {
          return function(p1__9676_SHARP_) {
            var or__6140__auto__ = p1__9676_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__9676_SHARP_.cljs$core$IFn$_invoke$arity$1(x) : p1__9676_SHARP_.call(null, x);
            if (cljs.core.truth_(or__6140__auto__)) {
              return or__6140__auto__;
            } else {
              return p1__9676_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__9676_SHARP_.cljs$core$IFn$_invoke$arity$1(y) : p1__9676_SHARP_.call(null, y);
            }
          };
        }(ps__$1), ps__$1);
      };
      var cljs$core$spn__3 = function(x, y, z) {
        return cljs.core.some(function(ps__$1) {
          return function(p1__9677_SHARP_) {
            var or__6140__auto__ = p1__9677_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__9677_SHARP_.cljs$core$IFn$_invoke$arity$1(x) : p1__9677_SHARP_.call(null, x);
            if (cljs.core.truth_(or__6140__auto__)) {
              return or__6140__auto__;
            } else {
              var or__6140__auto____$1 = p1__9677_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__9677_SHARP_.cljs$core$IFn$_invoke$arity$1(y) : p1__9677_SHARP_.call(null, y);
              if (cljs.core.truth_(or__6140__auto____$1)) {
                return or__6140__auto____$1;
              } else {
                return p1__9677_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__9677_SHARP_.cljs$core$IFn$_invoke$arity$1(z) : p1__9677_SHARP_.call(null, z);
              }
            }
          };
        }(ps__$1), ps__$1);
      };
      var cljs$core$spn__4 = function() {
        var G__9705__delegate = function(x, y, z, args) {
          var or__6140__auto__ = cljs$core$spn.cljs$core$IFn$_invoke$arity$3(x, y, z);
          if (cljs.core.truth_(or__6140__auto__)) {
            return or__6140__auto__;
          } else {
            return cljs.core.some(function(or__6140__auto__, ps__$1) {
              return function(p1__9678_SHARP_) {
                return cljs.core.some(p1__9678_SHARP_, args);
              };
            }(or__6140__auto__, ps__$1), ps__$1);
          }
        };
        var G__9705 = function(x, y, z, var_args) {
          var args = null;
          if (arguments.length > 3) {
            var G__9706__i = 0, G__9706__a = new Array(arguments.length - 3);
            while (G__9706__i < G__9706__a.length) {
              G__9706__a[G__9706__i] = arguments[G__9706__i + 3];
              ++G__9706__i;
            }
            args = new cljs.core.IndexedSeq(G__9706__a, 0);
          }
          return G__9705__delegate.call(this, x, y, z, args);
        };
        G__9705.cljs$lang$maxFixedArity = 3;
        G__9705.cljs$lang$applyTo = function(arglist__9707) {
          var x = cljs.core.first(arglist__9707);
          arglist__9707 = cljs.core.next(arglist__9707);
          var y = cljs.core.first(arglist__9707);
          arglist__9707 = cljs.core.next(arglist__9707);
          var z = cljs.core.first(arglist__9707);
          var args = cljs.core.rest(arglist__9707);
          return G__9705__delegate(x, y, z, args);
        };
        G__9705.cljs$core$IFn$_invoke$arity$variadic = G__9705__delegate;
        return G__9705;
      }();
      cljs$core$spn = function(x, y, z, var_args) {
        var args = var_args;
        switch(arguments.length) {
          case 0:
            return cljs$core$spn__0.call(this);
          case 1:
            return cljs$core$spn__1.call(this, x);
          case 2:
            return cljs$core$spn__2.call(this, x, y);
          case 3:
            return cljs$core$spn__3.call(this, x, y, z);
          default:
            var G__9708 = null;
            if (arguments.length > 3) {
              var G__9709__i = 0, G__9709__a = new Array(arguments.length - 3);
              while (G__9709__i < G__9709__a.length) {
                G__9709__a[G__9709__i] = arguments[G__9709__i + 3];
                ++G__9709__i;
              }
              G__9708 = new cljs.core.IndexedSeq(G__9709__a, 0);
            }
            return cljs$core$spn__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__9708);
        }
        throw new Error("Invalid arity: " + arguments.length);
      };
      cljs$core$spn.cljs$lang$maxFixedArity = 3;
      cljs$core$spn.cljs$lang$applyTo = cljs$core$spn__4.cljs$lang$applyTo;
      cljs$core$spn.cljs$core$IFn$_invoke$arity$0 = cljs$core$spn__0;
      cljs$core$spn.cljs$core$IFn$_invoke$arity$1 = cljs$core$spn__1;
      cljs$core$spn.cljs$core$IFn$_invoke$arity$2 = cljs$core$spn__2;
      cljs$core$spn.cljs$core$IFn$_invoke$arity$3 = cljs$core$spn__3;
      cljs$core$spn.cljs$core$IFn$_invoke$arity$variadic = cljs$core$spn__4.cljs$core$IFn$_invoke$arity$variadic;
      return cljs$core$spn;
    }();
  }(ps__$1);
};
cljs.core.some_fn.cljs$lang$applyTo = function(seq9680) {
  var G__9681 = cljs.core.first(seq9680);
  var seq9680__$1 = cljs.core.next(seq9680);
  var G__9682 = cljs.core.first(seq9680__$1);
  var seq9680__$2 = cljs.core.next(seq9680__$1);
  var G__9683 = cljs.core.first(seq9680__$2);
  var seq9680__$3 = cljs.core.next(seq9680__$2);
  return cljs.core.some_fn.cljs$core$IFn$_invoke$arity$variadic(G__9681, G__9682, G__9683, seq9680__$3);
};
cljs.core.some_fn.cljs$lang$maxFixedArity = 3;
cljs.core.map = function cljs$core$map(var_args) {
  var args9711 = [];
  var len__7198__auto___9731 = arguments.length;
  var i__7199__auto___9732 = 0;
  while (true) {
    if (i__7199__auto___9732 < len__7198__auto___9731) {
      args9711.push(arguments[i__7199__auto___9732]);
      var G__9733 = i__7199__auto___9732 + 1;
      i__7199__auto___9732 = G__9733;
      continue;
    } else {
    }
    break;
  }
  var G__9718 = args9711.length;
  switch(G__9718) {
    case 1:
      return cljs.core.map.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.map.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.map.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 4:
      return cljs.core.map.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args9711.slice(4), 0);
      return cljs.core.map.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], arguments[3], argseq__7217__auto__);
  }
};
cljs.core.map.cljs$core$IFn$_invoke$arity$1 = function(f) {
  return function(rf) {
    return function() {
      var G__9735 = null;
      var G__9735__0 = function() {
        return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
      };
      var G__9735__1 = function(result) {
        return rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null, result);
      };
      var G__9735__2 = function(result, input) {
        var G__9719 = result;
        var G__9720 = f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(input) : f.call(null, input);
        return rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(G__9719, G__9720) : rf.call(null, G__9719, G__9720);
      };
      var G__9735__3 = function() {
        var G__9736__delegate = function(result, input, inputs) {
          var G__9721 = result;
          var G__9722 = cljs.core.apply.cljs$core$IFn$_invoke$arity$3(f, input, inputs);
          return rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(G__9721, G__9722) : rf.call(null, G__9721, G__9722);
        };
        var G__9736 = function(result, input, var_args) {
          var inputs = null;
          if (arguments.length > 2) {
            var G__9737__i = 0, G__9737__a = new Array(arguments.length - 2);
            while (G__9737__i < G__9737__a.length) {
              G__9737__a[G__9737__i] = arguments[G__9737__i + 2];
              ++G__9737__i;
            }
            inputs = new cljs.core.IndexedSeq(G__9737__a, 0);
          }
          return G__9736__delegate.call(this, result, input, inputs);
        };
        G__9736.cljs$lang$maxFixedArity = 2;
        G__9736.cljs$lang$applyTo = function(arglist__9738) {
          var result = cljs.core.first(arglist__9738);
          arglist__9738 = cljs.core.next(arglist__9738);
          var input = cljs.core.first(arglist__9738);
          var inputs = cljs.core.rest(arglist__9738);
          return G__9736__delegate(result, input, inputs);
        };
        G__9736.cljs$core$IFn$_invoke$arity$variadic = G__9736__delegate;
        return G__9736;
      }();
      G__9735 = function(result, input, var_args) {
        var inputs = var_args;
        switch(arguments.length) {
          case 0:
            return G__9735__0.call(this);
          case 1:
            return G__9735__1.call(this, result);
          case 2:
            return G__9735__2.call(this, result, input);
          default:
            var G__9739 = null;
            if (arguments.length > 2) {
              var G__9740__i = 0, G__9740__a = new Array(arguments.length - 2);
              while (G__9740__i < G__9740__a.length) {
                G__9740__a[G__9740__i] = arguments[G__9740__i + 2];
                ++G__9740__i;
              }
              G__9739 = new cljs.core.IndexedSeq(G__9740__a, 0);
            }
            return G__9735__3.cljs$core$IFn$_invoke$arity$variadic(result, input, G__9739);
        }
        throw new Error("Invalid arity: " + arguments.length);
      };
      G__9735.cljs$lang$maxFixedArity = 2;
      G__9735.cljs$lang$applyTo = G__9735__3.cljs$lang$applyTo;
      G__9735.cljs$core$IFn$_invoke$arity$0 = G__9735__0;
      G__9735.cljs$core$IFn$_invoke$arity$1 = G__9735__1;
      G__9735.cljs$core$IFn$_invoke$arity$2 = G__9735__2;
      G__9735.cljs$core$IFn$_invoke$arity$variadic = G__9735__3.cljs$core$IFn$_invoke$arity$variadic;
      return G__9735;
    }();
  };
};
cljs.core.map.cljs$core$IFn$_invoke$arity$2 = function(f, coll) {
  return new cljs.core.LazySeq(null, function() {
    var temp__4425__auto__ = cljs.core.seq(coll);
    if (temp__4425__auto__) {
      var s = temp__4425__auto__;
      if (cljs.core.chunked_seq_QMARK_(s)) {
        var c = cljs.core.chunk_first(s);
        var size = cljs.core.count(c);
        var b = cljs.core.chunk_buffer(size);
        var n__7043__auto___9741 = size;
        var i_9742 = 0;
        while (true) {
          if (i_9742 < n__7043__auto___9741) {
            cljs.core.chunk_append(b, function() {
              var G__9723 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(c, i_9742);
              return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__9723) : f.call(null, G__9723);
            }());
            var G__9743 = i_9742 + 1;
            i_9742 = G__9743;
            continue;
          } else {
          }
          break;
        }
        return cljs.core.chunk_cons(cljs.core.chunk(b), cljs.core.map.cljs$core$IFn$_invoke$arity$2(f, cljs.core.chunk_rest(s)));
      } else {
        return cljs.core.cons(function() {
          var G__9724 = cljs.core.first(s);
          return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__9724) : f.call(null, G__9724);
        }(), cljs.core.map.cljs$core$IFn$_invoke$arity$2(f, cljs.core.rest(s)));
      }
    } else {
      return null;
    }
  }, null, null);
};
cljs.core.map.cljs$core$IFn$_invoke$arity$3 = function(f, c1, c2) {
  return new cljs.core.LazySeq(null, function() {
    var s1 = cljs.core.seq(c1);
    var s2 = cljs.core.seq(c2);
    if (s1 && s2) {
      return cljs.core.cons(function() {
        var G__9725 = cljs.core.first(s1);
        var G__9726 = cljs.core.first(s2);
        return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__9725, G__9726) : f.call(null, G__9725, G__9726);
      }(), cljs.core.map.cljs$core$IFn$_invoke$arity$3(f, cljs.core.rest(s1), cljs.core.rest(s2)));
    } else {
      return null;
    }
  }, null, null);
};
cljs.core.map.cljs$core$IFn$_invoke$arity$4 = function(f, c1, c2, c3) {
  return new cljs.core.LazySeq(null, function() {
    var s1 = cljs.core.seq(c1);
    var s2 = cljs.core.seq(c2);
    var s3 = cljs.core.seq(c3);
    if (s1 && s2 && s3) {
      return cljs.core.cons(function() {
        var G__9727 = cljs.core.first(s1);
        var G__9728 = cljs.core.first(s2);
        var G__9729 = cljs.core.first(s3);
        return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__9727, G__9728, G__9729) : f.call(null, G__9727, G__9728, G__9729);
      }(), cljs.core.map.cljs$core$IFn$_invoke$arity$4(f, cljs.core.rest(s1), cljs.core.rest(s2), cljs.core.rest(s3)));
    } else {
      return null;
    }
  }, null, null);
};
cljs.core.map.cljs$core$IFn$_invoke$arity$variadic = function(f, c1, c2, c3, colls) {
  var step = function cljs$core$step(cs) {
    return new cljs.core.LazySeq(null, function() {
      var ss = cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs.core.seq, cs);
      if (cljs.core.every_QMARK_(cljs.core.identity, ss)) {
        return cljs.core.cons(cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs.core.first, ss), cljs$core$step(cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs.core.rest, ss)));
      } else {
        return null;
      }
    }, null, null);
  };
  return cljs.core.map.cljs$core$IFn$_invoke$arity$2(function(step) {
    return function(p1__9710_SHARP_) {
      return cljs.core.apply.cljs$core$IFn$_invoke$arity$2(f, p1__9710_SHARP_);
    };
  }(step), step(cljs.core.conj.cljs$core$IFn$_invoke$arity$variadic(colls, c3, cljs.core.array_seq([c2, c1], 0))));
};
cljs.core.map.cljs$lang$applyTo = function(seq9712) {
  var G__9713 = cljs.core.first(seq9712);
  var seq9712__$1 = cljs.core.next(seq9712);
  var G__9714 = cljs.core.first(seq9712__$1);
  var seq9712__$2 = cljs.core.next(seq9712__$1);
  var G__9715 = cljs.core.first(seq9712__$2);
  var seq9712__$3 = cljs.core.next(seq9712__$2);
  var G__9716 = cljs.core.first(seq9712__$3);
  var seq9712__$4 = cljs.core.next(seq9712__$3);
  return cljs.core.map.cljs$core$IFn$_invoke$arity$variadic(G__9713, G__9714, G__9715, G__9716, seq9712__$4);
};
cljs.core.map.cljs$lang$maxFixedArity = 4;
cljs.core.take = function cljs$core$take(var_args) {
  var args9744 = [];
  var len__7198__auto___9749 = arguments.length;
  var i__7199__auto___9750 = 0;
  while (true) {
    if (i__7199__auto___9750 < len__7198__auto___9749) {
      args9744.push(arguments[i__7199__auto___9750]);
      var G__9751 = i__7199__auto___9750 + 1;
      i__7199__auto___9750 = G__9751;
      continue;
    } else {
    }
    break;
  }
  var G__9746 = args9744.length;
  switch(G__9746) {
    case 1:
      return cljs.core.take.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.take.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9744.length)].join(""));;
  }
};
cljs.core.take.cljs$core$IFn$_invoke$arity$1 = function(n) {
  if (typeof n === "number") {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(function() {
      var G__9747 = cljs.core.list(new cljs.core.Symbol(null, "number?", "number?", -1747282210, null), new cljs.core.Symbol(null, "n", "n", -2092305744, null));
      return cljs.core.pr_str.cljs$core$IFn$_invoke$arity$1 ? cljs.core.pr_str.cljs$core$IFn$_invoke$arity$1(G__9747) : cljs.core.pr_str.call(null, G__9747);
    }())].join(""));
  }
  return function(rf) {
    var na = cljs.core.volatile_BANG_(n);
    return function(na) {
      return function() {
        var G__9753 = null;
        var G__9753__0 = function() {
          return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
        };
        var G__9753__1 = function(result) {
          return rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null, result);
        };
        var G__9753__2 = function(result, input) {
          var n__$1 = cljs.core.deref(na);
          var nn = cljs.core._vreset_BANG_(na, cljs.core._deref(na) - 1);
          var result__$1 = n__$1 > 0 ? rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result, input) : rf.call(null, result, input) : result;
          if (!(nn > 0)) {
            return cljs.core.ensure_reduced(result__$1);
          } else {
            return result__$1;
          }
        };
        G__9753 = function(result, input) {
          switch(arguments.length) {
            case 0:
              return G__9753__0.call(this);
            case 1:
              return G__9753__1.call(this, result);
            case 2:
              return G__9753__2.call(this, result, input);
          }
          throw new Error("Invalid arity: " + arguments.length);
        };
        G__9753.cljs$core$IFn$_invoke$arity$0 = G__9753__0;
        G__9753.cljs$core$IFn$_invoke$arity$1 = G__9753__1;
        G__9753.cljs$core$IFn$_invoke$arity$2 = G__9753__2;
        return G__9753;
      }();
    }(na);
  };
};
cljs.core.take.cljs$core$IFn$_invoke$arity$2 = function(n, coll) {
  if (typeof n === "number") {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(function() {
      var G__9748 = cljs.core.list(new cljs.core.Symbol(null, "number?", "number?", -1747282210, null), new cljs.core.Symbol(null, "n", "n", -2092305744, null));
      return cljs.core.pr_str.cljs$core$IFn$_invoke$arity$1 ? cljs.core.pr_str.cljs$core$IFn$_invoke$arity$1(G__9748) : cljs.core.pr_str.call(null, G__9748);
    }())].join(""));
  }
  return new cljs.core.LazySeq(null, function() {
    if (n > 0) {
      var temp__4425__auto__ = cljs.core.seq(coll);
      if (temp__4425__auto__) {
        var s = temp__4425__auto__;
        return cljs.core.cons(cljs.core.first(s), cljs.core.take.cljs$core$IFn$_invoke$arity$2(n - 1, cljs.core.rest(s)));
      } else {
        return null;
      }
    } else {
      return null;
    }
  }, null, null);
};
cljs.core.take.cljs$lang$maxFixedArity = 2;
cljs.core.drop = function cljs$core$drop(var_args) {
  var args9754 = [];
  var len__7198__auto___9759 = arguments.length;
  var i__7199__auto___9760 = 0;
  while (true) {
    if (i__7199__auto___9760 < len__7198__auto___9759) {
      args9754.push(arguments[i__7199__auto___9760]);
      var G__9761 = i__7199__auto___9760 + 1;
      i__7199__auto___9760 = G__9761;
      continue;
    } else {
    }
    break;
  }
  var G__9756 = args9754.length;
  switch(G__9756) {
    case 1:
      return cljs.core.drop.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.drop.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9754.length)].join(""));;
  }
};
cljs.core.drop.cljs$core$IFn$_invoke$arity$1 = function(n) {
  if (typeof n === "number") {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(function() {
      var G__9757 = cljs.core.list(new cljs.core.Symbol(null, "number?", "number?", -1747282210, null), new cljs.core.Symbol(null, "n", "n", -2092305744, null));
      return cljs.core.pr_str.cljs$core$IFn$_invoke$arity$1 ? cljs.core.pr_str.cljs$core$IFn$_invoke$arity$1(G__9757) : cljs.core.pr_str.call(null, G__9757);
    }())].join(""));
  }
  return function(rf) {
    var na = cljs.core.volatile_BANG_(n);
    return function(na) {
      return function() {
        var G__9763 = null;
        var G__9763__0 = function() {
          return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
        };
        var G__9763__1 = function(result) {
          return rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null, result);
        };
        var G__9763__2 = function(result, input) {
          var n__$1 = cljs.core.deref(na);
          cljs.core._vreset_BANG_(na, cljs.core._deref(na) - 1);
          if (n__$1 > 0) {
            return result;
          } else {
            return rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result, input) : rf.call(null, result, input);
          }
        };
        G__9763 = function(result, input) {
          switch(arguments.length) {
            case 0:
              return G__9763__0.call(this);
            case 1:
              return G__9763__1.call(this, result);
            case 2:
              return G__9763__2.call(this, result, input);
          }
          throw new Error("Invalid arity: " + arguments.length);
        };
        G__9763.cljs$core$IFn$_invoke$arity$0 = G__9763__0;
        G__9763.cljs$core$IFn$_invoke$arity$1 = G__9763__1;
        G__9763.cljs$core$IFn$_invoke$arity$2 = G__9763__2;
        return G__9763;
      }();
    }(na);
  };
};
cljs.core.drop.cljs$core$IFn$_invoke$arity$2 = function(n, coll) {
  if (typeof n === "number") {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(function() {
      var G__9758 = cljs.core.list(new cljs.core.Symbol(null, "number?", "number?", -1747282210, null), new cljs.core.Symbol(null, "n", "n", -2092305744, null));
      return cljs.core.pr_str.cljs$core$IFn$_invoke$arity$1 ? cljs.core.pr_str.cljs$core$IFn$_invoke$arity$1(G__9758) : cljs.core.pr_str.call(null, G__9758);
    }())].join(""));
  }
  var step = function(n__$1, coll__$1) {
    while (true) {
      var s = cljs.core.seq(coll__$1);
      if (n__$1 > 0 && s) {
        var G__9764 = n__$1 - 1;
        var G__9765 = cljs.core.rest(s);
        n__$1 = G__9764;
        coll__$1 = G__9765;
        continue;
      } else {
        return s;
      }
      break;
    }
  };
  return new cljs.core.LazySeq(null, function(step) {
    return function() {
      return step(n, coll);
    };
  }(step), null, null);
};
cljs.core.drop.cljs$lang$maxFixedArity = 2;
cljs.core.drop_last = function cljs$core$drop_last(var_args) {
  var args9766 = [];
  var len__7198__auto___9769 = arguments.length;
  var i__7199__auto___9770 = 0;
  while (true) {
    if (i__7199__auto___9770 < len__7198__auto___9769) {
      args9766.push(arguments[i__7199__auto___9770]);
      var G__9771 = i__7199__auto___9770 + 1;
      i__7199__auto___9770 = G__9771;
      continue;
    } else {
    }
    break;
  }
  var G__9768 = args9766.length;
  switch(G__9768) {
    case 1:
      return cljs.core.drop_last.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.drop_last.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9766.length)].join(""));;
  }
};
cljs.core.drop_last.cljs$core$IFn$_invoke$arity$1 = function(s) {
  return cljs.core.drop_last.cljs$core$IFn$_invoke$arity$2(1, s);
};
cljs.core.drop_last.cljs$core$IFn$_invoke$arity$2 = function(n, s) {
  return cljs.core.map.cljs$core$IFn$_invoke$arity$3(function(x, _) {
    return x;
  }, s, cljs.core.drop.cljs$core$IFn$_invoke$arity$2(n, s));
};
cljs.core.drop_last.cljs$lang$maxFixedArity = 2;
cljs.core.take_last = function cljs$core$take_last(n, coll) {
  var s = cljs.core.seq(coll);
  var lead = cljs.core.seq(cljs.core.drop.cljs$core$IFn$_invoke$arity$2(n, coll));
  while (true) {
    if (lead) {
      var G__9773 = cljs.core.next(s);
      var G__9774 = cljs.core.next(lead);
      s = G__9773;
      lead = G__9774;
      continue;
    } else {
      return s;
    }
    break;
  }
};
cljs.core.drop_while = function cljs$core$drop_while(var_args) {
  var args9775 = [];
  var len__7198__auto___9780 = arguments.length;
  var i__7199__auto___9781 = 0;
  while (true) {
    if (i__7199__auto___9781 < len__7198__auto___9780) {
      args9775.push(arguments[i__7199__auto___9781]);
      var G__9782 = i__7199__auto___9781 + 1;
      i__7199__auto___9781 = G__9782;
      continue;
    } else {
    }
    break;
  }
  var G__9777 = args9775.length;
  switch(G__9777) {
    case 1:
      return cljs.core.drop_while.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.drop_while.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9775.length)].join(""));;
  }
};
cljs.core.drop_while.cljs$core$IFn$_invoke$arity$1 = function(pred) {
  return function(rf) {
    var da = cljs.core.volatile_BANG_(true);
    return function(da) {
      return function() {
        var G__9784 = null;
        var G__9784__0 = function() {
          return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
        };
        var G__9784__1 = function(result) {
          return rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null, result);
        };
        var G__9784__2 = function(result, input) {
          var drop_QMARK_ = cljs.core.deref(da);
          if (cljs.core.truth_(function() {
            var and__6128__auto__ = drop_QMARK_;
            if (cljs.core.truth_(and__6128__auto__)) {
              return pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(input) : pred.call(null, input);
            } else {
              return and__6128__auto__;
            }
          }())) {
            return result;
          } else {
            cljs.core.vreset_BANG_(da, null);
            return rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result, input) : rf.call(null, result, input);
          }
        };
        G__9784 = function(result, input) {
          switch(arguments.length) {
            case 0:
              return G__9784__0.call(this);
            case 1:
              return G__9784__1.call(this, result);
            case 2:
              return G__9784__2.call(this, result, input);
          }
          throw new Error("Invalid arity: " + arguments.length);
        };
        G__9784.cljs$core$IFn$_invoke$arity$0 = G__9784__0;
        G__9784.cljs$core$IFn$_invoke$arity$1 = G__9784__1;
        G__9784.cljs$core$IFn$_invoke$arity$2 = G__9784__2;
        return G__9784;
      }();
    }(da);
  };
};
cljs.core.drop_while.cljs$core$IFn$_invoke$arity$2 = function(pred, coll) {
  var step = function(pred__$1, coll__$1) {
    while (true) {
      var s = cljs.core.seq(coll__$1);
      if (cljs.core.truth_(function() {
        var and__6128__auto__ = s;
        if (and__6128__auto__) {
          var G__9779 = cljs.core.first(s);
          return pred__$1.cljs$core$IFn$_invoke$arity$1 ? pred__$1.cljs$core$IFn$_invoke$arity$1(G__9779) : pred__$1.call(null, G__9779);
        } else {
          return and__6128__auto__;
        }
      }())) {
        var G__9785 = pred__$1;
        var G__9786 = cljs.core.rest(s);
        pred__$1 = G__9785;
        coll__$1 = G__9786;
        continue;
      } else {
        return s;
      }
      break;
    }
  };
  return new cljs.core.LazySeq(null, function(step) {
    return function() {
      return step(pred, coll);
    };
  }(step), null, null);
};
cljs.core.drop_while.cljs$lang$maxFixedArity = 2;
cljs.core.cycle = function cljs$core$cycle(coll) {
  return new cljs.core.LazySeq(null, function() {
    var temp__4425__auto__ = cljs.core.seq(coll);
    if (temp__4425__auto__) {
      var s = temp__4425__auto__;
      return cljs.core.concat.cljs$core$IFn$_invoke$arity$2(s, cljs$core$cycle(s));
    } else {
      return null;
    }
  }, null, null);
};
cljs.core.split_at = function cljs$core$split_at(n, coll) {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.take.cljs$core$IFn$_invoke$arity$2(n, coll), cljs.core.drop.cljs$core$IFn$_invoke$arity$2(n, coll)], null);
};
cljs.core.repeat = function cljs$core$repeat(var_args) {
  var args9787 = [];
  var len__7198__auto___9790 = arguments.length;
  var i__7199__auto___9791 = 0;
  while (true) {
    if (i__7199__auto___9791 < len__7198__auto___9790) {
      args9787.push(arguments[i__7199__auto___9791]);
      var G__9792 = i__7199__auto___9791 + 1;
      i__7199__auto___9791 = G__9792;
      continue;
    } else {
    }
    break;
  }
  var G__9789 = args9787.length;
  switch(G__9789) {
    case 1:
      return cljs.core.repeat.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.repeat.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9787.length)].join(""));;
  }
};
cljs.core.repeat.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return new cljs.core.LazySeq(null, function() {
    return cljs.core.cons(x, cljs.core.repeat.cljs$core$IFn$_invoke$arity$1(x));
  }, null, null);
};
cljs.core.repeat.cljs$core$IFn$_invoke$arity$2 = function(n, x) {
  return cljs.core.take.cljs$core$IFn$_invoke$arity$2(n, cljs.core.repeat.cljs$core$IFn$_invoke$arity$1(x));
};
cljs.core.repeat.cljs$lang$maxFixedArity = 2;
cljs.core.replicate = function cljs$core$replicate(n, x) {
  return cljs.core.take.cljs$core$IFn$_invoke$arity$2(n, cljs.core.repeat.cljs$core$IFn$_invoke$arity$1(x));
};
cljs.core.repeatedly = function cljs$core$repeatedly(var_args) {
  var args9794 = [];
  var len__7198__auto___9797 = arguments.length;
  var i__7199__auto___9798 = 0;
  while (true) {
    if (i__7199__auto___9798 < len__7198__auto___9797) {
      args9794.push(arguments[i__7199__auto___9798]);
      var G__9799 = i__7199__auto___9798 + 1;
      i__7199__auto___9798 = G__9799;
      continue;
    } else {
    }
    break;
  }
  var G__9796 = args9794.length;
  switch(G__9796) {
    case 1:
      return cljs.core.repeatedly.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.repeatedly.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9794.length)].join(""));;
  }
};
cljs.core.repeatedly.cljs$core$IFn$_invoke$arity$1 = function(f) {
  return new cljs.core.LazySeq(null, function() {
    return cljs.core.cons(f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null), cljs.core.repeatedly.cljs$core$IFn$_invoke$arity$1(f));
  }, null, null);
};
cljs.core.repeatedly.cljs$core$IFn$_invoke$arity$2 = function(n, f) {
  return cljs.core.take.cljs$core$IFn$_invoke$arity$2(n, cljs.core.repeatedly.cljs$core$IFn$_invoke$arity$1(f));
};
cljs.core.repeatedly.cljs$lang$maxFixedArity = 2;
cljs.core.iterate = function cljs$core$iterate(f, x) {
  return cljs.core.cons(x, new cljs.core.LazySeq(null, function() {
    return cljs$core$iterate(f, f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(x) : f.call(null, x));
  }, null, null));
};
cljs.core.interleave = function cljs$core$interleave(var_args) {
  var args9803 = [];
  var len__7198__auto___9809 = arguments.length;
  var i__7199__auto___9810 = 0;
  while (true) {
    if (i__7199__auto___9810 < len__7198__auto___9809) {
      args9803.push(arguments[i__7199__auto___9810]);
      var G__9811 = i__7199__auto___9810 + 1;
      i__7199__auto___9810 = G__9811;
      continue;
    } else {
    }
    break;
  }
  var G__9808 = args9803.length;
  switch(G__9808) {
    case 2:
      return cljs.core.interleave.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args9803.slice(2), 0);
      return cljs.core.interleave.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
cljs.core.interleave.cljs$core$IFn$_invoke$arity$2 = function(c1, c2) {
  return new cljs.core.LazySeq(null, function() {
    var s1 = cljs.core.seq(c1);
    var s2 = cljs.core.seq(c2);
    if (s1 && s2) {
      return cljs.core.cons(cljs.core.first(s1), cljs.core.cons(cljs.core.first(s2), cljs.core.interleave.cljs$core$IFn$_invoke$arity$2(cljs.core.rest(s1), cljs.core.rest(s2))));
    } else {
      return null;
    }
  }, null, null);
};
cljs.core.interleave.cljs$core$IFn$_invoke$arity$variadic = function(c1, c2, colls) {
  return new cljs.core.LazySeq(null, function() {
    var ss = cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs.core.seq, cljs.core.conj.cljs$core$IFn$_invoke$arity$variadic(colls, c2, cljs.core.array_seq([c1], 0)));
    if (cljs.core.every_QMARK_(cljs.core.identity, ss)) {
      return cljs.core.concat.cljs$core$IFn$_invoke$arity$2(cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs.core.first, ss), cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.interleave, cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs.core.rest, ss)));
    } else {
      return null;
    }
  }, null, null);
};
cljs.core.interleave.cljs$lang$applyTo = function(seq9804) {
  var G__9805 = cljs.core.first(seq9804);
  var seq9804__$1 = cljs.core.next(seq9804);
  var G__9806 = cljs.core.first(seq9804__$1);
  var seq9804__$2 = cljs.core.next(seq9804__$1);
  return cljs.core.interleave.cljs$core$IFn$_invoke$arity$variadic(G__9805, G__9806, seq9804__$2);
};
cljs.core.interleave.cljs$lang$maxFixedArity = 2;
cljs.core.interpose = function cljs$core$interpose(var_args) {
  var args9813 = [];
  var len__7198__auto___9816 = arguments.length;
  var i__7199__auto___9817 = 0;
  while (true) {
    if (i__7199__auto___9817 < len__7198__auto___9816) {
      args9813.push(arguments[i__7199__auto___9817]);
      var G__9818 = i__7199__auto___9817 + 1;
      i__7199__auto___9817 = G__9818;
      continue;
    } else {
    }
    break;
  }
  var G__9815 = args9813.length;
  switch(G__9815) {
    case 1:
      return cljs.core.interpose.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.interpose.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9813.length)].join(""));;
  }
};
cljs.core.interpose.cljs$core$IFn$_invoke$arity$1 = function(sep) {
  return function(rf) {
    var started = cljs.core.volatile_BANG_(false);
    return function(started) {
      return function() {
        var G__9820 = null;
        var G__9820__0 = function() {
          return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
        };
        var G__9820__1 = function(result) {
          return rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null, result);
        };
        var G__9820__2 = function(result, input) {
          if (cljs.core.truth_(cljs.core.deref(started))) {
            var sepr = rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result, sep) : rf.call(null, result, sep);
            if (cljs.core.reduced_QMARK_(sepr)) {
              return sepr;
            } else {
              return rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(sepr, input) : rf.call(null, sepr, input);
            }
          } else {
            cljs.core.vreset_BANG_(started, true);
            return rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result, input) : rf.call(null, result, input);
          }
        };
        G__9820 = function(result, input) {
          switch(arguments.length) {
            case 0:
              return G__9820__0.call(this);
            case 1:
              return G__9820__1.call(this, result);
            case 2:
              return G__9820__2.call(this, result, input);
          }
          throw new Error("Invalid arity: " + arguments.length);
        };
        G__9820.cljs$core$IFn$_invoke$arity$0 = G__9820__0;
        G__9820.cljs$core$IFn$_invoke$arity$1 = G__9820__1;
        G__9820.cljs$core$IFn$_invoke$arity$2 = G__9820__2;
        return G__9820;
      }();
    }(started);
  };
};
cljs.core.interpose.cljs$core$IFn$_invoke$arity$2 = function(sep, coll) {
  return cljs.core.drop.cljs$core$IFn$_invoke$arity$2(1, cljs.core.interleave.cljs$core$IFn$_invoke$arity$2(cljs.core.repeat.cljs$core$IFn$_invoke$arity$1(sep), coll));
};
cljs.core.interpose.cljs$lang$maxFixedArity = 2;
cljs.core.flatten1 = function cljs$core$flatten1(colls) {
  var cat = function cljs$core$flatten1_$_cat(coll, colls__$1) {
    return new cljs.core.LazySeq(null, function() {
      var temp__4423__auto__ = cljs.core.seq(coll);
      if (temp__4423__auto__) {
        var coll__$1 = temp__4423__auto__;
        return cljs.core.cons(cljs.core.first(coll__$1), cljs$core$flatten1_$_cat(cljs.core.rest(coll__$1), colls__$1));
      } else {
        if (cljs.core.seq(colls__$1)) {
          return cljs$core$flatten1_$_cat(cljs.core.first(colls__$1), cljs.core.rest(colls__$1));
        } else {
          return null;
        }
      }
    }, null, null);
  };
  return cat(null, colls);
};
cljs.core.mapcat = function cljs$core$mapcat(var_args) {
  var args9829 = [];
  var len__7198__auto___9834 = arguments.length;
  var i__7199__auto___9835 = 0;
  while (true) {
    if (i__7199__auto___9835 < len__7198__auto___9834) {
      args9829.push(arguments[i__7199__auto___9835]);
      var G__9836 = i__7199__auto___9835 + 1;
      i__7199__auto___9835 = G__9836;
      continue;
    } else {
    }
    break;
  }
  var G__9833 = args9829.length;
  switch(G__9833) {
    case 1:
      return cljs.core.mapcat.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args9829.slice(1), 0);
      return cljs.core.mapcat.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7217__auto__);
  }
};
cljs.core.mapcat.cljs$core$IFn$_invoke$arity$1 = function(f) {
  return cljs.core.comp.cljs$core$IFn$_invoke$arity$2(cljs.core.map.cljs$core$IFn$_invoke$arity$1(f), cljs.core.cat);
};
cljs.core.mapcat.cljs$core$IFn$_invoke$arity$variadic = function(f, colls) {
  return cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.concat, cljs.core.apply.cljs$core$IFn$_invoke$arity$3(cljs.core.map, f, colls));
};
cljs.core.mapcat.cljs$lang$applyTo = function(seq9830) {
  var G__9831 = cljs.core.first(seq9830);
  var seq9830__$1 = cljs.core.next(seq9830);
  return cljs.core.mapcat.cljs$core$IFn$_invoke$arity$variadic(G__9831, seq9830__$1);
};
cljs.core.mapcat.cljs$lang$maxFixedArity = 1;
cljs.core.filter = function cljs$core$filter(var_args) {
  var args9838 = [];
  var len__7198__auto___9842 = arguments.length;
  var i__7199__auto___9843 = 0;
  while (true) {
    if (i__7199__auto___9843 < len__7198__auto___9842) {
      args9838.push(arguments[i__7199__auto___9843]);
      var G__9844 = i__7199__auto___9843 + 1;
      i__7199__auto___9843 = G__9844;
      continue;
    } else {
    }
    break;
  }
  var G__9840 = args9838.length;
  switch(G__9840) {
    case 1:
      return cljs.core.filter.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.filter.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9838.length)].join(""));;
  }
};
cljs.core.filter.cljs$core$IFn$_invoke$arity$1 = function(pred) {
  return function(rf) {
    return function() {
      var G__9846 = null;
      var G__9846__0 = function() {
        return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
      };
      var G__9846__1 = function(result) {
        return rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null, result);
      };
      var G__9846__2 = function(result, input) {
        if (cljs.core.truth_(pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(input) : pred.call(null, input))) {
          return rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result, input) : rf.call(null, result, input);
        } else {
          return result;
        }
      };
      G__9846 = function(result, input) {
        switch(arguments.length) {
          case 0:
            return G__9846__0.call(this);
          case 1:
            return G__9846__1.call(this, result);
          case 2:
            return G__9846__2.call(this, result, input);
        }
        throw new Error("Invalid arity: " + arguments.length);
      };
      G__9846.cljs$core$IFn$_invoke$arity$0 = G__9846__0;
      G__9846.cljs$core$IFn$_invoke$arity$1 = G__9846__1;
      G__9846.cljs$core$IFn$_invoke$arity$2 = G__9846__2;
      return G__9846;
    }();
  };
};
cljs.core.filter.cljs$core$IFn$_invoke$arity$2 = function(pred, coll) {
  return new cljs.core.LazySeq(null, function() {
    var temp__4425__auto__ = cljs.core.seq(coll);
    if (temp__4425__auto__) {
      var s = temp__4425__auto__;
      if (cljs.core.chunked_seq_QMARK_(s)) {
        var c = cljs.core.chunk_first(s);
        var size = cljs.core.count(c);
        var b = cljs.core.chunk_buffer(size);
        var n__7043__auto___9847 = size;
        var i_9848 = 0;
        while (true) {
          if (i_9848 < n__7043__auto___9847) {
            if (cljs.core.truth_(function() {
              var G__9841 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(c, i_9848);
              return pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(G__9841) : pred.call(null, G__9841);
            }())) {
              cljs.core.chunk_append(b, cljs.core._nth.cljs$core$IFn$_invoke$arity$2(c, i_9848));
            } else {
            }
            var G__9849 = i_9848 + 1;
            i_9848 = G__9849;
            continue;
          } else {
          }
          break;
        }
        return cljs.core.chunk_cons(cljs.core.chunk(b), cljs.core.filter.cljs$core$IFn$_invoke$arity$2(pred, cljs.core.chunk_rest(s)));
      } else {
        var f = cljs.core.first(s);
        var r = cljs.core.rest(s);
        if (cljs.core.truth_(pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(f) : pred.call(null, f))) {
          return cljs.core.cons(f, cljs.core.filter.cljs$core$IFn$_invoke$arity$2(pred, r));
        } else {
          return cljs.core.filter.cljs$core$IFn$_invoke$arity$2(pred, r);
        }
      }
    } else {
      return null;
    }
  }, null, null);
};
cljs.core.filter.cljs$lang$maxFixedArity = 2;
cljs.core.remove = function cljs$core$remove(var_args) {
  var args9850 = [];
  var len__7198__auto___9853 = arguments.length;
  var i__7199__auto___9854 = 0;
  while (true) {
    if (i__7199__auto___9854 < len__7198__auto___9853) {
      args9850.push(arguments[i__7199__auto___9854]);
      var G__9855 = i__7199__auto___9854 + 1;
      i__7199__auto___9854 = G__9855;
      continue;
    } else {
    }
    break;
  }
  var G__9852 = args9850.length;
  switch(G__9852) {
    case 1:
      return cljs.core.remove.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.remove.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9850.length)].join(""));;
  }
};
cljs.core.remove.cljs$core$IFn$_invoke$arity$1 = function(pred) {
  return cljs.core.filter.cljs$core$IFn$_invoke$arity$1(cljs.core.complement(pred));
};
cljs.core.remove.cljs$core$IFn$_invoke$arity$2 = function(pred, coll) {
  return cljs.core.filter.cljs$core$IFn$_invoke$arity$2(cljs.core.complement(pred), coll);
};
cljs.core.remove.cljs$lang$maxFixedArity = 2;
cljs.core.tree_seq = function cljs$core$tree_seq(branch_QMARK_, children, root) {
  var walk = function cljs$core$tree_seq_$_walk(node) {
    return new cljs.core.LazySeq(null, function() {
      return cljs.core.cons(node, cljs.core.truth_(branch_QMARK_.cljs$core$IFn$_invoke$arity$1 ? branch_QMARK_.cljs$core$IFn$_invoke$arity$1(node) : branch_QMARK_.call(null, node)) ? cljs.core.mapcat.cljs$core$IFn$_invoke$arity$variadic(cljs$core$tree_seq_$_walk, cljs.core.array_seq([children.cljs$core$IFn$_invoke$arity$1 ? children.cljs$core$IFn$_invoke$arity$1(node) : children.call(null, node)], 0)) : null);
    }, null, null);
  };
  return walk(root);
};
cljs.core.flatten = function cljs$core$flatten(x) {
  return cljs.core.filter.cljs$core$IFn$_invoke$arity$2(function(p1__9857_SHARP_) {
    return !cljs.core.sequential_QMARK_(p1__9857_SHARP_);
  }, cljs.core.rest(cljs.core.tree_seq(cljs.core.sequential_QMARK_, cljs.core.seq, x)));
};
cljs.core.into = function cljs$core$into(var_args) {
  var args9858 = [];
  var len__7198__auto___9863 = arguments.length;
  var i__7199__auto___9864 = 0;
  while (true) {
    if (i__7199__auto___9864 < len__7198__auto___9863) {
      args9858.push(arguments[i__7199__auto___9864]);
      var G__9865 = i__7199__auto___9864 + 1;
      i__7199__auto___9864 = G__9865;
      continue;
    } else {
    }
    break;
  }
  var G__9860 = args9858.length;
  switch(G__9860) {
    case 2:
      return cljs.core.into.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.into.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9858.length)].join(""));;
  }
};
cljs.core.into.cljs$core$IFn$_invoke$arity$2 = function(to, from) {
  if (!(to == null)) {
    if (!(to == null) ? to.cljs$lang$protocol_mask$partition1$ & 4 || to.cljs$core$IEditableCollection$ ? true : false : false) {
      return cljs.core.with_meta(cljs.core.persistent_BANG_(cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._conj_BANG_, cljs.core.transient$(to), from)), cljs.core.meta(to));
    } else {
      return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._conj, to, from);
    }
  } else {
    return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.conj, cljs.core.List.EMPTY, from);
  }
};
cljs.core.into.cljs$core$IFn$_invoke$arity$3 = function(to, xform, from) {
  if (!(to == null) ? to.cljs$lang$protocol_mask$partition1$ & 4 || to.cljs$core$IEditableCollection$ ? true : false : false) {
    return cljs.core.with_meta(cljs.core.persistent_BANG_(cljs.core.transduce.cljs$core$IFn$_invoke$arity$4(xform, cljs.core.conj_BANG_, cljs.core.transient$(to), from)), cljs.core.meta(to));
  } else {
    return cljs.core.transduce.cljs$core$IFn$_invoke$arity$4(xform, cljs.core.conj, to, from);
  }
};
cljs.core.into.cljs$lang$maxFixedArity = 3;
cljs.core.mapv = function cljs$core$mapv(var_args) {
  var args9867 = [];
  var len__7198__auto___9875 = arguments.length;
  var i__7199__auto___9876 = 0;
  while (true) {
    if (i__7199__auto___9876 < len__7198__auto___9875) {
      args9867.push(arguments[i__7199__auto___9876]);
      var G__9877 = i__7199__auto___9876 + 1;
      i__7199__auto___9876 = G__9877;
      continue;
    } else {
    }
    break;
  }
  var G__9874 = args9867.length;
  switch(G__9874) {
    case 2:
      return cljs.core.mapv.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.mapv.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 4:
      return cljs.core.mapv.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args9867.slice(4), 0);
      return cljs.core.mapv.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], arguments[3], argseq__7217__auto__);
  }
};
cljs.core.mapv.cljs$core$IFn$_invoke$arity$2 = function(f, coll) {
  return cljs.core.persistent_BANG_(cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(v, o) {
    return cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$2(v, f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(o) : f.call(null, o));
  }, cljs.core.transient$(cljs.core.PersistentVector.EMPTY), coll));
};
cljs.core.mapv.cljs$core$IFn$_invoke$arity$3 = function(f, c1, c2) {
  return cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentVector.EMPTY, cljs.core.map.cljs$core$IFn$_invoke$arity$3(f, c1, c2));
};
cljs.core.mapv.cljs$core$IFn$_invoke$arity$4 = function(f, c1, c2, c3) {
  return cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentVector.EMPTY, cljs.core.map.cljs$core$IFn$_invoke$arity$4(f, c1, c2, c3));
};
cljs.core.mapv.cljs$core$IFn$_invoke$arity$variadic = function(f, c1, c2, c3, colls) {
  return cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentVector.EMPTY, cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(cljs.core.map, f, c1, c2, c3, cljs.core.array_seq([colls], 0)));
};
cljs.core.mapv.cljs$lang$applyTo = function(seq9868) {
  var G__9869 = cljs.core.first(seq9868);
  var seq9868__$1 = cljs.core.next(seq9868);
  var G__9870 = cljs.core.first(seq9868__$1);
  var seq9868__$2 = cljs.core.next(seq9868__$1);
  var G__9871 = cljs.core.first(seq9868__$2);
  var seq9868__$3 = cljs.core.next(seq9868__$2);
  var G__9872 = cljs.core.first(seq9868__$3);
  var seq9868__$4 = cljs.core.next(seq9868__$3);
  return cljs.core.mapv.cljs$core$IFn$_invoke$arity$variadic(G__9869, G__9870, G__9871, G__9872, seq9868__$4);
};
cljs.core.mapv.cljs$lang$maxFixedArity = 4;
cljs.core.filterv = function cljs$core$filterv(pred, coll) {
  return cljs.core.persistent_BANG_(cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(v, o) {
    if (cljs.core.truth_(pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(o) : pred.call(null, o))) {
      return cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$2(v, o);
    } else {
      return v;
    }
  }, cljs.core.transient$(cljs.core.PersistentVector.EMPTY), coll));
};
cljs.core.partition = function cljs$core$partition(var_args) {
  var args9879 = [];
  var len__7198__auto___9882 = arguments.length;
  var i__7199__auto___9883 = 0;
  while (true) {
    if (i__7199__auto___9883 < len__7198__auto___9882) {
      args9879.push(arguments[i__7199__auto___9883]);
      var G__9884 = i__7199__auto___9883 + 1;
      i__7199__auto___9883 = G__9884;
      continue;
    } else {
    }
    break;
  }
  var G__9881 = args9879.length;
  switch(G__9881) {
    case 2:
      return cljs.core.partition.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.partition.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 4:
      return cljs.core.partition.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9879.length)].join(""));;
  }
};
cljs.core.partition.cljs$core$IFn$_invoke$arity$2 = function(n, coll) {
  return cljs.core.partition.cljs$core$IFn$_invoke$arity$3(n, n, coll);
};
cljs.core.partition.cljs$core$IFn$_invoke$arity$3 = function(n, step, coll) {
  return new cljs.core.LazySeq(null, function() {
    var temp__4425__auto__ = cljs.core.seq(coll);
    if (temp__4425__auto__) {
      var s = temp__4425__auto__;
      var p = cljs.core.take.cljs$core$IFn$_invoke$arity$2(n, s);
      if (n === cljs.core.count(p)) {
        return cljs.core.cons(p, cljs.core.partition.cljs$core$IFn$_invoke$arity$3(n, step, cljs.core.drop.cljs$core$IFn$_invoke$arity$2(step, s)));
      } else {
        return null;
      }
    } else {
      return null;
    }
  }, null, null);
};
cljs.core.partition.cljs$core$IFn$_invoke$arity$4 = function(n, step, pad, coll) {
  return new cljs.core.LazySeq(null, function() {
    var temp__4425__auto__ = cljs.core.seq(coll);
    if (temp__4425__auto__) {
      var s = temp__4425__auto__;
      var p = cljs.core.take.cljs$core$IFn$_invoke$arity$2(n, s);
      if (n === cljs.core.count(p)) {
        return cljs.core.cons(p, cljs.core.partition.cljs$core$IFn$_invoke$arity$4(n, step, pad, cljs.core.drop.cljs$core$IFn$_invoke$arity$2(step, s)));
      } else {
        return cljs.core._conj(cljs.core.List.EMPTY, cljs.core.take.cljs$core$IFn$_invoke$arity$2(n, cljs.core.concat.cljs$core$IFn$_invoke$arity$2(p, pad)));
      }
    } else {
      return null;
    }
  }, null, null);
};
cljs.core.partition.cljs$lang$maxFixedArity = 4;
cljs.core.get_in = function cljs$core$get_in(var_args) {
  var args9886 = [];
  var len__7198__auto___9890 = arguments.length;
  var i__7199__auto___9891 = 0;
  while (true) {
    if (i__7199__auto___9891 < len__7198__auto___9890) {
      args9886.push(arguments[i__7199__auto___9891]);
      var G__9892 = i__7199__auto___9891 + 1;
      i__7199__auto___9891 = G__9892;
      continue;
    } else {
    }
    break;
  }
  var G__9888 = args9886.length;
  switch(G__9888) {
    case 2:
      return cljs.core.get_in.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.get_in.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args9886.length)].join(""));;
  }
};
cljs.core.get_in.cljs$core$IFn$_invoke$arity$2 = function(m, ks) {
  return cljs.core.get_in.cljs$core$IFn$_invoke$arity$3(m, ks, null);
};
cljs.core.get_in.cljs$core$IFn$_invoke$arity$3 = function(m, ks, not_found) {
  var sentinel = cljs.core.lookup_sentinel;
  var m__$1 = m;
  var ks__$1 = cljs.core.seq(ks);
  while (true) {
    if (ks__$1) {
      if (!(!(m__$1 == null) ? m__$1.cljs$lang$protocol_mask$partition0$ & 256 || m__$1.cljs$core$ILookup$ ? true : !m__$1.cljs$lang$protocol_mask$partition0$ ? cljs.core.native_satisfies_QMARK_(cljs.core.ILookup, m__$1) : false : cljs.core.native_satisfies_QMARK_(cljs.core.ILookup, m__$1))) {
        return not_found;
      } else {
        var m__$2 = cljs.core.get.cljs$core$IFn$_invoke$arity$3(m__$1, cljs.core.first(ks__$1), sentinel);
        if (sentinel === m__$2) {
          return not_found;
        } else {
          var G__9894 = sentinel;
          var G__9895 = m__$2;
          var G__9896 = cljs.core.next(ks__$1);
          sentinel = G__9894;
          m__$1 = G__9895;
          ks__$1 = G__9896;
          continue;
        }
      }
    } else {
      return m__$1;
    }
    break;
  }
};
cljs.core.get_in.cljs$lang$maxFixedArity = 3;
cljs.core.assoc_in = function cljs$core$assoc_in(m, p__9897, v) {
  var vec__9902 = p__9897;
  var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9902, 0, null);
  var ks = cljs.core.nthnext(vec__9902, 1);
  if (cljs.core.truth_(ks)) {
    return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m, k, cljs$core$assoc_in(cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k), ks, v));
  } else {
    return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m, k, v);
  }
};
cljs.core.update_in = function cljs$core$update_in(var_args) {
  var args9903 = [];
  var len__7198__auto___9933 = arguments.length;
  var i__7199__auto___9934 = 0;
  while (true) {
    if (i__7199__auto___9934 < len__7198__auto___9933) {
      args9903.push(arguments[i__7199__auto___9934]);
      var G__9935 = i__7199__auto___9934 + 1;
      i__7199__auto___9934 = G__9935;
      continue;
    } else {
    }
    break;
  }
  var G__9912 = args9903.length;
  switch(G__9912) {
    case 3:
      return cljs.core.update_in.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 4:
      return cljs.core.update_in.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    case 5:
      return cljs.core.update_in.cljs$core$IFn$_invoke$arity$5(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);
      break;
    case 6:
      return cljs.core.update_in.cljs$core$IFn$_invoke$arity$6(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args9903.slice(6), 0);
      return cljs.core.update_in.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], argseq__7217__auto__);
  }
};
cljs.core.update_in.cljs$core$IFn$_invoke$arity$3 = function(m, p__9913, f) {
  var vec__9914 = p__9913;
  var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9914, 0, null);
  var ks = cljs.core.nthnext(vec__9914, 1);
  if (cljs.core.truth_(ks)) {
    return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m, k, cljs.core.update_in.cljs$core$IFn$_invoke$arity$3(cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k), ks, f));
  } else {
    return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m, k, function() {
      var G__9915 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k);
      return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__9915) : f.call(null, G__9915);
    }());
  }
};
cljs.core.update_in.cljs$core$IFn$_invoke$arity$4 = function(m, p__9916, f, a) {
  var vec__9917 = p__9916;
  var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9917, 0, null);
  var ks = cljs.core.nthnext(vec__9917, 1);
  if (cljs.core.truth_(ks)) {
    return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m, k, cljs.core.update_in.cljs$core$IFn$_invoke$arity$4(cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k), ks, f, a));
  } else {
    return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m, k, function() {
      var G__9918 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k);
      var G__9919 = a;
      return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__9918, G__9919) : f.call(null, G__9918, G__9919);
    }());
  }
};
cljs.core.update_in.cljs$core$IFn$_invoke$arity$5 = function(m, p__9920, f, a, b) {
  var vec__9921 = p__9920;
  var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9921, 0, null);
  var ks = cljs.core.nthnext(vec__9921, 1);
  if (cljs.core.truth_(ks)) {
    return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m, k, cljs.core.update_in.cljs$core$IFn$_invoke$arity$5(cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k), ks, f, a, b));
  } else {
    return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m, k, function() {
      var G__9922 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k);
      var G__9923 = a;
      var G__9924 = b;
      return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__9922, G__9923, G__9924) : f.call(null, G__9922, G__9923, G__9924);
    }());
  }
};
cljs.core.update_in.cljs$core$IFn$_invoke$arity$6 = function(m, p__9925, f, a, b, c) {
  var vec__9926 = p__9925;
  var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9926, 0, null);
  var ks = cljs.core.nthnext(vec__9926, 1);
  if (cljs.core.truth_(ks)) {
    return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m, k, cljs.core.update_in.cljs$core$IFn$_invoke$arity$6(cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k), ks, f, a, b, c));
  } else {
    return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m, k, function() {
      var G__9927 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k);
      var G__9928 = a;
      var G__9929 = b;
      var G__9930 = c;
      return f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(G__9927, G__9928, G__9929, G__9930) : f.call(null, G__9927, G__9928, G__9929, G__9930);
    }());
  }
};
cljs.core.update_in.cljs$core$IFn$_invoke$arity$variadic = function(m, p__9931, f, a, b, c, args) {
  var vec__9932 = p__9931;
  var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9932, 0, null);
  var ks = cljs.core.nthnext(vec__9932, 1);
  if (cljs.core.truth_(ks)) {
    return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m, k, cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(cljs.core.update_in, cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k), ks, f, a, cljs.core.array_seq([b, c, args], 0)));
  } else {
    return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m, k, cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(f, cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k), a, b, c, cljs.core.array_seq([args], 0)));
  }
};
cljs.core.update_in.cljs$lang$applyTo = function(seq9904) {
  var G__9905 = cljs.core.first(seq9904);
  var seq9904__$1 = cljs.core.next(seq9904);
  var G__9906 = cljs.core.first(seq9904__$1);
  var seq9904__$2 = cljs.core.next(seq9904__$1);
  var G__9907 = cljs.core.first(seq9904__$2);
  var seq9904__$3 = cljs.core.next(seq9904__$2);
  var G__9908 = cljs.core.first(seq9904__$3);
  var seq9904__$4 = cljs.core.next(seq9904__$3);
  var G__9909 = cljs.core.first(seq9904__$4);
  var seq9904__$5 = cljs.core.next(seq9904__$4);
  var G__9910 = cljs.core.first(seq9904__$5);
  var seq9904__$6 = cljs.core.next(seq9904__$5);
  return cljs.core.update_in.cljs$core$IFn$_invoke$arity$variadic(G__9905, G__9906, G__9907, G__9908, G__9909, G__9910, seq9904__$6);
};
cljs.core.update_in.cljs$lang$maxFixedArity = 6;
cljs.core.update = function cljs$core$update(var_args) {
  var args9937 = [];
  var len__7198__auto___9957 = arguments.length;
  var i__7199__auto___9958 = 0;
  while (true) {
    if (i__7199__auto___9958 < len__7198__auto___9957) {
      args9937.push(arguments[i__7199__auto___9958]);
      var G__9959 = i__7199__auto___9958 + 1;
      i__7199__auto___9958 = G__9959;
      continue;
    } else {
    }
    break;
  }
  var G__9946 = args9937.length;
  switch(G__9946) {
    case 3:
      return cljs.core.update.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 4:
      return cljs.core.update.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    case 5:
      return cljs.core.update.cljs$core$IFn$_invoke$arity$5(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);
      break;
    case 6:
      return cljs.core.update.cljs$core$IFn$_invoke$arity$6(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args9937.slice(6), 0);
      return cljs.core.update.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], argseq__7217__auto__);
  }
};
cljs.core.update.cljs$core$IFn$_invoke$arity$3 = function(m, k, f) {
  return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m, k, function() {
    var G__9947 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k);
    return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__9947) : f.call(null, G__9947);
  }());
};
cljs.core.update.cljs$core$IFn$_invoke$arity$4 = function(m, k, f, x) {
  return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m, k, function() {
    var G__9948 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k);
    var G__9949 = x;
    return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__9948, G__9949) : f.call(null, G__9948, G__9949);
  }());
};
cljs.core.update.cljs$core$IFn$_invoke$arity$5 = function(m, k, f, x, y) {
  return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m, k, function() {
    var G__9950 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k);
    var G__9951 = x;
    var G__9952 = y;
    return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__9950, G__9951, G__9952) : f.call(null, G__9950, G__9951, G__9952);
  }());
};
cljs.core.update.cljs$core$IFn$_invoke$arity$6 = function(m, k, f, x, y, z) {
  return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m, k, function() {
    var G__9953 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k);
    var G__9954 = x;
    var G__9955 = y;
    var G__9956 = z;
    return f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(G__9953, G__9954, G__9955, G__9956) : f.call(null, G__9953, G__9954, G__9955, G__9956);
  }());
};
cljs.core.update.cljs$core$IFn$_invoke$arity$variadic = function(m, k, f, x, y, z, more) {
  return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m, k, cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(f, cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k), x, y, z, cljs.core.array_seq([more], 0)));
};
cljs.core.update.cljs$lang$applyTo = function(seq9938) {
  var G__9939 = cljs.core.first(seq9938);
  var seq9938__$1 = cljs.core.next(seq9938);
  var G__9940 = cljs.core.first(seq9938__$1);
  var seq9938__$2 = cljs.core.next(seq9938__$1);
  var G__9941 = cljs.core.first(seq9938__$2);
  var seq9938__$3 = cljs.core.next(seq9938__$2);
  var G__9942 = cljs.core.first(seq9938__$3);
  var seq9938__$4 = cljs.core.next(seq9938__$3);
  var G__9943 = cljs.core.first(seq9938__$4);
  var seq9938__$5 = cljs.core.next(seq9938__$4);
  var G__9944 = cljs.core.first(seq9938__$5);
  var seq9938__$6 = cljs.core.next(seq9938__$5);
  return cljs.core.update.cljs$core$IFn$_invoke$arity$variadic(G__9939, G__9940, G__9941, G__9942, G__9943, G__9944, seq9938__$6);
};
cljs.core.update.cljs$lang$maxFixedArity = 6;
cljs.core.VectorNode = function(edit, arr) {
  this.edit = edit;
  this.arr = arr;
};
cljs.core.VectorNode.getBasis = function() {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "edit", "edit", -1302639, null), new cljs.core.Symbol(null, "arr", "arr", 2115492975, null)], null);
};
cljs.core.VectorNode.cljs$lang$type = true;
cljs.core.VectorNode.cljs$lang$ctorStr = "cljs.core/VectorNode";
cljs.core.VectorNode.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/VectorNode");
};
cljs.core.__GT_VectorNode = function cljs$core$__GT_VectorNode(edit, arr) {
  return new cljs.core.VectorNode(edit, arr);
};
cljs.core.pv_fresh_node = function cljs$core$pv_fresh_node(edit) {
  return new cljs.core.VectorNode(edit, [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]);
};
cljs.core.pv_aget = function cljs$core$pv_aget(node, idx) {
  return node.arr[idx];
};
cljs.core.pv_aset = function cljs$core$pv_aset(node, idx, val) {
  return node.arr[idx] = val;
};
cljs.core.pv_clone_node = function cljs$core$pv_clone_node(node) {
  return new cljs.core.VectorNode(node.edit, cljs.core.aclone(node.arr));
};
cljs.core.tail_off = function cljs$core$tail_off(pv) {
  var cnt = pv.cnt;
  if (cnt < 32) {
    return 0;
  } else {
    return cnt - 1 >>> 5 << 5;
  }
};
cljs.core.new_path = function cljs$core$new_path(edit, level, node) {
  var ll = level;
  var ret = node;
  while (true) {
    if (ll === 0) {
      return ret;
    } else {
      var embed = ret;
      var r = cljs.core.pv_fresh_node(edit);
      var _ = cljs.core.pv_aset(r, 0, embed);
      var G__9961 = ll - 5;
      var G__9962 = r;
      ll = G__9961;
      ret = G__9962;
      continue;
    }
    break;
  }
};
cljs.core.push_tail = function cljs$core$push_tail(pv, level, parent, tailnode) {
  var ret = cljs.core.pv_clone_node(parent);
  var subidx = pv.cnt - 1 >>> level & 31;
  if (5 === level) {
    cljs.core.pv_aset(ret, subidx, tailnode);
    return ret;
  } else {
    var child = cljs.core.pv_aget(parent, subidx);
    if (!(child == null)) {
      var node_to_insert = cljs$core$push_tail(pv, level - 5, child, tailnode);
      cljs.core.pv_aset(ret, subidx, node_to_insert);
      return ret;
    } else {
      var node_to_insert = cljs.core.new_path(null, level - 5, tailnode);
      cljs.core.pv_aset(ret, subidx, node_to_insert);
      return ret;
    }
  }
};
cljs.core.vector_index_out_of_bounds = function cljs$core$vector_index_out_of_bounds(i, cnt) {
  throw new Error([cljs.core.str("No item "), cljs.core.str(i), cljs.core.str(" in vector of length "), cljs.core.str(cnt)].join(""));
};
cljs.core.first_array_for_longvec = function cljs$core$first_array_for_longvec(pv) {
  var node = pv.root;
  var level = pv.shift;
  while (true) {
    if (level > 0) {
      var G__9967 = cljs.core.pv_aget(node, 0);
      var G__9968 = level - 5;
      node = G__9967;
      level = G__9968;
      continue;
    } else {
      return node.arr;
    }
    break;
  }
};
cljs.core.unchecked_array_for = function cljs$core$unchecked_array_for(pv, i) {
  if (i >= cljs.core.tail_off(pv)) {
    return pv.tail;
  } else {
    var node = pv.root;
    var level = pv.shift;
    while (true) {
      if (level > 0) {
        var G__9969 = cljs.core.pv_aget(node, i >>> level & 31);
        var G__9970 = level - 5;
        node = G__9969;
        level = G__9970;
        continue;
      } else {
        return node.arr;
      }
      break;
    }
  }
};
cljs.core.array_for = function cljs$core$array_for(pv, i) {
  if (0 <= i && i < pv.cnt) {
    return cljs.core.unchecked_array_for(pv, i);
  } else {
    return cljs.core.vector_index_out_of_bounds(i, pv.cnt);
  }
};
cljs.core.do_assoc = function cljs$core$do_assoc(pv, level, node, i, val) {
  var ret = cljs.core.pv_clone_node(node);
  if (level === 0) {
    cljs.core.pv_aset(ret, i & 31, val);
    return ret;
  } else {
    var subidx = i >>> level & 31;
    cljs.core.pv_aset(ret, subidx, cljs$core$do_assoc(pv, level - 5, cljs.core.pv_aget(node, subidx), i, val));
    return ret;
  }
};
cljs.core.pop_tail = function cljs$core$pop_tail(pv, level, node) {
  var subidx = pv.cnt - 2 >>> level & 31;
  if (level > 5) {
    var new_child = cljs$core$pop_tail(pv, level - 5, cljs.core.pv_aget(node, subidx));
    if (new_child == null && subidx === 0) {
      return null;
    } else {
      var ret = cljs.core.pv_clone_node(node);
      cljs.core.pv_aset(ret, subidx, new_child);
      return ret;
    }
  } else {
    if (subidx === 0) {
      return null;
    } else {
      var ret = cljs.core.pv_clone_node(node);
      cljs.core.pv_aset(ret, subidx, null);
      return ret;
    }
  }
};
cljs.core.RangedIterator = function(i, base, arr, v, start, end) {
  this.i = i;
  this.base = base;
  this.arr = arr;
  this.v = v;
  this.start = start;
  this.end = end;
};
cljs.core.RangedIterator.prototype.hasNext = function() {
  var self__ = this;
  var this$ = this;
  return self__.i < self__.end;
};
cljs.core.RangedIterator.prototype.next = function() {
  var self__ = this;
  var this$ = this;
  if (self__.i - self__.base === 32) {
    self__.arr = cljs.core.unchecked_array_for(self__.v, self__.i);
    self__.base = self__.base + 32;
  } else {
  }
  var ret = self__.arr[self__.i & 31];
  self__.i = self__.i + 1;
  return ret;
};
cljs.core.RangedIterator.getBasis = function() {
  return new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "i", "i", 253690212, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, "base", "base", 1825810849, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, 
  "arr", "arr", 2115492975, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), new cljs.core.Symbol(null, "v", "v", 1661996586, null), new cljs.core.Symbol(null, "start", "start", 1285322546, null), new cljs.core.Symbol(null, "end", "end", 1372345569, null)], null);
};
cljs.core.RangedIterator.cljs$lang$type = true;
cljs.core.RangedIterator.cljs$lang$ctorStr = "cljs.core/RangedIterator";
cljs.core.RangedIterator.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/RangedIterator");
};
cljs.core.__GT_RangedIterator = function cljs$core$__GT_RangedIterator(i, base, arr, v, start, end) {
  return new cljs.core.RangedIterator(i, base, arr, v, start, end);
};
cljs.core.ranged_iterator = function cljs$core$ranged_iterator(v, start, end) {
  var i = start;
  return new cljs.core.RangedIterator(i, i - i % 32, start < cljs.core.count(v) ? cljs.core.unchecked_array_for(v, i) : null, v, start, end);
};
cljs.core.PersistentVector = function(meta, cnt, shift, root, tail, __hash) {
  this.meta = meta;
  this.cnt = cnt;
  this.shift = shift;
  this.root = root;
  this.tail = tail;
  this.__hash = __hash;
  this.cljs$lang$protocol_mask$partition0$ = 167668511;
  this.cljs$lang$protocol_mask$partition1$ = 8196;
};
cljs.core.PersistentVector.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.PersistentVector.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.PersistentVector.prototype.cljs$core$ILookup$_lookup$arity$2 = function(coll, k) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(coll__$1, k, null);
};
cljs.core.PersistentVector.prototype.cljs$core$ILookup$_lookup$arity$3 = function(coll, k, not_found) {
  var self__ = this;
  var coll__$1 = this;
  if (typeof k === "number") {
    return cljs.core._nth.cljs$core$IFn$_invoke$arity$3(coll__$1, k, not_found);
  } else {
    return not_found;
  }
};
cljs.core.PersistentVector.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(v, f, init) {
  var self__ = this;
  var v__$1 = this;
  var i = 0;
  var init__$1 = init;
  while (true) {
    if (i < self__.cnt) {
      var arr = cljs.core.unchecked_array_for(v__$1, i);
      var len = arr.length;
      var init__$2 = function() {
        var j = 0;
        var init__$2 = init__$1;
        while (true) {
          if (j < len) {
            var init__$3 = function() {
              var G__9980 = init__$2;
              var G__9981 = j + i;
              var G__9982 = arr[j];
              return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__9980, G__9981, G__9982) : f.call(null, G__9980, G__9981, G__9982);
            }();
            if (cljs.core.reduced_QMARK_(init__$3)) {
              return init__$3;
            } else {
              var G__9989 = j + 1;
              var G__9990 = init__$3;
              j = G__9989;
              init__$2 = G__9990;
              continue;
            }
          } else {
            return init__$2;
          }
          break;
        }
      }();
      if (cljs.core.reduced_QMARK_(init__$2)) {
        return cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init__$2) : cljs.core.deref.call(null, init__$2);
      } else {
        var G__9991 = i + len;
        var G__9992 = init__$2;
        i = G__9991;
        init__$1 = G__9992;
        continue;
      }
    } else {
      return init__$1;
    }
    break;
  }
};
cljs.core.PersistentVector.prototype.cljs$core$IIndexed$_nth$arity$2 = function(coll, n) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.array_for(coll__$1, n)[n & 31];
};
cljs.core.PersistentVector.prototype.cljs$core$IIndexed$_nth$arity$3 = function(coll, n, not_found) {
  var self__ = this;
  var coll__$1 = this;
  if (0 <= n && n < self__.cnt) {
    return cljs.core.unchecked_array_for(coll__$1, n)[n & 31];
  } else {
    return not_found;
  }
};
cljs.core.PersistentVector.prototype.cljs$core$IVector$_assoc_n$arity$3 = function(coll, n, val) {
  var self__ = this;
  var coll__$1 = this;
  if (0 <= n && n < self__.cnt) {
    if (cljs.core.tail_off(coll__$1) <= n) {
      var new_tail = cljs.core.aclone(self__.tail);
      new_tail[n & 31] = val;
      return new cljs.core.PersistentVector(self__.meta, self__.cnt, self__.shift, self__.root, new_tail, null);
    } else {
      return new cljs.core.PersistentVector(self__.meta, self__.cnt, self__.shift, cljs.core.do_assoc(coll__$1, self__.shift, self__.root, n, val), self__.tail, null);
    }
  } else {
    if (n === self__.cnt) {
      return cljs.core._conj(coll__$1, val);
    } else {
      throw new Error([cljs.core.str("Index "), cljs.core.str(n), cljs.core.str(" out of bounds  [0,"), cljs.core.str(self__.cnt), cljs.core.str("]")].join(""));
    }
  }
};
cljs.core.PersistentVector.prototype.cljs$core$IIterable$ = true;
cljs.core.PersistentVector.prototype.cljs$core$IIterable$_iterator$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  return cljs.core.ranged_iterator(this$__$1, 0, self__.cnt);
};
cljs.core.PersistentVector.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.meta;
};
cljs.core.PersistentVector.prototype.cljs$core$ICloneable$_clone$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return new cljs.core.PersistentVector(self__.meta, self__.cnt, self__.shift, self__.root, self__.tail, self__.__hash);
};
cljs.core.PersistentVector.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.cnt;
};
cljs.core.PersistentVector.prototype.cljs$core$IMapEntry$_key$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core._nth.cljs$core$IFn$_invoke$arity$2(coll__$1, 0);
};
cljs.core.PersistentVector.prototype.cljs$core$IMapEntry$_val$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core._nth.cljs$core$IFn$_invoke$arity$2(coll__$1, 1);
};
cljs.core.PersistentVector.prototype.cljs$core$IStack$_peek$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.cnt > 0) {
    return cljs.core._nth.cljs$core$IFn$_invoke$arity$2(coll__$1, self__.cnt - 1);
  } else {
    return null;
  }
};
cljs.core.PersistentVector.prototype.cljs$core$IStack$_pop$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.cnt === 0) {
    throw new Error("Can't pop empty vector");
  } else {
    if (1 === self__.cnt) {
      return cljs.core._with_meta(cljs.core.PersistentVector.EMPTY, self__.meta);
    } else {
      if (1 < self__.cnt - cljs.core.tail_off(coll__$1)) {
        return new cljs.core.PersistentVector(self__.meta, self__.cnt - 1, self__.shift, self__.root, self__.tail.slice(0, -1), null);
      } else {
        var new_tail = cljs.core.unchecked_array_for(coll__$1, self__.cnt - 2);
        var nr = cljs.core.pop_tail(coll__$1, self__.shift, self__.root);
        var new_root = nr == null ? cljs.core.PersistentVector.EMPTY_NODE : nr;
        var cnt_1 = self__.cnt - 1;
        if (5 < self__.shift && cljs.core.pv_aget(new_root, 1) == null) {
          return new cljs.core.PersistentVector(self__.meta, cnt_1, self__.shift - 5, cljs.core.pv_aget(new_root, 0), new_tail, null);
        } else {
          return new cljs.core.PersistentVector(self__.meta, cnt_1, self__.shift, new_root, new_tail, null);
        }
      }
    }
  }
};
cljs.core.PersistentVector.prototype.cljs$core$IReversible$_rseq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.cnt > 0) {
    return new cljs.core.RSeq(coll__$1, self__.cnt - 1, null);
  } else {
    return null;
  }
};
cljs.core.PersistentVector.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var h__6575__auto__ = self__.__hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
    self__.__hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.PersistentVector.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  if (other instanceof cljs.core.PersistentVector) {
    if (self__.cnt === cljs.core.count(other)) {
      var me_iter = cljs.core._iterator(coll__$1);
      var you_iter = cljs.core._iterator(other);
      while (true) {
        if (cljs.core.truth_(me_iter.hasNext())) {
          var x = me_iter.next();
          var y = you_iter.next();
          if (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(x, y)) {
            continue;
          } else {
            return false;
          }
        } else {
          return true;
        }
        break;
      }
    } else {
      return false;
    }
  } else {
    return cljs.core.equiv_sequential(coll__$1, other);
  }
};
cljs.core.PersistentVector.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.TransientVector(self__.cnt, self__.shift, cljs.core.tv_editable_root.cljs$core$IFn$_invoke$arity$1 ? cljs.core.tv_editable_root.cljs$core$IFn$_invoke$arity$1(self__.root) : cljs.core.tv_editable_root.call(null, self__.root), cljs.core.tv_editable_tail.cljs$core$IFn$_invoke$arity$1 ? cljs.core.tv_editable_tail.cljs$core$IFn$_invoke$arity$1(self__.tail) : cljs.core.tv_editable_tail.call(null, self__.tail));
};
cljs.core.PersistentVector.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.with_meta(cljs.core.PersistentVector.EMPTY, self__.meta);
};
cljs.core.PersistentVector.prototype.cljs$core$IReduce$_reduce$arity$2 = function(v, f) {
  var self__ = this;
  var v__$1 = this;
  return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$2(v__$1, f);
};
cljs.core.PersistentVector.prototype.cljs$core$IReduce$_reduce$arity$3 = function(v, f, init) {
  var self__ = this;
  var v__$1 = this;
  var i = 0;
  var init__$1 = init;
  while (true) {
    if (i < self__.cnt) {
      var arr = cljs.core.unchecked_array_for(v__$1, i);
      var len = arr.length;
      var init__$2 = function() {
        var j = 0;
        var init__$2 = init__$1;
        while (true) {
          if (j < len) {
            var init__$3 = function() {
              var G__9983 = init__$2;
              var G__9984 = arr[j];
              return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__9983, G__9984) : f.call(null, G__9983, G__9984);
            }();
            if (cljs.core.reduced_QMARK_(init__$3)) {
              return init__$3;
            } else {
              var G__9993 = j + 1;
              var G__9994 = init__$3;
              j = G__9993;
              init__$2 = G__9994;
              continue;
            }
          } else {
            return init__$2;
          }
          break;
        }
      }();
      if (cljs.core.reduced_QMARK_(init__$2)) {
        return cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init__$2) : cljs.core.deref.call(null, init__$2);
      } else {
        var G__9995 = i + len;
        var G__9996 = init__$2;
        i = G__9995;
        init__$1 = G__9996;
        continue;
      }
    } else {
      return init__$1;
    }
    break;
  }
};
cljs.core.PersistentVector.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(coll, k, v) {
  var self__ = this;
  var coll__$1 = this;
  if (typeof k === "number") {
    return cljs.core._assoc_n(coll__$1, k, v);
  } else {
    throw new Error("Vector's key for assoc must be a number.");
  }
};
cljs.core.PersistentVector.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.cnt === 0) {
    return null;
  } else {
    if (self__.cnt <= 32) {
      return new cljs.core.IndexedSeq(self__.tail, 0);
    } else {
      var G__9985 = coll__$1;
      var G__9986 = cljs.core.first_array_for_longvec(coll__$1);
      var G__9987 = 0;
      var G__9988 = 0;
      return cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4 ? cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4(G__9985, G__9986, G__9987, G__9988) : cljs.core.chunked_seq.call(null, G__9985, G__9986, G__9987, G__9988);
    }
  }
};
cljs.core.PersistentVector.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.PersistentVector(meta__$1, self__.cnt, self__.shift, self__.root, self__.tail, self__.__hash);
};
cljs.core.PersistentVector.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.cnt - cljs.core.tail_off(coll__$1) < 32) {
    var len = self__.tail.length;
    var new_tail = new Array(len + 1);
    var n__7043__auto___9997 = len;
    var i_9998 = 0;
    while (true) {
      if (i_9998 < n__7043__auto___9997) {
        new_tail[i_9998] = self__.tail[i_9998];
        var G__9999 = i_9998 + 1;
        i_9998 = G__9999;
        continue;
      } else {
      }
      break;
    }
    new_tail[len] = o;
    return new cljs.core.PersistentVector(self__.meta, self__.cnt + 1, self__.shift, self__.root, new_tail, null);
  } else {
    var root_overflow_QMARK_ = self__.cnt >>> 5 > 1 << self__.shift;
    var new_shift = root_overflow_QMARK_ ? self__.shift + 5 : self__.shift;
    var new_root = root_overflow_QMARK_ ? function() {
      var n_r = cljs.core.pv_fresh_node(null);
      cljs.core.pv_aset(n_r, 0, self__.root);
      cljs.core.pv_aset(n_r, 1, cljs.core.new_path(null, self__.shift, new cljs.core.VectorNode(null, self__.tail)));
      return n_r;
    }() : cljs.core.push_tail(coll__$1, self__.shift, self__.root, new cljs.core.VectorNode(null, self__.tail));
    return new cljs.core.PersistentVector(self__.meta, self__.cnt + 1, new_shift, new_root, [o], null);
  }
};
cljs.core.PersistentVector.prototype.call = function() {
  var G__10000 = null;
  var G__10000__2 = function(self__, k) {
    var self__ = this;
    var self____$1 = this;
    var coll = self____$1;
    return coll.cljs$core$IIndexed$_nth$arity$2(null, k);
  };
  var G__10000__3 = function(self__, k, not_found) {
    var self__ = this;
    var self____$1 = this;
    var coll = self____$1;
    return coll.cljs$core$IIndexed$_nth$arity$3(null, k, not_found);
  };
  G__10000 = function(self__, k, not_found) {
    switch(arguments.length) {
      case 2:
        return G__10000__2.call(this, self__, k);
      case 3:
        return G__10000__3.call(this, self__, k, not_found);
    }
    throw new Error("Invalid arity: " + arguments.length);
  };
  G__10000.cljs$core$IFn$_invoke$arity$2 = G__10000__2;
  G__10000.cljs$core$IFn$_invoke$arity$3 = G__10000__3;
  return G__10000;
}();
cljs.core.PersistentVector.prototype.apply = function(self__, args9979) {
  var self__ = this;
  var self____$1 = this;
  return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args9979)));
};
cljs.core.PersistentVector.prototype.cljs$core$IFn$_invoke$arity$1 = function(k) {
  var self__ = this;
  var coll = this;
  return coll.cljs$core$IIndexed$_nth$arity$2(null, k);
};
cljs.core.PersistentVector.prototype.cljs$core$IFn$_invoke$arity$2 = function(k, not_found) {
  var self__ = this;
  var coll = this;
  return coll.cljs$core$IIndexed$_nth$arity$3(null, k, not_found);
};
cljs.core.PersistentVector.getBasis = function() {
  return new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "meta", "meta", -1154898805, null), new cljs.core.Symbol(null, "cnt", "cnt", 1924510325, null), new cljs.core.Symbol(null, "shift", "shift", -1657295705, null), new cljs.core.Symbol(null, "root", "root", 1191874074, null), new cljs.core.Symbol(null, "tail", "tail", 494507963, null), cljs.core.with_meta(new cljs.core.Symbol(null, "__hash", "__hash", -1328796629, null), new cljs.core.PersistentArrayMap(null, 
  1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.PersistentVector.cljs$lang$type = true;
cljs.core.PersistentVector.cljs$lang$ctorStr = "cljs.core/PersistentVector";
cljs.core.PersistentVector.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/PersistentVector");
};
cljs.core.__GT_PersistentVector = function cljs$core$__GT_PersistentVector(meta, cnt, shift, root, tail, __hash) {
  return new cljs.core.PersistentVector(meta, cnt, shift, root, tail, __hash);
};
cljs.core.PersistentVector.EMPTY_NODE = new cljs.core.VectorNode(null, [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]);
cljs.core.PersistentVector.EMPTY = new cljs.core.PersistentVector(null, 0, 5, cljs.core.PersistentVector.EMPTY_NODE, [], cljs.core.empty_ordered_hash);
cljs.core.PersistentVector.fromArray = function(xs, no_clone) {
  var l = xs.length;
  var xs__$1 = no_clone ? xs : cljs.core.aclone(xs);
  if (l < 32) {
    return new cljs.core.PersistentVector(null, l, 5, cljs.core.PersistentVector.EMPTY_NODE, xs__$1, null);
  } else {
    var node = xs__$1.slice(0, 32);
    var v = new cljs.core.PersistentVector(null, 32, 5, cljs.core.PersistentVector.EMPTY_NODE, node, null);
    var i = 32;
    var out = v.cljs$core$IEditableCollection$_as_transient$arity$1(null);
    while (true) {
      if (i < l) {
        var G__10001 = i + 1;
        var G__10002 = cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$2(out, xs__$1[i]);
        i = G__10001;
        out = G__10002;
        continue;
      } else {
        return cljs.core.persistent_BANG_(out);
      }
      break;
    }
  }
};
cljs.core.PersistentVector.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.vec = function cljs$core$vec(coll) {
  if (cljs.core.array_QMARK_(coll)) {
    return cljs.core.PersistentVector.fromArray(coll, true);
  } else {
    return cljs.core._persistent_BANG_(cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._conj_BANG_, cljs.core._as_transient(cljs.core.PersistentVector.EMPTY), coll));
  }
};
cljs.core.vector = function cljs$core$vector(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___10004 = arguments.length;
  var i__7199__auto___10005 = 0;
  while (true) {
    if (i__7199__auto___10005 < len__7198__auto___10004) {
      args__7205__auto__.push(arguments[i__7199__auto___10005]);
      var G__10006 = i__7199__auto___10005 + 1;
      i__7199__auto___10005 = G__10006;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return cljs.core.vector.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
cljs.core.vector.cljs$core$IFn$_invoke$arity$variadic = function(args) {
  if (args instanceof cljs.core.IndexedSeq && args.i === 0) {
    return cljs.core.PersistentVector.fromArray(args.arr, true);
  } else {
    return cljs.core.vec(args);
  }
};
cljs.core.vector.cljs$lang$maxFixedArity = 0;
cljs.core.vector.cljs$lang$applyTo = function(seq10003) {
  return cljs.core.vector.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq10003));
};
cljs.core.ChunkedSeq = function(vec, node, i, off, meta, __hash) {
  this.vec = vec;
  this.node = node;
  this.i = i;
  this.off = off;
  this.meta = meta;
  this.__hash = __hash;
  this.cljs$lang$protocol_mask$partition0$ = 32375020;
  this.cljs$lang$protocol_mask$partition1$ = 1536;
};
cljs.core.ChunkedSeq.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.ChunkedSeq.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.ChunkedSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.meta;
};
cljs.core.ChunkedSeq.prototype.cljs$core$INext$_next$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.off + 1 < self__.node.length) {
    var s = function() {
      var G__10007 = self__.vec;
      var G__10008 = self__.node;
      var G__10009 = self__.i;
      var G__10010 = self__.off + 1;
      return cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4 ? cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4(G__10007, G__10008, G__10009, G__10010) : cljs.core.chunked_seq.call(null, G__10007, G__10008, G__10009, G__10010);
    }();
    if (s == null) {
      return null;
    } else {
      return s;
    }
  } else {
    return cljs.core._chunked_next(coll__$1);
  }
};
cljs.core.ChunkedSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var h__6575__auto__ = self__.__hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
    self__.__hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.ChunkedSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.equiv_sequential(coll__$1, other);
};
cljs.core.ChunkedSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.with_meta(cljs.core.PersistentVector.EMPTY, self__.meta);
};
cljs.core.ChunkedSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(coll, f) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$2(function() {
    var G__10011 = self__.vec;
    var G__10012 = self__.i + self__.off;
    var G__10013 = cljs.core.count(self__.vec);
    return cljs.core.subvec.cljs$core$IFn$_invoke$arity$3 ? cljs.core.subvec.cljs$core$IFn$_invoke$arity$3(G__10011, G__10012, G__10013) : cljs.core.subvec.call(null, G__10011, G__10012, G__10013);
  }(), f);
};
cljs.core.ChunkedSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(coll, f, start) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$3(function() {
    var G__10014 = self__.vec;
    var G__10015 = self__.i + self__.off;
    var G__10016 = cljs.core.count(self__.vec);
    return cljs.core.subvec.cljs$core$IFn$_invoke$arity$3 ? cljs.core.subvec.cljs$core$IFn$_invoke$arity$3(G__10014, G__10015, G__10016) : cljs.core.subvec.call(null, G__10014, G__10015, G__10016);
  }(), f, start);
};
cljs.core.ChunkedSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.node[self__.off];
};
cljs.core.ChunkedSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.off + 1 < self__.node.length) {
    var s = function() {
      var G__10017 = self__.vec;
      var G__10018 = self__.node;
      var G__10019 = self__.i;
      var G__10020 = self__.off + 1;
      return cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4 ? cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4(G__10017, G__10018, G__10019, G__10020) : cljs.core.chunked_seq.call(null, G__10017, G__10018, G__10019, G__10020);
    }();
    if (s == null) {
      return cljs.core.List.EMPTY;
    } else {
      return s;
    }
  } else {
    return cljs.core._chunked_rest(coll__$1);
  }
};
cljs.core.ChunkedSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return coll__$1;
};
cljs.core.ChunkedSeq.prototype.cljs$core$IChunkedSeq$_chunked_first$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.array_chunk.cljs$core$IFn$_invoke$arity$2(self__.node, self__.off);
};
cljs.core.ChunkedSeq.prototype.cljs$core$IChunkedSeq$_chunked_rest$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var end = self__.i + self__.node.length;
  if (end < cljs.core._count(self__.vec)) {
    var G__10021 = self__.vec;
    var G__10022 = cljs.core.unchecked_array_for(self__.vec, end);
    var G__10023 = end;
    var G__10024 = 0;
    return cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4 ? cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4(G__10021, G__10022, G__10023, G__10024) : cljs.core.chunked_seq.call(null, G__10021, G__10022, G__10023, G__10024);
  } else {
    return cljs.core.List.EMPTY;
  }
};
cljs.core.ChunkedSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, m) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$5 ? cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$5(self__.vec, self__.node, self__.i, self__.off, m) : cljs.core.chunked_seq.call(null, self__.vec, self__.node, self__.i, self__.off, m);
};
cljs.core.ChunkedSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.cons(o, coll__$1);
};
cljs.core.ChunkedSeq.prototype.cljs$core$IChunkedNext$_chunked_next$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var end = self__.i + self__.node.length;
  if (end < cljs.core._count(self__.vec)) {
    var G__10025 = self__.vec;
    var G__10026 = cljs.core.unchecked_array_for(self__.vec, end);
    var G__10027 = end;
    var G__10028 = 0;
    return cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4 ? cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4(G__10025, G__10026, G__10027, G__10028) : cljs.core.chunked_seq.call(null, G__10025, G__10026, G__10027, G__10028);
  } else {
    return null;
  }
};
cljs.core.ChunkedSeq.getBasis = function() {
  return new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "vec", "vec", 982683596, null), new cljs.core.Symbol(null, "node", "node", -2073234571, null), new cljs.core.Symbol(null, "i", "i", 253690212, null), new cljs.core.Symbol(null, "off", "off", -2047994980, null), new cljs.core.Symbol(null, "meta", "meta", -1154898805, null), cljs.core.with_meta(new cljs.core.Symbol(null, "__hash", "__hash", -1328796629, null), new cljs.core.PersistentArrayMap(null, 
  1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.ChunkedSeq.cljs$lang$type = true;
cljs.core.ChunkedSeq.cljs$lang$ctorStr = "cljs.core/ChunkedSeq";
cljs.core.ChunkedSeq.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/ChunkedSeq");
};
cljs.core.__GT_ChunkedSeq = function cljs$core$__GT_ChunkedSeq(vec, node, i, off, meta, __hash) {
  return new cljs.core.ChunkedSeq(vec, node, i, off, meta, __hash);
};
cljs.core.ChunkedSeq.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.chunked_seq = function cljs$core$chunked_seq(var_args) {
  var args10029 = [];
  var len__7198__auto___10032 = arguments.length;
  var i__7199__auto___10033 = 0;
  while (true) {
    if (i__7199__auto___10033 < len__7198__auto___10032) {
      args10029.push(arguments[i__7199__auto___10033]);
      var G__10034 = i__7199__auto___10033 + 1;
      i__7199__auto___10033 = G__10034;
      continue;
    } else {
    }
    break;
  }
  var G__10031 = args10029.length;
  switch(G__10031) {
    case 3:
      return cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 4:
      return cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    case 5:
      return cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$5(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10029.length)].join(""));;
  }
};
cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$3 = function(vec, i, off) {
  return new cljs.core.ChunkedSeq(vec, cljs.core.array_for(vec, i), i, off, null, null);
};
cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4 = function(vec, node, i, off) {
  return new cljs.core.ChunkedSeq(vec, node, i, off, null, null);
};
cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$5 = function(vec, node, i, off, meta) {
  return new cljs.core.ChunkedSeq(vec, node, i, off, meta, null);
};
cljs.core.chunked_seq.cljs$lang$maxFixedArity = 5;
cljs.core.Subvec = function(meta, v, start, end, __hash) {
  this.meta = meta;
  this.v = v;
  this.start = start;
  this.end = end;
  this.__hash = __hash;
  this.cljs$lang$protocol_mask$partition0$ = 167666463;
  this.cljs$lang$protocol_mask$partition1$ = 8192;
};
cljs.core.Subvec.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.Subvec.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.Subvec.prototype.cljs$core$ILookup$_lookup$arity$2 = function(coll, k) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(coll__$1, k, null);
};
cljs.core.Subvec.prototype.cljs$core$ILookup$_lookup$arity$3 = function(coll, k, not_found) {
  var self__ = this;
  var coll__$1 = this;
  if (typeof k === "number") {
    return cljs.core._nth.cljs$core$IFn$_invoke$arity$3(coll__$1, k, not_found);
  } else {
    return not_found;
  }
};
cljs.core.Subvec.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(coll, f, init) {
  var self__ = this;
  var coll__$1 = this;
  var i = self__.start;
  var j = 0;
  var init__$1 = init;
  while (true) {
    if (i < self__.end) {
      var init__$2 = function() {
        var G__10037 = init__$1;
        var G__10038 = j;
        var G__10039 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(self__.v, i);
        return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__10037, G__10038, G__10039) : f.call(null, G__10037, G__10038, G__10039);
      }();
      if (cljs.core.reduced_QMARK_(init__$2)) {
        return cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init__$2) : cljs.core.deref.call(null, init__$2);
      } else {
        var G__10056 = i + 1;
        var G__10057 = j + 1;
        var G__10058 = init__$2;
        i = G__10056;
        j = G__10057;
        init__$1 = G__10058;
        continue;
      }
    } else {
      return init__$1;
    }
    break;
  }
};
cljs.core.Subvec.prototype.cljs$core$IIndexed$_nth$arity$2 = function(coll, n) {
  var self__ = this;
  var coll__$1 = this;
  if (n < 0 || self__.end <= self__.start + n) {
    return cljs.core.vector_index_out_of_bounds(n, self__.end - self__.start);
  } else {
    return cljs.core._nth.cljs$core$IFn$_invoke$arity$2(self__.v, self__.start + n);
  }
};
cljs.core.Subvec.prototype.cljs$core$IIndexed$_nth$arity$3 = function(coll, n, not_found) {
  var self__ = this;
  var coll__$1 = this;
  if (n < 0 || self__.end <= self__.start + n) {
    return not_found;
  } else {
    return cljs.core._nth.cljs$core$IFn$_invoke$arity$3(self__.v, self__.start + n, not_found);
  }
};
cljs.core.Subvec.prototype.cljs$core$IVector$_assoc_n$arity$3 = function(coll, n, val) {
  var self__ = this;
  var coll__$1 = this;
  var v_pos = self__.start + n;
  var G__10040 = self__.meta;
  var G__10041 = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(self__.v, v_pos, val);
  var G__10042 = self__.start;
  var G__10043 = function() {
    var x__6471__auto__ = self__.end;
    var y__6472__auto__ = v_pos + 1;
    return x__6471__auto__ > y__6472__auto__ ? x__6471__auto__ : y__6472__auto__;
  }();
  var G__10044 = null;
  return cljs.core.build_subvec.cljs$core$IFn$_invoke$arity$5 ? cljs.core.build_subvec.cljs$core$IFn$_invoke$arity$5(G__10040, G__10041, G__10042, G__10043, G__10044) : cljs.core.build_subvec.call(null, G__10040, G__10041, G__10042, G__10043, G__10044);
};
cljs.core.Subvec.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.meta;
};
cljs.core.Subvec.prototype.cljs$core$ICloneable$_clone$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return new cljs.core.Subvec(self__.meta, self__.v, self__.start, self__.end, self__.__hash);
};
cljs.core.Subvec.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.end - self__.start;
};
cljs.core.Subvec.prototype.cljs$core$IStack$_peek$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core._nth.cljs$core$IFn$_invoke$arity$2(self__.v, self__.end - 1);
};
cljs.core.Subvec.prototype.cljs$core$IStack$_pop$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.start === self__.end) {
    throw new Error("Can't pop empty vector");
  } else {
    var G__10045 = self__.meta;
    var G__10046 = self__.v;
    var G__10047 = self__.start;
    var G__10048 = self__.end - 1;
    var G__10049 = null;
    return cljs.core.build_subvec.cljs$core$IFn$_invoke$arity$5 ? cljs.core.build_subvec.cljs$core$IFn$_invoke$arity$5(G__10045, G__10046, G__10047, G__10048, G__10049) : cljs.core.build_subvec.call(null, G__10045, G__10046, G__10047, G__10048, G__10049);
  }
};
cljs.core.Subvec.prototype.cljs$core$IReversible$_rseq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (!(self__.start === self__.end)) {
    return new cljs.core.RSeq(coll__$1, self__.end - self__.start - 1, null);
  } else {
    return null;
  }
};
cljs.core.Subvec.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var h__6575__auto__ = self__.__hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
    self__.__hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.Subvec.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.equiv_sequential(coll__$1, other);
};
cljs.core.Subvec.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.with_meta(cljs.core.PersistentVector.EMPTY, self__.meta);
};
cljs.core.Subvec.prototype.cljs$core$IReduce$_reduce$arity$2 = function(coll, f) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$2(coll__$1, f);
};
cljs.core.Subvec.prototype.cljs$core$IReduce$_reduce$arity$3 = function(coll, f, start__$1) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$3(coll__$1, f, start__$1);
};
cljs.core.Subvec.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(coll, key, val) {
  var self__ = this;
  var coll__$1 = this;
  if (typeof key === "number") {
    return cljs.core._assoc_n(coll__$1, key, val);
  } else {
    throw new Error("Subvec's key for assoc must be a number.");
  }
};
cljs.core.Subvec.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var subvec_seq = function(coll__$1) {
    return function cljs$core$subvec_seq(i) {
      if (i === self__.end) {
        return null;
      } else {
        return cljs.core.cons(cljs.core._nth.cljs$core$IFn$_invoke$arity$2(self__.v, i), new cljs.core.LazySeq(null, function(coll__$1) {
          return function() {
            return cljs$core$subvec_seq(i + 1);
          };
        }(coll__$1), null, null));
      }
    };
  }(coll__$1);
  return subvec_seq(self__.start);
};
cljs.core.Subvec.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.build_subvec.cljs$core$IFn$_invoke$arity$5 ? cljs.core.build_subvec.cljs$core$IFn$_invoke$arity$5(meta__$1, self__.v, self__.start, self__.end, self__.__hash) : cljs.core.build_subvec.call(null, meta__$1, self__.v, self__.start, self__.end, self__.__hash);
};
cljs.core.Subvec.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
  var self__ = this;
  var coll__$1 = this;
  var G__10051 = self__.meta;
  var G__10052 = cljs.core._assoc_n(self__.v, self__.end, o);
  var G__10053 = self__.start;
  var G__10054 = self__.end + 1;
  var G__10055 = null;
  return cljs.core.build_subvec.cljs$core$IFn$_invoke$arity$5 ? cljs.core.build_subvec.cljs$core$IFn$_invoke$arity$5(G__10051, G__10052, G__10053, G__10054, G__10055) : cljs.core.build_subvec.call(null, G__10051, G__10052, G__10053, G__10054, G__10055);
};
cljs.core.Subvec.prototype.call = function() {
  var G__10059 = null;
  var G__10059__2 = function(self__, k) {
    var self__ = this;
    var self____$1 = this;
    var coll = self____$1;
    return coll.cljs$core$IIndexed$_nth$arity$2(null, k);
  };
  var G__10059__3 = function(self__, k, not_found) {
    var self__ = this;
    var self____$1 = this;
    var coll = self____$1;
    return coll.cljs$core$IIndexed$_nth$arity$3(null, k, not_found);
  };
  G__10059 = function(self__, k, not_found) {
    switch(arguments.length) {
      case 2:
        return G__10059__2.call(this, self__, k);
      case 3:
        return G__10059__3.call(this, self__, k, not_found);
    }
    throw new Error("Invalid arity: " + arguments.length);
  };
  G__10059.cljs$core$IFn$_invoke$arity$2 = G__10059__2;
  G__10059.cljs$core$IFn$_invoke$arity$3 = G__10059__3;
  return G__10059;
}();
cljs.core.Subvec.prototype.apply = function(self__, args10036) {
  var self__ = this;
  var self____$1 = this;
  return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args10036)));
};
cljs.core.Subvec.prototype.cljs$core$IFn$_invoke$arity$1 = function(k) {
  var self__ = this;
  var coll = this;
  return coll.cljs$core$IIndexed$_nth$arity$2(null, k);
};
cljs.core.Subvec.prototype.cljs$core$IFn$_invoke$arity$2 = function(k, not_found) {
  var self__ = this;
  var coll = this;
  return coll.cljs$core$IIndexed$_nth$arity$3(null, k, not_found);
};
cljs.core.Subvec.getBasis = function() {
  return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "meta", "meta", -1154898805, null), new cljs.core.Symbol(null, "v", "v", 1661996586, null), new cljs.core.Symbol(null, "start", "start", 1285322546, null), new cljs.core.Symbol(null, "end", "end", 1372345569, null), cljs.core.with_meta(new cljs.core.Symbol(null, "__hash", "__hash", -1328796629, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", 
  "mutable", 875778266), true], null))], null);
};
cljs.core.Subvec.cljs$lang$type = true;
cljs.core.Subvec.cljs$lang$ctorStr = "cljs.core/Subvec";
cljs.core.Subvec.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/Subvec");
};
cljs.core.__GT_Subvec = function cljs$core$__GT_Subvec(meta, v, start, end, __hash) {
  return new cljs.core.Subvec(meta, v, start, end, __hash);
};
cljs.core.Subvec.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.build_subvec = function cljs$core$build_subvec(meta, v, start, end, __hash) {
  while (true) {
    if (v instanceof cljs.core.Subvec) {
      var G__10060 = meta;
      var G__10061 = v.v;
      var G__10062 = v.start + start;
      var G__10063 = v.start + end;
      var G__10064 = __hash;
      meta = G__10060;
      v = G__10061;
      start = G__10062;
      end = G__10063;
      __hash = G__10064;
      continue;
    } else {
      var c = cljs.core.count(v);
      if (start < 0 || end < 0 || start > c || end > c) {
        throw new Error("Index out of bounds");
      } else {
      }
      return new cljs.core.Subvec(meta, v, start, end, __hash);
    }
    break;
  }
};
cljs.core.subvec = function cljs$core$subvec(var_args) {
  var args10065 = [];
  var len__7198__auto___10068 = arguments.length;
  var i__7199__auto___10069 = 0;
  while (true) {
    if (i__7199__auto___10069 < len__7198__auto___10068) {
      args10065.push(arguments[i__7199__auto___10069]);
      var G__10070 = i__7199__auto___10069 + 1;
      i__7199__auto___10069 = G__10070;
      continue;
    } else {
    }
    break;
  }
  var G__10067 = args10065.length;
  switch(G__10067) {
    case 2:
      return cljs.core.subvec.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.subvec.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10065.length)].join(""));;
  }
};
cljs.core.subvec.cljs$core$IFn$_invoke$arity$2 = function(v, start) {
  return cljs.core.subvec.cljs$core$IFn$_invoke$arity$3(v, start, cljs.core.count(v));
};
cljs.core.subvec.cljs$core$IFn$_invoke$arity$3 = function(v, start, end) {
  return cljs.core.build_subvec(null, v, start, end, null);
};
cljs.core.subvec.cljs$lang$maxFixedArity = 3;
cljs.core.tv_ensure_editable = function cljs$core$tv_ensure_editable(edit, node) {
  if (edit === node.edit) {
    return node;
  } else {
    return new cljs.core.VectorNode(edit, cljs.core.aclone(node.arr));
  }
};
cljs.core.tv_editable_root = function cljs$core$tv_editable_root(node) {
  return new cljs.core.VectorNode({}, cljs.core.aclone(node.arr));
};
cljs.core.tv_editable_tail = function cljs$core$tv_editable_tail(tl) {
  var ret = [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null];
  cljs.core.array_copy(tl, 0, ret, 0, tl.length);
  return ret;
};
cljs.core.tv_push_tail = function cljs$core$tv_push_tail(tv, level, parent, tail_node) {
  var ret = cljs.core.tv_ensure_editable(tv.root.edit, parent);
  var subidx = tv.cnt - 1 >>> level & 31;
  cljs.core.pv_aset(ret, subidx, level === 5 ? tail_node : function() {
    var child = cljs.core.pv_aget(ret, subidx);
    if (!(child == null)) {
      return cljs$core$tv_push_tail(tv, level - 5, child, tail_node);
    } else {
      return cljs.core.new_path(tv.root.edit, level - 5, tail_node);
    }
  }());
  return ret;
};
cljs.core.tv_pop_tail = function cljs$core$tv_pop_tail(tv, level, node) {
  var node__$1 = cljs.core.tv_ensure_editable(tv.root.edit, node);
  var subidx = tv.cnt - 2 >>> level & 31;
  if (level > 5) {
    var new_child = cljs$core$tv_pop_tail(tv, level - 5, cljs.core.pv_aget(node__$1, subidx));
    if (new_child == null && subidx === 0) {
      return null;
    } else {
      cljs.core.pv_aset(node__$1, subidx, new_child);
      return node__$1;
    }
  } else {
    if (subidx === 0) {
      return null;
    } else {
      cljs.core.pv_aset(node__$1, subidx, null);
      return node__$1;
    }
  }
};
cljs.core.unchecked_editable_array_for = function cljs$core$unchecked_editable_array_for(tv, i) {
  if (i >= cljs.core.tail_off(tv)) {
    return tv.tail;
  } else {
    var root = tv.root;
    var node = root;
    var level = tv.shift;
    while (true) {
      if (level > 0) {
        var G__10083 = cljs.core.tv_ensure_editable(root.edit, cljs.core.pv_aget(node, i >>> level & 31));
        var G__10084 = level - 5;
        node = G__10083;
        level = G__10084;
        continue;
      } else {
        return node.arr;
      }
      break;
    }
  }
};
cljs.core.TransientVector = function(cnt, shift, root, tail) {
  this.cnt = cnt;
  this.shift = shift;
  this.root = root;
  this.tail = tail;
  this.cljs$lang$protocol_mask$partition1$ = 88;
  this.cljs$lang$protocol_mask$partition0$ = 275;
};
cljs.core.TransientVector.prototype.cljs$core$ITransientCollection$_conj_BANG_$arity$2 = function(tcoll, o) {
  var self__ = this;
  var tcoll__$1 = this;
  if (self__.root.edit) {
    if (self__.cnt - cljs.core.tail_off(tcoll__$1) < 32) {
      self__.tail[self__.cnt & 31] = o;
      self__.cnt = self__.cnt + 1;
      return tcoll__$1;
    } else {
      var tail_node = new cljs.core.VectorNode(self__.root.edit, self__.tail);
      var new_tail = [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null];
      new_tail[0] = o;
      self__.tail = new_tail;
      if (self__.cnt >>> 5 > 1 << self__.shift) {
        var new_root_array = [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null];
        var new_shift = self__.shift + 5;
        new_root_array[0] = self__.root;
        new_root_array[1] = cljs.core.new_path(self__.root.edit, self__.shift, tail_node);
        self__.root = new cljs.core.VectorNode(self__.root.edit, new_root_array);
        self__.shift = new_shift;
        self__.cnt = self__.cnt + 1;
        return tcoll__$1;
      } else {
        var new_root = cljs.core.tv_push_tail(tcoll__$1, self__.shift, self__.root, tail_node);
        self__.root = new_root;
        self__.cnt = self__.cnt + 1;
        return tcoll__$1;
      }
    }
  } else {
    throw new Error("conj! after persistent!");
  }
};
cljs.core.TransientVector.prototype.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 = function(tcoll) {
  var self__ = this;
  var tcoll__$1 = this;
  if (self__.root.edit) {
    self__.root.edit = null;
    var len = self__.cnt - cljs.core.tail_off(tcoll__$1);
    var trimmed_tail = new Array(len);
    cljs.core.array_copy(self__.tail, 0, trimmed_tail, 0, len);
    return new cljs.core.PersistentVector(null, self__.cnt, self__.shift, self__.root, trimmed_tail, null);
  } else {
    throw new Error("persistent! called twice");
  }
};
cljs.core.TransientVector.prototype.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3 = function(tcoll, key, val) {
  var self__ = this;
  var tcoll__$1 = this;
  if (typeof key === "number") {
    return cljs.core._assoc_n_BANG_(tcoll__$1, key, val);
  } else {
    throw new Error("TransientVector's key for assoc! must be a number.");
  }
};
cljs.core.TransientVector.prototype.cljs$core$ITransientVector$_assoc_n_BANG_$arity$3 = function(tcoll, n, val) {
  var self__ = this;
  var tcoll__$1 = this;
  if (self__.root.edit) {
    if (0 <= n && n < self__.cnt) {
      if (cljs.core.tail_off(tcoll__$1) <= n) {
        self__.tail[n & 31] = val;
        return tcoll__$1;
      } else {
        var new_root = function(tcoll__$1) {
          return function cljs$core$go(level, node) {
            var node__$1 = cljs.core.tv_ensure_editable(self__.root.edit, node);
            if (level === 0) {
              cljs.core.pv_aset(node__$1, n & 31, val);
              return node__$1;
            } else {
              var subidx = n >>> level & 31;
              cljs.core.pv_aset(node__$1, subidx, cljs$core$go(level - 5, cljs.core.pv_aget(node__$1, subidx)));
              return node__$1;
            }
          };
        }(tcoll__$1).call(null, self__.shift, self__.root);
        self__.root = new_root;
        return tcoll__$1;
      }
    } else {
      if (n === self__.cnt) {
        return cljs.core._conj_BANG_(tcoll__$1, val);
      } else {
        throw new Error([cljs.core.str("Index "), cljs.core.str(n), cljs.core.str(" out of bounds for TransientVector of length"), cljs.core.str(self__.cnt)].join(""));
      }
    }
  } else {
    throw new Error("assoc! after persistent!");
  }
};
cljs.core.TransientVector.prototype.cljs$core$ITransientVector$_pop_BANG_$arity$1 = function(tcoll) {
  var self__ = this;
  var tcoll__$1 = this;
  if (self__.root.edit) {
    if (self__.cnt === 0) {
      throw new Error("Can't pop empty vector");
    } else {
      if (1 === self__.cnt) {
        self__.cnt = 0;
        return tcoll__$1;
      } else {
        if ((self__.cnt - 1 & 31) > 0) {
          self__.cnt = self__.cnt - 1;
          return tcoll__$1;
        } else {
          var new_tail = cljs.core.unchecked_editable_array_for(tcoll__$1, self__.cnt - 2);
          var new_root = function() {
            var nr = cljs.core.tv_pop_tail(tcoll__$1, self__.shift, self__.root);
            if (!(nr == null)) {
              return nr;
            } else {
              return new cljs.core.VectorNode(self__.root.edit, [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]);
            }
          }();
          if (5 < self__.shift && cljs.core.pv_aget(new_root, 1) == null) {
            var new_root__$1 = cljs.core.tv_ensure_editable(self__.root.edit, cljs.core.pv_aget(new_root, 0));
            self__.root = new_root__$1;
            self__.shift = self__.shift - 5;
            self__.cnt = self__.cnt - 1;
            self__.tail = new_tail;
            return tcoll__$1;
          } else {
            self__.root = new_root;
            self__.cnt = self__.cnt - 1;
            self__.tail = new_tail;
            return tcoll__$1;
          }
        }
      }
    }
  } else {
    throw new Error("pop! after persistent!");
  }
};
cljs.core.TransientVector.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.root.edit) {
    return self__.cnt;
  } else {
    throw new Error("count after persistent!");
  }
};
cljs.core.TransientVector.prototype.cljs$core$IIndexed$_nth$arity$2 = function(coll, n) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.root.edit) {
    return cljs.core.array_for(coll__$1, n)[n & 31];
  } else {
    throw new Error("nth after persistent!");
  }
};
cljs.core.TransientVector.prototype.cljs$core$IIndexed$_nth$arity$3 = function(coll, n, not_found) {
  var self__ = this;
  var coll__$1 = this;
  if (0 <= n && n < self__.cnt) {
    return cljs.core._nth.cljs$core$IFn$_invoke$arity$2(coll__$1, n);
  } else {
    return not_found;
  }
};
cljs.core.TransientVector.prototype.cljs$core$ILookup$_lookup$arity$2 = function(coll, k) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(coll__$1, k, null);
};
cljs.core.TransientVector.prototype.cljs$core$ILookup$_lookup$arity$3 = function(coll, k, not_found) {
  var self__ = this;
  var coll__$1 = this;
  if (typeof k === "number") {
    return cljs.core._nth.cljs$core$IFn$_invoke$arity$3(coll__$1, k, not_found);
  } else {
    return not_found;
  }
};
cljs.core.TransientVector.prototype.call = function() {
  var G__10088 = null;
  var G__10088__2 = function(self__, k) {
    var self__ = this;
    var self____$1 = this;
    var coll = self____$1;
    return coll.cljs$core$ILookup$_lookup$arity$2(null, k);
  };
  var G__10088__3 = function(self__, k, not_found) {
    var self__ = this;
    var self____$1 = this;
    var coll = self____$1;
    return coll.cljs$core$ILookup$_lookup$arity$3(null, k, not_found);
  };
  G__10088 = function(self__, k, not_found) {
    switch(arguments.length) {
      case 2:
        return G__10088__2.call(this, self__, k);
      case 3:
        return G__10088__3.call(this, self__, k, not_found);
    }
    throw new Error("Invalid arity: " + arguments.length);
  };
  G__10088.cljs$core$IFn$_invoke$arity$2 = G__10088__2;
  G__10088.cljs$core$IFn$_invoke$arity$3 = G__10088__3;
  return G__10088;
}();
cljs.core.TransientVector.prototype.apply = function(self__, args10085) {
  var self__ = this;
  var self____$1 = this;
  return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args10085)));
};
cljs.core.TransientVector.prototype.cljs$core$IFn$_invoke$arity$1 = function(k) {
  var self__ = this;
  var coll = this;
  return coll.cljs$core$ILookup$_lookup$arity$2(null, k);
};
cljs.core.TransientVector.prototype.cljs$core$IFn$_invoke$arity$2 = function(k, not_found) {
  var self__ = this;
  var coll = this;
  return coll.cljs$core$ILookup$_lookup$arity$3(null, k, not_found);
};
cljs.core.TransientVector.getBasis = function() {
  return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "cnt", "cnt", 1924510325, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, "shift", "shift", -1657295705, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, 
  "root", "root", 1191874074, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, "tail", "tail", 494507963, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.TransientVector.cljs$lang$type = true;
cljs.core.TransientVector.cljs$lang$ctorStr = "cljs.core/TransientVector";
cljs.core.TransientVector.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/TransientVector");
};
cljs.core.__GT_TransientVector = function cljs$core$__GT_TransientVector(cnt, shift, root, tail) {
  return new cljs.core.TransientVector(cnt, shift, root, tail);
};
cljs.core.PersistentQueueIter = function(fseq, riter) {
  this.fseq = fseq;
  this.riter = riter;
};
cljs.core.PersistentQueueIter.prototype.hasNext = function() {
  var self__ = this;
  var _ = this;
  var or__6140__auto__ = cljs.core.some_QMARK_(self__.fseq) && cljs.core.seq(self__.fseq);
  if (or__6140__auto__) {
    return or__6140__auto__;
  } else {
    var and__6128__auto__ = cljs.core.some_QMARK_(self__.riter);
    if (and__6128__auto__) {
      return self__.riter.hasNext();
    } else {
      return and__6128__auto__;
    }
  }
};
cljs.core.PersistentQueueIter.prototype.next = function() {
  var self__ = this;
  var _ = this;
  if (cljs.core.some_QMARK_(self__.fseq)) {
    var ret = cljs.core.first(self__.fseq);
    self__.fseq = cljs.core.next(self__.fseq);
    return ret;
  } else {
    if (cljs.core.some_QMARK_(self__.riter) && self__.riter.hasNext()) {
      return self__.riter.next();
    } else {
      throw new Error("No such element");
    }
  }
};
cljs.core.PersistentQueueIter.prototype.remove = function() {
  var self__ = this;
  var _ = this;
  return new Error("Unsupported operation");
};
cljs.core.PersistentQueueIter.getBasis = function() {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "fseq", "fseq", -1466412450, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), new cljs.core.Symbol(null, "riter", "riter", -237834262, null)], null);
};
cljs.core.PersistentQueueIter.cljs$lang$type = true;
cljs.core.PersistentQueueIter.cljs$lang$ctorStr = "cljs.core/PersistentQueueIter";
cljs.core.PersistentQueueIter.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/PersistentQueueIter");
};
cljs.core.__GT_PersistentQueueIter = function cljs$core$__GT_PersistentQueueIter(fseq, riter) {
  return new cljs.core.PersistentQueueIter(fseq, riter);
};
cljs.core.PersistentQueueSeq = function(meta, front, rear, __hash) {
  this.meta = meta;
  this.front = front;
  this.rear = rear;
  this.__hash = __hash;
  this.cljs$lang$protocol_mask$partition0$ = 31850572;
  this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.PersistentQueueSeq.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.PersistentQueueSeq.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.meta;
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var h__6575__auto__ = self__.__hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
    self__.__hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.equiv_sequential(coll__$1, other);
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.with_meta(cljs.core.List.EMPTY, self__.meta);
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.first(self__.front);
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var temp__4423__auto__ = cljs.core.next(self__.front);
  if (temp__4423__auto__) {
    var f1 = temp__4423__auto__;
    return new cljs.core.PersistentQueueSeq(self__.meta, f1, self__.rear, null);
  } else {
    if (self__.rear == null) {
      return cljs.core._empty(coll__$1);
    } else {
      return new cljs.core.PersistentQueueSeq(self__.meta, self__.rear, null, null);
    }
  }
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return coll__$1;
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.PersistentQueueSeq(meta__$1, self__.front, self__.rear, self__.__hash);
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.cons(o, coll__$1);
};
cljs.core.PersistentQueueSeq.getBasis = function() {
  return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "meta", "meta", -1154898805, null), new cljs.core.Symbol(null, "front", "front", 117022539, null), new cljs.core.Symbol(null, "rear", "rear", -900164830, null), cljs.core.with_meta(new cljs.core.Symbol(null, "__hash", "__hash", -1328796629, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.PersistentQueueSeq.cljs$lang$type = true;
cljs.core.PersistentQueueSeq.cljs$lang$ctorStr = "cljs.core/PersistentQueueSeq";
cljs.core.PersistentQueueSeq.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/PersistentQueueSeq");
};
cljs.core.__GT_PersistentQueueSeq = function cljs$core$__GT_PersistentQueueSeq(meta, front, rear, __hash) {
  return new cljs.core.PersistentQueueSeq(meta, front, rear, __hash);
};
cljs.core.PersistentQueueSeq.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.PersistentQueue = function(meta, count, front, rear, __hash) {
  this.meta = meta;
  this.count = count;
  this.front = front;
  this.rear = rear;
  this.__hash = __hash;
  this.cljs$lang$protocol_mask$partition0$ = 31858766;
  this.cljs$lang$protocol_mask$partition1$ = 8192;
};
cljs.core.PersistentQueue.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.PersistentQueue.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.PersistentQueue.prototype.cljs$core$IIterable$ = true;
cljs.core.PersistentQueue.prototype.cljs$core$IIterable$_iterator$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.PersistentQueueIter(self__.front, cljs.core._iterator(self__.rear));
};
cljs.core.PersistentQueue.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.meta;
};
cljs.core.PersistentQueue.prototype.cljs$core$ICloneable$_clone$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.PersistentQueue(self__.meta, self__.count, self__.front, self__.rear, self__.__hash);
};
cljs.core.PersistentQueue.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.count;
};
cljs.core.PersistentQueue.prototype.cljs$core$IStack$_peek$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.first(self__.front);
};
cljs.core.PersistentQueue.prototype.cljs$core$IStack$_pop$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (cljs.core.truth_(self__.front)) {
    var temp__4423__auto__ = cljs.core.next(self__.front);
    if (temp__4423__auto__) {
      var f1 = temp__4423__auto__;
      return new cljs.core.PersistentQueue(self__.meta, self__.count - 1, f1, self__.rear, null);
    } else {
      return new cljs.core.PersistentQueue(self__.meta, self__.count - 1, cljs.core.seq(self__.rear), cljs.core.PersistentVector.EMPTY, null);
    }
  } else {
    return coll__$1;
  }
};
cljs.core.PersistentQueue.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var h__6575__auto__ = self__.__hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
    self__.__hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.PersistentQueue.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.equiv_sequential(coll__$1, other);
};
cljs.core.PersistentQueue.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.with_meta(cljs.core.PersistentQueue.EMPTY, self__.meta);
};
cljs.core.PersistentQueue.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.first(self__.front);
};
cljs.core.PersistentQueue.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.rest(cljs.core.seq(coll__$1));
};
cljs.core.PersistentQueue.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var rear__$1 = cljs.core.seq(self__.rear);
  if (cljs.core.truth_(function() {
    var or__6140__auto__ = self__.front;
    if (cljs.core.truth_(or__6140__auto__)) {
      return or__6140__auto__;
    } else {
      return rear__$1;
    }
  }())) {
    return new cljs.core.PersistentQueueSeq(null, self__.front, cljs.core.seq(rear__$1), null);
  } else {
    return null;
  }
};
cljs.core.PersistentQueue.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.PersistentQueue(meta__$1, self__.count, self__.front, self__.rear, self__.__hash);
};
cljs.core.PersistentQueue.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
  var self__ = this;
  var coll__$1 = this;
  if (cljs.core.truth_(self__.front)) {
    return new cljs.core.PersistentQueue(self__.meta, self__.count + 1, self__.front, cljs.core.conj.cljs$core$IFn$_invoke$arity$2(function() {
      var or__6140__auto__ = self__.rear;
      if (cljs.core.truth_(or__6140__auto__)) {
        return or__6140__auto__;
      } else {
        return cljs.core.PersistentVector.EMPTY;
      }
    }(), o), null);
  } else {
    return new cljs.core.PersistentQueue(self__.meta, self__.count + 1, cljs.core.conj.cljs$core$IFn$_invoke$arity$2(self__.front, o), cljs.core.PersistentVector.EMPTY, null);
  }
};
cljs.core.PersistentQueue.getBasis = function() {
  return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "meta", "meta", -1154898805, null), new cljs.core.Symbol(null, "count", "count", -514511684, null), new cljs.core.Symbol(null, "front", "front", 117022539, null), new cljs.core.Symbol(null, "rear", "rear", -900164830, null), cljs.core.with_meta(new cljs.core.Symbol(null, "__hash", "__hash", -1328796629, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
  "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.PersistentQueue.cljs$lang$type = true;
cljs.core.PersistentQueue.cljs$lang$ctorStr = "cljs.core/PersistentQueue";
cljs.core.PersistentQueue.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/PersistentQueue");
};
cljs.core.__GT_PersistentQueue = function cljs$core$__GT_PersistentQueue(meta, count, front, rear, __hash) {
  return new cljs.core.PersistentQueue(meta, count, front, rear, __hash);
};
cljs.core.PersistentQueue.EMPTY = new cljs.core.PersistentQueue(null, 0, null, cljs.core.PersistentVector.EMPTY, cljs.core.empty_ordered_hash);
cljs.core.PersistentQueue.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.NeverEquiv = function() {
  this.cljs$lang$protocol_mask$partition0$ = 2097152;
  this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.NeverEquiv.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.NeverEquiv.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(o, other) {
  var self__ = this;
  var o__$1 = this;
  return false;
};
cljs.core.NeverEquiv.getBasis = function() {
  return cljs.core.PersistentVector.EMPTY;
};
cljs.core.NeverEquiv.cljs$lang$type = true;
cljs.core.NeverEquiv.cljs$lang$ctorStr = "cljs.core/NeverEquiv";
cljs.core.NeverEquiv.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/NeverEquiv");
};
cljs.core.__GT_NeverEquiv = function cljs$core$__GT_NeverEquiv() {
  return new cljs.core.NeverEquiv;
};
cljs.core.never_equiv = new cljs.core.NeverEquiv;
cljs.core.equiv_map = function cljs$core$equiv_map(x, y) {
  return cljs.core.boolean$(cljs.core.map_QMARK_(y) ? cljs.core.count(x) === cljs.core.count(y) ? cljs.core.every_QMARK_(cljs.core.identity, cljs.core.map.cljs$core$IFn$_invoke$arity$2(function(xkv) {
    return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(cljs.core.get.cljs$core$IFn$_invoke$arity$3(y, cljs.core.first(xkv), cljs.core.never_equiv), cljs.core.second(xkv));
  }, x)) : null : null);
};
cljs.core.scan_array = function cljs$core$scan_array(incr, k, array) {
  var len = array.length;
  var i = 0;
  while (true) {
    if (i < len) {
      if (k === array[i]) {
        return i;
      } else {
        var G__10089 = i + incr;
        i = G__10089;
        continue;
      }
    } else {
      return null;
    }
    break;
  }
};
cljs.core.obj_map_compare_keys = function cljs$core$obj_map_compare_keys(a, b) {
  var a__$1 = cljs.core.hash(a);
  var b__$1 = cljs.core.hash(b);
  if (a__$1 < b__$1) {
    return -1;
  } else {
    if (a__$1 > b__$1) {
      return 1;
    } else {
      return 0;
    }
  }
};
cljs.core.obj_map__GT_hash_map = function cljs$core$obj_map__GT_hash_map(m, k, v) {
  var ks = m.keys;
  var len = ks.length;
  var so = m.strobj;
  var mm = cljs.core.meta(m);
  var i = 0;
  var out = cljs.core.transient$(cljs.core.PersistentHashMap.EMPTY);
  while (true) {
    if (i < len) {
      var k__$1 = ks[i];
      var G__10090 = i + 1;
      var G__10091 = cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(out, k__$1, so[k__$1]);
      i = G__10090;
      out = G__10091;
      continue;
    } else {
      return cljs.core.with_meta(cljs.core.persistent_BANG_(cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(out, k, v)), mm);
    }
    break;
  }
};
cljs.core.obj_clone = function cljs$core$obj_clone(obj, ks) {
  var new_obj = {};
  var l = ks.length;
  var i_10096 = 0;
  while (true) {
    if (i_10096 < l) {
      var k_10097 = ks[i_10096];
      new_obj[k_10097] = obj[k_10097];
      var G__10098 = i_10096 + 1;
      i_10096 = G__10098;
      continue;
    } else {
    }
    break;
  }
  return new_obj;
};
cljs.core.ObjMap = function(meta, keys, strobj, update_count, __hash) {
  this.meta = meta;
  this.keys = keys;
  this.strobj = strobj;
  this.update_count = update_count;
  this.__hash = __hash;
  this.cljs$lang$protocol_mask$partition0$ = 16123663;
  this.cljs$lang$protocol_mask$partition1$ = 4;
};
cljs.core.ObjMap.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.ObjMap.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.ObjMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(coll, k) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(coll__$1, k, null);
};
cljs.core.ObjMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(coll, k, not_found) {
  var self__ = this;
  var coll__$1 = this;
  if (goog.isString(k) && !(cljs.core.scan_array(1, k, self__.keys) == null)) {
    return self__.strobj[k];
  } else {
    return not_found;
  }
};
cljs.core.ObjMap.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(coll, f, init) {
  var self__ = this;
  var coll__$1 = this;
  var len = self__.keys.length;
  var keys__$1 = self__.keys.sort(cljs.core.obj_map_compare_keys);
  var init__$1 = init;
  while (true) {
    if (cljs.core.seq(keys__$1)) {
      var k = cljs.core.first(keys__$1);
      var init__$2 = function() {
        var G__10101 = init__$1;
        var G__10102 = k;
        var G__10103 = self__.strobj[k];
        return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__10101, G__10102, G__10103) : f.call(null, G__10101, G__10102, G__10103);
      }();
      if (cljs.core.reduced_QMARK_(init__$2)) {
        return cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init__$2) : cljs.core.deref.call(null, init__$2);
      } else {
        var G__10104 = cljs.core.rest(keys__$1);
        var G__10105 = init__$2;
        keys__$1 = G__10104;
        init__$1 = G__10105;
        continue;
      }
    } else {
      return init__$1;
    }
    break;
  }
};
cljs.core.ObjMap.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.meta;
};
cljs.core.ObjMap.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.keys.length;
};
cljs.core.ObjMap.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var h__6575__auto__ = self__.__hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_unordered_coll(coll__$1);
    self__.__hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.ObjMap.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.equiv_map(coll__$1, other);
};
cljs.core.ObjMap.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.transient$(cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentHashMap.EMPTY, coll__$1));
};
cljs.core.ObjMap.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.with_meta(cljs.core.ObjMap.EMPTY, self__.meta);
};
cljs.core.ObjMap.prototype.cljs$core$IMap$_dissoc$arity$2 = function(coll, k) {
  var self__ = this;
  var coll__$1 = this;
  if (goog.isString(k) && !(cljs.core.scan_array(1, k, self__.keys) == null)) {
    var new_keys = cljs.core.aclone(self__.keys);
    var new_strobj = cljs.core.obj_clone(self__.strobj, self__.keys);
    new_keys.splice(cljs.core.scan_array(1, k, new_keys), 1);
    delete new_strobj[k];
    return new cljs.core.ObjMap(self__.meta, new_keys, new_strobj, self__.update_count + 1, null);
  } else {
    return coll__$1;
  }
};
cljs.core.ObjMap.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(coll, k, v) {
  var self__ = this;
  var coll__$1 = this;
  if (goog.isString(k)) {
    if (self__.update_count > cljs.core.ObjMap.HASHMAP_THRESHOLD || self__.keys.length >= cljs.core.ObjMap.HASHMAP_THRESHOLD) {
      return cljs.core.obj_map__GT_hash_map(coll__$1, k, v);
    } else {
      if (!(cljs.core.scan_array(1, k, self__.keys) == null)) {
        var new_strobj = cljs.core.obj_clone(self__.strobj, self__.keys);
        new_strobj[k] = v;
        return new cljs.core.ObjMap(self__.meta, self__.keys, new_strobj, self__.update_count + 1, null);
      } else {
        var new_strobj = cljs.core.obj_clone(self__.strobj, self__.keys);
        var new_keys = cljs.core.aclone(self__.keys);
        new_strobj[k] = v;
        new_keys.push(k);
        return new cljs.core.ObjMap(self__.meta, new_keys, new_strobj, self__.update_count + 1, null);
      }
    }
  } else {
    return cljs.core.obj_map__GT_hash_map(coll__$1, k, v);
  }
};
cljs.core.ObjMap.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = function(coll, k) {
  var self__ = this;
  var coll__$1 = this;
  if (goog.isString(k) && !(cljs.core.scan_array(1, k, self__.keys) == null)) {
    return true;
  } else {
    return false;
  }
};
cljs.core.ObjMap.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.keys.length > 0) {
    return cljs.core.map.cljs$core$IFn$_invoke$arity$2(function(coll__$1) {
      return function(p1__10099_SHARP_) {
        return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [p1__10099_SHARP_, self__.strobj[p1__10099_SHARP_]], null);
      };
    }(coll__$1), self__.keys.sort(cljs.core.obj_map_compare_keys));
  } else {
    return null;
  }
};
cljs.core.ObjMap.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.ObjMap(meta__$1, self__.keys, self__.strobj, self__.update_count, self__.__hash);
};
cljs.core.ObjMap.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, entry) {
  var self__ = this;
  var coll__$1 = this;
  if (cljs.core.vector_QMARK_(entry)) {
    return cljs.core._assoc(coll__$1, cljs.core._nth.cljs$core$IFn$_invoke$arity$2(entry, 0), cljs.core._nth.cljs$core$IFn$_invoke$arity$2(entry, 1));
  } else {
    return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._conj, coll__$1, entry);
  }
};
cljs.core.ObjMap.prototype.call = function() {
  var G__10106 = null;
  var G__10106__2 = function(self__, k) {
    var self__ = this;
    var self____$1 = this;
    var coll = self____$1;
    return coll.cljs$core$ILookup$_lookup$arity$2(null, k);
  };
  var G__10106__3 = function(self__, k, not_found) {
    var self__ = this;
    var self____$1 = this;
    var coll = self____$1;
    return coll.cljs$core$ILookup$_lookup$arity$3(null, k, not_found);
  };
  G__10106 = function(self__, k, not_found) {
    switch(arguments.length) {
      case 2:
        return G__10106__2.call(this, self__, k);
      case 3:
        return G__10106__3.call(this, self__, k, not_found);
    }
    throw new Error("Invalid arity: " + arguments.length);
  };
  G__10106.cljs$core$IFn$_invoke$arity$2 = G__10106__2;
  G__10106.cljs$core$IFn$_invoke$arity$3 = G__10106__3;
  return G__10106;
}();
cljs.core.ObjMap.prototype.apply = function(self__, args10100) {
  var self__ = this;
  var self____$1 = this;
  return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args10100)));
};
cljs.core.ObjMap.prototype.cljs$core$IFn$_invoke$arity$1 = function(k) {
  var self__ = this;
  var coll = this;
  return coll.cljs$core$ILookup$_lookup$arity$2(null, k);
};
cljs.core.ObjMap.prototype.cljs$core$IFn$_invoke$arity$2 = function(k, not_found) {
  var self__ = this;
  var coll = this;
  return coll.cljs$core$ILookup$_lookup$arity$3(null, k, not_found);
};
cljs.core.ObjMap.getBasis = function() {
  return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "meta", "meta", -1154898805, null), new cljs.core.Symbol(null, "keys", "keys", -1586012071, null), new cljs.core.Symbol(null, "strobj", "strobj", 1088091283, null), new cljs.core.Symbol(null, "update-count", "update-count", -411982269, null), cljs.core.with_meta(new cljs.core.Symbol(null, "__hash", "__hash", -1328796629, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
  "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.ObjMap.cljs$lang$type = true;
cljs.core.ObjMap.cljs$lang$ctorStr = "cljs.core/ObjMap";
cljs.core.ObjMap.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/ObjMap");
};
cljs.core.__GT_ObjMap = function cljs$core$__GT_ObjMap(meta, keys, strobj, update_count, __hash) {
  return new cljs.core.ObjMap(meta, keys, strobj, update_count, __hash);
};
cljs.core.ObjMap.EMPTY = new cljs.core.ObjMap(null, [], {}, 0, cljs.core.empty_unordered_hash);
cljs.core.ObjMap.HASHMAP_THRESHOLD = 8;
cljs.core.ObjMap.fromObject = function(ks, obj) {
  return new cljs.core.ObjMap(null, ks, obj, 0, null);
};
cljs.core.RecordIter = function(i, record, base_count, fields, ext_map_iter) {
  this.i = i;
  this.record = record;
  this.base_count = base_count;
  this.fields = fields;
  this.ext_map_iter = ext_map_iter;
};
cljs.core.RecordIter.prototype.hasNext = function() {
  var self__ = this;
  var _ = this;
  var or__6140__auto__ = self__.i < self__.base_count;
  if (or__6140__auto__) {
    return or__6140__auto__;
  } else {
    return self__.ext_map_iter.hasNext();
  }
};
cljs.core.RecordIter.prototype.next = function() {
  var self__ = this;
  var _ = this;
  if (self__.i < self__.base_count) {
    var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$2(self__.fields, self__.i);
    self__.i = self__.i + 1;
    return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [k, cljs.core._lookup.cljs$core$IFn$_invoke$arity$2(self__.record, k)], null);
  } else {
    return self__.ext_map_iter.next();
  }
};
cljs.core.RecordIter.prototype.remove = function() {
  var self__ = this;
  var _ = this;
  return new Error("Unsupported operation");
};
cljs.core.RecordIter.getBasis = function() {
  return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "i", "i", 253690212, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), new cljs.core.Symbol(null, "record", "record", 861424668, null), new cljs.core.Symbol(null, "base-count", "base-count", -1180647182, null), new cljs.core.Symbol(null, "fields", "fields", -291534703, null), new cljs.core.Symbol(null, 
  "ext-map-iter", "ext-map-iter", -1215982757, null)], null);
};
cljs.core.RecordIter.cljs$lang$type = true;
cljs.core.RecordIter.cljs$lang$ctorStr = "cljs.core/RecordIter";
cljs.core.RecordIter.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/RecordIter");
};
cljs.core.__GT_RecordIter = function cljs$core$__GT_RecordIter(i, record, base_count, fields, ext_map_iter) {
  return new cljs.core.RecordIter(i, record, base_count, fields, ext_map_iter);
};
cljs.core.ES6EntriesIterator = function(s) {
  this.s = s;
};
cljs.core.ES6EntriesIterator.prototype.next = function() {
  var self__ = this;
  var _ = this;
  if (!(self__.s == null)) {
    var vec__10109 = cljs.core.first(self__.s);
    var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10109, 0, null);
    var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10109, 1, null);
    self__.s = cljs.core.next(self__.s);
    return {"value":[k, v], "done":false};
  } else {
    return {"value":null, "done":true};
  }
};
cljs.core.ES6EntriesIterator.getBasis = function() {
  return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "s", "s", -948495851, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.ES6EntriesIterator.cljs$lang$type = true;
cljs.core.ES6EntriesIterator.cljs$lang$ctorStr = "cljs.core/ES6EntriesIterator";
cljs.core.ES6EntriesIterator.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/ES6EntriesIterator");
};
cljs.core.__GT_ES6EntriesIterator = function cljs$core$__GT_ES6EntriesIterator(s) {
  return new cljs.core.ES6EntriesIterator(s);
};
cljs.core.es6_entries_iterator = function cljs$core$es6_entries_iterator(coll) {
  return new cljs.core.ES6EntriesIterator(cljs.core.seq(coll));
};
cljs.core.ES6SetEntriesIterator = function(s) {
  this.s = s;
};
cljs.core.ES6SetEntriesIterator.prototype.next = function() {
  var self__ = this;
  var _ = this;
  if (!(self__.s == null)) {
    var x = cljs.core.first(self__.s);
    self__.s = cljs.core.next(self__.s);
    return {"value":[x, x], "done":false};
  } else {
    return {"value":null, "done":true};
  }
};
cljs.core.ES6SetEntriesIterator.getBasis = function() {
  return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "s", "s", -948495851, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.ES6SetEntriesIterator.cljs$lang$type = true;
cljs.core.ES6SetEntriesIterator.cljs$lang$ctorStr = "cljs.core/ES6SetEntriesIterator";
cljs.core.ES6SetEntriesIterator.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/ES6SetEntriesIterator");
};
cljs.core.__GT_ES6SetEntriesIterator = function cljs$core$__GT_ES6SetEntriesIterator(s) {
  return new cljs.core.ES6SetEntriesIterator(s);
};
cljs.core.es6_set_entries_iterator = function cljs$core$es6_set_entries_iterator(coll) {
  return new cljs.core.ES6SetEntriesIterator(cljs.core.seq(coll));
};
cljs.core.array_index_of_nil_QMARK_ = function cljs$core$array_index_of_nil_QMARK_(arr) {
  var len = arr.length;
  var i = 0;
  while (true) {
    if (len <= i) {
      return -1;
    } else {
      if (arr[i] == null) {
        return i;
      } else {
        var G__10110 = i + 2;
        i = G__10110;
        continue;
      }
    }
    break;
  }
};
cljs.core.array_index_of_keyword_QMARK_ = function cljs$core$array_index_of_keyword_QMARK_(arr, k) {
  var len = arr.length;
  var kstr = k.fqn;
  var i = 0;
  while (true) {
    if (len <= i) {
      return -1;
    } else {
      if (arr[i] instanceof cljs.core.Keyword && kstr === arr[i].fqn) {
        return i;
      } else {
        var G__10111 = i + 2;
        i = G__10111;
        continue;
      }
    }
    break;
  }
};
cljs.core.array_index_of_symbol_QMARK_ = function cljs$core$array_index_of_symbol_QMARK_(arr, k) {
  var len = arr.length;
  var kstr = k.str;
  var i = 0;
  while (true) {
    if (len <= i) {
      return -1;
    } else {
      if (arr[i] instanceof cljs.core.Symbol && kstr === arr[i].str) {
        return i;
      } else {
        var G__10112 = i + 2;
        i = G__10112;
        continue;
      }
    }
    break;
  }
};
cljs.core.array_index_of_identical_QMARK_ = function cljs$core$array_index_of_identical_QMARK_(arr, k) {
  var len = arr.length;
  var i = 0;
  while (true) {
    if (len <= i) {
      return -1;
    } else {
      if (k === arr[i]) {
        return i;
      } else {
        var G__10113 = i + 2;
        i = G__10113;
        continue;
      }
    }
    break;
  }
};
cljs.core.array_index_of_equiv_QMARK_ = function cljs$core$array_index_of_equiv_QMARK_(arr, k) {
  var len = arr.length;
  var i = 0;
  while (true) {
    if (len <= i) {
      return -1;
    } else {
      if (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(k, arr[i])) {
        return i;
      } else {
        var G__10114 = i + 2;
        i = G__10114;
        continue;
      }
    }
    break;
  }
};
cljs.core.array_index_of = function cljs$core$array_index_of(arr, k) {
  if (k instanceof cljs.core.Keyword) {
    return cljs.core.array_index_of_keyword_QMARK_(arr, k);
  } else {
    if (goog.isString(k) || typeof k === "number") {
      return cljs.core.array_index_of_identical_QMARK_(arr, k);
    } else {
      if (k instanceof cljs.core.Symbol) {
        return cljs.core.array_index_of_symbol_QMARK_(arr, k);
      } else {
        if (k == null) {
          return cljs.core.array_index_of_nil_QMARK_(arr);
        } else {
          return cljs.core.array_index_of_equiv_QMARK_(arr, k);
        }
      }
    }
  }
};
cljs.core.array_map_index_of = function cljs$core$array_map_index_of(m, k) {
  return cljs.core.array_index_of(m.arr, k);
};
cljs.core.array_extend_kv = function cljs$core$array_extend_kv(arr, k, v) {
  var l = arr.length;
  var narr = new Array(l + 2);
  var i_10115 = 0;
  while (true) {
    if (i_10115 < l) {
      narr[i_10115] = arr[i_10115];
      var G__10116 = i_10115 + 1;
      i_10115 = G__10116;
      continue;
    } else {
    }
    break;
  }
  narr[l] = k;
  narr[l + 1] = v;
  return narr;
};
cljs.core.array_map_extend_kv = function cljs$core$array_map_extend_kv(m, k, v) {
  return cljs.core.array_extend_kv(m.arr, k, v);
};
cljs.core.PersistentArrayMapSeq = function(arr, i, _meta) {
  this.arr = arr;
  this.i = i;
  this._meta = _meta;
  this.cljs$lang$protocol_mask$partition0$ = 32374990;
  this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.PersistentArrayMapSeq.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.PersistentArrayMapSeq.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__._meta;
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$INext$_next$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.i < self__.arr.length - 2) {
    return new cljs.core.PersistentArrayMapSeq(self__.arr, self__.i + 2, self__._meta);
  } else {
    return null;
  }
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return (self__.arr.length - self__.i) / 2;
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.hash_ordered_coll(coll__$1);
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.equiv_sequential(coll__$1, other);
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.with_meta(cljs.core.List.EMPTY, self__._meta);
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(coll, f) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f, coll__$1);
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(coll, f, start) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f, start, coll__$1);
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.arr[self__.i], self__.arr[self__.i + 1]], null);
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.i < self__.arr.length - 2) {
    return new cljs.core.PersistentArrayMapSeq(self__.arr, self__.i + 2, self__._meta);
  } else {
    return cljs.core.List.EMPTY;
  }
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return coll__$1;
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, new_meta) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.PersistentArrayMapSeq(self__.arr, self__.i, new_meta);
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.cons(o, coll__$1);
};
cljs.core.PersistentArrayMapSeq.getBasis = function() {
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "arr", "arr", 2115492975, null), new cljs.core.Symbol(null, "i", "i", 253690212, null), new cljs.core.Symbol(null, "_meta", "_meta", -1716892533, null)], null);
};
cljs.core.PersistentArrayMapSeq.cljs$lang$type = true;
cljs.core.PersistentArrayMapSeq.cljs$lang$ctorStr = "cljs.core/PersistentArrayMapSeq";
cljs.core.PersistentArrayMapSeq.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/PersistentArrayMapSeq");
};
cljs.core.__GT_PersistentArrayMapSeq = function cljs$core$__GT_PersistentArrayMapSeq(arr, i, _meta) {
  return new cljs.core.PersistentArrayMapSeq(arr, i, _meta);
};
cljs.core.PersistentArrayMapSeq.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.persistent_array_map_seq = function cljs$core$persistent_array_map_seq(arr, i, _meta) {
  if (i <= arr.length - 2) {
    return new cljs.core.PersistentArrayMapSeq(arr, i, _meta);
  } else {
    return null;
  }
};
cljs.core.PersistentArrayMapIterator = function(arr, i, cnt) {
  this.arr = arr;
  this.i = i;
  this.cnt = cnt;
};
cljs.core.PersistentArrayMapIterator.prototype.hasNext = function() {
  var self__ = this;
  var _ = this;
  return self__.i < self__.cnt;
};
cljs.core.PersistentArrayMapIterator.prototype.next = function() {
  var self__ = this;
  var _ = this;
  var ret = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.arr[self__.i], self__.arr[self__.i + 1]], null);
  self__.i = self__.i + 2;
  return ret;
};
cljs.core.PersistentArrayMapIterator.getBasis = function() {
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "arr", "arr", 2115492975, null), cljs.core.with_meta(new cljs.core.Symbol(null, "i", "i", 253690212, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), new cljs.core.Symbol(null, "cnt", "cnt", 1924510325, null)], null);
};
cljs.core.PersistentArrayMapIterator.cljs$lang$type = true;
cljs.core.PersistentArrayMapIterator.cljs$lang$ctorStr = "cljs.core/PersistentArrayMapIterator";
cljs.core.PersistentArrayMapIterator.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/PersistentArrayMapIterator");
};
cljs.core.__GT_PersistentArrayMapIterator = function cljs$core$__GT_PersistentArrayMapIterator(arr, i, cnt) {
  return new cljs.core.PersistentArrayMapIterator(arr, i, cnt);
};
cljs.core.PersistentArrayMap = function(meta, cnt, arr, __hash) {
  this.meta = meta;
  this.cnt = cnt;
  this.arr = arr;
  this.__hash = __hash;
  this.cljs$lang$protocol_mask$partition0$ = 16647951;
  this.cljs$lang$protocol_mask$partition1$ = 8196;
};
cljs.core.PersistentArrayMap.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.PersistentArrayMap.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.PersistentArrayMap.prototype.keys = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.es6_iterator(cljs.core.keys.cljs$core$IFn$_invoke$arity$1 ? cljs.core.keys.cljs$core$IFn$_invoke$arity$1(coll) : cljs.core.keys.call(null, coll));
};
cljs.core.PersistentArrayMap.prototype.entries = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.es6_entries_iterator(cljs.core.seq(coll));
};
cljs.core.PersistentArrayMap.prototype.values = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.es6_iterator(cljs.core.vals.cljs$core$IFn$_invoke$arity$1 ? cljs.core.vals.cljs$core$IFn$_invoke$arity$1(coll) : cljs.core.vals.call(null, coll));
};
cljs.core.PersistentArrayMap.prototype.has = function(k) {
  var self__ = this;
  var coll = this;
  return cljs.core.contains_QMARK_(coll, k);
};
cljs.core.PersistentArrayMap.prototype.get = function(k, not_found) {
  var self__ = this;
  var coll = this;
  return coll.cljs$core$ILookup$_lookup$arity$3(null, k, not_found);
};
cljs.core.PersistentArrayMap.prototype.forEach = function(f) {
  var self__ = this;
  var coll = this;
  var seq__10118 = cljs.core.seq(coll);
  var chunk__10119 = null;
  var count__10120 = 0;
  var i__10121 = 0;
  while (true) {
    if (i__10121 < count__10120) {
      var vec__10122 = chunk__10119.cljs$core$IIndexed$_nth$arity$2(null, i__10121);
      var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10122, 0, null);
      var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10122, 1, null);
      f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(v, k) : f.call(null, v, k);
      var G__10131 = seq__10118;
      var G__10132 = chunk__10119;
      var G__10133 = count__10120;
      var G__10134 = i__10121 + 1;
      seq__10118 = G__10131;
      chunk__10119 = G__10132;
      count__10120 = G__10133;
      i__10121 = G__10134;
      continue;
    } else {
      var temp__4425__auto__ = cljs.core.seq(seq__10118);
      if (temp__4425__auto__) {
        var seq__10118__$1 = temp__4425__auto__;
        if (cljs.core.chunked_seq_QMARK_(seq__10118__$1)) {
          var c__6943__auto__ = cljs.core.chunk_first(seq__10118__$1);
          var G__10135 = cljs.core.chunk_rest(seq__10118__$1);
          var G__10136 = c__6943__auto__;
          var G__10137 = cljs.core.count(c__6943__auto__);
          var G__10138 = 0;
          seq__10118 = G__10135;
          chunk__10119 = G__10136;
          count__10120 = G__10137;
          i__10121 = G__10138;
          continue;
        } else {
          var vec__10123 = cljs.core.first(seq__10118__$1);
          var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10123, 0, null);
          var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10123, 1, null);
          f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(v, k) : f.call(null, v, k);
          var G__10139 = cljs.core.next(seq__10118__$1);
          var G__10140 = null;
          var G__10141 = 0;
          var G__10142 = 0;
          seq__10118 = G__10139;
          chunk__10119 = G__10140;
          count__10120 = G__10141;
          i__10121 = G__10142;
          continue;
        }
      } else {
        return null;
      }
    }
    break;
  }
};
cljs.core.PersistentArrayMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(coll, k) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(coll__$1, k, null);
};
cljs.core.PersistentArrayMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(coll, k, not_found) {
  var self__ = this;
  var coll__$1 = this;
  var idx = cljs.core.array_map_index_of(coll__$1, k);
  if (idx === -1) {
    return not_found;
  } else {
    return self__.arr[idx + 1];
  }
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(coll, f, init) {
  var self__ = this;
  var coll__$1 = this;
  var len = self__.arr.length;
  var i = 0;
  var init__$1 = init;
  while (true) {
    if (i < len) {
      var init__$2 = function() {
        var G__10124 = init__$1;
        var G__10125 = self__.arr[i];
        var G__10126 = self__.arr[i + 1];
        return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__10124, G__10125, G__10126) : f.call(null, G__10124, G__10125, G__10126);
      }();
      if (cljs.core.reduced_QMARK_(init__$2)) {
        return cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init__$2) : cljs.core.deref.call(null, init__$2);
      } else {
        var G__10143 = i + 2;
        var G__10144 = init__$2;
        i = G__10143;
        init__$1 = G__10144;
        continue;
      }
    } else {
      return init__$1;
    }
    break;
  }
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IIterable$ = true;
cljs.core.PersistentArrayMap.prototype.cljs$core$IIterable$_iterator$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  return new cljs.core.PersistentArrayMapIterator(self__.arr, 0, self__.cnt * 2);
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.meta;
};
cljs.core.PersistentArrayMap.prototype.cljs$core$ICloneable$_clone$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return new cljs.core.PersistentArrayMap(self__.meta, self__.cnt, self__.arr, self__.__hash);
};
cljs.core.PersistentArrayMap.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.cnt;
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var h__6575__auto__ = self__.__hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_unordered_coll(coll__$1);
    self__.__hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  if (!(other == null) ? other.cljs$lang$protocol_mask$partition0$ & 1024 || other.cljs$core$IMap$ ? true : false : false) {
    var alen = self__.arr.length;
    var other__$1 = other;
    if (self__.cnt === other__$1.cljs$core$ICounted$_count$arity$1(null)) {
      var i = 0;
      while (true) {
        if (i < alen) {
          var v = other__$1.cljs$core$ILookup$_lookup$arity$3(null, self__.arr[i], cljs.core.lookup_sentinel);
          if (!(v === cljs.core.lookup_sentinel)) {
            if (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(self__.arr[i + 1], v)) {
              var G__10145 = i + 2;
              i = G__10145;
              continue;
            } else {
              return false;
            }
          } else {
            return false;
          }
        } else {
          return true;
        }
        break;
      }
    } else {
      return false;
    }
  } else {
    return cljs.core.equiv_map(coll__$1, other);
  }
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.TransientArrayMap({}, self__.arr.length, cljs.core.aclone(self__.arr));
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core._with_meta(cljs.core.PersistentArrayMap.EMPTY, self__.meta);
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IReduce$_reduce$arity$2 = function(coll, f) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f, coll__$1);
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IReduce$_reduce$arity$3 = function(coll, f, start) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f, start, coll__$1);
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IMap$_dissoc$arity$2 = function(coll, k) {
  var self__ = this;
  var coll__$1 = this;
  var idx = cljs.core.array_map_index_of(coll__$1, k);
  if (idx >= 0) {
    var len = self__.arr.length;
    var new_len = len - 2;
    if (new_len === 0) {
      return cljs.core._empty(coll__$1);
    } else {
      var new_arr = new Array(new_len);
      var s = 0;
      var d = 0;
      while (true) {
        if (s >= len) {
          return new cljs.core.PersistentArrayMap(self__.meta, self__.cnt - 1, new_arr, null);
        } else {
          if (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(k, self__.arr[s])) {
            var G__10146 = s + 2;
            var G__10147 = d;
            s = G__10146;
            d = G__10147;
            continue;
          } else {
            new_arr[d] = self__.arr[s];
            new_arr[d + 1] = self__.arr[s + 1];
            var G__10148 = s + 2;
            var G__10149 = d + 2;
            s = G__10148;
            d = G__10149;
            continue;
          }
        }
        break;
      }
    }
  } else {
    return coll__$1;
  }
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(coll, k, v) {
  var self__ = this;
  var coll__$1 = this;
  var idx = cljs.core.array_map_index_of(coll__$1, k);
  if (idx === -1) {
    if (self__.cnt < cljs.core.PersistentArrayMap.HASHMAP_THRESHOLD) {
      var arr__$1 = cljs.core.array_map_extend_kv(coll__$1, k, v);
      return new cljs.core.PersistentArrayMap(self__.meta, self__.cnt + 1, arr__$1, null);
    } else {
      return cljs.core._with_meta(cljs.core._assoc(cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentHashMap.EMPTY, coll__$1), k, v), self__.meta);
    }
  } else {
    if (v === self__.arr[idx + 1]) {
      return coll__$1;
    } else {
      var arr__$1 = function() {
        var G__10130 = cljs.core.aclone(self__.arr);
        G__10130[idx + 1] = v;
        return G__10130;
      }();
      return new cljs.core.PersistentArrayMap(self__.meta, self__.cnt, arr__$1, null);
    }
  }
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = function(coll, k) {
  var self__ = this;
  var coll__$1 = this;
  return !(cljs.core.array_map_index_of(coll__$1, k) === -1);
};
cljs.core.PersistentArrayMap.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.persistent_array_map_seq(self__.arr, 0, null);
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.PersistentArrayMap(meta__$1, self__.cnt, self__.arr, self__.__hash);
};
cljs.core.PersistentArrayMap.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, entry) {
  var self__ = this;
  var coll__$1 = this;
  if (cljs.core.vector_QMARK_(entry)) {
    return cljs.core._assoc(coll__$1, cljs.core._nth.cljs$core$IFn$_invoke$arity$2(entry, 0), cljs.core._nth.cljs$core$IFn$_invoke$arity$2(entry, 1));
  } else {
    var ret = coll__$1;
    var es = cljs.core.seq(entry);
    while (true) {
      if (es == null) {
        return ret;
      } else {
        var e = cljs.core.first(es);
        if (cljs.core.vector_QMARK_(e)) {
          var G__10150 = cljs.core._assoc(ret, cljs.core._nth.cljs$core$IFn$_invoke$arity$2(e, 0), cljs.core._nth.cljs$core$IFn$_invoke$arity$2(e, 1));
          var G__10151 = cljs.core.next(es);
          ret = G__10150;
          es = G__10151;
          continue;
        } else {
          throw new Error("conj on a map takes map entries or seqables of map entries");
        }
      }
      break;
    }
  }
};
cljs.core.PersistentArrayMap.prototype.call = function() {
  var G__10152 = null;
  var G__10152__2 = function(self__, k) {
    var self__ = this;
    var self____$1 = this;
    var coll = self____$1;
    return coll.cljs$core$ILookup$_lookup$arity$2(null, k);
  };
  var G__10152__3 = function(self__, k, not_found) {
    var self__ = this;
    var self____$1 = this;
    var coll = self____$1;
    return coll.cljs$core$ILookup$_lookup$arity$3(null, k, not_found);
  };
  G__10152 = function(self__, k, not_found) {
    switch(arguments.length) {
      case 2:
        return G__10152__2.call(this, self__, k);
      case 3:
        return G__10152__3.call(this, self__, k, not_found);
    }
    throw new Error("Invalid arity: " + arguments.length);
  };
  G__10152.cljs$core$IFn$_invoke$arity$2 = G__10152__2;
  G__10152.cljs$core$IFn$_invoke$arity$3 = G__10152__3;
  return G__10152;
}();
cljs.core.PersistentArrayMap.prototype.apply = function(self__, args10117) {
  var self__ = this;
  var self____$1 = this;
  return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args10117)));
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IFn$_invoke$arity$1 = function(k) {
  var self__ = this;
  var coll = this;
  return coll.cljs$core$ILookup$_lookup$arity$2(null, k);
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IFn$_invoke$arity$2 = function(k, not_found) {
  var self__ = this;
  var coll = this;
  return coll.cljs$core$ILookup$_lookup$arity$3(null, k, not_found);
};
cljs.core.PersistentArrayMap.getBasis = function() {
  return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "meta", "meta", -1154898805, null), new cljs.core.Symbol(null, "cnt", "cnt", 1924510325, null), new cljs.core.Symbol(null, "arr", "arr", 2115492975, null), cljs.core.with_meta(new cljs.core.Symbol(null, "__hash", "__hash", -1328796629, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.PersistentArrayMap.cljs$lang$type = true;
cljs.core.PersistentArrayMap.cljs$lang$ctorStr = "cljs.core/PersistentArrayMap";
cljs.core.PersistentArrayMap.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/PersistentArrayMap");
};
cljs.core.__GT_PersistentArrayMap = function cljs$core$__GT_PersistentArrayMap(meta, cnt, arr, __hash) {
  return new cljs.core.PersistentArrayMap(meta, cnt, arr, __hash);
};
cljs.core.PersistentArrayMap.EMPTY = new cljs.core.PersistentArrayMap(null, 0, [], cljs.core.empty_unordered_hash);
cljs.core.PersistentArrayMap.HASHMAP_THRESHOLD = 8;
cljs.core.PersistentArrayMap.fromArray = function(arr, no_clone, no_check) {
  var arr__$1 = no_clone ? arr : cljs.core.aclone(arr);
  var arr__$2 = no_check ? arr__$1 : function() {
    var ret = [];
    var i_10153 = 0;
    while (true) {
      if (i_10153 < arr__$1.length) {
        var k_10154 = arr__$1[i_10153];
        var v_10155 = arr__$1[i_10153 + 1];
        var idx_10156 = cljs.core.array_index_of(ret, k_10154);
        if (idx_10156 === -1) {
          ret.push(k_10154);
          ret.push(v_10155);
        } else {
        }
        var G__10157 = i_10153 + 2;
        i_10153 = G__10157;
        continue;
      } else {
      }
      break;
    }
    return ret;
  }();
  var arr__$3 = function() {
    var cnt = arr__$2.length / 2;
    return new cljs.core.PersistentArrayMap(null, cnt, arr__$2, null);
  }();
  return arr__$3;
};
cljs.core.PersistentArrayMap.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.TransientArrayMap = function(editable_QMARK_, len, arr) {
  this.editable_QMARK_ = editable_QMARK_;
  this.len = len;
  this.arr = arr;
  this.cljs$lang$protocol_mask$partition0$ = 258;
  this.cljs$lang$protocol_mask$partition1$ = 56;
};
cljs.core.TransientArrayMap.prototype.cljs$core$ICounted$_count$arity$1 = function(tcoll) {
  var self__ = this;
  var tcoll__$1 = this;
  if (cljs.core.truth_(self__.editable_QMARK_)) {
    return cljs.core.quot(self__.len, 2);
  } else {
    throw new Error("count after persistent!");
  }
};
cljs.core.TransientArrayMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(tcoll, k) {
  var self__ = this;
  var tcoll__$1 = this;
  return cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(tcoll__$1, k, null);
};
cljs.core.TransientArrayMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(tcoll, k, not_found) {
  var self__ = this;
  var tcoll__$1 = this;
  if (cljs.core.truth_(self__.editable_QMARK_)) {
    var idx = cljs.core.array_map_index_of(tcoll__$1, k);
    if (idx === -1) {
      return not_found;
    } else {
      return self__.arr[idx + 1];
    }
  } else {
    throw new Error("lookup after persistent!");
  }
};
cljs.core.TransientArrayMap.prototype.cljs$core$ITransientCollection$_conj_BANG_$arity$2 = function(tcoll, o) {
  var self__ = this;
  var tcoll__$1 = this;
  if (cljs.core.truth_(self__.editable_QMARK_)) {
    if (!(o == null) ? o.cljs$lang$protocol_mask$partition0$ & 2048 || o.cljs$core$IMapEntry$ ? true : !o.cljs$lang$protocol_mask$partition0$ ? cljs.core.native_satisfies_QMARK_(cljs.core.IMapEntry, o) : false : cljs.core.native_satisfies_QMARK_(cljs.core.IMapEntry, o)) {
      return cljs.core._assoc_BANG_(tcoll__$1, cljs.core.key.cljs$core$IFn$_invoke$arity$1 ? cljs.core.key.cljs$core$IFn$_invoke$arity$1(o) : cljs.core.key.call(null, o), cljs.core.val.cljs$core$IFn$_invoke$arity$1 ? cljs.core.val.cljs$core$IFn$_invoke$arity$1(o) : cljs.core.val.call(null, o));
    } else {
      var es = cljs.core.seq(o);
      var tcoll__$2 = tcoll__$1;
      while (true) {
        var temp__4423__auto__ = cljs.core.first(es);
        if (cljs.core.truth_(temp__4423__auto__)) {
          var e = temp__4423__auto__;
          var G__10160 = cljs.core.next(es);
          var G__10161 = cljs.core._assoc_BANG_(tcoll__$2, cljs.core.key.cljs$core$IFn$_invoke$arity$1 ? cljs.core.key.cljs$core$IFn$_invoke$arity$1(e) : cljs.core.key.call(null, e), cljs.core.val.cljs$core$IFn$_invoke$arity$1 ? cljs.core.val.cljs$core$IFn$_invoke$arity$1(e) : cljs.core.val.call(null, e));
          es = G__10160;
          tcoll__$2 = G__10161;
          continue;
        } else {
          return tcoll__$2;
        }
        break;
      }
    }
  } else {
    throw new Error("conj! after persistent!");
  }
};
cljs.core.TransientArrayMap.prototype.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 = function(tcoll) {
  var self__ = this;
  var tcoll__$1 = this;
  if (cljs.core.truth_(self__.editable_QMARK_)) {
    self__.editable_QMARK_ = false;
    return new cljs.core.PersistentArrayMap(null, cljs.core.quot(self__.len, 2), self__.arr, null);
  } else {
    throw new Error("persistent! called twice");
  }
};
cljs.core.TransientArrayMap.prototype.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3 = function(tcoll, key, val) {
  var self__ = this;
  var tcoll__$1 = this;
  if (cljs.core.truth_(self__.editable_QMARK_)) {
    var idx = cljs.core.array_map_index_of(tcoll__$1, key);
    if (idx === -1) {
      if (self__.len + 2 <= 2 * cljs.core.PersistentArrayMap.HASHMAP_THRESHOLD) {
        self__.len = self__.len + 2;
        self__.arr.push(key);
        self__.arr.push(val);
        return tcoll__$1;
      } else {
        return cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(cljs.core.array__GT_transient_hash_map.cljs$core$IFn$_invoke$arity$2 ? cljs.core.array__GT_transient_hash_map.cljs$core$IFn$_invoke$arity$2(self__.len, self__.arr) : cljs.core.array__GT_transient_hash_map.call(null, self__.len, self__.arr), key, val);
      }
    } else {
      if (val === self__.arr[idx + 1]) {
        return tcoll__$1;
      } else {
        self__.arr[idx + 1] = val;
        return tcoll__$1;
      }
    }
  } else {
    throw new Error("assoc! after persistent!");
  }
};
cljs.core.TransientArrayMap.prototype.cljs$core$ITransientMap$_dissoc_BANG_$arity$2 = function(tcoll, key) {
  var self__ = this;
  var tcoll__$1 = this;
  if (cljs.core.truth_(self__.editable_QMARK_)) {
    var idx = cljs.core.array_map_index_of(tcoll__$1, key);
    if (idx >= 0) {
      self__.arr[idx] = self__.arr[self__.len - 2];
      self__.arr[idx + 1] = self__.arr[self__.len - 1];
      var G__10159_10162 = self__.arr;
      G__10159_10162.pop();
      G__10159_10162.pop();
      self__.len = self__.len - 2;
    } else {
    }
    return tcoll__$1;
  } else {
    throw new Error("dissoc! after persistent!");
  }
};
cljs.core.TransientArrayMap.getBasis = function() {
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "editable?", "editable?", -164945806, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, "len", "len", -1230778691, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), 
  new cljs.core.Symbol(null, "arr", "arr", 2115492975, null)], null);
};
cljs.core.TransientArrayMap.cljs$lang$type = true;
cljs.core.TransientArrayMap.cljs$lang$ctorStr = "cljs.core/TransientArrayMap";
cljs.core.TransientArrayMap.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/TransientArrayMap");
};
cljs.core.__GT_TransientArrayMap = function cljs$core$__GT_TransientArrayMap(editable_QMARK_, len, arr) {
  return new cljs.core.TransientArrayMap(editable_QMARK_, len, arr);
};
cljs.core.array__GT_transient_hash_map = function cljs$core$array__GT_transient_hash_map(len, arr) {
  var out = cljs.core.transient$(cljs.core.PersistentHashMap.EMPTY);
  var i = 0;
  while (true) {
    if (i < len) {
      var G__10163 = cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(out, arr[i], arr[i + 1]);
      var G__10164 = i + 2;
      out = G__10163;
      i = G__10164;
      continue;
    } else {
      return out;
    }
    break;
  }
};
cljs.core.Box = function(val) {
  this.val = val;
};
cljs.core.Box.getBasis = function() {
  return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "val", "val", 1769233139, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.Box.cljs$lang$type = true;
cljs.core.Box.cljs$lang$ctorStr = "cljs.core/Box";
cljs.core.Box.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/Box");
};
cljs.core.__GT_Box = function cljs$core$__GT_Box(val) {
  return new cljs.core.Box(val);
};
cljs.core.key_test = function cljs$core$key_test(key, other) {
  if (key === other) {
    return true;
  } else {
    if (cljs.core.keyword_identical_QMARK_(key, other)) {
      return true;
    } else {
      return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(key, other);
    }
  }
};
cljs.core.mask = function cljs$core$mask(hash, shift) {
  return hash >>> shift & 31;
};
cljs.core.clone_and_set = function cljs$core$clone_and_set(var_args) {
  var args10165 = [];
  var len__7198__auto___10170 = arguments.length;
  var i__7199__auto___10171 = 0;
  while (true) {
    if (i__7199__auto___10171 < len__7198__auto___10170) {
      args10165.push(arguments[i__7199__auto___10171]);
      var G__10172 = i__7199__auto___10171 + 1;
      i__7199__auto___10171 = G__10172;
      continue;
    } else {
    }
    break;
  }
  var G__10167 = args10165.length;
  switch(G__10167) {
    case 3:
      return cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 5:
      return cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$5(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10165.length)].join(""));;
  }
};
cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$3 = function(arr, i, a) {
  var G__10168 = cljs.core.aclone(arr);
  G__10168[i] = a;
  return G__10168;
};
cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$5 = function(arr, i, a, j, b) {
  var G__10169 = cljs.core.aclone(arr);
  G__10169[i] = a;
  G__10169[j] = b;
  return G__10169;
};
cljs.core.clone_and_set.cljs$lang$maxFixedArity = 5;
cljs.core.remove_pair = function cljs$core$remove_pair(arr, i) {
  var new_arr = new Array(arr.length - 2);
  cljs.core.array_copy(arr, 0, new_arr, 0, 2 * i);
  cljs.core.array_copy(arr, 2 * (i + 1), new_arr, 2 * i, new_arr.length - 2 * i);
  return new_arr;
};
cljs.core.bitmap_indexed_node_index = function cljs$core$bitmap_indexed_node_index(bitmap, bit) {
  return cljs.core.bit_count(bitmap & bit - 1);
};
cljs.core.bitpos = function cljs$core$bitpos(hash, shift) {
  return 1 << (hash >>> shift & 31);
};
cljs.core.edit_and_set = function cljs$core$edit_and_set(var_args) {
  var args10174 = [];
  var len__7198__auto___10177 = arguments.length;
  var i__7199__auto___10178 = 0;
  while (true) {
    if (i__7199__auto___10178 < len__7198__auto___10177) {
      args10174.push(arguments[i__7199__auto___10178]);
      var G__10179 = i__7199__auto___10178 + 1;
      i__7199__auto___10178 = G__10179;
      continue;
    } else {
    }
    break;
  }
  var G__10176 = args10174.length;
  switch(G__10176) {
    case 4:
      return cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    case 6:
      return cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$6(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10174.length)].join(""));;
  }
};
cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$4 = function(inode, edit, i, a) {
  var editable = inode.ensure_editable(edit);
  editable.arr[i] = a;
  return editable;
};
cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$6 = function(inode, edit, i, a, j, b) {
  var editable = inode.ensure_editable(edit);
  editable.arr[i] = a;
  editable.arr[j] = b;
  return editable;
};
cljs.core.edit_and_set.cljs$lang$maxFixedArity = 6;
cljs.core.inode_kv_reduce = function cljs$core$inode_kv_reduce(arr, f, init) {
  var len = arr.length;
  var i = 0;
  var init__$1 = init;
  while (true) {
    if (i < len) {
      var init__$2 = function() {
        var k = arr[i];
        if (!(k == null)) {
          var G__10184 = init__$1;
          var G__10185 = k;
          var G__10186 = arr[i + 1];
          return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__10184, G__10185, G__10186) : f.call(null, G__10184, G__10185, G__10186);
        } else {
          var node = arr[i + 1];
          if (!(node == null)) {
            return node.kv_reduce(f, init__$1);
          } else {
            return init__$1;
          }
        }
      }();
      if (cljs.core.reduced_QMARK_(init__$2)) {
        return cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init__$2) : cljs.core.deref.call(null, init__$2);
      } else {
        var G__10187 = i + 2;
        var G__10188 = init__$2;
        i = G__10187;
        init__$1 = G__10188;
        continue;
      }
    } else {
      return init__$1;
    }
    break;
  }
};
cljs.core.NodeIterator = function(arr, i, next_entry, next_iter) {
  this.arr = arr;
  this.i = i;
  this.next_entry = next_entry;
  this.next_iter = next_iter;
};
cljs.core.NodeIterator.prototype.advance = function() {
  var self__ = this;
  var this$ = this;
  var len = self__.arr.length;
  while (true) {
    if (self__.i < len) {
      var key = self__.arr[self__.i];
      var node_or_val = self__.arr[self__.i + 1];
      var found = cljs.core.some_QMARK_(key) ? self__.next_entry = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [key, node_or_val], null) : cljs.core.some_QMARK_(node_or_val) ? function() {
        var new_iter = cljs.core._iterator(node_or_val);
        if (new_iter.hasNext()) {
          return self__.next_iter = new_iter;
        } else {
          return false;
        }
      }() : false;
      self__.i = self__.i + 2;
      if (found) {
        return true;
      } else {
        continue;
      }
    } else {
      return false;
    }
    break;
  }
};
cljs.core.NodeIterator.prototype.hasNext = function() {
  var self__ = this;
  var this$ = this;
  var or__6140__auto__ = cljs.core.some_QMARK_(self__.next_entry);
  if (or__6140__auto__) {
    return or__6140__auto__;
  } else {
    var or__6140__auto____$1 = cljs.core.some_QMARK_(self__.next_iter);
    if (or__6140__auto____$1) {
      return or__6140__auto____$1;
    } else {
      return this$.advance();
    }
  }
};
cljs.core.NodeIterator.prototype.next = function() {
  var self__ = this;
  var this$ = this;
  if (cljs.core.some_QMARK_(self__.next_entry)) {
    var ret = self__.next_entry;
    self__.next_entry = null;
    return ret;
  } else {
    if (cljs.core.some_QMARK_(self__.next_iter)) {
      var ret = self__.next_iter.next();
      if (self__.next_iter.hasNext()) {
      } else {
        self__.next_iter = null;
      }
      return ret;
    } else {
      if (this$.advance()) {
        return this$.next();
      } else {
        throw new Error("No such element");
      }
    }
  }
};
cljs.core.NodeIterator.prototype.remove = function() {
  var self__ = this;
  var _ = this;
  return new Error("Unsupported operation");
};
cljs.core.NodeIterator.getBasis = function() {
  return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "arr", "arr", 2115492975, null), cljs.core.with_meta(new cljs.core.Symbol(null, "i", "i", 253690212, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, "next-entry", "next-entry", 1091342476, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
  "mutable", "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, "next-iter", "next-iter", 1526626239, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.NodeIterator.cljs$lang$type = true;
cljs.core.NodeIterator.cljs$lang$ctorStr = "cljs.core/NodeIterator";
cljs.core.NodeIterator.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/NodeIterator");
};
cljs.core.__GT_NodeIterator = function cljs$core$__GT_NodeIterator(arr, i, next_entry, next_iter) {
  return new cljs.core.NodeIterator(arr, i, next_entry, next_iter);
};
cljs.core.BitmapIndexedNode = function(edit, bitmap, arr) {
  this.edit = edit;
  this.bitmap = bitmap;
  this.arr = arr;
};
cljs.core.BitmapIndexedNode.prototype.ensure_editable = function(e) {
  var self__ = this;
  var inode = this;
  if (e === self__.edit) {
    return inode;
  } else {
    var n = cljs.core.bit_count(self__.bitmap);
    var new_arr = new Array(n < 0 ? 4 : 2 * (n + 1));
    cljs.core.array_copy(self__.arr, 0, new_arr, 0, 2 * n);
    return new cljs.core.BitmapIndexedNode(e, self__.bitmap, new_arr);
  }
};
cljs.core.BitmapIndexedNode.prototype.inode_without_BANG_ = function(edit__$1, shift, hash, key, removed_leaf_QMARK_) {
  var self__ = this;
  var inode = this;
  var bit = 1 << (hash >>> shift & 31);
  if ((self__.bitmap & bit) === 0) {
    return inode;
  } else {
    var idx = cljs.core.bitmap_indexed_node_index(self__.bitmap, bit);
    var key_or_nil = self__.arr[2 * idx];
    var val_or_node = self__.arr[2 * idx + 1];
    if (key_or_nil == null) {
      var n = val_or_node.inode_without_BANG_(edit__$1, shift + 5, hash, key, removed_leaf_QMARK_);
      if (n === val_or_node) {
        return inode;
      } else {
        if (!(n == null)) {
          return cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$4(inode, edit__$1, 2 * idx + 1, n);
        } else {
          if (self__.bitmap === bit) {
            return null;
          } else {
            return inode.edit_and_remove_pair(edit__$1, bit, idx);
          }
        }
      }
    } else {
      if (cljs.core.key_test(key, key_or_nil)) {
        removed_leaf_QMARK_[0] = true;
        return inode.edit_and_remove_pair(edit__$1, bit, idx);
      } else {
        return inode;
      }
    }
  }
};
cljs.core.BitmapIndexedNode.prototype.edit_and_remove_pair = function(e, bit, i) {
  var self__ = this;
  var inode = this;
  if (self__.bitmap === bit) {
    return null;
  } else {
    var editable = inode.ensure_editable(e);
    var earr = editable.arr;
    var len = earr.length;
    editable.bitmap = bit ^ editable.bitmap;
    cljs.core.array_copy(earr, 2 * (i + 1), earr, 2 * i, len - 2 * (i + 1));
    earr[len - 2] = null;
    earr[len - 1] = null;
    return editable;
  }
};
cljs.core.BitmapIndexedNode.prototype.inode_seq = function() {
  var self__ = this;
  var inode = this;
  return cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$1 ? cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$1(self__.arr) : cljs.core.create_inode_seq.call(null, self__.arr);
};
cljs.core.BitmapIndexedNode.prototype.kv_reduce = function(f, init) {
  var self__ = this;
  var inode = this;
  return cljs.core.inode_kv_reduce(self__.arr, f, init);
};
cljs.core.BitmapIndexedNode.prototype.inode_lookup = function(shift, hash, key, not_found) {
  var self__ = this;
  var inode = this;
  var bit = 1 << (hash >>> shift & 31);
  if ((self__.bitmap & bit) === 0) {
    return not_found;
  } else {
    var idx = cljs.core.bitmap_indexed_node_index(self__.bitmap, bit);
    var key_or_nil = self__.arr[2 * idx];
    var val_or_node = self__.arr[2 * idx + 1];
    if (key_or_nil == null) {
      return val_or_node.inode_lookup(shift + 5, hash, key, not_found);
    } else {
      if (cljs.core.key_test(key, key_or_nil)) {
        return val_or_node;
      } else {
        return not_found;
      }
    }
  }
};
cljs.core.BitmapIndexedNode.prototype.inode_assoc_BANG_ = function(edit__$1, shift, hash, key, val, added_leaf_QMARK_) {
  var self__ = this;
  var inode = this;
  var bit = 1 << (hash >>> shift & 31);
  var idx = cljs.core.bitmap_indexed_node_index(self__.bitmap, bit);
  if ((self__.bitmap & bit) === 0) {
    var n = cljs.core.bit_count(self__.bitmap);
    if (2 * n < self__.arr.length) {
      var editable = inode.ensure_editable(edit__$1);
      var earr = editable.arr;
      added_leaf_QMARK_.val = true;
      cljs.core.array_copy_downward(earr, 2 * idx, earr, 2 * (idx + 1), 2 * (n - idx));
      earr[2 * idx] = key;
      earr[2 * idx + 1] = val;
      editable.bitmap = editable.bitmap | bit;
      return editable;
    } else {
      if (n >= 16) {
        var nodes = [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null];
        var jdx = hash >>> shift & 31;
        nodes[jdx] = cljs.core.BitmapIndexedNode.EMPTY.inode_assoc_BANG_(edit__$1, shift + 5, hash, key, val, added_leaf_QMARK_);
        var i_10202 = 0;
        var j_10203 = 0;
        while (true) {
          if (i_10202 < 32) {
            if ((self__.bitmap >>> i_10202 & 1) === 0) {
              var G__10204 = i_10202 + 1;
              var G__10205 = j_10203;
              i_10202 = G__10204;
              j_10203 = G__10205;
              continue;
            } else {
              nodes[i_10202] = !(self__.arr[j_10203] == null) ? cljs.core.BitmapIndexedNode.EMPTY.inode_assoc_BANG_(edit__$1, shift + 5, cljs.core.hash(self__.arr[j_10203]), self__.arr[j_10203], self__.arr[j_10203 + 1], added_leaf_QMARK_) : self__.arr[j_10203 + 1];
              var G__10206 = i_10202 + 1;
              var G__10207 = j_10203 + 2;
              i_10202 = G__10206;
              j_10203 = G__10207;
              continue;
            }
          } else {
          }
          break;
        }
        return new cljs.core.ArrayNode(edit__$1, n + 1, nodes);
      } else {
        var new_arr = new Array(2 * (n + 4));
        cljs.core.array_copy(self__.arr, 0, new_arr, 0, 2 * idx);
        new_arr[2 * idx] = key;
        new_arr[2 * idx + 1] = val;
        cljs.core.array_copy(self__.arr, 2 * idx, new_arr, 2 * (idx + 1), 2 * (n - idx));
        added_leaf_QMARK_.val = true;
        var editable = inode.ensure_editable(edit__$1);
        editable.arr = new_arr;
        editable.bitmap = editable.bitmap | bit;
        return editable;
      }
    }
  } else {
    var key_or_nil = self__.arr[2 * idx];
    var val_or_node = self__.arr[2 * idx + 1];
    if (key_or_nil == null) {
      var n = val_or_node.inode_assoc_BANG_(edit__$1, shift + 5, hash, key, val, added_leaf_QMARK_);
      if (n === val_or_node) {
        return inode;
      } else {
        return cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$4(inode, edit__$1, 2 * idx + 1, n);
      }
    } else {
      if (cljs.core.key_test(key, key_or_nil)) {
        if (val === val_or_node) {
          return inode;
        } else {
          return cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$4(inode, edit__$1, 2 * idx + 1, val);
        }
      } else {
        added_leaf_QMARK_.val = true;
        return cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$6(inode, edit__$1, 2 * idx, null, 2 * idx + 1, function() {
          var G__10189 = edit__$1;
          var G__10190 = shift + 5;
          var G__10191 = key_or_nil;
          var G__10192 = val_or_node;
          var G__10193 = hash;
          var G__10194 = key;
          var G__10195 = val;
          return cljs.core.create_node.cljs$core$IFn$_invoke$arity$7 ? cljs.core.create_node.cljs$core$IFn$_invoke$arity$7(G__10189, G__10190, G__10191, G__10192, G__10193, G__10194, G__10195) : cljs.core.create_node.call(null, G__10189, G__10190, G__10191, G__10192, G__10193, G__10194, G__10195);
        }());
      }
    }
  }
};
cljs.core.BitmapIndexedNode.prototype.inode_assoc = function(shift, hash, key, val, added_leaf_QMARK_) {
  var self__ = this;
  var inode = this;
  var bit = 1 << (hash >>> shift & 31);
  var idx = cljs.core.bitmap_indexed_node_index(self__.bitmap, bit);
  if ((self__.bitmap & bit) === 0) {
    var n = cljs.core.bit_count(self__.bitmap);
    if (n >= 16) {
      var nodes = [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null];
      var jdx = hash >>> shift & 31;
      nodes[jdx] = cljs.core.BitmapIndexedNode.EMPTY.inode_assoc(shift + 5, hash, key, val, added_leaf_QMARK_);
      var i_10208 = 0;
      var j_10209 = 0;
      while (true) {
        if (i_10208 < 32) {
          if ((self__.bitmap >>> i_10208 & 1) === 0) {
            var G__10210 = i_10208 + 1;
            var G__10211 = j_10209;
            i_10208 = G__10210;
            j_10209 = G__10211;
            continue;
          } else {
            nodes[i_10208] = !(self__.arr[j_10209] == null) ? cljs.core.BitmapIndexedNode.EMPTY.inode_assoc(shift + 5, cljs.core.hash(self__.arr[j_10209]), self__.arr[j_10209], self__.arr[j_10209 + 1], added_leaf_QMARK_) : self__.arr[j_10209 + 1];
            var G__10212 = i_10208 + 1;
            var G__10213 = j_10209 + 2;
            i_10208 = G__10212;
            j_10209 = G__10213;
            continue;
          }
        } else {
        }
        break;
      }
      return new cljs.core.ArrayNode(null, n + 1, nodes);
    } else {
      var new_arr = new Array(2 * (n + 1));
      cljs.core.array_copy(self__.arr, 0, new_arr, 0, 2 * idx);
      new_arr[2 * idx] = key;
      new_arr[2 * idx + 1] = val;
      cljs.core.array_copy(self__.arr, 2 * idx, new_arr, 2 * (idx + 1), 2 * (n - idx));
      added_leaf_QMARK_.val = true;
      return new cljs.core.BitmapIndexedNode(null, self__.bitmap | bit, new_arr);
    }
  } else {
    var key_or_nil = self__.arr[2 * idx];
    var val_or_node = self__.arr[2 * idx + 1];
    if (key_or_nil == null) {
      var n = val_or_node.inode_assoc(shift + 5, hash, key, val, added_leaf_QMARK_);
      if (n === val_or_node) {
        return inode;
      } else {
        return new cljs.core.BitmapIndexedNode(null, self__.bitmap, cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$3(self__.arr, 2 * idx + 1, n));
      }
    } else {
      if (cljs.core.key_test(key, key_or_nil)) {
        if (val === val_or_node) {
          return inode;
        } else {
          return new cljs.core.BitmapIndexedNode(null, self__.bitmap, cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$3(self__.arr, 2 * idx + 1, val));
        }
      } else {
        added_leaf_QMARK_.val = true;
        return new cljs.core.BitmapIndexedNode(null, self__.bitmap, cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$5(self__.arr, 2 * idx, null, 2 * idx + 1, function() {
          var G__10196 = shift + 5;
          var G__10197 = key_or_nil;
          var G__10198 = val_or_node;
          var G__10199 = hash;
          var G__10200 = key;
          var G__10201 = val;
          return cljs.core.create_node.cljs$core$IFn$_invoke$arity$6 ? cljs.core.create_node.cljs$core$IFn$_invoke$arity$6(G__10196, G__10197, G__10198, G__10199, G__10200, G__10201) : cljs.core.create_node.call(null, G__10196, G__10197, G__10198, G__10199, G__10200, G__10201);
        }()));
      }
    }
  }
};
cljs.core.BitmapIndexedNode.prototype.inode_find = function(shift, hash, key, not_found) {
  var self__ = this;
  var inode = this;
  var bit = 1 << (hash >>> shift & 31);
  if ((self__.bitmap & bit) === 0) {
    return not_found;
  } else {
    var idx = cljs.core.bitmap_indexed_node_index(self__.bitmap, bit);
    var key_or_nil = self__.arr[2 * idx];
    var val_or_node = self__.arr[2 * idx + 1];
    if (key_or_nil == null) {
      return val_or_node.inode_find(shift + 5, hash, key, not_found);
    } else {
      if (cljs.core.key_test(key, key_or_nil)) {
        return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [key_or_nil, val_or_node], null);
      } else {
        return not_found;
      }
    }
  }
};
cljs.core.BitmapIndexedNode.prototype.inode_without = function(shift, hash, key) {
  var self__ = this;
  var inode = this;
  var bit = 1 << (hash >>> shift & 31);
  if ((self__.bitmap & bit) === 0) {
    return inode;
  } else {
    var idx = cljs.core.bitmap_indexed_node_index(self__.bitmap, bit);
    var key_or_nil = self__.arr[2 * idx];
    var val_or_node = self__.arr[2 * idx + 1];
    if (key_or_nil == null) {
      var n = val_or_node.inode_without(shift + 5, hash, key);
      if (n === val_or_node) {
        return inode;
      } else {
        if (!(n == null)) {
          return new cljs.core.BitmapIndexedNode(null, self__.bitmap, cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$3(self__.arr, 2 * idx + 1, n));
        } else {
          if (self__.bitmap === bit) {
            return null;
          } else {
            return new cljs.core.BitmapIndexedNode(null, self__.bitmap ^ bit, cljs.core.remove_pair(self__.arr, idx));
          }
        }
      }
    } else {
      if (cljs.core.key_test(key, key_or_nil)) {
        return new cljs.core.BitmapIndexedNode(null, self__.bitmap ^ bit, cljs.core.remove_pair(self__.arr, idx));
      } else {
        return inode;
      }
    }
  }
};
cljs.core.BitmapIndexedNode.prototype.cljs$core$IIterable$ = true;
cljs.core.BitmapIndexedNode.prototype.cljs$core$IIterable$_iterator$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.NodeIterator(self__.arr, 0, null, null);
};
cljs.core.BitmapIndexedNode.getBasis = function() {
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "edit", "edit", -1302639, null), cljs.core.with_meta(new cljs.core.Symbol(null, "bitmap", "bitmap", 501334601, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, "arr", "arr", 2115492975, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
  "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.BitmapIndexedNode.cljs$lang$type = true;
cljs.core.BitmapIndexedNode.cljs$lang$ctorStr = "cljs.core/BitmapIndexedNode";
cljs.core.BitmapIndexedNode.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/BitmapIndexedNode");
};
cljs.core.__GT_BitmapIndexedNode = function cljs$core$__GT_BitmapIndexedNode(edit, bitmap, arr) {
  return new cljs.core.BitmapIndexedNode(edit, bitmap, arr);
};
cljs.core.BitmapIndexedNode.EMPTY = new cljs.core.BitmapIndexedNode(null, 0, []);
cljs.core.pack_array_node = function cljs$core$pack_array_node(array_node, edit, idx) {
  var arr = array_node.arr;
  var len = arr.length;
  var new_arr = new Array(2 * (array_node.cnt - 1));
  var i = 0;
  var j = 1;
  var bitmap = 0;
  while (true) {
    if (i < len) {
      if (!(i === idx) && !(arr[i] == null)) {
        new_arr[j] = arr[i];
        var G__10214 = i + 1;
        var G__10215 = j + 2;
        var G__10216 = bitmap | 1 << i;
        i = G__10214;
        j = G__10215;
        bitmap = G__10216;
        continue;
      } else {
        var G__10217 = i + 1;
        var G__10218 = j;
        var G__10219 = bitmap;
        i = G__10217;
        j = G__10218;
        bitmap = G__10219;
        continue;
      }
    } else {
      return new cljs.core.BitmapIndexedNode(edit, bitmap, new_arr);
    }
    break;
  }
};
cljs.core.ArrayNodeIterator = function(arr, i, next_iter) {
  this.arr = arr;
  this.i = i;
  this.next_iter = next_iter;
};
cljs.core.ArrayNodeIterator.prototype.hasNext = function() {
  var self__ = this;
  var this$ = this;
  var len = self__.arr.length;
  while (true) {
    if (!(cljs.core.some_QMARK_(self__.next_iter) && self__.next_iter.hasNext())) {
      if (self__.i < len) {
        var node = self__.arr[self__.i];
        self__.i = self__.i + 1;
        if (cljs.core.some_QMARK_(node)) {
          self__.next_iter = cljs.core._iterator(node);
        } else {
        }
        continue;
      } else {
        return false;
      }
    } else {
      return true;
    }
    break;
  }
};
cljs.core.ArrayNodeIterator.prototype.next = function() {
  var self__ = this;
  var this$ = this;
  if (this$.hasNext()) {
    return self__.next_iter.next();
  } else {
    throw new Error("No such element");
  }
};
cljs.core.ArrayNodeIterator.prototype.remove = function() {
  var self__ = this;
  var _ = this;
  return new Error("Unsupported operation");
};
cljs.core.ArrayNodeIterator.getBasis = function() {
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "arr", "arr", 2115492975, null), cljs.core.with_meta(new cljs.core.Symbol(null, "i", "i", 253690212, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, "next-iter", "next-iter", 1526626239, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
  "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.ArrayNodeIterator.cljs$lang$type = true;
cljs.core.ArrayNodeIterator.cljs$lang$ctorStr = "cljs.core/ArrayNodeIterator";
cljs.core.ArrayNodeIterator.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/ArrayNodeIterator");
};
cljs.core.__GT_ArrayNodeIterator = function cljs$core$__GT_ArrayNodeIterator(arr, i, next_iter) {
  return new cljs.core.ArrayNodeIterator(arr, i, next_iter);
};
cljs.core.ArrayNode = function(edit, cnt, arr) {
  this.edit = edit;
  this.cnt = cnt;
  this.arr = arr;
};
cljs.core.ArrayNode.prototype.ensure_editable = function(e) {
  var self__ = this;
  var inode = this;
  if (e === self__.edit) {
    return inode;
  } else {
    return new cljs.core.ArrayNode(e, self__.cnt, cljs.core.aclone(self__.arr));
  }
};
cljs.core.ArrayNode.prototype.inode_without_BANG_ = function(edit__$1, shift, hash, key, removed_leaf_QMARK_) {
  var self__ = this;
  var inode = this;
  var idx = hash >>> shift & 31;
  var node = self__.arr[idx];
  if (node == null) {
    return inode;
  } else {
    var n = node.inode_without_BANG_(edit__$1, shift + 5, hash, key, removed_leaf_QMARK_);
    if (n === node) {
      return inode;
    } else {
      if (n == null) {
        if (self__.cnt <= 8) {
          return cljs.core.pack_array_node(inode, edit__$1, idx);
        } else {
          var editable = cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$4(inode, edit__$1, idx, n);
          editable.cnt = editable.cnt - 1;
          return editable;
        }
      } else {
        return cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$4(inode, edit__$1, idx, n);
      }
    }
  }
};
cljs.core.ArrayNode.prototype.inode_seq = function() {
  var self__ = this;
  var inode = this;
  return cljs.core.create_array_node_seq.cljs$core$IFn$_invoke$arity$1 ? cljs.core.create_array_node_seq.cljs$core$IFn$_invoke$arity$1(self__.arr) : cljs.core.create_array_node_seq.call(null, self__.arr);
};
cljs.core.ArrayNode.prototype.kv_reduce = function(f, init) {
  var self__ = this;
  var inode = this;
  var len = self__.arr.length;
  var i = 0;
  var init__$1 = init;
  while (true) {
    if (i < len) {
      var node = self__.arr[i];
      if (!(node == null)) {
        var init__$2 = node.kv_reduce(f, init__$1);
        if (cljs.core.reduced_QMARK_(init__$2)) {
          return cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init__$2) : cljs.core.deref.call(null, init__$2);
        } else {
          var G__10220 = i + 1;
          var G__10221 = init__$2;
          i = G__10220;
          init__$1 = G__10221;
          continue;
        }
      } else {
        var G__10222 = i + 1;
        var G__10223 = init__$1;
        i = G__10222;
        init__$1 = G__10223;
        continue;
      }
    } else {
      return init__$1;
    }
    break;
  }
};
cljs.core.ArrayNode.prototype.inode_lookup = function(shift, hash, key, not_found) {
  var self__ = this;
  var inode = this;
  var idx = hash >>> shift & 31;
  var node = self__.arr[idx];
  if (!(node == null)) {
    return node.inode_lookup(shift + 5, hash, key, not_found);
  } else {
    return not_found;
  }
};
cljs.core.ArrayNode.prototype.inode_assoc_BANG_ = function(edit__$1, shift, hash, key, val, added_leaf_QMARK_) {
  var self__ = this;
  var inode = this;
  var idx = hash >>> shift & 31;
  var node = self__.arr[idx];
  if (node == null) {
    var editable = cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$4(inode, edit__$1, idx, cljs.core.BitmapIndexedNode.EMPTY.inode_assoc_BANG_(edit__$1, shift + 5, hash, key, val, added_leaf_QMARK_));
    editable.cnt = editable.cnt + 1;
    return editable;
  } else {
    var n = node.inode_assoc_BANG_(edit__$1, shift + 5, hash, key, val, added_leaf_QMARK_);
    if (n === node) {
      return inode;
    } else {
      return cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$4(inode, edit__$1, idx, n);
    }
  }
};
cljs.core.ArrayNode.prototype.inode_assoc = function(shift, hash, key, val, added_leaf_QMARK_) {
  var self__ = this;
  var inode = this;
  var idx = hash >>> shift & 31;
  var node = self__.arr[idx];
  if (node == null) {
    return new cljs.core.ArrayNode(null, self__.cnt + 1, cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$3(self__.arr, idx, cljs.core.BitmapIndexedNode.EMPTY.inode_assoc(shift + 5, hash, key, val, added_leaf_QMARK_)));
  } else {
    var n = node.inode_assoc(shift + 5, hash, key, val, added_leaf_QMARK_);
    if (n === node) {
      return inode;
    } else {
      return new cljs.core.ArrayNode(null, self__.cnt, cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$3(self__.arr, idx, n));
    }
  }
};
cljs.core.ArrayNode.prototype.inode_find = function(shift, hash, key, not_found) {
  var self__ = this;
  var inode = this;
  var idx = hash >>> shift & 31;
  var node = self__.arr[idx];
  if (!(node == null)) {
    return node.inode_find(shift + 5, hash, key, not_found);
  } else {
    return not_found;
  }
};
cljs.core.ArrayNode.prototype.inode_without = function(shift, hash, key) {
  var self__ = this;
  var inode = this;
  var idx = hash >>> shift & 31;
  var node = self__.arr[idx];
  if (!(node == null)) {
    var n = node.inode_without(shift + 5, hash, key);
    if (n === node) {
      return inode;
    } else {
      if (n == null) {
        if (self__.cnt <= 8) {
          return cljs.core.pack_array_node(inode, null, idx);
        } else {
          return new cljs.core.ArrayNode(null, self__.cnt - 1, cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$3(self__.arr, idx, n));
        }
      } else {
        return new cljs.core.ArrayNode(null, self__.cnt, cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$3(self__.arr, idx, n));
      }
    }
  } else {
    return inode;
  }
};
cljs.core.ArrayNode.prototype.cljs$core$IIterable$ = true;
cljs.core.ArrayNode.prototype.cljs$core$IIterable$_iterator$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.ArrayNodeIterator(self__.arr, 0, null);
};
cljs.core.ArrayNode.getBasis = function() {
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "edit", "edit", -1302639, null), cljs.core.with_meta(new cljs.core.Symbol(null, "cnt", "cnt", 1924510325, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, "arr", "arr", 2115492975, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
  "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.ArrayNode.cljs$lang$type = true;
cljs.core.ArrayNode.cljs$lang$ctorStr = "cljs.core/ArrayNode";
cljs.core.ArrayNode.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/ArrayNode");
};
cljs.core.__GT_ArrayNode = function cljs$core$__GT_ArrayNode(edit, cnt, arr) {
  return new cljs.core.ArrayNode(edit, cnt, arr);
};
cljs.core.hash_collision_node_find_index = function cljs$core$hash_collision_node_find_index(arr, cnt, key) {
  var lim = 2 * cnt;
  var i = 0;
  while (true) {
    if (i < lim) {
      if (cljs.core.key_test(key, arr[i])) {
        return i;
      } else {
        var G__10224 = i + 2;
        i = G__10224;
        continue;
      }
    } else {
      return -1;
    }
    break;
  }
};
cljs.core.HashCollisionNode = function(edit, collision_hash, cnt, arr) {
  this.edit = edit;
  this.collision_hash = collision_hash;
  this.cnt = cnt;
  this.arr = arr;
};
cljs.core.HashCollisionNode.prototype.ensure_editable = function(e) {
  var self__ = this;
  var inode = this;
  if (e === self__.edit) {
    return inode;
  } else {
    var new_arr = new Array(2 * (self__.cnt + 1));
    cljs.core.array_copy(self__.arr, 0, new_arr, 0, 2 * self__.cnt);
    return new cljs.core.HashCollisionNode(e, self__.collision_hash, self__.cnt, new_arr);
  }
};
cljs.core.HashCollisionNode.prototype.inode_without_BANG_ = function(edit__$1, shift, hash, key, removed_leaf_QMARK_) {
  var self__ = this;
  var inode = this;
  var idx = cljs.core.hash_collision_node_find_index(self__.arr, self__.cnt, key);
  if (idx === -1) {
    return inode;
  } else {
    removed_leaf_QMARK_[0] = true;
    if (self__.cnt === 1) {
      return null;
    } else {
      var editable = inode.ensure_editable(edit__$1);
      var earr = editable.arr;
      earr[idx] = earr[2 * self__.cnt - 2];
      earr[idx + 1] = earr[2 * self__.cnt - 1];
      earr[2 * self__.cnt - 1] = null;
      earr[2 * self__.cnt - 2] = null;
      editable.cnt = editable.cnt - 1;
      return editable;
    }
  }
};
cljs.core.HashCollisionNode.prototype.inode_seq = function() {
  var self__ = this;
  var inode = this;
  return cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$1 ? cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$1(self__.arr) : cljs.core.create_inode_seq.call(null, self__.arr);
};
cljs.core.HashCollisionNode.prototype.kv_reduce = function(f, init) {
  var self__ = this;
  var inode = this;
  return cljs.core.inode_kv_reduce(self__.arr, f, init);
};
cljs.core.HashCollisionNode.prototype.inode_lookup = function(shift, hash, key, not_found) {
  var self__ = this;
  var inode = this;
  var idx = cljs.core.hash_collision_node_find_index(self__.arr, self__.cnt, key);
  if (idx < 0) {
    return not_found;
  } else {
    if (cljs.core.key_test(key, self__.arr[idx])) {
      return self__.arr[idx + 1];
    } else {
      return not_found;
    }
  }
};
cljs.core.HashCollisionNode.prototype.inode_assoc_BANG_ = function(edit__$1, shift, hash, key, val, added_leaf_QMARK_) {
  var self__ = this;
  var inode = this;
  if (hash === self__.collision_hash) {
    var idx = cljs.core.hash_collision_node_find_index(self__.arr, self__.cnt, key);
    if (idx === -1) {
      if (self__.arr.length > 2 * self__.cnt) {
        var editable = cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$6(inode, edit__$1, 2 * self__.cnt, key, 2 * self__.cnt + 1, val);
        added_leaf_QMARK_.val = true;
        editable.cnt = editable.cnt + 1;
        return editable;
      } else {
        var len = self__.arr.length;
        var new_arr = new Array(len + 2);
        cljs.core.array_copy(self__.arr, 0, new_arr, 0, len);
        new_arr[len] = key;
        new_arr[len + 1] = val;
        added_leaf_QMARK_.val = true;
        return inode.ensure_editable_array(edit__$1, self__.cnt + 1, new_arr);
      }
    } else {
      if (self__.arr[idx + 1] === val) {
        return inode;
      } else {
        return cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$4(inode, edit__$1, idx + 1, val);
      }
    }
  } else {
    return (new cljs.core.BitmapIndexedNode(edit__$1, 1 << (self__.collision_hash >>> shift & 31), [null, inode, null, null])).inode_assoc_BANG_(edit__$1, shift, hash, key, val, added_leaf_QMARK_);
  }
};
cljs.core.HashCollisionNode.prototype.inode_assoc = function(shift, hash, key, val, added_leaf_QMARK_) {
  var self__ = this;
  var inode = this;
  if (hash === self__.collision_hash) {
    var idx = cljs.core.hash_collision_node_find_index(self__.arr, self__.cnt, key);
    if (idx === -1) {
      var len = 2 * self__.cnt;
      var new_arr = new Array(len + 2);
      cljs.core.array_copy(self__.arr, 0, new_arr, 0, len);
      new_arr[len] = key;
      new_arr[len + 1] = val;
      added_leaf_QMARK_.val = true;
      return new cljs.core.HashCollisionNode(null, self__.collision_hash, self__.cnt + 1, new_arr);
    } else {
      if (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(self__.arr[idx], val)) {
        return inode;
      } else {
        return new cljs.core.HashCollisionNode(null, self__.collision_hash, self__.cnt, cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$3(self__.arr, idx + 1, val));
      }
    }
  } else {
    return (new cljs.core.BitmapIndexedNode(null, 1 << (self__.collision_hash >>> shift & 31), [null, inode])).inode_assoc(shift, hash, key, val, added_leaf_QMARK_);
  }
};
cljs.core.HashCollisionNode.prototype.ensure_editable_array = function(e, count, array) {
  var self__ = this;
  var inode = this;
  if (e === self__.edit) {
    self__.arr = array;
    self__.cnt = count;
    return inode;
  } else {
    return new cljs.core.HashCollisionNode(self__.edit, self__.collision_hash, count, array);
  }
};
cljs.core.HashCollisionNode.prototype.inode_find = function(shift, hash, key, not_found) {
  var self__ = this;
  var inode = this;
  var idx = cljs.core.hash_collision_node_find_index(self__.arr, self__.cnt, key);
  if (idx < 0) {
    return not_found;
  } else {
    if (cljs.core.key_test(key, self__.arr[idx])) {
      return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.arr[idx], self__.arr[idx + 1]], null);
    } else {
      return not_found;
    }
  }
};
cljs.core.HashCollisionNode.prototype.inode_without = function(shift, hash, key) {
  var self__ = this;
  var inode = this;
  var idx = cljs.core.hash_collision_node_find_index(self__.arr, self__.cnt, key);
  if (idx === -1) {
    return inode;
  } else {
    if (self__.cnt === 1) {
      return null;
    } else {
      return new cljs.core.HashCollisionNode(null, self__.collision_hash, self__.cnt - 1, cljs.core.remove_pair(self__.arr, cljs.core.quot(idx, 2)));
    }
  }
};
cljs.core.HashCollisionNode.prototype.cljs$core$IIterable$ = true;
cljs.core.HashCollisionNode.prototype.cljs$core$IIterable$_iterator$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.NodeIterator(self__.arr, 0, null, null);
};
cljs.core.HashCollisionNode.getBasis = function() {
  return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "edit", "edit", -1302639, null), cljs.core.with_meta(new cljs.core.Symbol(null, "collision-hash", "collision-hash", -35831342, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, "cnt", "cnt", 1924510325, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
  "mutable", "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, "arr", "arr", 2115492975, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.HashCollisionNode.cljs$lang$type = true;
cljs.core.HashCollisionNode.cljs$lang$ctorStr = "cljs.core/HashCollisionNode";
cljs.core.HashCollisionNode.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/HashCollisionNode");
};
cljs.core.__GT_HashCollisionNode = function cljs$core$__GT_HashCollisionNode(edit, collision_hash, cnt, arr) {
  return new cljs.core.HashCollisionNode(edit, collision_hash, cnt, arr);
};
cljs.core.create_node = function cljs$core$create_node(var_args) {
  var args10225 = [];
  var len__7198__auto___10228 = arguments.length;
  var i__7199__auto___10229 = 0;
  while (true) {
    if (i__7199__auto___10229 < len__7198__auto___10228) {
      args10225.push(arguments[i__7199__auto___10229]);
      var G__10230 = i__7199__auto___10229 + 1;
      i__7199__auto___10229 = G__10230;
      continue;
    } else {
    }
    break;
  }
  var G__10227 = args10225.length;
  switch(G__10227) {
    case 6:
      return cljs.core.create_node.cljs$core$IFn$_invoke$arity$6(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
      break;
    case 7:
      return cljs.core.create_node.cljs$core$IFn$_invoke$arity$7(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10225.length)].join(""));;
  }
};
cljs.core.create_node.cljs$core$IFn$_invoke$arity$6 = function(shift, key1, val1, key2hash, key2, val2) {
  var key1hash = cljs.core.hash(key1);
  if (key1hash === key2hash) {
    return new cljs.core.HashCollisionNode(null, key1hash, 2, [key1, val1, key2, val2]);
  } else {
    var added_leaf_QMARK_ = new cljs.core.Box(false);
    return cljs.core.BitmapIndexedNode.EMPTY.inode_assoc(shift, key1hash, key1, val1, added_leaf_QMARK_).inode_assoc(shift, key2hash, key2, val2, added_leaf_QMARK_);
  }
};
cljs.core.create_node.cljs$core$IFn$_invoke$arity$7 = function(edit, shift, key1, val1, key2hash, key2, val2) {
  var key1hash = cljs.core.hash(key1);
  if (key1hash === key2hash) {
    return new cljs.core.HashCollisionNode(null, key1hash, 2, [key1, val1, key2, val2]);
  } else {
    var added_leaf_QMARK_ = new cljs.core.Box(false);
    return cljs.core.BitmapIndexedNode.EMPTY.inode_assoc_BANG_(edit, shift, key1hash, key1, val1, added_leaf_QMARK_).inode_assoc_BANG_(edit, shift, key2hash, key2, val2, added_leaf_QMARK_);
  }
};
cljs.core.create_node.cljs$lang$maxFixedArity = 7;
cljs.core.NodeSeq = function(meta, nodes, i, s, __hash) {
  this.meta = meta;
  this.nodes = nodes;
  this.i = i;
  this.s = s;
  this.__hash = __hash;
  this.cljs$lang$protocol_mask$partition0$ = 32374860;
  this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.NodeSeq.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.NodeSeq.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.NodeSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.meta;
};
cljs.core.NodeSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var h__6575__auto__ = self__.__hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
    self__.__hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.NodeSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.equiv_sequential(coll__$1, other);
};
cljs.core.NodeSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.with_meta(cljs.core.List.EMPTY, self__.meta);
};
cljs.core.NodeSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(coll, f) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f, coll__$1);
};
cljs.core.NodeSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(coll, f, start) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f, start, coll__$1);
};
cljs.core.NodeSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.s == null) {
    return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.nodes[self__.i], self__.nodes[self__.i + 1]], null);
  } else {
    return cljs.core.first(self__.s);
  }
};
cljs.core.NodeSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.s == null) {
    var G__10232 = self__.nodes;
    var G__10233 = self__.i + 2;
    var G__10234 = null;
    return cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$3 ? cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$3(G__10232, G__10233, G__10234) : cljs.core.create_inode_seq.call(null, G__10232, G__10233, G__10234);
  } else {
    var G__10235 = self__.nodes;
    var G__10236 = self__.i;
    var G__10237 = cljs.core.next(self__.s);
    return cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$3 ? cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$3(G__10235, G__10236, G__10237) : cljs.core.create_inode_seq.call(null, G__10235, G__10236, G__10237);
  }
};
cljs.core.NodeSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  return this$__$1;
};
cljs.core.NodeSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.NodeSeq(meta__$1, self__.nodes, self__.i, self__.s, self__.__hash);
};
cljs.core.NodeSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.cons(o, coll__$1);
};
cljs.core.NodeSeq.getBasis = function() {
  return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "meta", "meta", -1154898805, null), new cljs.core.Symbol(null, "nodes", "nodes", -459054278, null), new cljs.core.Symbol(null, "i", "i", 253690212, null), new cljs.core.Symbol(null, "s", "s", -948495851, null), cljs.core.with_meta(new cljs.core.Symbol(null, "__hash", "__hash", -1328796629, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 
  875778266), true], null))], null);
};
cljs.core.NodeSeq.cljs$lang$type = true;
cljs.core.NodeSeq.cljs$lang$ctorStr = "cljs.core/NodeSeq";
cljs.core.NodeSeq.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/NodeSeq");
};
cljs.core.__GT_NodeSeq = function cljs$core$__GT_NodeSeq(meta, nodes, i, s, __hash) {
  return new cljs.core.NodeSeq(meta, nodes, i, s, __hash);
};
cljs.core.NodeSeq.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.create_inode_seq = function cljs$core$create_inode_seq(var_args) {
  var args10238 = [];
  var len__7198__auto___10241 = arguments.length;
  var i__7199__auto___10242 = 0;
  while (true) {
    if (i__7199__auto___10242 < len__7198__auto___10241) {
      args10238.push(arguments[i__7199__auto___10242]);
      var G__10243 = i__7199__auto___10242 + 1;
      i__7199__auto___10242 = G__10243;
      continue;
    } else {
    }
    break;
  }
  var G__10240 = args10238.length;
  switch(G__10240) {
    case 1:
      return cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 3:
      return cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10238.length)].join(""));;
  }
};
cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$1 = function(nodes) {
  return cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$3(nodes, 0, null);
};
cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$3 = function(nodes, i, s) {
  if (s == null) {
    var len = nodes.length;
    var j = i;
    while (true) {
      if (j < len) {
        if (!(nodes[j] == null)) {
          return new cljs.core.NodeSeq(null, nodes, j, null, null);
        } else {
          var temp__4423__auto__ = nodes[j + 1];
          if (cljs.core.truth_(temp__4423__auto__)) {
            var node = temp__4423__auto__;
            var temp__4423__auto____$1 = node.inode_seq();
            if (cljs.core.truth_(temp__4423__auto____$1)) {
              var node_seq = temp__4423__auto____$1;
              return new cljs.core.NodeSeq(null, nodes, j + 2, node_seq, null);
            } else {
              var G__10245 = j + 2;
              j = G__10245;
              continue;
            }
          } else {
            var G__10246 = j + 2;
            j = G__10246;
            continue;
          }
        }
      } else {
        return null;
      }
      break;
    }
  } else {
    return new cljs.core.NodeSeq(null, nodes, i, s, null);
  }
};
cljs.core.create_inode_seq.cljs$lang$maxFixedArity = 3;
cljs.core.ArrayNodeSeq = function(meta, nodes, i, s, __hash) {
  this.meta = meta;
  this.nodes = nodes;
  this.i = i;
  this.s = s;
  this.__hash = __hash;
  this.cljs$lang$protocol_mask$partition0$ = 32374860;
  this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.ArrayNodeSeq.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.ArrayNodeSeq.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.meta;
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var h__6575__auto__ = self__.__hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
    self__.__hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.equiv_sequential(coll__$1, other);
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.with_meta(cljs.core.List.EMPTY, self__.meta);
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(coll, f) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f, coll__$1);
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(coll, f, start) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f, start, coll__$1);
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.first(self__.s);
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var G__10247 = null;
  var G__10248 = self__.nodes;
  var G__10249 = self__.i;
  var G__10250 = cljs.core.next(self__.s);
  return cljs.core.create_array_node_seq.cljs$core$IFn$_invoke$arity$4 ? cljs.core.create_array_node_seq.cljs$core$IFn$_invoke$arity$4(G__10247, G__10248, G__10249, G__10250) : cljs.core.create_array_node_seq.call(null, G__10247, G__10248, G__10249, G__10250);
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  return this$__$1;
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.ArrayNodeSeq(meta__$1, self__.nodes, self__.i, self__.s, self__.__hash);
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.cons(o, coll__$1);
};
cljs.core.ArrayNodeSeq.getBasis = function() {
  return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "meta", "meta", -1154898805, null), new cljs.core.Symbol(null, "nodes", "nodes", -459054278, null), new cljs.core.Symbol(null, "i", "i", 253690212, null), new cljs.core.Symbol(null, "s", "s", -948495851, null), cljs.core.with_meta(new cljs.core.Symbol(null, "__hash", "__hash", -1328796629, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 
  875778266), true], null))], null);
};
cljs.core.ArrayNodeSeq.cljs$lang$type = true;
cljs.core.ArrayNodeSeq.cljs$lang$ctorStr = "cljs.core/ArrayNodeSeq";
cljs.core.ArrayNodeSeq.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/ArrayNodeSeq");
};
cljs.core.__GT_ArrayNodeSeq = function cljs$core$__GT_ArrayNodeSeq(meta, nodes, i, s, __hash) {
  return new cljs.core.ArrayNodeSeq(meta, nodes, i, s, __hash);
};
cljs.core.ArrayNodeSeq.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.create_array_node_seq = function cljs$core$create_array_node_seq(var_args) {
  var args10251 = [];
  var len__7198__auto___10254 = arguments.length;
  var i__7199__auto___10255 = 0;
  while (true) {
    if (i__7199__auto___10255 < len__7198__auto___10254) {
      args10251.push(arguments[i__7199__auto___10255]);
      var G__10256 = i__7199__auto___10255 + 1;
      i__7199__auto___10255 = G__10256;
      continue;
    } else {
    }
    break;
  }
  var G__10253 = args10251.length;
  switch(G__10253) {
    case 1:
      return cljs.core.create_array_node_seq.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 4:
      return cljs.core.create_array_node_seq.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10251.length)].join(""));;
  }
};
cljs.core.create_array_node_seq.cljs$core$IFn$_invoke$arity$1 = function(nodes) {
  return cljs.core.create_array_node_seq.cljs$core$IFn$_invoke$arity$4(null, nodes, 0, null);
};
cljs.core.create_array_node_seq.cljs$core$IFn$_invoke$arity$4 = function(meta, nodes, i, s) {
  if (s == null) {
    var len = nodes.length;
    var j = i;
    while (true) {
      if (j < len) {
        var temp__4423__auto__ = nodes[j];
        if (cljs.core.truth_(temp__4423__auto__)) {
          var nj = temp__4423__auto__;
          var temp__4423__auto____$1 = nj.inode_seq();
          if (cljs.core.truth_(temp__4423__auto____$1)) {
            var ns = temp__4423__auto____$1;
            return new cljs.core.ArrayNodeSeq(meta, nodes, j + 1, ns, null);
          } else {
            var G__10258 = j + 1;
            j = G__10258;
            continue;
          }
        } else {
          var G__10259 = j + 1;
          j = G__10259;
          continue;
        }
      } else {
        return null;
      }
      break;
    }
  } else {
    return new cljs.core.ArrayNodeSeq(meta, nodes, i, s, null);
  }
};
cljs.core.create_array_node_seq.cljs$lang$maxFixedArity = 4;
cljs.core.HashMapIter = function(nil_val, root_iter, seen) {
  this.nil_val = nil_val;
  this.root_iter = root_iter;
  this.seen = seen;
};
cljs.core.HashMapIter.prototype.hasNext = function() {
  var self__ = this;
  var _ = this;
  return self__.seen && self__.root_iter.hasNext();
};
cljs.core.HashMapIter.prototype.next = function() {
  var self__ = this;
  var _ = this;
  if (!self__.seen) {
    self__.seen = true;
    return self__.nil_val;
  } else {
    return self__.root_iter.next();
  }
};
cljs.core.HashMapIter.prototype.remove = function() {
  var self__ = this;
  var _ = this;
  return new Error("Unsupported operation");
};
cljs.core.HashMapIter.getBasis = function() {
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "nil-val", "nil-val", -513933559, null), new cljs.core.Symbol(null, "root-iter", "root-iter", 1974672108, null), cljs.core.with_meta(new cljs.core.Symbol(null, "seen", "seen", 1121531738, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.HashMapIter.cljs$lang$type = true;
cljs.core.HashMapIter.cljs$lang$ctorStr = "cljs.core/HashMapIter";
cljs.core.HashMapIter.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/HashMapIter");
};
cljs.core.__GT_HashMapIter = function cljs$core$__GT_HashMapIter(nil_val, root_iter, seen) {
  return new cljs.core.HashMapIter(nil_val, root_iter, seen);
};
cljs.core.PersistentHashMap = function(meta, cnt, root, has_nil_QMARK_, nil_val, __hash) {
  this.meta = meta;
  this.cnt = cnt;
  this.root = root;
  this.has_nil_QMARK_ = has_nil_QMARK_;
  this.nil_val = nil_val;
  this.__hash = __hash;
  this.cljs$lang$protocol_mask$partition0$ = 16123663;
  this.cljs$lang$protocol_mask$partition1$ = 8196;
};
cljs.core.PersistentHashMap.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.PersistentHashMap.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.PersistentHashMap.prototype.keys = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.es6_iterator(cljs.core.keys.cljs$core$IFn$_invoke$arity$1 ? cljs.core.keys.cljs$core$IFn$_invoke$arity$1(coll) : cljs.core.keys.call(null, coll));
};
cljs.core.PersistentHashMap.prototype.entries = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.es6_entries_iterator(cljs.core.seq(coll));
};
cljs.core.PersistentHashMap.prototype.values = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.es6_iterator(cljs.core.vals.cljs$core$IFn$_invoke$arity$1 ? cljs.core.vals.cljs$core$IFn$_invoke$arity$1(coll) : cljs.core.vals.call(null, coll));
};
cljs.core.PersistentHashMap.prototype.has = function(k) {
  var self__ = this;
  var coll = this;
  return cljs.core.contains_QMARK_(coll, k);
};
cljs.core.PersistentHashMap.prototype.get = function(k, not_found) {
  var self__ = this;
  var coll = this;
  return coll.cljs$core$ILookup$_lookup$arity$3(null, k, not_found);
};
cljs.core.PersistentHashMap.prototype.forEach = function(f) {
  var self__ = this;
  var coll = this;
  var seq__10261 = cljs.core.seq(coll);
  var chunk__10262 = null;
  var count__10263 = 0;
  var i__10264 = 0;
  while (true) {
    if (i__10264 < count__10263) {
      var vec__10265 = chunk__10262.cljs$core$IIndexed$_nth$arity$2(null, i__10264);
      var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10265, 0, null);
      var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10265, 1, null);
      f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(v, k) : f.call(null, v, k);
      var G__10269 = seq__10261;
      var G__10270 = chunk__10262;
      var G__10271 = count__10263;
      var G__10272 = i__10264 + 1;
      seq__10261 = G__10269;
      chunk__10262 = G__10270;
      count__10263 = G__10271;
      i__10264 = G__10272;
      continue;
    } else {
      var temp__4425__auto__ = cljs.core.seq(seq__10261);
      if (temp__4425__auto__) {
        var seq__10261__$1 = temp__4425__auto__;
        if (cljs.core.chunked_seq_QMARK_(seq__10261__$1)) {
          var c__6943__auto__ = cljs.core.chunk_first(seq__10261__$1);
          var G__10273 = cljs.core.chunk_rest(seq__10261__$1);
          var G__10274 = c__6943__auto__;
          var G__10275 = cljs.core.count(c__6943__auto__);
          var G__10276 = 0;
          seq__10261 = G__10273;
          chunk__10262 = G__10274;
          count__10263 = G__10275;
          i__10264 = G__10276;
          continue;
        } else {
          var vec__10266 = cljs.core.first(seq__10261__$1);
          var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10266, 0, null);
          var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10266, 1, null);
          f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(v, k) : f.call(null, v, k);
          var G__10277 = cljs.core.next(seq__10261__$1);
          var G__10278 = null;
          var G__10279 = 0;
          var G__10280 = 0;
          seq__10261 = G__10277;
          chunk__10262 = G__10278;
          count__10263 = G__10279;
          i__10264 = G__10280;
          continue;
        }
      } else {
        return null;
      }
    }
    break;
  }
};
cljs.core.PersistentHashMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(coll, k) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(coll__$1, k, null);
};
cljs.core.PersistentHashMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(coll, k, not_found) {
  var self__ = this;
  var coll__$1 = this;
  if (k == null) {
    if (self__.has_nil_QMARK_) {
      return self__.nil_val;
    } else {
      return not_found;
    }
  } else {
    if (self__.root == null) {
      return not_found;
    } else {
      return self__.root.inode_lookup(0, cljs.core.hash(k), k, not_found);
    }
  }
};
cljs.core.PersistentHashMap.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(coll, f, init) {
  var self__ = this;
  var coll__$1 = this;
  var init__$1 = self__.has_nil_QMARK_ ? f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(init, null, self__.nil_val) : f.call(null, init, null, self__.nil_val) : init;
  if (cljs.core.reduced_QMARK_(init__$1)) {
    return cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init__$1) : cljs.core.deref.call(null, init__$1);
  } else {
    if (!(self__.root == null)) {
      return self__.root.kv_reduce(f, init__$1);
    } else {
      return init__$1;
    }
  }
};
cljs.core.PersistentHashMap.prototype.cljs$core$IIterable$ = true;
cljs.core.PersistentHashMap.prototype.cljs$core$IIterable$_iterator$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var root_iter = self__.root ? cljs.core._iterator(self__.root) : cljs.core.nil_iter;
  if (self__.has_nil_QMARK_) {
    return new cljs.core.HashMapIter(self__.nil_val, root_iter, false);
  } else {
    return root_iter;
  }
};
cljs.core.PersistentHashMap.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.meta;
};
cljs.core.PersistentHashMap.prototype.cljs$core$ICloneable$_clone$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return new cljs.core.PersistentHashMap(self__.meta, self__.cnt, self__.root, self__.has_nil_QMARK_, self__.nil_val, self__.__hash);
};
cljs.core.PersistentHashMap.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.cnt;
};
cljs.core.PersistentHashMap.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var h__6575__auto__ = self__.__hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_unordered_coll(coll__$1);
    self__.__hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.PersistentHashMap.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.equiv_map(coll__$1, other);
};
cljs.core.PersistentHashMap.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.TransientHashMap({}, self__.root, self__.cnt, self__.has_nil_QMARK_, self__.nil_val);
};
cljs.core.PersistentHashMap.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core._with_meta(cljs.core.PersistentHashMap.EMPTY, self__.meta);
};
cljs.core.PersistentHashMap.prototype.cljs$core$IMap$_dissoc$arity$2 = function(coll, k) {
  var self__ = this;
  var coll__$1 = this;
  if (k == null) {
    if (self__.has_nil_QMARK_) {
      return new cljs.core.PersistentHashMap(self__.meta, self__.cnt - 1, self__.root, false, null, null);
    } else {
      return coll__$1;
    }
  } else {
    if (self__.root == null) {
      return coll__$1;
    } else {
      var new_root = self__.root.inode_without(0, cljs.core.hash(k), k);
      if (new_root === self__.root) {
        return coll__$1;
      } else {
        return new cljs.core.PersistentHashMap(self__.meta, self__.cnt - 1, new_root, self__.has_nil_QMARK_, self__.nil_val, null);
      }
    }
  }
};
cljs.core.PersistentHashMap.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(coll, k, v) {
  var self__ = this;
  var coll__$1 = this;
  if (k == null) {
    if (self__.has_nil_QMARK_ && v === self__.nil_val) {
      return coll__$1;
    } else {
      return new cljs.core.PersistentHashMap(self__.meta, self__.has_nil_QMARK_ ? self__.cnt : self__.cnt + 1, self__.root, true, v, null);
    }
  } else {
    var added_leaf_QMARK_ = new cljs.core.Box(false);
    var new_root = (self__.root == null ? cljs.core.BitmapIndexedNode.EMPTY : self__.root).inode_assoc(0, cljs.core.hash(k), k, v, added_leaf_QMARK_);
    if (new_root === self__.root) {
      return coll__$1;
    } else {
      return new cljs.core.PersistentHashMap(self__.meta, added_leaf_QMARK_.val ? self__.cnt + 1 : self__.cnt, new_root, self__.has_nil_QMARK_, self__.nil_val, null);
    }
  }
};
cljs.core.PersistentHashMap.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = function(coll, k) {
  var self__ = this;
  var coll__$1 = this;
  if (k == null) {
    return self__.has_nil_QMARK_;
  } else {
    if (self__.root == null) {
      return false;
    } else {
      return !(self__.root.inode_lookup(0, cljs.core.hash(k), k, cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel);
    }
  }
};
cljs.core.PersistentHashMap.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.cnt > 0) {
    var s = !(self__.root == null) ? self__.root.inode_seq() : null;
    if (self__.has_nil_QMARK_) {
      return cljs.core.cons(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [null, self__.nil_val], null), s);
    } else {
      return s;
    }
  } else {
    return null;
  }
};
cljs.core.PersistentHashMap.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.PersistentHashMap(meta__$1, self__.cnt, self__.root, self__.has_nil_QMARK_, self__.nil_val, self__.__hash);
};
cljs.core.PersistentHashMap.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, entry) {
  var self__ = this;
  var coll__$1 = this;
  if (cljs.core.vector_QMARK_(entry)) {
    return cljs.core._assoc(coll__$1, cljs.core._nth.cljs$core$IFn$_invoke$arity$2(entry, 0), cljs.core._nth.cljs$core$IFn$_invoke$arity$2(entry, 1));
  } else {
    var ret = coll__$1;
    var es = cljs.core.seq(entry);
    while (true) {
      if (es == null) {
        return ret;
      } else {
        var e = cljs.core.first(es);
        if (cljs.core.vector_QMARK_(e)) {
          var G__10281 = cljs.core._assoc(ret, cljs.core._nth.cljs$core$IFn$_invoke$arity$2(e, 0), cljs.core._nth.cljs$core$IFn$_invoke$arity$2(e, 1));
          var G__10282 = cljs.core.next(es);
          ret = G__10281;
          es = G__10282;
          continue;
        } else {
          throw new Error("conj on a map takes map entries or seqables of map entries");
        }
      }
      break;
    }
  }
};
cljs.core.PersistentHashMap.prototype.call = function() {
  var G__10283 = null;
  var G__10283__2 = function(self__, k) {
    var self__ = this;
    var self____$1 = this;
    var coll = self____$1;
    return coll.cljs$core$ILookup$_lookup$arity$2(null, k);
  };
  var G__10283__3 = function(self__, k, not_found) {
    var self__ = this;
    var self____$1 = this;
    var coll = self____$1;
    return coll.cljs$core$ILookup$_lookup$arity$3(null, k, not_found);
  };
  G__10283 = function(self__, k, not_found) {
    switch(arguments.length) {
      case 2:
        return G__10283__2.call(this, self__, k);
      case 3:
        return G__10283__3.call(this, self__, k, not_found);
    }
    throw new Error("Invalid arity: " + arguments.length);
  };
  G__10283.cljs$core$IFn$_invoke$arity$2 = G__10283__2;
  G__10283.cljs$core$IFn$_invoke$arity$3 = G__10283__3;
  return G__10283;
}();
cljs.core.PersistentHashMap.prototype.apply = function(self__, args10260) {
  var self__ = this;
  var self____$1 = this;
  return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args10260)));
};
cljs.core.PersistentHashMap.prototype.cljs$core$IFn$_invoke$arity$1 = function(k) {
  var self__ = this;
  var coll = this;
  return coll.cljs$core$ILookup$_lookup$arity$2(null, k);
};
cljs.core.PersistentHashMap.prototype.cljs$core$IFn$_invoke$arity$2 = function(k, not_found) {
  var self__ = this;
  var coll = this;
  return coll.cljs$core$ILookup$_lookup$arity$3(null, k, not_found);
};
cljs.core.PersistentHashMap.getBasis = function() {
  return new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "meta", "meta", -1154898805, null), new cljs.core.Symbol(null, "cnt", "cnt", 1924510325, null), new cljs.core.Symbol(null, "root", "root", 1191874074, null), cljs.core.with_meta(new cljs.core.Symbol(null, "has-nil?", "has-nil?", 825886722, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "tag", "tag", -1290361223), new cljs.core.Symbol(null, "boolean", 
  "boolean", -278886877, null)], null)), new cljs.core.Symbol(null, "nil-val", "nil-val", -513933559, null), cljs.core.with_meta(new cljs.core.Symbol(null, "__hash", "__hash", -1328796629, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.PersistentHashMap.cljs$lang$type = true;
cljs.core.PersistentHashMap.cljs$lang$ctorStr = "cljs.core/PersistentHashMap";
cljs.core.PersistentHashMap.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/PersistentHashMap");
};
cljs.core.__GT_PersistentHashMap = function cljs$core$__GT_PersistentHashMap(meta, cnt, root, has_nil_QMARK_, nil_val, __hash) {
  return new cljs.core.PersistentHashMap(meta, cnt, root, has_nil_QMARK_, nil_val, __hash);
};
cljs.core.PersistentHashMap.EMPTY = new cljs.core.PersistentHashMap(null, 0, null, false, null, cljs.core.empty_unordered_hash);
cljs.core.PersistentHashMap.fromArray = function(arr, no_clone) {
  var arr__$1 = no_clone ? arr : cljs.core.aclone(arr);
  var len = arr__$1.length;
  var i = 0;
  var ret = cljs.core.transient$(cljs.core.PersistentHashMap.EMPTY);
  while (true) {
    if (i < len) {
      var G__10284 = i + 2;
      var G__10285 = cljs.core._assoc_BANG_(ret, arr__$1[i], arr__$1[i + 1]);
      i = G__10284;
      ret = G__10285;
      continue;
    } else {
      return cljs.core._persistent_BANG_(ret);
    }
    break;
  }
};
cljs.core.PersistentHashMap.fromArrays = function(ks, vs) {
  var len = ks.length;
  var i = 0;
  var out = cljs.core.transient$(cljs.core.PersistentHashMap.EMPTY);
  while (true) {
    if (i < len) {
      var G__10286 = i + 1;
      var G__10287 = out.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3(null, ks[i], vs[i]);
      i = G__10286;
      out = G__10287;
      continue;
    } else {
      return cljs.core.persistent_BANG_(out);
    }
    break;
  }
};
cljs.core.PersistentHashMap.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.TransientHashMap = function(edit, root, count, has_nil_QMARK_, nil_val) {
  this.edit = edit;
  this.root = root;
  this.count = count;
  this.has_nil_QMARK_ = has_nil_QMARK_;
  this.nil_val = nil_val;
  this.cljs$lang$protocol_mask$partition0$ = 258;
  this.cljs$lang$protocol_mask$partition1$ = 56;
};
cljs.core.TransientHashMap.prototype.conj_BANG_ = function(o) {
  var self__ = this;
  var tcoll = this;
  if (self__.edit) {
    if (!(o == null) ? o.cljs$lang$protocol_mask$partition0$ & 2048 || o.cljs$core$IMapEntry$ ? true : !o.cljs$lang$protocol_mask$partition0$ ? cljs.core.native_satisfies_QMARK_(cljs.core.IMapEntry, o) : false : cljs.core.native_satisfies_QMARK_(cljs.core.IMapEntry, o)) {
      return tcoll.assoc_BANG_(cljs.core.key.cljs$core$IFn$_invoke$arity$1 ? cljs.core.key.cljs$core$IFn$_invoke$arity$1(o) : cljs.core.key.call(null, o), cljs.core.val.cljs$core$IFn$_invoke$arity$1 ? cljs.core.val.cljs$core$IFn$_invoke$arity$1(o) : cljs.core.val.call(null, o));
    } else {
      var es = cljs.core.seq(o);
      var tcoll__$1 = tcoll;
      while (true) {
        var temp__4423__auto__ = cljs.core.first(es);
        if (cljs.core.truth_(temp__4423__auto__)) {
          var e = temp__4423__auto__;
          var G__10289 = cljs.core.next(es);
          var G__10290 = tcoll__$1.assoc_BANG_(cljs.core.key.cljs$core$IFn$_invoke$arity$1 ? cljs.core.key.cljs$core$IFn$_invoke$arity$1(e) : cljs.core.key.call(null, e), cljs.core.val.cljs$core$IFn$_invoke$arity$1 ? cljs.core.val.cljs$core$IFn$_invoke$arity$1(e) : cljs.core.val.call(null, e));
          es = G__10289;
          tcoll__$1 = G__10290;
          continue;
        } else {
          return tcoll__$1;
        }
        break;
      }
    }
  } else {
    throw new Error("conj! after persistent");
  }
};
cljs.core.TransientHashMap.prototype.assoc_BANG_ = function(k, v) {
  var self__ = this;
  var tcoll = this;
  if (self__.edit) {
    if (k == null) {
      if (self__.nil_val === v) {
      } else {
        self__.nil_val = v;
      }
      if (self__.has_nil_QMARK_) {
      } else {
        self__.count = self__.count + 1;
        self__.has_nil_QMARK_ = true;
      }
      return tcoll;
    } else {
      var added_leaf_QMARK_ = new cljs.core.Box(false);
      var node = (self__.root == null ? cljs.core.BitmapIndexedNode.EMPTY : self__.root).inode_assoc_BANG_(self__.edit, 0, cljs.core.hash(k), k, v, added_leaf_QMARK_);
      if (node === self__.root) {
      } else {
        self__.root = node;
      }
      if (added_leaf_QMARK_.val) {
        self__.count = self__.count + 1;
      } else {
      }
      return tcoll;
    }
  } else {
    throw new Error("assoc! after persistent!");
  }
};
cljs.core.TransientHashMap.prototype.without_BANG_ = function(k) {
  var self__ = this;
  var tcoll = this;
  if (self__.edit) {
    if (k == null) {
      if (self__.has_nil_QMARK_) {
        self__.has_nil_QMARK_ = false;
        self__.nil_val = null;
        self__.count = self__.count - 1;
        return tcoll;
      } else {
        return tcoll;
      }
    } else {
      if (self__.root == null) {
        return tcoll;
      } else {
        var removed_leaf_QMARK_ = new cljs.core.Box(false);
        var node = self__.root.inode_without_BANG_(self__.edit, 0, cljs.core.hash(k), k, removed_leaf_QMARK_);
        if (node === self__.root) {
        } else {
          self__.root = node;
        }
        if (cljs.core.truth_(removed_leaf_QMARK_[0])) {
          self__.count = self__.count - 1;
        } else {
        }
        return tcoll;
      }
    }
  } else {
    throw new Error("dissoc! after persistent!");
  }
};
cljs.core.TransientHashMap.prototype.persistent_BANG_ = function() {
  var self__ = this;
  var tcoll = this;
  if (self__.edit) {
    self__.edit = null;
    return new cljs.core.PersistentHashMap(null, self__.count, self__.root, self__.has_nil_QMARK_, self__.nil_val, null);
  } else {
    throw new Error("persistent! called twice");
  }
};
cljs.core.TransientHashMap.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.edit) {
    return self__.count;
  } else {
    throw new Error("count after persistent!");
  }
};
cljs.core.TransientHashMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(tcoll, k) {
  var self__ = this;
  var tcoll__$1 = this;
  if (k == null) {
    if (self__.has_nil_QMARK_) {
      return self__.nil_val;
    } else {
      return null;
    }
  } else {
    if (self__.root == null) {
      return null;
    } else {
      return self__.root.inode_lookup(0, cljs.core.hash(k), k);
    }
  }
};
cljs.core.TransientHashMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(tcoll, k, not_found) {
  var self__ = this;
  var tcoll__$1 = this;
  if (k == null) {
    if (self__.has_nil_QMARK_) {
      return self__.nil_val;
    } else {
      return not_found;
    }
  } else {
    if (self__.root == null) {
      return not_found;
    } else {
      return self__.root.inode_lookup(0, cljs.core.hash(k), k, not_found);
    }
  }
};
cljs.core.TransientHashMap.prototype.cljs$core$ITransientCollection$_conj_BANG_$arity$2 = function(tcoll, val) {
  var self__ = this;
  var tcoll__$1 = this;
  return tcoll__$1.conj_BANG_(val);
};
cljs.core.TransientHashMap.prototype.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 = function(tcoll) {
  var self__ = this;
  var tcoll__$1 = this;
  return tcoll__$1.persistent_BANG_();
};
cljs.core.TransientHashMap.prototype.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3 = function(tcoll, key, val) {
  var self__ = this;
  var tcoll__$1 = this;
  return tcoll__$1.assoc_BANG_(key, val);
};
cljs.core.TransientHashMap.prototype.cljs$core$ITransientMap$_dissoc_BANG_$arity$2 = function(tcoll, key) {
  var self__ = this;
  var tcoll__$1 = this;
  return tcoll__$1.without_BANG_(key);
};
cljs.core.TransientHashMap.getBasis = function() {
  return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "edit", "edit", -1302639, null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "tag", "tag", -1290361223), new cljs.core.Symbol(null, "boolean", "boolean", -278886877, null), new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, "root", "root", 1191874074, null), new cljs.core.PersistentArrayMap(null, 
  1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, "count", "count", -514511684, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, "has-nil?", "has-nil?", 825886722, null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "tag", "tag", -1290361223), new cljs.core.Symbol(null, 
  "boolean", "boolean", -278886877, null), new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, "nil-val", "nil-val", -513933559, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.TransientHashMap.cljs$lang$type = true;
cljs.core.TransientHashMap.cljs$lang$ctorStr = "cljs.core/TransientHashMap";
cljs.core.TransientHashMap.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/TransientHashMap");
};
cljs.core.__GT_TransientHashMap = function cljs$core$__GT_TransientHashMap(edit, root, count, has_nil_QMARK_, nil_val) {
  return new cljs.core.TransientHashMap(edit, root, count, has_nil_QMARK_, nil_val);
};
cljs.core.tree_map_seq_push = function cljs$core$tree_map_seq_push(node, stack, ascending_QMARK_) {
  var t = node;
  var stack__$1 = stack;
  while (true) {
    if (!(t == null)) {
      var G__10291 = ascending_QMARK_ ? t.left : t.right;
      var G__10292 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(stack__$1, t);
      t = G__10291;
      stack__$1 = G__10292;
      continue;
    } else {
      return stack__$1;
    }
    break;
  }
};
cljs.core.PersistentTreeMapSeq = function(meta, stack, ascending_QMARK_, cnt, __hash) {
  this.meta = meta;
  this.stack = stack;
  this.ascending_QMARK_ = ascending_QMARK_;
  this.cnt = cnt;
  this.__hash = __hash;
  this.cljs$lang$protocol_mask$partition0$ = 32374862;
  this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.PersistentTreeMapSeq.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.PersistentTreeMapSeq.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.meta;
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.cnt < 0) {
    return cljs.core.count(cljs.core.next(coll__$1)) + 1;
  } else {
    return self__.cnt;
  }
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var h__6575__auto__ = self__.__hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
    self__.__hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.equiv_sequential(coll__$1, other);
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.with_meta(cljs.core.List.EMPTY, self__.meta);
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(coll, f) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f, coll__$1);
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(coll, f, start) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f, start, coll__$1);
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  return cljs.core.peek(self__.stack);
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  var t = cljs.core.first(self__.stack);
  var next_stack = cljs.core.tree_map_seq_push(self__.ascending_QMARK_ ? t.right : t.left, cljs.core.next(self__.stack), self__.ascending_QMARK_);
  if (!(next_stack == null)) {
    return new cljs.core.PersistentTreeMapSeq(null, next_stack, self__.ascending_QMARK_, self__.cnt - 1, null);
  } else {
    return cljs.core.List.EMPTY;
  }
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  return this$__$1;
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.PersistentTreeMapSeq(meta__$1, self__.stack, self__.ascending_QMARK_, self__.cnt, self__.__hash);
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.cons(o, coll__$1);
};
cljs.core.PersistentTreeMapSeq.getBasis = function() {
  return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "meta", "meta", -1154898805, null), new cljs.core.Symbol(null, "stack", "stack", 847125597, null), cljs.core.with_meta(new cljs.core.Symbol(null, "ascending?", "ascending?", -1938452653, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "tag", "tag", -1290361223), new cljs.core.Symbol(null, "boolean", "boolean", -278886877, null)], null)), new cljs.core.Symbol(null, 
  "cnt", "cnt", 1924510325, null), cljs.core.with_meta(new cljs.core.Symbol(null, "__hash", "__hash", -1328796629, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.PersistentTreeMapSeq.cljs$lang$type = true;
cljs.core.PersistentTreeMapSeq.cljs$lang$ctorStr = "cljs.core/PersistentTreeMapSeq";
cljs.core.PersistentTreeMapSeq.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/PersistentTreeMapSeq");
};
cljs.core.__GT_PersistentTreeMapSeq = function cljs$core$__GT_PersistentTreeMapSeq(meta, stack, ascending_QMARK_, cnt, __hash) {
  return new cljs.core.PersistentTreeMapSeq(meta, stack, ascending_QMARK_, cnt, __hash);
};
cljs.core.PersistentTreeMapSeq.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.create_tree_map_seq = function cljs$core$create_tree_map_seq(tree, ascending_QMARK_, cnt) {
  return new cljs.core.PersistentTreeMapSeq(null, cljs.core.tree_map_seq_push(tree, null, ascending_QMARK_), ascending_QMARK_, cnt, null);
};
cljs.core.balance_left = function cljs$core$balance_left(key, val, ins, right) {
  if (ins instanceof cljs.core.RedNode) {
    if (ins.left instanceof cljs.core.RedNode) {
      return new cljs.core.RedNode(ins.key, ins.val, ins.left.blacken(), new cljs.core.BlackNode(key, val, ins.right, right, null), null);
    } else {
      if (ins.right instanceof cljs.core.RedNode) {
        return new cljs.core.RedNode(ins.right.key, ins.right.val, new cljs.core.BlackNode(ins.key, ins.val, ins.left, ins.right.left, null), new cljs.core.BlackNode(key, val, ins.right.right, right, null), null);
      } else {
        return new cljs.core.BlackNode(key, val, ins, right, null);
      }
    }
  } else {
    return new cljs.core.BlackNode(key, val, ins, right, null);
  }
};
cljs.core.balance_right = function cljs$core$balance_right(key, val, left, ins) {
  if (ins instanceof cljs.core.RedNode) {
    if (ins.right instanceof cljs.core.RedNode) {
      return new cljs.core.RedNode(ins.key, ins.val, new cljs.core.BlackNode(key, val, left, ins.left, null), ins.right.blacken(), null);
    } else {
      if (ins.left instanceof cljs.core.RedNode) {
        return new cljs.core.RedNode(ins.left.key, ins.left.val, new cljs.core.BlackNode(key, val, left, ins.left.left, null), new cljs.core.BlackNode(ins.key, ins.val, ins.left.right, ins.right, null), null);
      } else {
        return new cljs.core.BlackNode(key, val, left, ins, null);
      }
    }
  } else {
    return new cljs.core.BlackNode(key, val, left, ins, null);
  }
};
cljs.core.balance_left_del = function cljs$core$balance_left_del(key, val, del, right) {
  if (del instanceof cljs.core.RedNode) {
    return new cljs.core.RedNode(key, val, del.blacken(), right, null);
  } else {
    if (right instanceof cljs.core.BlackNode) {
      return cljs.core.balance_right(key, val, del, right.redden());
    } else {
      if (right instanceof cljs.core.RedNode && right.left instanceof cljs.core.BlackNode) {
        return new cljs.core.RedNode(right.left.key, right.left.val, new cljs.core.BlackNode(key, val, del, right.left.left, null), cljs.core.balance_right(right.key, right.val, right.left.right, right.right.redden()), null);
      } else {
        throw new Error("red-black tree invariant violation");
      }
    }
  }
};
cljs.core.balance_right_del = function cljs$core$balance_right_del(key, val, left, del) {
  if (del instanceof cljs.core.RedNode) {
    return new cljs.core.RedNode(key, val, left, del.blacken(), null);
  } else {
    if (left instanceof cljs.core.BlackNode) {
      return cljs.core.balance_left(key, val, left.redden(), del);
    } else {
      if (left instanceof cljs.core.RedNode && left.right instanceof cljs.core.BlackNode) {
        return new cljs.core.RedNode(left.right.key, left.right.val, cljs.core.balance_left(left.key, left.val, left.left.redden(), left.right.left), new cljs.core.BlackNode(key, val, left.right.right, del, null), null);
      } else {
        throw new Error("red-black tree invariant violation");
      }
    }
  }
};
cljs.core.tree_map_kv_reduce = function cljs$core$tree_map_kv_reduce(node, f, init) {
  var init__$1 = !(node.left == null) ? cljs$core$tree_map_kv_reduce(node.left, f, init) : init;
  if (cljs.core.reduced_QMARK_(init__$1)) {
    return cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init__$1) : cljs.core.deref.call(null, init__$1);
  } else {
    var init__$2 = function() {
      var G__10302 = init__$1;
      var G__10303 = node.key;
      var G__10304 = node.val;
      return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__10302, G__10303, G__10304) : f.call(null, G__10302, G__10303, G__10304);
    }();
    if (cljs.core.reduced_QMARK_(init__$2)) {
      return cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init__$2) : cljs.core.deref.call(null, init__$2);
    } else {
      var init__$3 = !(node.right == null) ? cljs$core$tree_map_kv_reduce(node.right, f, init__$2) : init__$2;
      if (cljs.core.reduced_QMARK_(init__$3)) {
        return cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init__$3) : cljs.core.deref.call(null, init__$3);
      } else {
        return init__$3;
      }
    }
  }
};
cljs.core.BlackNode = function(key, val, left, right, __hash) {
  this.key = key;
  this.val = val;
  this.left = left;
  this.right = right;
  this.__hash = __hash;
  this.cljs$lang$protocol_mask$partition0$ = 32402207;
  this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.BlackNode.prototype.add_right = function(ins) {
  var self__ = this;
  var node = this;
  return ins.balance_right(node);
};
cljs.core.BlackNode.prototype.redden = function() {
  var self__ = this;
  var node = this;
  return new cljs.core.RedNode(self__.key, self__.val, self__.left, self__.right, null);
};
cljs.core.BlackNode.prototype.blacken = function() {
  var self__ = this;
  var node = this;
  return node;
};
cljs.core.BlackNode.prototype.add_left = function(ins) {
  var self__ = this;
  var node = this;
  return ins.balance_left(node);
};
cljs.core.BlackNode.prototype.replace = function(key__$1, val__$1, left__$1, right__$1) {
  var self__ = this;
  var node = this;
  return new cljs.core.BlackNode(key__$1, val__$1, left__$1, right__$1, null);
};
cljs.core.BlackNode.prototype.balance_left = function(parent) {
  var self__ = this;
  var node = this;
  return new cljs.core.BlackNode(parent.key, parent.val, node, parent.right, null);
};
cljs.core.BlackNode.prototype.balance_right = function(parent) {
  var self__ = this;
  var node = this;
  return new cljs.core.BlackNode(parent.key, parent.val, parent.left, node, null);
};
cljs.core.BlackNode.prototype.remove_left = function(del) {
  var self__ = this;
  var node = this;
  return cljs.core.balance_left_del(self__.key, self__.val, del, self__.right);
};
cljs.core.BlackNode.prototype.kv_reduce = function(f, init) {
  var self__ = this;
  var node = this;
  return cljs.core.tree_map_kv_reduce(node, f, init);
};
cljs.core.BlackNode.prototype.remove_right = function(del) {
  var self__ = this;
  var node = this;
  return cljs.core.balance_right_del(self__.key, self__.val, self__.left, del);
};
cljs.core.BlackNode.prototype.cljs$core$ILookup$_lookup$arity$2 = function(node, k) {
  var self__ = this;
  var node__$1 = this;
  return cljs.core._nth.cljs$core$IFn$_invoke$arity$3(node__$1, k, null);
};
cljs.core.BlackNode.prototype.cljs$core$ILookup$_lookup$arity$3 = function(node, k, not_found) {
  var self__ = this;
  var node__$1 = this;
  return cljs.core._nth.cljs$core$IFn$_invoke$arity$3(node__$1, k, not_found);
};
cljs.core.BlackNode.prototype.cljs$core$IIndexed$_nth$arity$2 = function(node, n) {
  var self__ = this;
  var node__$1 = this;
  if (n === 0) {
    return self__.key;
  } else {
    if (n === 1) {
      return self__.val;
    } else {
      return null;
    }
  }
};
cljs.core.BlackNode.prototype.cljs$core$IIndexed$_nth$arity$3 = function(node, n, not_found) {
  var self__ = this;
  var node__$1 = this;
  if (n === 0) {
    return self__.key;
  } else {
    if (n === 1) {
      return self__.val;
    } else {
      return not_found;
    }
  }
};
cljs.core.BlackNode.prototype.cljs$core$IVector$_assoc_n$arity$3 = function(node, n, v) {
  var self__ = this;
  var node__$1 = this;
  return (new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key, self__.val], null)).cljs$core$IVector$_assoc_n$arity$3(null, n, v);
};
cljs.core.BlackNode.prototype.cljs$core$IMeta$_meta$arity$1 = function(node) {
  var self__ = this;
  var node__$1 = this;
  return null;
};
cljs.core.BlackNode.prototype.cljs$core$ICounted$_count$arity$1 = function(node) {
  var self__ = this;
  var node__$1 = this;
  return 2;
};
cljs.core.BlackNode.prototype.cljs$core$IMapEntry$_key$arity$1 = function(node) {
  var self__ = this;
  var node__$1 = this;
  return self__.key;
};
cljs.core.BlackNode.prototype.cljs$core$IMapEntry$_val$arity$1 = function(node) {
  var self__ = this;
  var node__$1 = this;
  return self__.val;
};
cljs.core.BlackNode.prototype.cljs$core$IStack$_peek$arity$1 = function(node) {
  var self__ = this;
  var node__$1 = this;
  return self__.val;
};
cljs.core.BlackNode.prototype.cljs$core$IStack$_pop$arity$1 = function(node) {
  var self__ = this;
  var node__$1 = this;
  return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key], null);
};
cljs.core.BlackNode.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var h__6575__auto__ = self__.__hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
    self__.__hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.BlackNode.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.equiv_sequential(coll__$1, other);
};
cljs.core.BlackNode.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(node) {
  var self__ = this;
  var node__$1 = this;
  return cljs.core.PersistentVector.EMPTY;
};
cljs.core.BlackNode.prototype.cljs$core$IReduce$_reduce$arity$2 = function(node, f) {
  var self__ = this;
  var node__$1 = this;
  return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$2(node__$1, f);
};
cljs.core.BlackNode.prototype.cljs$core$IReduce$_reduce$arity$3 = function(node, f, start) {
  var self__ = this;
  var node__$1 = this;
  return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$3(node__$1, f, start);
};
cljs.core.BlackNode.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(node, k, v) {
  var self__ = this;
  var node__$1 = this;
  return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key, self__.val], null), k, v);
};
cljs.core.BlackNode.prototype.cljs$core$ISeqable$_seq$arity$1 = function(node) {
  var self__ = this;
  var node__$1 = this;
  return cljs.core._conj(cljs.core._conj(cljs.core.List.EMPTY, self__.val), self__.key);
};
cljs.core.BlackNode.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(node, meta) {
  var self__ = this;
  var node__$1 = this;
  return cljs.core.with_meta(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key, self__.val], null), meta);
};
cljs.core.BlackNode.prototype.cljs$core$ICollection$_conj$arity$2 = function(node, o) {
  var self__ = this;
  var node__$1 = this;
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key, self__.val, o], null);
};
cljs.core.BlackNode.prototype.call = function() {
  var G__10306 = null;
  var G__10306__2 = function(self__, k) {
    var self__ = this;
    var self____$1 = this;
    var node = self____$1;
    return node.cljs$core$ILookup$_lookup$arity$2(null, k);
  };
  var G__10306__3 = function(self__, k, not_found) {
    var self__ = this;
    var self____$1 = this;
    var node = self____$1;
    return node.cljs$core$ILookup$_lookup$arity$3(null, k, not_found);
  };
  G__10306 = function(self__, k, not_found) {
    switch(arguments.length) {
      case 2:
        return G__10306__2.call(this, self__, k);
      case 3:
        return G__10306__3.call(this, self__, k, not_found);
    }
    throw new Error("Invalid arity: " + arguments.length);
  };
  G__10306.cljs$core$IFn$_invoke$arity$2 = G__10306__2;
  G__10306.cljs$core$IFn$_invoke$arity$3 = G__10306__3;
  return G__10306;
}();
cljs.core.BlackNode.prototype.apply = function(self__, args10305) {
  var self__ = this;
  var self____$1 = this;
  return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args10305)));
};
cljs.core.BlackNode.prototype.cljs$core$IFn$_invoke$arity$1 = function(k) {
  var self__ = this;
  var node = this;
  return node.cljs$core$ILookup$_lookup$arity$2(null, k);
};
cljs.core.BlackNode.prototype.cljs$core$IFn$_invoke$arity$2 = function(k, not_found) {
  var self__ = this;
  var node = this;
  return node.cljs$core$ILookup$_lookup$arity$3(null, k, not_found);
};
cljs.core.BlackNode.getBasis = function() {
  return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "key", "key", 124488940, null), new cljs.core.Symbol(null, "val", "val", 1769233139, null), new cljs.core.Symbol(null, "left", "left", 1241415590, null), new cljs.core.Symbol(null, "right", "right", 1187949694, null), cljs.core.with_meta(new cljs.core.Symbol(null, "__hash", "__hash", -1328796629, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", 
  "mutable", 875778266), true], null))], null);
};
cljs.core.BlackNode.cljs$lang$type = true;
cljs.core.BlackNode.cljs$lang$ctorStr = "cljs.core/BlackNode";
cljs.core.BlackNode.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/BlackNode");
};
cljs.core.__GT_BlackNode = function cljs$core$__GT_BlackNode(key, val, left, right, __hash) {
  return new cljs.core.BlackNode(key, val, left, right, __hash);
};
cljs.core.BlackNode.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.RedNode = function(key, val, left, right, __hash) {
  this.key = key;
  this.val = val;
  this.left = left;
  this.right = right;
  this.__hash = __hash;
  this.cljs$lang$protocol_mask$partition0$ = 32402207;
  this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.RedNode.prototype.add_right = function(ins) {
  var self__ = this;
  var node = this;
  return new cljs.core.RedNode(self__.key, self__.val, self__.left, ins, null);
};
cljs.core.RedNode.prototype.redden = function() {
  var self__ = this;
  var node = this;
  throw new Error("red-black tree invariant violation");
};
cljs.core.RedNode.prototype.blacken = function() {
  var self__ = this;
  var node = this;
  return new cljs.core.BlackNode(self__.key, self__.val, self__.left, self__.right, null);
};
cljs.core.RedNode.prototype.add_left = function(ins) {
  var self__ = this;
  var node = this;
  return new cljs.core.RedNode(self__.key, self__.val, ins, self__.right, null);
};
cljs.core.RedNode.prototype.replace = function(key__$1, val__$1, left__$1, right__$1) {
  var self__ = this;
  var node = this;
  return new cljs.core.RedNode(key__$1, val__$1, left__$1, right__$1, null);
};
cljs.core.RedNode.prototype.balance_left = function(parent) {
  var self__ = this;
  var node = this;
  if (self__.left instanceof cljs.core.RedNode) {
    return new cljs.core.RedNode(self__.key, self__.val, self__.left.blacken(), new cljs.core.BlackNode(parent.key, parent.val, self__.right, parent.right, null), null);
  } else {
    if (self__.right instanceof cljs.core.RedNode) {
      return new cljs.core.RedNode(self__.right.key, self__.right.val, new cljs.core.BlackNode(self__.key, self__.val, self__.left, self__.right.left, null), new cljs.core.BlackNode(parent.key, parent.val, self__.right.right, parent.right, null), null);
    } else {
      return new cljs.core.BlackNode(parent.key, parent.val, node, parent.right, null);
    }
  }
};
cljs.core.RedNode.prototype.balance_right = function(parent) {
  var self__ = this;
  var node = this;
  if (self__.right instanceof cljs.core.RedNode) {
    return new cljs.core.RedNode(self__.key, self__.val, new cljs.core.BlackNode(parent.key, parent.val, parent.left, self__.left, null), self__.right.blacken(), null);
  } else {
    if (self__.left instanceof cljs.core.RedNode) {
      return new cljs.core.RedNode(self__.left.key, self__.left.val, new cljs.core.BlackNode(parent.key, parent.val, parent.left, self__.left.left, null), new cljs.core.BlackNode(self__.key, self__.val, self__.left.right, self__.right, null), null);
    } else {
      return new cljs.core.BlackNode(parent.key, parent.val, parent.left, node, null);
    }
  }
};
cljs.core.RedNode.prototype.remove_left = function(del) {
  var self__ = this;
  var node = this;
  return new cljs.core.RedNode(self__.key, self__.val, del, self__.right, null);
};
cljs.core.RedNode.prototype.kv_reduce = function(f, init) {
  var self__ = this;
  var node = this;
  return cljs.core.tree_map_kv_reduce(node, f, init);
};
cljs.core.RedNode.prototype.remove_right = function(del) {
  var self__ = this;
  var node = this;
  return new cljs.core.RedNode(self__.key, self__.val, self__.left, del, null);
};
cljs.core.RedNode.prototype.cljs$core$ILookup$_lookup$arity$2 = function(node, k) {
  var self__ = this;
  var node__$1 = this;
  return cljs.core._nth.cljs$core$IFn$_invoke$arity$3(node__$1, k, null);
};
cljs.core.RedNode.prototype.cljs$core$ILookup$_lookup$arity$3 = function(node, k, not_found) {
  var self__ = this;
  var node__$1 = this;
  return cljs.core._nth.cljs$core$IFn$_invoke$arity$3(node__$1, k, not_found);
};
cljs.core.RedNode.prototype.cljs$core$IIndexed$_nth$arity$2 = function(node, n) {
  var self__ = this;
  var node__$1 = this;
  if (n === 0) {
    return self__.key;
  } else {
    if (n === 1) {
      return self__.val;
    } else {
      return null;
    }
  }
};
cljs.core.RedNode.prototype.cljs$core$IIndexed$_nth$arity$3 = function(node, n, not_found) {
  var self__ = this;
  var node__$1 = this;
  if (n === 0) {
    return self__.key;
  } else {
    if (n === 1) {
      return self__.val;
    } else {
      return not_found;
    }
  }
};
cljs.core.RedNode.prototype.cljs$core$IVector$_assoc_n$arity$3 = function(node, n, v) {
  var self__ = this;
  var node__$1 = this;
  return (new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key, self__.val], null)).cljs$core$IVector$_assoc_n$arity$3(null, n, v);
};
cljs.core.RedNode.prototype.cljs$core$IMeta$_meta$arity$1 = function(node) {
  var self__ = this;
  var node__$1 = this;
  return null;
};
cljs.core.RedNode.prototype.cljs$core$ICounted$_count$arity$1 = function(node) {
  var self__ = this;
  var node__$1 = this;
  return 2;
};
cljs.core.RedNode.prototype.cljs$core$IMapEntry$_key$arity$1 = function(node) {
  var self__ = this;
  var node__$1 = this;
  return self__.key;
};
cljs.core.RedNode.prototype.cljs$core$IMapEntry$_val$arity$1 = function(node) {
  var self__ = this;
  var node__$1 = this;
  return self__.val;
};
cljs.core.RedNode.prototype.cljs$core$IStack$_peek$arity$1 = function(node) {
  var self__ = this;
  var node__$1 = this;
  return self__.val;
};
cljs.core.RedNode.prototype.cljs$core$IStack$_pop$arity$1 = function(node) {
  var self__ = this;
  var node__$1 = this;
  return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key], null);
};
cljs.core.RedNode.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var h__6575__auto__ = self__.__hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
    self__.__hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.RedNode.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.equiv_sequential(coll__$1, other);
};
cljs.core.RedNode.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(node) {
  var self__ = this;
  var node__$1 = this;
  return cljs.core.PersistentVector.EMPTY;
};
cljs.core.RedNode.prototype.cljs$core$IReduce$_reduce$arity$2 = function(node, f) {
  var self__ = this;
  var node__$1 = this;
  return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$2(node__$1, f);
};
cljs.core.RedNode.prototype.cljs$core$IReduce$_reduce$arity$3 = function(node, f, start) {
  var self__ = this;
  var node__$1 = this;
  return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$3(node__$1, f, start);
};
cljs.core.RedNode.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(node, k, v) {
  var self__ = this;
  var node__$1 = this;
  return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key, self__.val], null), k, v);
};
cljs.core.RedNode.prototype.cljs$core$ISeqable$_seq$arity$1 = function(node) {
  var self__ = this;
  var node__$1 = this;
  return cljs.core._conj(cljs.core._conj(cljs.core.List.EMPTY, self__.val), self__.key);
};
cljs.core.RedNode.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(node, meta) {
  var self__ = this;
  var node__$1 = this;
  return cljs.core.with_meta(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key, self__.val], null), meta);
};
cljs.core.RedNode.prototype.cljs$core$ICollection$_conj$arity$2 = function(node, o) {
  var self__ = this;
  var node__$1 = this;
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key, self__.val, o], null);
};
cljs.core.RedNode.prototype.call = function() {
  var G__10308 = null;
  var G__10308__2 = function(self__, k) {
    var self__ = this;
    var self____$1 = this;
    var node = self____$1;
    return node.cljs$core$ILookup$_lookup$arity$2(null, k);
  };
  var G__10308__3 = function(self__, k, not_found) {
    var self__ = this;
    var self____$1 = this;
    var node = self____$1;
    return node.cljs$core$ILookup$_lookup$arity$3(null, k, not_found);
  };
  G__10308 = function(self__, k, not_found) {
    switch(arguments.length) {
      case 2:
        return G__10308__2.call(this, self__, k);
      case 3:
        return G__10308__3.call(this, self__, k, not_found);
    }
    throw new Error("Invalid arity: " + arguments.length);
  };
  G__10308.cljs$core$IFn$_invoke$arity$2 = G__10308__2;
  G__10308.cljs$core$IFn$_invoke$arity$3 = G__10308__3;
  return G__10308;
}();
cljs.core.RedNode.prototype.apply = function(self__, args10307) {
  var self__ = this;
  var self____$1 = this;
  return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args10307)));
};
cljs.core.RedNode.prototype.cljs$core$IFn$_invoke$arity$1 = function(k) {
  var self__ = this;
  var node = this;
  return node.cljs$core$ILookup$_lookup$arity$2(null, k);
};
cljs.core.RedNode.prototype.cljs$core$IFn$_invoke$arity$2 = function(k, not_found) {
  var self__ = this;
  var node = this;
  return node.cljs$core$ILookup$_lookup$arity$3(null, k, not_found);
};
cljs.core.RedNode.getBasis = function() {
  return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "key", "key", 124488940, null), new cljs.core.Symbol(null, "val", "val", 1769233139, null), new cljs.core.Symbol(null, "left", "left", 1241415590, null), new cljs.core.Symbol(null, "right", "right", 1187949694, null), cljs.core.with_meta(new cljs.core.Symbol(null, "__hash", "__hash", -1328796629, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", 
  "mutable", 875778266), true], null))], null);
};
cljs.core.RedNode.cljs$lang$type = true;
cljs.core.RedNode.cljs$lang$ctorStr = "cljs.core/RedNode";
cljs.core.RedNode.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/RedNode");
};
cljs.core.__GT_RedNode = function cljs$core$__GT_RedNode(key, val, left, right, __hash) {
  return new cljs.core.RedNode(key, val, left, right, __hash);
};
cljs.core.RedNode.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.tree_map_add = function cljs$core$tree_map_add(comp, tree, k, v, found) {
  if (tree == null) {
    return new cljs.core.RedNode(k, v, null, null, null);
  } else {
    var c = function() {
      var G__10321 = k;
      var G__10322 = tree.key;
      return comp.cljs$core$IFn$_invoke$arity$2 ? comp.cljs$core$IFn$_invoke$arity$2(G__10321, G__10322) : comp.call(null, G__10321, G__10322);
    }();
    if (c === 0) {
      found[0] = tree;
      return null;
    } else {
      if (c < 0) {
        var ins = cljs$core$tree_map_add(comp, tree.left, k, v, found);
        if (!(ins == null)) {
          return tree.add_left(ins);
        } else {
          return null;
        }
      } else {
        var ins = cljs$core$tree_map_add(comp, tree.right, k, v, found);
        if (!(ins == null)) {
          return tree.add_right(ins);
        } else {
          return null;
        }
      }
    }
  }
};
cljs.core.tree_map_append = function cljs$core$tree_map_append(left, right) {
  if (left == null) {
    return right;
  } else {
    if (right == null) {
      return left;
    } else {
      if (left instanceof cljs.core.RedNode) {
        if (right instanceof cljs.core.RedNode) {
          var app = cljs$core$tree_map_append(left.right, right.left);
          if (app instanceof cljs.core.RedNode) {
            return new cljs.core.RedNode(app.key, app.val, new cljs.core.RedNode(left.key, left.val, left.left, app.left, null), new cljs.core.RedNode(right.key, right.val, app.right, right.right, null), null);
          } else {
            return new cljs.core.RedNode(left.key, left.val, left.left, new cljs.core.RedNode(right.key, right.val, app, right.right, null), null);
          }
        } else {
          return new cljs.core.RedNode(left.key, left.val, left.left, cljs$core$tree_map_append(left.right, right), null);
        }
      } else {
        if (right instanceof cljs.core.RedNode) {
          return new cljs.core.RedNode(right.key, right.val, cljs$core$tree_map_append(left, right.left), right.right, null);
        } else {
          var app = cljs$core$tree_map_append(left.right, right.left);
          if (app instanceof cljs.core.RedNode) {
            return new cljs.core.RedNode(app.key, app.val, new cljs.core.BlackNode(left.key, left.val, left.left, app.left, null), new cljs.core.BlackNode(right.key, right.val, app.right, right.right, null), null);
          } else {
            return cljs.core.balance_left_del(left.key, left.val, left.left, new cljs.core.BlackNode(right.key, right.val, app, right.right, null));
          }
        }
      }
    }
  }
};
cljs.core.tree_map_remove = function cljs$core$tree_map_remove(comp, tree, k, found) {
  if (!(tree == null)) {
    var c = function() {
      var G__10341 = k;
      var G__10342 = tree.key;
      return comp.cljs$core$IFn$_invoke$arity$2 ? comp.cljs$core$IFn$_invoke$arity$2(G__10341, G__10342) : comp.call(null, G__10341, G__10342);
    }();
    if (c === 0) {
      found[0] = tree;
      return cljs.core.tree_map_append(tree.left, tree.right);
    } else {
      if (c < 0) {
        var del = cljs$core$tree_map_remove(comp, tree.left, k, found);
        if (!(del == null) || !(found[0] == null)) {
          if (tree.left instanceof cljs.core.BlackNode) {
            return cljs.core.balance_left_del(tree.key, tree.val, del, tree.right);
          } else {
            return new cljs.core.RedNode(tree.key, tree.val, del, tree.right, null);
          }
        } else {
          return null;
        }
      } else {
        var del = cljs$core$tree_map_remove(comp, tree.right, k, found);
        if (!(del == null) || !(found[0] == null)) {
          if (tree.right instanceof cljs.core.BlackNode) {
            return cljs.core.balance_right_del(tree.key, tree.val, tree.left, del);
          } else {
            return new cljs.core.RedNode(tree.key, tree.val, tree.left, del, null);
          }
        } else {
          return null;
        }
      }
    }
  } else {
    return null;
  }
};
cljs.core.tree_map_replace = function cljs$core$tree_map_replace(comp, tree, k, v) {
  var tk = tree.key;
  var c = comp.cljs$core$IFn$_invoke$arity$2 ? comp.cljs$core$IFn$_invoke$arity$2(k, tk) : comp.call(null, k, tk);
  if (c === 0) {
    return tree.replace(tk, v, tree.left, tree.right);
  } else {
    if (c < 0) {
      return tree.replace(tk, tree.val, cljs$core$tree_map_replace(comp, tree.left, k, v), tree.right);
    } else {
      return tree.replace(tk, tree.val, tree.left, cljs$core$tree_map_replace(comp, tree.right, k, v));
    }
  }
};
cljs.core.PersistentTreeMap = function(comp, tree, cnt, meta, __hash) {
  this.comp = comp;
  this.tree = tree;
  this.cnt = cnt;
  this.meta = meta;
  this.__hash = __hash;
  this.cljs$lang$protocol_mask$partition0$ = 418776847;
  this.cljs$lang$protocol_mask$partition1$ = 8192;
};
cljs.core.PersistentTreeMap.prototype.forEach = function(f) {
  var self__ = this;
  var coll = this;
  var seq__10352 = cljs.core.seq(coll);
  var chunk__10353 = null;
  var count__10354 = 0;
  var i__10355 = 0;
  while (true) {
    if (i__10355 < count__10354) {
      var vec__10356 = chunk__10353.cljs$core$IIndexed$_nth$arity$2(null, i__10355);
      var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10356, 0, null);
      var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10356, 1, null);
      f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(v, k) : f.call(null, v, k);
      var G__10362 = seq__10352;
      var G__10363 = chunk__10353;
      var G__10364 = count__10354;
      var G__10365 = i__10355 + 1;
      seq__10352 = G__10362;
      chunk__10353 = G__10363;
      count__10354 = G__10364;
      i__10355 = G__10365;
      continue;
    } else {
      var temp__4425__auto__ = cljs.core.seq(seq__10352);
      if (temp__4425__auto__) {
        var seq__10352__$1 = temp__4425__auto__;
        if (cljs.core.chunked_seq_QMARK_(seq__10352__$1)) {
          var c__6943__auto__ = cljs.core.chunk_first(seq__10352__$1);
          var G__10366 = cljs.core.chunk_rest(seq__10352__$1);
          var G__10367 = c__6943__auto__;
          var G__10368 = cljs.core.count(c__6943__auto__);
          var G__10369 = 0;
          seq__10352 = G__10366;
          chunk__10353 = G__10367;
          count__10354 = G__10368;
          i__10355 = G__10369;
          continue;
        } else {
          var vec__10357 = cljs.core.first(seq__10352__$1);
          var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10357, 0, null);
          var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10357, 1, null);
          f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(v, k) : f.call(null, v, k);
          var G__10370 = cljs.core.next(seq__10352__$1);
          var G__10371 = null;
          var G__10372 = 0;
          var G__10373 = 0;
          seq__10352 = G__10370;
          chunk__10353 = G__10371;
          count__10354 = G__10372;
          i__10355 = G__10373;
          continue;
        }
      } else {
        return null;
      }
    }
    break;
  }
};
cljs.core.PersistentTreeMap.prototype.get = function(k, not_found) {
  var self__ = this;
  var coll = this;
  return coll.cljs$core$ILookup$_lookup$arity$3(null, k, not_found);
};
cljs.core.PersistentTreeMap.prototype.entries = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.es6_entries_iterator(cljs.core.seq(coll));
};
cljs.core.PersistentTreeMap.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.PersistentTreeMap.prototype.keys = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.es6_iterator(cljs.core.keys.cljs$core$IFn$_invoke$arity$1 ? cljs.core.keys.cljs$core$IFn$_invoke$arity$1(coll) : cljs.core.keys.call(null, coll));
};
cljs.core.PersistentTreeMap.prototype.values = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.es6_iterator(cljs.core.vals.cljs$core$IFn$_invoke$arity$1 ? cljs.core.vals.cljs$core$IFn$_invoke$arity$1(coll) : cljs.core.vals.call(null, coll));
};
cljs.core.PersistentTreeMap.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.PersistentTreeMap.prototype.entry_at = function(k) {
  var self__ = this;
  var coll = this;
  var t = self__.tree;
  while (true) {
    if (!(t == null)) {
      var c = function() {
        var G__10358 = k;
        var G__10359 = t.key;
        return self__.comp.cljs$core$IFn$_invoke$arity$2 ? self__.comp.cljs$core$IFn$_invoke$arity$2(G__10358, G__10359) : self__.comp.call(null, G__10358, G__10359);
      }();
      if (c === 0) {
        return t;
      } else {
        if (c < 0) {
          var G__10374 = t.left;
          t = G__10374;
          continue;
        } else {
          var G__10375 = t.right;
          t = G__10375;
          continue;
        }
      }
    } else {
      return null;
    }
    break;
  }
};
cljs.core.PersistentTreeMap.prototype.has = function(k) {
  var self__ = this;
  var coll = this;
  return cljs.core.contains_QMARK_(coll, k);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(coll, k) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(coll__$1, k, null);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(coll, k, not_found) {
  var self__ = this;
  var coll__$1 = this;
  var n = coll__$1.entry_at(k);
  if (!(n == null)) {
    return n.val;
  } else {
    return not_found;
  }
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(coll, f, init) {
  var self__ = this;
  var coll__$1 = this;
  if (!(self__.tree == null)) {
    return cljs.core.tree_map_kv_reduce(self__.tree, f, init);
  } else {
    return init;
  }
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.meta;
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ICloneable$_clone$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return new cljs.core.PersistentTreeMap(self__.comp, self__.tree, self__.cnt, self__.meta, self__.__hash);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.cnt;
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IReversible$_rseq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.cnt > 0) {
    return cljs.core.create_tree_map_seq(self__.tree, false, self__.cnt);
  } else {
    return null;
  }
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var h__6575__auto__ = self__.__hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_unordered_coll(coll__$1);
    self__.__hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.equiv_map(coll__$1, other);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.PersistentTreeMap(self__.comp, null, 0, self__.meta, 0);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IMap$_dissoc$arity$2 = function(coll, k) {
  var self__ = this;
  var coll__$1 = this;
  var found = [null];
  var t = cljs.core.tree_map_remove(self__.comp, self__.tree, k, found);
  if (t == null) {
    if (cljs.core.nth.cljs$core$IFn$_invoke$arity$2(found, 0) == null) {
      return coll__$1;
    } else {
      return new cljs.core.PersistentTreeMap(self__.comp, null, 0, self__.meta, null);
    }
  } else {
    return new cljs.core.PersistentTreeMap(self__.comp, t.blacken(), self__.cnt - 1, self__.meta, null);
  }
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(coll, k, v) {
  var self__ = this;
  var coll__$1 = this;
  var found = [null];
  var t = cljs.core.tree_map_add(self__.comp, self__.tree, k, v, found);
  if (t == null) {
    var found_node = cljs.core.nth.cljs$core$IFn$_invoke$arity$2(found, 0);
    if (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(v, found_node.val)) {
      return coll__$1;
    } else {
      return new cljs.core.PersistentTreeMap(self__.comp, cljs.core.tree_map_replace(self__.comp, self__.tree, k, v), self__.cnt, self__.meta, null);
    }
  } else {
    return new cljs.core.PersistentTreeMap(self__.comp, t.blacken(), self__.cnt + 1, self__.meta, null);
  }
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = function(coll, k) {
  var self__ = this;
  var coll__$1 = this;
  return !(coll__$1.entry_at(k) == null);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.cnt > 0) {
    return cljs.core.create_tree_map_seq(self__.tree, true, self__.cnt);
  } else {
    return null;
  }
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.PersistentTreeMap(self__.comp, self__.tree, self__.cnt, meta__$1, self__.__hash);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, entry) {
  var self__ = this;
  var coll__$1 = this;
  if (cljs.core.vector_QMARK_(entry)) {
    return cljs.core._assoc(coll__$1, cljs.core._nth.cljs$core$IFn$_invoke$arity$2(entry, 0), cljs.core._nth.cljs$core$IFn$_invoke$arity$2(entry, 1));
  } else {
    var ret = coll__$1;
    var es = cljs.core.seq(entry);
    while (true) {
      if (es == null) {
        return ret;
      } else {
        var e = cljs.core.first(es);
        if (cljs.core.vector_QMARK_(e)) {
          var G__10376 = cljs.core._assoc(ret, cljs.core._nth.cljs$core$IFn$_invoke$arity$2(e, 0), cljs.core._nth.cljs$core$IFn$_invoke$arity$2(e, 1));
          var G__10377 = cljs.core.next(es);
          ret = G__10376;
          es = G__10377;
          continue;
        } else {
          throw new Error("conj on a map takes map entries or seqables of map entries");
        }
      }
      break;
    }
  }
};
cljs.core.PersistentTreeMap.prototype.call = function() {
  var G__10378 = null;
  var G__10378__2 = function(self__, k) {
    var self__ = this;
    var self____$1 = this;
    var coll = self____$1;
    return coll.cljs$core$ILookup$_lookup$arity$2(null, k);
  };
  var G__10378__3 = function(self__, k, not_found) {
    var self__ = this;
    var self____$1 = this;
    var coll = self____$1;
    return coll.cljs$core$ILookup$_lookup$arity$3(null, k, not_found);
  };
  G__10378 = function(self__, k, not_found) {
    switch(arguments.length) {
      case 2:
        return G__10378__2.call(this, self__, k);
      case 3:
        return G__10378__3.call(this, self__, k, not_found);
    }
    throw new Error("Invalid arity: " + arguments.length);
  };
  G__10378.cljs$core$IFn$_invoke$arity$2 = G__10378__2;
  G__10378.cljs$core$IFn$_invoke$arity$3 = G__10378__3;
  return G__10378;
}();
cljs.core.PersistentTreeMap.prototype.apply = function(self__, args10351) {
  var self__ = this;
  var self____$1 = this;
  return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args10351)));
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IFn$_invoke$arity$1 = function(k) {
  var self__ = this;
  var coll = this;
  return coll.cljs$core$ILookup$_lookup$arity$2(null, k);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IFn$_invoke$arity$2 = function(k, not_found) {
  var self__ = this;
  var coll = this;
  return coll.cljs$core$ILookup$_lookup$arity$3(null, k, not_found);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ISorted$_sorted_seq$arity$2 = function(coll, ascending_QMARK_) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.cnt > 0) {
    return cljs.core.create_tree_map_seq(self__.tree, ascending_QMARK_, self__.cnt);
  } else {
    return null;
  }
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ISorted$_sorted_seq_from$arity$3 = function(coll, k, ascending_QMARK_) {
  var self__ = this;
  var coll__$1 = this;
  if (self__.cnt > 0) {
    var stack = null;
    var t = self__.tree;
    while (true) {
      if (!(t == null)) {
        var c = function() {
          var G__10360 = k;
          var G__10361 = t.key;
          return self__.comp.cljs$core$IFn$_invoke$arity$2 ? self__.comp.cljs$core$IFn$_invoke$arity$2(G__10360, G__10361) : self__.comp.call(null, G__10360, G__10361);
        }();
        if (c === 0) {
          return new cljs.core.PersistentTreeMapSeq(null, cljs.core.conj.cljs$core$IFn$_invoke$arity$2(stack, t), ascending_QMARK_, -1, null);
        } else {
          if (cljs.core.truth_(ascending_QMARK_)) {
            if (c < 0) {
              var G__10379 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(stack, t);
              var G__10380 = t.left;
              stack = G__10379;
              t = G__10380;
              continue;
            } else {
              var G__10381 = stack;
              var G__10382 = t.right;
              stack = G__10381;
              t = G__10382;
              continue;
            }
          } else {
            if (c > 0) {
              var G__10383 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(stack, t);
              var G__10384 = t.right;
              stack = G__10383;
              t = G__10384;
              continue;
            } else {
              var G__10385 = stack;
              var G__10386 = t.left;
              stack = G__10385;
              t = G__10386;
              continue;
            }
          }
        }
      } else {
        if (stack == null) {
          return null;
        } else {
          return new cljs.core.PersistentTreeMapSeq(null, stack, ascending_QMARK_, -1, null);
        }
      }
      break;
    }
  } else {
    return null;
  }
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ISorted$_entry_key$arity$2 = function(coll, entry) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.key.cljs$core$IFn$_invoke$arity$1 ? cljs.core.key.cljs$core$IFn$_invoke$arity$1(entry) : cljs.core.key.call(null, entry);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ISorted$_comparator$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.comp;
};
cljs.core.PersistentTreeMap.getBasis = function() {
  return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "comp", "comp", -1462482139, null), new cljs.core.Symbol(null, "tree", "tree", 1444219499, null), new cljs.core.Symbol(null, "cnt", "cnt", 1924510325, null), new cljs.core.Symbol(null, "meta", "meta", -1154898805, null), cljs.core.with_meta(new cljs.core.Symbol(null, "__hash", "__hash", -1328796629, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", 
  "mutable", 875778266), true], null))], null);
};
cljs.core.PersistentTreeMap.cljs$lang$type = true;
cljs.core.PersistentTreeMap.cljs$lang$ctorStr = "cljs.core/PersistentTreeMap";
cljs.core.PersistentTreeMap.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/PersistentTreeMap");
};
cljs.core.__GT_PersistentTreeMap = function cljs$core$__GT_PersistentTreeMap(comp, tree, cnt, meta, __hash) {
  return new cljs.core.PersistentTreeMap(comp, tree, cnt, meta, __hash);
};
cljs.core.PersistentTreeMap.EMPTY = new cljs.core.PersistentTreeMap(cljs.core.compare, null, 0, null, cljs.core.empty_unordered_hash);
cljs.core.PersistentTreeMap.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.hash_map = function cljs$core$hash_map(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___10388 = arguments.length;
  var i__7199__auto___10389 = 0;
  while (true) {
    if (i__7199__auto___10389 < len__7198__auto___10388) {
      args__7205__auto__.push(arguments[i__7199__auto___10389]);
      var G__10390 = i__7199__auto___10389 + 1;
      i__7199__auto___10389 = G__10390;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return cljs.core.hash_map.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
cljs.core.hash_map.cljs$core$IFn$_invoke$arity$variadic = function(keyvals) {
  var in$ = cljs.core.seq(keyvals);
  var out = cljs.core.transient$(cljs.core.PersistentHashMap.EMPTY);
  while (true) {
    if (in$) {
      var G__10391 = cljs.core.nnext(in$);
      var G__10392 = cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(out, cljs.core.first(in$), cljs.core.second(in$));
      in$ = G__10391;
      out = G__10392;
      continue;
    } else {
      return cljs.core.persistent_BANG_(out);
    }
    break;
  }
};
cljs.core.hash_map.cljs$lang$maxFixedArity = 0;
cljs.core.hash_map.cljs$lang$applyTo = function(seq10387) {
  return cljs.core.hash_map.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq10387));
};
cljs.core.array_map = function cljs$core$array_map(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___10394 = arguments.length;
  var i__7199__auto___10395 = 0;
  while (true) {
    if (i__7199__auto___10395 < len__7198__auto___10394) {
      args__7205__auto__.push(arguments[i__7199__auto___10395]);
      var G__10396 = i__7199__auto___10395 + 1;
      i__7199__auto___10395 = G__10396;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return cljs.core.array_map.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
cljs.core.array_map.cljs$core$IFn$_invoke$arity$variadic = function(keyvals) {
  var arr = keyvals instanceof cljs.core.IndexedSeq && keyvals.i === 0 ? keyvals.arr : cljs.core.into_array.cljs$core$IFn$_invoke$arity$1(keyvals);
  return cljs.core.PersistentArrayMap.fromArray(arr, true, false);
};
cljs.core.array_map.cljs$lang$maxFixedArity = 0;
cljs.core.array_map.cljs$lang$applyTo = function(seq10393) {
  return cljs.core.array_map.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq10393));
};
cljs.core.obj_map = function cljs$core$obj_map(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___10400 = arguments.length;
  var i__7199__auto___10401 = 0;
  while (true) {
    if (i__7199__auto___10401 < len__7198__auto___10400) {
      args__7205__auto__.push(arguments[i__7199__auto___10401]);
      var G__10402 = i__7199__auto___10401 + 1;
      i__7199__auto___10401 = G__10402;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return cljs.core.obj_map.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
cljs.core.obj_map.cljs$core$IFn$_invoke$arity$variadic = function(keyvals) {
  var ks = [];
  var obj = {};
  var kvs = cljs.core.seq(keyvals);
  while (true) {
    if (kvs) {
      ks.push(cljs.core.first(kvs));
      obj[cljs.core.first(kvs)] = cljs.core.second(kvs);
      var G__10403 = cljs.core.nnext(kvs);
      kvs = G__10403;
      continue;
    } else {
      return cljs.core.ObjMap.fromObject(ks, obj);
    }
    break;
  }
};
cljs.core.obj_map.cljs$lang$maxFixedArity = 0;
cljs.core.obj_map.cljs$lang$applyTo = function(seq10397) {
  return cljs.core.obj_map.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq10397));
};
cljs.core.sorted_map = function cljs$core$sorted_map(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___10405 = arguments.length;
  var i__7199__auto___10406 = 0;
  while (true) {
    if (i__7199__auto___10406 < len__7198__auto___10405) {
      args__7205__auto__.push(arguments[i__7199__auto___10406]);
      var G__10407 = i__7199__auto___10406 + 1;
      i__7199__auto___10406 = G__10407;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return cljs.core.sorted_map.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
cljs.core.sorted_map.cljs$core$IFn$_invoke$arity$variadic = function(keyvals) {
  var in$ = cljs.core.seq(keyvals);
  var out = cljs.core.PersistentTreeMap.EMPTY;
  while (true) {
    if (in$) {
      var G__10408 = cljs.core.nnext(in$);
      var G__10409 = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(out, cljs.core.first(in$), cljs.core.second(in$));
      in$ = G__10408;
      out = G__10409;
      continue;
    } else {
      return out;
    }
    break;
  }
};
cljs.core.sorted_map.cljs$lang$maxFixedArity = 0;
cljs.core.sorted_map.cljs$lang$applyTo = function(seq10404) {
  return cljs.core.sorted_map.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq10404));
};
cljs.core.sorted_map_by = function cljs$core$sorted_map_by(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___10412 = arguments.length;
  var i__7199__auto___10413 = 0;
  while (true) {
    if (i__7199__auto___10413 < len__7198__auto___10412) {
      args__7205__auto__.push(arguments[i__7199__auto___10413]);
      var G__10414 = i__7199__auto___10413 + 1;
      i__7199__auto___10413 = G__10414;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return cljs.core.sorted_map_by.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
cljs.core.sorted_map_by.cljs$core$IFn$_invoke$arity$variadic = function(comparator, keyvals) {
  var in$ = cljs.core.seq(keyvals);
  var out = new cljs.core.PersistentTreeMap(cljs.core.fn__GT_comparator(comparator), null, 0, null, 0);
  while (true) {
    if (in$) {
      var G__10415 = cljs.core.nnext(in$);
      var G__10416 = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(out, cljs.core.first(in$), cljs.core.second(in$));
      in$ = G__10415;
      out = G__10416;
      continue;
    } else {
      return out;
    }
    break;
  }
};
cljs.core.sorted_map_by.cljs$lang$maxFixedArity = 1;
cljs.core.sorted_map_by.cljs$lang$applyTo = function(seq10410) {
  var G__10411 = cljs.core.first(seq10410);
  var seq10410__$1 = cljs.core.next(seq10410);
  return cljs.core.sorted_map_by.cljs$core$IFn$_invoke$arity$variadic(G__10411, seq10410__$1);
};
cljs.core.KeySeq = function(mseq, _meta) {
  this.mseq = mseq;
  this._meta = _meta;
  this.cljs$lang$protocol_mask$partition0$ = 32374988;
  this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.KeySeq.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.KeySeq.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.KeySeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__._meta;
};
cljs.core.KeySeq.prototype.cljs$core$INext$_next$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var nseq = (!(self__.mseq == null) ? self__.mseq.cljs$lang$protocol_mask$partition0$ & 128 || self__.mseq.cljs$core$INext$ ? true : !self__.mseq.cljs$lang$protocol_mask$partition0$ ? cljs.core.native_satisfies_QMARK_(cljs.core.INext, self__.mseq) : false : cljs.core.native_satisfies_QMARK_(cljs.core.INext, self__.mseq)) ? self__.mseq.cljs$core$INext$_next$arity$1(null) : cljs.core.next(self__.mseq);
  if (nseq == null) {
    return null;
  } else {
    return new cljs.core.KeySeq(nseq, self__._meta);
  }
};
cljs.core.KeySeq.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.hash_ordered_coll(coll__$1);
};
cljs.core.KeySeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.equiv_sequential(coll__$1, other);
};
cljs.core.KeySeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.with_meta(cljs.core.List.EMPTY, self__._meta);
};
cljs.core.KeySeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(coll, f) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f, coll__$1);
};
cljs.core.KeySeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(coll, f, start) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f, start, coll__$1);
};
cljs.core.KeySeq.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var me = self__.mseq.cljs$core$ISeq$_first$arity$1(null);
  return me.cljs$core$IMapEntry$_key$arity$1(null);
};
cljs.core.KeySeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var nseq = (!(self__.mseq == null) ? self__.mseq.cljs$lang$protocol_mask$partition0$ & 128 || self__.mseq.cljs$core$INext$ ? true : !self__.mseq.cljs$lang$protocol_mask$partition0$ ? cljs.core.native_satisfies_QMARK_(cljs.core.INext, self__.mseq) : false : cljs.core.native_satisfies_QMARK_(cljs.core.INext, self__.mseq)) ? self__.mseq.cljs$core$INext$_next$arity$1(null) : cljs.core.next(self__.mseq);
  if (!(nseq == null)) {
    return new cljs.core.KeySeq(nseq, self__._meta);
  } else {
    return cljs.core.List.EMPTY;
  }
};
cljs.core.KeySeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return coll__$1;
};
cljs.core.KeySeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, new_meta) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.KeySeq(self__.mseq, new_meta);
};
cljs.core.KeySeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.cons(o, coll__$1);
};
cljs.core.KeySeq.getBasis = function() {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "mseq", "mseq", 1602647196, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "tag", "tag", -1290361223), new cljs.core.Symbol(null, "not-native", "not-native", -236392494, null)], null)), new cljs.core.Symbol(null, "_meta", "_meta", -1716892533, null)], null);
};
cljs.core.KeySeq.cljs$lang$type = true;
cljs.core.KeySeq.cljs$lang$ctorStr = "cljs.core/KeySeq";
cljs.core.KeySeq.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/KeySeq");
};
cljs.core.__GT_KeySeq = function cljs$core$__GT_KeySeq(mseq, _meta) {
  return new cljs.core.KeySeq(mseq, _meta);
};
cljs.core.KeySeq.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.keys = function cljs$core$keys(hash_map) {
  var temp__4425__auto__ = cljs.core.seq(hash_map);
  if (temp__4425__auto__) {
    var mseq = temp__4425__auto__;
    return new cljs.core.KeySeq(mseq, null);
  } else {
    return null;
  }
};
cljs.core.key = function cljs$core$key(map_entry) {
  return cljs.core._key(map_entry);
};
cljs.core.ValSeq = function(mseq, _meta) {
  this.mseq = mseq;
  this._meta = _meta;
  this.cljs$lang$protocol_mask$partition0$ = 32374988;
  this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.ValSeq.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.ValSeq.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.ValSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__._meta;
};
cljs.core.ValSeq.prototype.cljs$core$INext$_next$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var nseq = (!(self__.mseq == null) ? self__.mseq.cljs$lang$protocol_mask$partition0$ & 128 || self__.mseq.cljs$core$INext$ ? true : !self__.mseq.cljs$lang$protocol_mask$partition0$ ? cljs.core.native_satisfies_QMARK_(cljs.core.INext, self__.mseq) : false : cljs.core.native_satisfies_QMARK_(cljs.core.INext, self__.mseq)) ? self__.mseq.cljs$core$INext$_next$arity$1(null) : cljs.core.next(self__.mseq);
  if (nseq == null) {
    return null;
  } else {
    return new cljs.core.ValSeq(nseq, self__._meta);
  }
};
cljs.core.ValSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.hash_ordered_coll(coll__$1);
};
cljs.core.ValSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.equiv_sequential(coll__$1, other);
};
cljs.core.ValSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.with_meta(cljs.core.List.EMPTY, self__._meta);
};
cljs.core.ValSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(coll, f) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f, coll__$1);
};
cljs.core.ValSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(coll, f, start) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f, start, coll__$1);
};
cljs.core.ValSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var me = self__.mseq.cljs$core$ISeq$_first$arity$1(null);
  return me.cljs$core$IMapEntry$_val$arity$1(null);
};
cljs.core.ValSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var nseq = (!(self__.mseq == null) ? self__.mseq.cljs$lang$protocol_mask$partition0$ & 128 || self__.mseq.cljs$core$INext$ ? true : !self__.mseq.cljs$lang$protocol_mask$partition0$ ? cljs.core.native_satisfies_QMARK_(cljs.core.INext, self__.mseq) : false : cljs.core.native_satisfies_QMARK_(cljs.core.INext, self__.mseq)) ? self__.mseq.cljs$core$INext$_next$arity$1(null) : cljs.core.next(self__.mseq);
  if (!(nseq == null)) {
    return new cljs.core.ValSeq(nseq, self__._meta);
  } else {
    return cljs.core.List.EMPTY;
  }
};
cljs.core.ValSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return coll__$1;
};
cljs.core.ValSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, new_meta) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.ValSeq(self__.mseq, new_meta);
};
cljs.core.ValSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.cons(o, coll__$1);
};
cljs.core.ValSeq.getBasis = function() {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "mseq", "mseq", 1602647196, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "tag", "tag", -1290361223), new cljs.core.Symbol(null, "not-native", "not-native", -236392494, null)], null)), new cljs.core.Symbol(null, "_meta", "_meta", -1716892533, null)], null);
};
cljs.core.ValSeq.cljs$lang$type = true;
cljs.core.ValSeq.cljs$lang$ctorStr = "cljs.core/ValSeq";
cljs.core.ValSeq.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/ValSeq");
};
cljs.core.__GT_ValSeq = function cljs$core$__GT_ValSeq(mseq, _meta) {
  return new cljs.core.ValSeq(mseq, _meta);
};
cljs.core.ValSeq.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.vals = function cljs$core$vals(hash_map) {
  var temp__4425__auto__ = cljs.core.seq(hash_map);
  if (temp__4425__auto__) {
    var mseq = temp__4425__auto__;
    return new cljs.core.ValSeq(mseq, null);
  } else {
    return null;
  }
};
cljs.core.val = function cljs$core$val(map_entry) {
  return cljs.core._val(map_entry);
};
cljs.core.merge = function cljs$core$merge(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___10424 = arguments.length;
  var i__7199__auto___10425 = 0;
  while (true) {
    if (i__7199__auto___10425 < len__7198__auto___10424) {
      args__7205__auto__.push(arguments[i__7199__auto___10425]);
      var G__10426 = i__7199__auto___10425 + 1;
      i__7199__auto___10425 = G__10426;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic = function(maps) {
  if (cljs.core.truth_(cljs.core.some(cljs.core.identity, maps))) {
    return cljs.core.reduce.cljs$core$IFn$_invoke$arity$2(function(p1__10421_SHARP_, p2__10422_SHARP_) {
      return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(function() {
        var or__6140__auto__ = p1__10421_SHARP_;
        if (cljs.core.truth_(or__6140__auto__)) {
          return or__6140__auto__;
        } else {
          return cljs.core.PersistentArrayMap.EMPTY;
        }
      }(), p2__10422_SHARP_);
    }, maps);
  } else {
    return null;
  }
};
cljs.core.merge.cljs$lang$maxFixedArity = 0;
cljs.core.merge.cljs$lang$applyTo = function(seq10423) {
  return cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq10423));
};
cljs.core.merge_with = function cljs$core$merge_with(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___10431 = arguments.length;
  var i__7199__auto___10432 = 0;
  while (true) {
    if (i__7199__auto___10432 < len__7198__auto___10431) {
      args__7205__auto__.push(arguments[i__7199__auto___10432]);
      var G__10433 = i__7199__auto___10432 + 1;
      i__7199__auto___10432 = G__10433;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return cljs.core.merge_with.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
cljs.core.merge_with.cljs$core$IFn$_invoke$arity$variadic = function(f, maps) {
  if (cljs.core.truth_(cljs.core.some(cljs.core.identity, maps))) {
    var merge_entry = function(m, e) {
      var k = cljs.core.first(e);
      var v = cljs.core.second(e);
      if (cljs.core.contains_QMARK_(m, k)) {
        return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m, k, function() {
          var G__10429 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k);
          var G__10430 = v;
          return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__10429, G__10430) : f.call(null, G__10429, G__10430);
        }());
      } else {
        return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m, k, v);
      }
    };
    var merge2 = function(merge_entry) {
      return function(m1, m2) {
        return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(merge_entry, function() {
          var or__6140__auto__ = m1;
          if (cljs.core.truth_(or__6140__auto__)) {
            return or__6140__auto__;
          } else {
            return cljs.core.PersistentArrayMap.EMPTY;
          }
        }(), cljs.core.seq(m2));
      };
    }(merge_entry);
    return cljs.core.reduce.cljs$core$IFn$_invoke$arity$2(merge2, maps);
  } else {
    return null;
  }
};
cljs.core.merge_with.cljs$lang$maxFixedArity = 1;
cljs.core.merge_with.cljs$lang$applyTo = function(seq10427) {
  var G__10428 = cljs.core.first(seq10427);
  var seq10427__$1 = cljs.core.next(seq10427);
  return cljs.core.merge_with.cljs$core$IFn$_invoke$arity$variadic(G__10428, seq10427__$1);
};
cljs.core.select_keys = function cljs$core$select_keys(map, keyseq) {
  var ret = cljs.core.PersistentArrayMap.EMPTY;
  var keys = cljs.core.seq(keyseq);
  while (true) {
    if (keys) {
      var key = cljs.core.first(keys);
      var entry = cljs.core.get.cljs$core$IFn$_invoke$arity$3(map, key, new cljs.core.Keyword("cljs.core", "not-found", "cljs.core/not-found", -1572889185));
      var G__10434 = cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$2(entry, new cljs.core.Keyword("cljs.core", "not-found", "cljs.core/not-found", -1572889185)) ? cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(ret, key, entry) : ret;
      var G__10435 = cljs.core.next(keys);
      ret = G__10434;
      keys = G__10435;
      continue;
    } else {
      return cljs.core.with_meta(ret, cljs.core.meta(map));
    }
    break;
  }
};
cljs.core.HashSetIter = function(iter) {
  this.iter = iter;
};
cljs.core.HashSetIter.prototype.hasNext = function() {
  var self__ = this;
  var _ = this;
  return self__.iter.hasNext();
};
cljs.core.HashSetIter.prototype.next = function() {
  var self__ = this;
  var _ = this;
  if (self__.iter.hasNext()) {
    return self__.iter.next().tail[0];
  } else {
    throw new Error("No such element");
  }
};
cljs.core.HashSetIter.prototype.remove = function() {
  var self__ = this;
  var _ = this;
  return new Error("Unsupported operation");
};
cljs.core.HashSetIter.getBasis = function() {
  return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "iter", "iter", -1346195486, null)], null);
};
cljs.core.HashSetIter.cljs$lang$type = true;
cljs.core.HashSetIter.cljs$lang$ctorStr = "cljs.core/HashSetIter";
cljs.core.HashSetIter.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/HashSetIter");
};
cljs.core.__GT_HashSetIter = function cljs$core$__GT_HashSetIter(iter) {
  return new cljs.core.HashSetIter(iter);
};
cljs.core.PersistentHashSet = function(meta, hash_map, __hash) {
  this.meta = meta;
  this.hash_map = hash_map;
  this.__hash = __hash;
  this.cljs$lang$protocol_mask$partition0$ = 15077647;
  this.cljs$lang$protocol_mask$partition1$ = 8196;
};
cljs.core.PersistentHashSet.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.PersistentHashSet.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.PersistentHashSet.prototype.keys = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.es6_iterator(cljs.core.seq(coll));
};
cljs.core.PersistentHashSet.prototype.entries = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.es6_set_entries_iterator(cljs.core.seq(coll));
};
cljs.core.PersistentHashSet.prototype.values = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.es6_iterator(cljs.core.seq(coll));
};
cljs.core.PersistentHashSet.prototype.has = function(k) {
  var self__ = this;
  var coll = this;
  return cljs.core.contains_QMARK_(coll, k);
};
cljs.core.PersistentHashSet.prototype.forEach = function(f) {
  var self__ = this;
  var coll = this;
  var seq__10438 = cljs.core.seq(coll);
  var chunk__10439 = null;
  var count__10440 = 0;
  var i__10441 = 0;
  while (true) {
    if (i__10441 < count__10440) {
      var vec__10442 = chunk__10439.cljs$core$IIndexed$_nth$arity$2(null, i__10441);
      var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10442, 0, null);
      var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10442, 1, null);
      f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(v, k) : f.call(null, v, k);
      var G__10444 = seq__10438;
      var G__10445 = chunk__10439;
      var G__10446 = count__10440;
      var G__10447 = i__10441 + 1;
      seq__10438 = G__10444;
      chunk__10439 = G__10445;
      count__10440 = G__10446;
      i__10441 = G__10447;
      continue;
    } else {
      var temp__4425__auto__ = cljs.core.seq(seq__10438);
      if (temp__4425__auto__) {
        var seq__10438__$1 = temp__4425__auto__;
        if (cljs.core.chunked_seq_QMARK_(seq__10438__$1)) {
          var c__6943__auto__ = cljs.core.chunk_first(seq__10438__$1);
          var G__10448 = cljs.core.chunk_rest(seq__10438__$1);
          var G__10449 = c__6943__auto__;
          var G__10450 = cljs.core.count(c__6943__auto__);
          var G__10451 = 0;
          seq__10438 = G__10448;
          chunk__10439 = G__10449;
          count__10440 = G__10450;
          i__10441 = G__10451;
          continue;
        } else {
          var vec__10443 = cljs.core.first(seq__10438__$1);
          var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10443, 0, null);
          var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10443, 1, null);
          f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(v, k) : f.call(null, v, k);
          var G__10452 = cljs.core.next(seq__10438__$1);
          var G__10453 = null;
          var G__10454 = 0;
          var G__10455 = 0;
          seq__10438 = G__10452;
          chunk__10439 = G__10453;
          count__10440 = G__10454;
          i__10441 = G__10455;
          continue;
        }
      } else {
        return null;
      }
    }
    break;
  }
};
cljs.core.PersistentHashSet.prototype.cljs$core$ILookup$_lookup$arity$2 = function(coll, v) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(coll__$1, v, null);
};
cljs.core.PersistentHashSet.prototype.cljs$core$ILookup$_lookup$arity$3 = function(coll, v, not_found) {
  var self__ = this;
  var coll__$1 = this;
  if (cljs.core._contains_key_QMARK_(self__.hash_map, v)) {
    return v;
  } else {
    return not_found;
  }
};
cljs.core.PersistentHashSet.prototype.cljs$core$IIterable$ = true;
cljs.core.PersistentHashSet.prototype.cljs$core$IIterable$_iterator$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.HashSetIter(cljs.core._iterator(self__.hash_map));
};
cljs.core.PersistentHashSet.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.meta;
};
cljs.core.PersistentHashSet.prototype.cljs$core$ICloneable$_clone$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return new cljs.core.PersistentHashSet(self__.meta, self__.hash_map, self__.__hash);
};
cljs.core.PersistentHashSet.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core._count(self__.hash_map);
};
cljs.core.PersistentHashSet.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var h__6575__auto__ = self__.__hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_unordered_coll(coll__$1);
    self__.__hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.PersistentHashSet.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.set_QMARK_(other) && cljs.core.count(coll__$1) === cljs.core.count(other) && cljs.core.every_QMARK_(function(coll__$1) {
    return function(p1__10436_SHARP_) {
      return cljs.core.contains_QMARK_(coll__$1, p1__10436_SHARP_);
    };
  }(coll__$1), other);
};
cljs.core.PersistentHashSet.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.TransientHashSet(cljs.core._as_transient(self__.hash_map));
};
cljs.core.PersistentHashSet.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.with_meta(cljs.core.PersistentHashSet.EMPTY, self__.meta);
};
cljs.core.PersistentHashSet.prototype.cljs$core$ISet$_disjoin$arity$2 = function(coll, v) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.PersistentHashSet(self__.meta, cljs.core._dissoc(self__.hash_map, v), null);
};
cljs.core.PersistentHashSet.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.keys(self__.hash_map);
};
cljs.core.PersistentHashSet.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.PersistentHashSet(meta__$1, self__.hash_map, self__.__hash);
};
cljs.core.PersistentHashSet.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.PersistentHashSet(self__.meta, cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(self__.hash_map, o, null), null);
};
cljs.core.PersistentHashSet.prototype.call = function() {
  var G__10456 = null;
  var G__10456__2 = function(self__, k) {
    var self__ = this;
    var self____$1 = this;
    var coll = self____$1;
    return coll.cljs$core$ILookup$_lookup$arity$2(null, k);
  };
  var G__10456__3 = function(self__, k, not_found) {
    var self__ = this;
    var self____$1 = this;
    var coll = self____$1;
    return coll.cljs$core$ILookup$_lookup$arity$3(null, k, not_found);
  };
  G__10456 = function(self__, k, not_found) {
    switch(arguments.length) {
      case 2:
        return G__10456__2.call(this, self__, k);
      case 3:
        return G__10456__3.call(this, self__, k, not_found);
    }
    throw new Error("Invalid arity: " + arguments.length);
  };
  G__10456.cljs$core$IFn$_invoke$arity$2 = G__10456__2;
  G__10456.cljs$core$IFn$_invoke$arity$3 = G__10456__3;
  return G__10456;
}();
cljs.core.PersistentHashSet.prototype.apply = function(self__, args10437) {
  var self__ = this;
  var self____$1 = this;
  return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args10437)));
};
cljs.core.PersistentHashSet.prototype.cljs$core$IFn$_invoke$arity$1 = function(k) {
  var self__ = this;
  var coll = this;
  return coll.cljs$core$ILookup$_lookup$arity$2(null, k);
};
cljs.core.PersistentHashSet.prototype.cljs$core$IFn$_invoke$arity$2 = function(k, not_found) {
  var self__ = this;
  var coll = this;
  return coll.cljs$core$ILookup$_lookup$arity$3(null, k, not_found);
};
cljs.core.PersistentHashSet.getBasis = function() {
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "meta", "meta", -1154898805, null), new cljs.core.Symbol(null, "hash-map", "hash-map", -439030950, null), cljs.core.with_meta(new cljs.core.Symbol(null, "__hash", "__hash", -1328796629, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.PersistentHashSet.cljs$lang$type = true;
cljs.core.PersistentHashSet.cljs$lang$ctorStr = "cljs.core/PersistentHashSet";
cljs.core.PersistentHashSet.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/PersistentHashSet");
};
cljs.core.__GT_PersistentHashSet = function cljs$core$__GT_PersistentHashSet(meta, hash_map, __hash) {
  return new cljs.core.PersistentHashSet(meta, hash_map, __hash);
};
cljs.core.PersistentHashSet.EMPTY = new cljs.core.PersistentHashSet(null, cljs.core.PersistentArrayMap.EMPTY, cljs.core.empty_unordered_hash);
cljs.core.PersistentHashSet.fromArray = function(items, no_clone) {
  var len = items.length;
  if (len <= cljs.core.PersistentArrayMap.HASHMAP_THRESHOLD) {
    var arr = no_clone ? items : cljs.core.aclone(items);
    var i = 0;
    var out = cljs.core.transient$(cljs.core.PersistentArrayMap.EMPTY);
    while (true) {
      if (i < len) {
        var G__10457 = i + 1;
        var G__10458 = cljs.core._assoc_BANG_(out, items[i], null);
        i = G__10457;
        out = G__10458;
        continue;
      } else {
        return new cljs.core.PersistentHashSet(null, cljs.core._persistent_BANG_(out), null);
      }
      break;
    }
  } else {
    var i = 0;
    var out = cljs.core.transient$(cljs.core.PersistentHashSet.EMPTY);
    while (true) {
      if (i < len) {
        var G__10459 = i + 1;
        var G__10460 = cljs.core._conj_BANG_(out, items[i]);
        i = G__10459;
        out = G__10460;
        continue;
      } else {
        return cljs.core._persistent_BANG_(out);
      }
      break;
    }
  }
};
cljs.core.PersistentHashSet.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.TransientHashSet = function(transient_map) {
  this.transient_map = transient_map;
  this.cljs$lang$protocol_mask$partition1$ = 136;
  this.cljs$lang$protocol_mask$partition0$ = 259;
};
cljs.core.TransientHashSet.prototype.cljs$core$ITransientCollection$_conj_BANG_$arity$2 = function(tcoll, o) {
  var self__ = this;
  var tcoll__$1 = this;
  self__.transient_map = cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(self__.transient_map, o, null);
  return tcoll__$1;
};
cljs.core.TransientHashSet.prototype.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 = function(tcoll) {
  var self__ = this;
  var tcoll__$1 = this;
  return new cljs.core.PersistentHashSet(null, cljs.core.persistent_BANG_(self__.transient_map), null);
};
cljs.core.TransientHashSet.prototype.cljs$core$ITransientSet$_disjoin_BANG_$arity$2 = function(tcoll, v) {
  var self__ = this;
  var tcoll__$1 = this;
  self__.transient_map = cljs.core.dissoc_BANG_.cljs$core$IFn$_invoke$arity$2(self__.transient_map, v);
  return tcoll__$1;
};
cljs.core.TransientHashSet.prototype.cljs$core$ICounted$_count$arity$1 = function(tcoll) {
  var self__ = this;
  var tcoll__$1 = this;
  return cljs.core.count(self__.transient_map);
};
cljs.core.TransientHashSet.prototype.cljs$core$ILookup$_lookup$arity$2 = function(tcoll, v) {
  var self__ = this;
  var tcoll__$1 = this;
  return cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(tcoll__$1, v, null);
};
cljs.core.TransientHashSet.prototype.cljs$core$ILookup$_lookup$arity$3 = function(tcoll, v, not_found) {
  var self__ = this;
  var tcoll__$1 = this;
  if (cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(self__.transient_map, v, cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel) {
    return not_found;
  } else {
    return v;
  }
};
cljs.core.TransientHashSet.prototype.call = function() {
  var G__10462 = null;
  var G__10462__2 = function(self__, k) {
    var self__ = this;
    var self____$1 = this;
    var tcoll = self____$1;
    if (cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(self__.transient_map, k, cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel) {
      return null;
    } else {
      return k;
    }
  };
  var G__10462__3 = function(self__, k, not_found) {
    var self__ = this;
    var self____$1 = this;
    var tcoll = self____$1;
    if (cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(self__.transient_map, k, cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel) {
      return not_found;
    } else {
      return k;
    }
  };
  G__10462 = function(self__, k, not_found) {
    switch(arguments.length) {
      case 2:
        return G__10462__2.call(this, self__, k);
      case 3:
        return G__10462__3.call(this, self__, k, not_found);
    }
    throw new Error("Invalid arity: " + arguments.length);
  };
  G__10462.cljs$core$IFn$_invoke$arity$2 = G__10462__2;
  G__10462.cljs$core$IFn$_invoke$arity$3 = G__10462__3;
  return G__10462;
}();
cljs.core.TransientHashSet.prototype.apply = function(self__, args10461) {
  var self__ = this;
  var self____$1 = this;
  return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args10461)));
};
cljs.core.TransientHashSet.prototype.cljs$core$IFn$_invoke$arity$1 = function(k) {
  var self__ = this;
  var tcoll = this;
  if (cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(self__.transient_map, k, cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel) {
    return null;
  } else {
    return k;
  }
};
cljs.core.TransientHashSet.prototype.cljs$core$IFn$_invoke$arity$2 = function(k, not_found) {
  var self__ = this;
  var tcoll = this;
  if (cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(self__.transient_map, k, cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel) {
    return not_found;
  } else {
    return k;
  }
};
cljs.core.TransientHashSet.getBasis = function() {
  return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "transient-map", "transient-map", 351764893, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.TransientHashSet.cljs$lang$type = true;
cljs.core.TransientHashSet.cljs$lang$ctorStr = "cljs.core/TransientHashSet";
cljs.core.TransientHashSet.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/TransientHashSet");
};
cljs.core.__GT_TransientHashSet = function cljs$core$__GT_TransientHashSet(transient_map) {
  return new cljs.core.TransientHashSet(transient_map);
};
cljs.core.PersistentTreeSet = function(meta, tree_map, __hash) {
  this.meta = meta;
  this.tree_map = tree_map;
  this.__hash = __hash;
  this.cljs$lang$protocol_mask$partition0$ = 417730831;
  this.cljs$lang$protocol_mask$partition1$ = 8192;
};
cljs.core.PersistentTreeSet.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.PersistentTreeSet.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.PersistentTreeSet.prototype.keys = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.es6_iterator(cljs.core.seq(coll));
};
cljs.core.PersistentTreeSet.prototype.entries = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.es6_set_entries_iterator(cljs.core.seq(coll));
};
cljs.core.PersistentTreeSet.prototype.values = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.es6_iterator(cljs.core.seq(coll));
};
cljs.core.PersistentTreeSet.prototype.has = function(k) {
  var self__ = this;
  var coll = this;
  return cljs.core.contains_QMARK_(coll, k);
};
cljs.core.PersistentTreeSet.prototype.forEach = function(f) {
  var self__ = this;
  var coll = this;
  var seq__10465 = cljs.core.seq(coll);
  var chunk__10466 = null;
  var count__10467 = 0;
  var i__10468 = 0;
  while (true) {
    if (i__10468 < count__10467) {
      var vec__10469 = chunk__10466.cljs$core$IIndexed$_nth$arity$2(null, i__10468);
      var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10469, 0, null);
      var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10469, 1, null);
      f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(v, k) : f.call(null, v, k);
      var G__10471 = seq__10465;
      var G__10472 = chunk__10466;
      var G__10473 = count__10467;
      var G__10474 = i__10468 + 1;
      seq__10465 = G__10471;
      chunk__10466 = G__10472;
      count__10467 = G__10473;
      i__10468 = G__10474;
      continue;
    } else {
      var temp__4425__auto__ = cljs.core.seq(seq__10465);
      if (temp__4425__auto__) {
        var seq__10465__$1 = temp__4425__auto__;
        if (cljs.core.chunked_seq_QMARK_(seq__10465__$1)) {
          var c__6943__auto__ = cljs.core.chunk_first(seq__10465__$1);
          var G__10475 = cljs.core.chunk_rest(seq__10465__$1);
          var G__10476 = c__6943__auto__;
          var G__10477 = cljs.core.count(c__6943__auto__);
          var G__10478 = 0;
          seq__10465 = G__10475;
          chunk__10466 = G__10476;
          count__10467 = G__10477;
          i__10468 = G__10478;
          continue;
        } else {
          var vec__10470 = cljs.core.first(seq__10465__$1);
          var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10470, 0, null);
          var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10470, 1, null);
          f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(v, k) : f.call(null, v, k);
          var G__10479 = cljs.core.next(seq__10465__$1);
          var G__10480 = null;
          var G__10481 = 0;
          var G__10482 = 0;
          seq__10465 = G__10479;
          chunk__10466 = G__10480;
          count__10467 = G__10481;
          i__10468 = G__10482;
          continue;
        }
      } else {
        return null;
      }
    }
    break;
  }
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ILookup$_lookup$arity$2 = function(coll, v) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(coll__$1, v, null);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ILookup$_lookup$arity$3 = function(coll, v, not_found) {
  var self__ = this;
  var coll__$1 = this;
  var n = self__.tree_map.entry_at(v);
  if (!(n == null)) {
    return n.key;
  } else {
    return not_found;
  }
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return self__.meta;
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ICloneable$_clone$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return new cljs.core.PersistentTreeSet(self__.meta, self__.tree_map, self__.__hash);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.count(self__.tree_map);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IReversible$_rseq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  if (cljs.core.count(self__.tree_map) > 0) {
    return cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs.core.key, cljs.core.rseq(self__.tree_map));
  } else {
    return null;
  }
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  var h__6575__auto__ = self__.__hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_unordered_coll(coll__$1);
    self__.__hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.set_QMARK_(other) && cljs.core.count(coll__$1) === cljs.core.count(other) && cljs.core.every_QMARK_(function(coll__$1) {
    return function(p1__10463_SHARP_) {
      return cljs.core.contains_QMARK_(coll__$1, p1__10463_SHARP_);
    };
  }(coll__$1), other);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.PersistentTreeSet(self__.meta, cljs.core._empty(self__.tree_map), 0);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ISet$_disjoin$arity$2 = function(coll, v) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.PersistentTreeSet(self__.meta, cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(self__.tree_map, v), null);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.keys(self__.tree_map);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.PersistentTreeSet(meta__$1, self__.tree_map, self__.__hash);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
  var self__ = this;
  var coll__$1 = this;
  return new cljs.core.PersistentTreeSet(self__.meta, cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(self__.tree_map, o, null), null);
};
cljs.core.PersistentTreeSet.prototype.call = function() {
  var G__10483 = null;
  var G__10483__2 = function(self__, k) {
    var self__ = this;
    var self____$1 = this;
    var coll = self____$1;
    return coll.cljs$core$ILookup$_lookup$arity$2(null, k);
  };
  var G__10483__3 = function(self__, k, not_found) {
    var self__ = this;
    var self____$1 = this;
    var coll = self____$1;
    return coll.cljs$core$ILookup$_lookup$arity$3(null, k, not_found);
  };
  G__10483 = function(self__, k, not_found) {
    switch(arguments.length) {
      case 2:
        return G__10483__2.call(this, self__, k);
      case 3:
        return G__10483__3.call(this, self__, k, not_found);
    }
    throw new Error("Invalid arity: " + arguments.length);
  };
  G__10483.cljs$core$IFn$_invoke$arity$2 = G__10483__2;
  G__10483.cljs$core$IFn$_invoke$arity$3 = G__10483__3;
  return G__10483;
}();
cljs.core.PersistentTreeSet.prototype.apply = function(self__, args10464) {
  var self__ = this;
  var self____$1 = this;
  return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args10464)));
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IFn$_invoke$arity$1 = function(k) {
  var self__ = this;
  var coll = this;
  return coll.cljs$core$ILookup$_lookup$arity$2(null, k);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IFn$_invoke$arity$2 = function(k, not_found) {
  var self__ = this;
  var coll = this;
  return coll.cljs$core$ILookup$_lookup$arity$3(null, k, not_found);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ISorted$_sorted_seq$arity$2 = function(coll, ascending_QMARK_) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs.core.key, cljs.core._sorted_seq(self__.tree_map, ascending_QMARK_));
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ISorted$_sorted_seq_from$arity$3 = function(coll, k, ascending_QMARK_) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs.core.key, cljs.core._sorted_seq_from(self__.tree_map, k, ascending_QMARK_));
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ISorted$_entry_key$arity$2 = function(coll, entry) {
  var self__ = this;
  var coll__$1 = this;
  return entry;
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ISorted$_comparator$arity$1 = function(coll) {
  var self__ = this;
  var coll__$1 = this;
  return cljs.core._comparator(self__.tree_map);
};
cljs.core.PersistentTreeSet.getBasis = function() {
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "meta", "meta", -1154898805, null), new cljs.core.Symbol(null, "tree-map", "tree-map", 1373073049, null), cljs.core.with_meta(new cljs.core.Symbol(null, "__hash", "__hash", -1328796629, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.PersistentTreeSet.cljs$lang$type = true;
cljs.core.PersistentTreeSet.cljs$lang$ctorStr = "cljs.core/PersistentTreeSet";
cljs.core.PersistentTreeSet.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/PersistentTreeSet");
};
cljs.core.__GT_PersistentTreeSet = function cljs$core$__GT_PersistentTreeSet(meta, tree_map, __hash) {
  return new cljs.core.PersistentTreeSet(meta, tree_map, __hash);
};
cljs.core.PersistentTreeSet.EMPTY = new cljs.core.PersistentTreeSet(null, cljs.core.PersistentTreeMap.EMPTY, cljs.core.empty_unordered_hash);
cljs.core.PersistentTreeSet.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.set_from_indexed_seq = function cljs$core$set_from_indexed_seq(iseq) {
  var arr = iseq.arr;
  var ret = function() {
    var a__7037__auto__ = arr;
    var i = 0;
    var res = cljs.core._as_transient(cljs.core.PersistentHashSet.EMPTY);
    while (true) {
      if (i < a__7037__auto__.length) {
        var G__10484 = i + 1;
        var G__10485 = res.cljs$core$ITransientCollection$_conj_BANG_$arity$2(null, arr[i]);
        i = G__10484;
        res = G__10485;
        continue;
      } else {
        return res;
      }
      break;
    }
  }();
  return ret.cljs$core$ITransientCollection$_persistent_BANG_$arity$1(null);
};
cljs.core.set = function cljs$core$set(coll) {
  var in$ = cljs.core.seq(coll);
  if (in$ == null) {
    return cljs.core.PersistentHashSet.EMPTY;
  } else {
    if (in$ instanceof cljs.core.IndexedSeq && in$.i === 0) {
      return cljs.core.set_from_indexed_seq(in$);
    } else {
      var in$__$1 = in$;
      var out = cljs.core._as_transient(cljs.core.PersistentHashSet.EMPTY);
      while (true) {
        if (!(in$__$1 == null)) {
          var G__10486 = cljs.core.next(in$__$1);
          var G__10487 = out.cljs$core$ITransientCollection$_conj_BANG_$arity$2(null, in$__$1.cljs$core$ISeq$_first$arity$1(null));
          in$__$1 = G__10486;
          out = G__10487;
          continue;
        } else {
          return cljs.core.persistent_BANG_(out);
        }
        break;
      }
    }
  }
};
cljs.core.hash_set = function cljs$core$hash_set(var_args) {
  var args10488 = [];
  var len__7198__auto___10492 = arguments.length;
  var i__7199__auto___10493 = 0;
  while (true) {
    if (i__7199__auto___10493 < len__7198__auto___10492) {
      args10488.push(arguments[i__7199__auto___10493]);
      var G__10494 = i__7199__auto___10493 + 1;
      i__7199__auto___10493 = G__10494;
      continue;
    } else {
    }
    break;
  }
  var G__10491 = args10488.length;
  switch(G__10491) {
    case 0:
      return cljs.core.hash_set.cljs$core$IFn$_invoke$arity$0();
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args10488.slice(0), 0);
      return cljs.core.hash_set.cljs$core$IFn$_invoke$arity$variadic(argseq__7217__auto__);
  }
};
cljs.core.hash_set.cljs$core$IFn$_invoke$arity$0 = function() {
  return cljs.core.PersistentHashSet.EMPTY;
};
cljs.core.hash_set.cljs$core$IFn$_invoke$arity$variadic = function(keys) {
  return cljs.core.set(keys);
};
cljs.core.hash_set.cljs$lang$applyTo = function(seq10489) {
  return cljs.core.hash_set.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq10489));
};
cljs.core.hash_set.cljs$lang$maxFixedArity = 0;
cljs.core.sorted_set = function cljs$core$sorted_set(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___10497 = arguments.length;
  var i__7199__auto___10498 = 0;
  while (true) {
    if (i__7199__auto___10498 < len__7198__auto___10497) {
      args__7205__auto__.push(arguments[i__7199__auto___10498]);
      var G__10499 = i__7199__auto___10498 + 1;
      i__7199__auto___10498 = G__10499;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return cljs.core.sorted_set.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
cljs.core.sorted_set.cljs$core$IFn$_invoke$arity$variadic = function(keys) {
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._conj, cljs.core.PersistentTreeSet.EMPTY, keys);
};
cljs.core.sorted_set.cljs$lang$maxFixedArity = 0;
cljs.core.sorted_set.cljs$lang$applyTo = function(seq10496) {
  return cljs.core.sorted_set.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq10496));
};
cljs.core.sorted_set_by = function cljs$core$sorted_set_by(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___10502 = arguments.length;
  var i__7199__auto___10503 = 0;
  while (true) {
    if (i__7199__auto___10503 < len__7198__auto___10502) {
      args__7205__auto__.push(arguments[i__7199__auto___10503]);
      var G__10504 = i__7199__auto___10503 + 1;
      i__7199__auto___10503 = G__10504;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return cljs.core.sorted_set_by.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
cljs.core.sorted_set_by.cljs$core$IFn$_invoke$arity$variadic = function(comparator, keys) {
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._conj, new cljs.core.PersistentTreeSet(null, cljs.core.sorted_map_by(comparator), 0), keys);
};
cljs.core.sorted_set_by.cljs$lang$maxFixedArity = 1;
cljs.core.sorted_set_by.cljs$lang$applyTo = function(seq10500) {
  var G__10501 = cljs.core.first(seq10500);
  var seq10500__$1 = cljs.core.next(seq10500);
  return cljs.core.sorted_set_by.cljs$core$IFn$_invoke$arity$variadic(G__10501, seq10500__$1);
};
cljs.core.replace = function cljs$core$replace(var_args) {
  var args10507 = [];
  var len__7198__auto___10510 = arguments.length;
  var i__7199__auto___10511 = 0;
  while (true) {
    if (i__7199__auto___10511 < len__7198__auto___10510) {
      args10507.push(arguments[i__7199__auto___10511]);
      var G__10512 = i__7199__auto___10511 + 1;
      i__7199__auto___10511 = G__10512;
      continue;
    } else {
    }
    break;
  }
  var G__10509 = args10507.length;
  switch(G__10509) {
    case 1:
      return cljs.core.replace.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.replace.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10507.length)].join(""));;
  }
};
cljs.core.replace.cljs$core$IFn$_invoke$arity$1 = function(smap) {
  return cljs.core.map.cljs$core$IFn$_invoke$arity$1(function(p1__10505_SHARP_) {
    var temp__4423__auto__ = cljs.core.find(smap, p1__10505_SHARP_);
    if (cljs.core.truth_(temp__4423__auto__)) {
      var e = temp__4423__auto__;
      return cljs.core.val(e);
    } else {
      return p1__10505_SHARP_;
    }
  });
};
cljs.core.replace.cljs$core$IFn$_invoke$arity$2 = function(smap, coll) {
  if (cljs.core.vector_QMARK_(coll)) {
    var n = cljs.core.count(coll);
    return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(n) {
      return function(v, i) {
        var temp__4423__auto__ = cljs.core.find(smap, cljs.core.nth.cljs$core$IFn$_invoke$arity$2(v, i));
        if (cljs.core.truth_(temp__4423__auto__)) {
          var e = temp__4423__auto__;
          return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(v, i, cljs.core.second(e));
        } else {
          return v;
        }
      };
    }(n), coll, cljs.core.take.cljs$core$IFn$_invoke$arity$2(n, cljs.core.iterate(cljs.core.inc, 0)));
  } else {
    return cljs.core.map.cljs$core$IFn$_invoke$arity$2(function(p1__10506_SHARP_) {
      var temp__4423__auto__ = cljs.core.find(smap, p1__10506_SHARP_);
      if (cljs.core.truth_(temp__4423__auto__)) {
        var e = temp__4423__auto__;
        return cljs.core.second(e);
      } else {
        return p1__10506_SHARP_;
      }
    }, coll);
  }
};
cljs.core.replace.cljs$lang$maxFixedArity = 2;
cljs.core.distinct = function cljs$core$distinct(var_args) {
  var args10514 = [];
  var len__7198__auto___10523 = arguments.length;
  var i__7199__auto___10524 = 0;
  while (true) {
    if (i__7199__auto___10524 < len__7198__auto___10523) {
      args10514.push(arguments[i__7199__auto___10524]);
      var G__10525 = i__7199__auto___10524 + 1;
      i__7199__auto___10524 = G__10525;
      continue;
    } else {
    }
    break;
  }
  var G__10516 = args10514.length;
  switch(G__10516) {
    case 0:
      return cljs.core.distinct.cljs$core$IFn$_invoke$arity$0();
      break;
    case 1:
      return cljs.core.distinct.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10514.length)].join(""));;
  }
};
cljs.core.distinct.cljs$core$IFn$_invoke$arity$0 = function() {
  return function(rf) {
    var seen = cljs.core.volatile_BANG_(cljs.core.PersistentHashSet.EMPTY);
    return function(seen) {
      return function() {
        var G__10527 = null;
        var G__10527__0 = function() {
          return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
        };
        var G__10527__1 = function(result) {
          return rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null, result);
        };
        var G__10527__2 = function(result, input) {
          if (cljs.core.contains_QMARK_(cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(seen) : cljs.core.deref.call(null, seen), input)) {
            return result;
          } else {
            cljs.core._vreset_BANG_(seen, cljs.core.conj.cljs$core$IFn$_invoke$arity$2(cljs.core._deref(seen), input));
            return rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result, input) : rf.call(null, result, input);
          }
        };
        G__10527 = function(result, input) {
          switch(arguments.length) {
            case 0:
              return G__10527__0.call(this);
            case 1:
              return G__10527__1.call(this, result);
            case 2:
              return G__10527__2.call(this, result, input);
          }
          throw new Error("Invalid arity: " + arguments.length);
        };
        G__10527.cljs$core$IFn$_invoke$arity$0 = G__10527__0;
        G__10527.cljs$core$IFn$_invoke$arity$1 = G__10527__1;
        G__10527.cljs$core$IFn$_invoke$arity$2 = G__10527__2;
        return G__10527;
      }();
    }(seen);
  };
};
cljs.core.distinct.cljs$core$IFn$_invoke$arity$1 = function(coll) {
  var step = function cljs$core$step(xs, seen) {
    return new cljs.core.LazySeq(null, function() {
      return function(p__10521, seen__$1) {
        while (true) {
          var vec__10522 = p__10521;
          var f = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10522, 0, null);
          var xs__$1 = vec__10522;
          var temp__4425__auto__ = cljs.core.seq(xs__$1);
          if (temp__4425__auto__) {
            var s = temp__4425__auto__;
            if (cljs.core.contains_QMARK_(seen__$1, f)) {
              var G__10528 = cljs.core.rest(s);
              var G__10529 = seen__$1;
              p__10521 = G__10528;
              seen__$1 = G__10529;
              continue;
            } else {
              return cljs.core.cons(f, cljs$core$step(cljs.core.rest(s), cljs.core.conj.cljs$core$IFn$_invoke$arity$2(seen__$1, f)));
            }
          } else {
            return null;
          }
          break;
        }
      }.call(null, xs, seen);
    }, null, null);
  };
  return step(coll, cljs.core.PersistentHashSet.EMPTY);
};
cljs.core.distinct.cljs$lang$maxFixedArity = 1;
cljs.core.butlast = function cljs$core$butlast(s) {
  var ret = cljs.core.PersistentVector.EMPTY;
  var s__$1 = s;
  while (true) {
    if (cljs.core.next(s__$1)) {
      var G__10530 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(ret, cljs.core.first(s__$1));
      var G__10531 = cljs.core.next(s__$1);
      ret = G__10530;
      s__$1 = G__10531;
      continue;
    } else {
      return cljs.core.seq(ret);
    }
    break;
  }
};
cljs.core.name = function cljs$core$name(x) {
  if (!(x == null) ? x.cljs$lang$protocol_mask$partition1$ & 4096 || x.cljs$core$INamed$ ? true : false : false) {
    return x.cljs$core$INamed$_name$arity$1(null);
  } else {
    if (typeof x === "string") {
      return x;
    } else {
      throw new Error([cljs.core.str("Doesn't support name: "), cljs.core.str(x)].join(""));
    }
  }
};
cljs.core.zipmap = function cljs$core$zipmap(keys, vals) {
  var map = cljs.core.transient$(cljs.core.PersistentArrayMap.EMPTY);
  var ks = cljs.core.seq(keys);
  var vs = cljs.core.seq(vals);
  while (true) {
    if (ks && vs) {
      var G__10534 = cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(map, cljs.core.first(ks), cljs.core.first(vs));
      var G__10535 = cljs.core.next(ks);
      var G__10536 = cljs.core.next(vs);
      map = G__10534;
      ks = G__10535;
      vs = G__10536;
      continue;
    } else {
      return cljs.core.persistent_BANG_(map);
    }
    break;
  }
};
cljs.core.max_key = function cljs$core$max_key(var_args) {
  var args10539 = [];
  var len__7198__auto___10546 = arguments.length;
  var i__7199__auto___10547 = 0;
  while (true) {
    if (i__7199__auto___10547 < len__7198__auto___10546) {
      args10539.push(arguments[i__7199__auto___10547]);
      var G__10548 = i__7199__auto___10547 + 1;
      i__7199__auto___10547 = G__10548;
      continue;
    } else {
    }
    break;
  }
  var G__10545 = args10539.length;
  switch(G__10545) {
    case 2:
      return cljs.core.max_key.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.max_key.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args10539.slice(3), 0);
      return cljs.core.max_key.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], argseq__7217__auto__);
  }
};
cljs.core.max_key.cljs$core$IFn$_invoke$arity$2 = function(k, x) {
  return x;
};
cljs.core.max_key.cljs$core$IFn$_invoke$arity$3 = function(k, x, y) {
  if ((k.cljs$core$IFn$_invoke$arity$1 ? k.cljs$core$IFn$_invoke$arity$1(x) : k.call(null, x)) > (k.cljs$core$IFn$_invoke$arity$1 ? k.cljs$core$IFn$_invoke$arity$1(y) : k.call(null, y))) {
    return x;
  } else {
    return y;
  }
};
cljs.core.max_key.cljs$core$IFn$_invoke$arity$variadic = function(k, x, y, more) {
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(p1__10537_SHARP_, p2__10538_SHARP_) {
    return cljs.core.max_key.cljs$core$IFn$_invoke$arity$3(k, p1__10537_SHARP_, p2__10538_SHARP_);
  }, cljs.core.max_key.cljs$core$IFn$_invoke$arity$3(k, x, y), more);
};
cljs.core.max_key.cljs$lang$applyTo = function(seq10540) {
  var G__10541 = cljs.core.first(seq10540);
  var seq10540__$1 = cljs.core.next(seq10540);
  var G__10542 = cljs.core.first(seq10540__$1);
  var seq10540__$2 = cljs.core.next(seq10540__$1);
  var G__10543 = cljs.core.first(seq10540__$2);
  var seq10540__$3 = cljs.core.next(seq10540__$2);
  return cljs.core.max_key.cljs$core$IFn$_invoke$arity$variadic(G__10541, G__10542, G__10543, seq10540__$3);
};
cljs.core.max_key.cljs$lang$maxFixedArity = 3;
cljs.core.min_key = function cljs$core$min_key(var_args) {
  var args10552 = [];
  var len__7198__auto___10559 = arguments.length;
  var i__7199__auto___10560 = 0;
  while (true) {
    if (i__7199__auto___10560 < len__7198__auto___10559) {
      args10552.push(arguments[i__7199__auto___10560]);
      var G__10561 = i__7199__auto___10560 + 1;
      i__7199__auto___10560 = G__10561;
      continue;
    } else {
    }
    break;
  }
  var G__10558 = args10552.length;
  switch(G__10558) {
    case 2:
      return cljs.core.min_key.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.min_key.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args10552.slice(3), 0);
      return cljs.core.min_key.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], argseq__7217__auto__);
  }
};
cljs.core.min_key.cljs$core$IFn$_invoke$arity$2 = function(k, x) {
  return x;
};
cljs.core.min_key.cljs$core$IFn$_invoke$arity$3 = function(k, x, y) {
  if ((k.cljs$core$IFn$_invoke$arity$1 ? k.cljs$core$IFn$_invoke$arity$1(x) : k.call(null, x)) < (k.cljs$core$IFn$_invoke$arity$1 ? k.cljs$core$IFn$_invoke$arity$1(y) : k.call(null, y))) {
    return x;
  } else {
    return y;
  }
};
cljs.core.min_key.cljs$core$IFn$_invoke$arity$variadic = function(k, x, y, more) {
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(p1__10550_SHARP_, p2__10551_SHARP_) {
    return cljs.core.min_key.cljs$core$IFn$_invoke$arity$3(k, p1__10550_SHARP_, p2__10551_SHARP_);
  }, cljs.core.min_key.cljs$core$IFn$_invoke$arity$3(k, x, y), more);
};
cljs.core.min_key.cljs$lang$applyTo = function(seq10553) {
  var G__10554 = cljs.core.first(seq10553);
  var seq10553__$1 = cljs.core.next(seq10553);
  var G__10555 = cljs.core.first(seq10553__$1);
  var seq10553__$2 = cljs.core.next(seq10553__$1);
  var G__10556 = cljs.core.first(seq10553__$2);
  var seq10553__$3 = cljs.core.next(seq10553__$2);
  return cljs.core.min_key.cljs$core$IFn$_invoke$arity$variadic(G__10554, G__10555, G__10556, seq10553__$3);
};
cljs.core.min_key.cljs$lang$maxFixedArity = 3;
cljs.core.ArrayList = function(arr) {
  this.arr = arr;
};
cljs.core.ArrayList.prototype.add = function(x) {
  var self__ = this;
  var _ = this;
  return self__.arr.push(x);
};
cljs.core.ArrayList.prototype.size = function() {
  var self__ = this;
  var _ = this;
  return self__.arr.length;
};
cljs.core.ArrayList.prototype.clear = function() {
  var self__ = this;
  var _ = this;
  return self__.arr = [];
};
cljs.core.ArrayList.prototype.isEmpty = function() {
  var self__ = this;
  var _ = this;
  return self__.arr.length === 0;
};
cljs.core.ArrayList.prototype.toArray = function() {
  var self__ = this;
  var _ = this;
  return self__.arr;
};
cljs.core.ArrayList.getBasis = function() {
  return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "arr", "arr", 2115492975, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.ArrayList.cljs$lang$type = true;
cljs.core.ArrayList.cljs$lang$ctorStr = "cljs.core/ArrayList";
cljs.core.ArrayList.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/ArrayList");
};
cljs.core.__GT_ArrayList = function cljs$core$__GT_ArrayList(arr) {
  return new cljs.core.ArrayList(arr);
};
cljs.core.array_list = function cljs$core$array_list() {
  return new cljs.core.ArrayList([]);
};
cljs.core.partition_all = function cljs$core$partition_all(var_args) {
  var args10563 = [];
  var len__7198__auto___10566 = arguments.length;
  var i__7199__auto___10567 = 0;
  while (true) {
    if (i__7199__auto___10567 < len__7198__auto___10566) {
      args10563.push(arguments[i__7199__auto___10567]);
      var G__10568 = i__7199__auto___10567 + 1;
      i__7199__auto___10567 = G__10568;
      continue;
    } else {
    }
    break;
  }
  var G__10565 = args10563.length;
  switch(G__10565) {
    case 1:
      return cljs.core.partition_all.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.partition_all.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.partition_all.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10563.length)].join(""));;
  }
};
cljs.core.partition_all.cljs$core$IFn$_invoke$arity$1 = function(n) {
  return function(rf) {
    var a = cljs.core.array_list();
    return function(a) {
      return function() {
        var G__10570 = null;
        var G__10570__0 = function() {
          return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
        };
        var G__10570__1 = function(result) {
          var result__$1 = cljs.core.truth_(a.isEmpty()) ? result : function() {
            var v = cljs.core.vec(a.toArray());
            a.clear();
            return cljs.core.unreduced(rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result, v) : rf.call(null, result, v));
          }();
          return rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result__$1) : rf.call(null, result__$1);
        };
        var G__10570__2 = function(result, input) {
          a.add(input);
          if (n === a.size()) {
            var v = cljs.core.vec(a.toArray());
            a.clear();
            return rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result, v) : rf.call(null, result, v);
          } else {
            return result;
          }
        };
        G__10570 = function(result, input) {
          switch(arguments.length) {
            case 0:
              return G__10570__0.call(this);
            case 1:
              return G__10570__1.call(this, result);
            case 2:
              return G__10570__2.call(this, result, input);
          }
          throw new Error("Invalid arity: " + arguments.length);
        };
        G__10570.cljs$core$IFn$_invoke$arity$0 = G__10570__0;
        G__10570.cljs$core$IFn$_invoke$arity$1 = G__10570__1;
        G__10570.cljs$core$IFn$_invoke$arity$2 = G__10570__2;
        return G__10570;
      }();
    }(a);
  };
};
cljs.core.partition_all.cljs$core$IFn$_invoke$arity$2 = function(n, coll) {
  return cljs.core.partition_all.cljs$core$IFn$_invoke$arity$3(n, n, coll);
};
cljs.core.partition_all.cljs$core$IFn$_invoke$arity$3 = function(n, step, coll) {
  return new cljs.core.LazySeq(null, function() {
    var temp__4425__auto__ = cljs.core.seq(coll);
    if (temp__4425__auto__) {
      var s = temp__4425__auto__;
      return cljs.core.cons(cljs.core.take.cljs$core$IFn$_invoke$arity$2(n, s), cljs.core.partition_all.cljs$core$IFn$_invoke$arity$3(n, step, cljs.core.drop.cljs$core$IFn$_invoke$arity$2(step, s)));
    } else {
      return null;
    }
  }, null, null);
};
cljs.core.partition_all.cljs$lang$maxFixedArity = 3;
cljs.core.take_while = function cljs$core$take_while(var_args) {
  var args10571 = [];
  var len__7198__auto___10575 = arguments.length;
  var i__7199__auto___10576 = 0;
  while (true) {
    if (i__7199__auto___10576 < len__7198__auto___10575) {
      args10571.push(arguments[i__7199__auto___10576]);
      var G__10577 = i__7199__auto___10576 + 1;
      i__7199__auto___10576 = G__10577;
      continue;
    } else {
    }
    break;
  }
  var G__10573 = args10571.length;
  switch(G__10573) {
    case 1:
      return cljs.core.take_while.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.take_while.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10571.length)].join(""));;
  }
};
cljs.core.take_while.cljs$core$IFn$_invoke$arity$1 = function(pred) {
  return function(rf) {
    return function() {
      var G__10579 = null;
      var G__10579__0 = function() {
        return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
      };
      var G__10579__1 = function(result) {
        return rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null, result);
      };
      var G__10579__2 = function(result, input) {
        if (cljs.core.truth_(pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(input) : pred.call(null, input))) {
          return rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result, input) : rf.call(null, result, input);
        } else {
          return cljs.core.reduced(result);
        }
      };
      G__10579 = function(result, input) {
        switch(arguments.length) {
          case 0:
            return G__10579__0.call(this);
          case 1:
            return G__10579__1.call(this, result);
          case 2:
            return G__10579__2.call(this, result, input);
        }
        throw new Error("Invalid arity: " + arguments.length);
      };
      G__10579.cljs$core$IFn$_invoke$arity$0 = G__10579__0;
      G__10579.cljs$core$IFn$_invoke$arity$1 = G__10579__1;
      G__10579.cljs$core$IFn$_invoke$arity$2 = G__10579__2;
      return G__10579;
    }();
  };
};
cljs.core.take_while.cljs$core$IFn$_invoke$arity$2 = function(pred, coll) {
  return new cljs.core.LazySeq(null, function() {
    var temp__4425__auto__ = cljs.core.seq(coll);
    if (temp__4425__auto__) {
      var s = temp__4425__auto__;
      if (cljs.core.truth_(function() {
        var G__10574 = cljs.core.first(s);
        return pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(G__10574) : pred.call(null, G__10574);
      }())) {
        return cljs.core.cons(cljs.core.first(s), cljs.core.take_while.cljs$core$IFn$_invoke$arity$2(pred, cljs.core.rest(s)));
      } else {
        return null;
      }
    } else {
      return null;
    }
  }, null, null);
};
cljs.core.take_while.cljs$lang$maxFixedArity = 2;
cljs.core.mk_bound_fn = function cljs$core$mk_bound_fn(sc, test, key) {
  return function(e) {
    var comp = cljs.core._comparator(sc);
    var G__10588 = function() {
      var G__10590 = cljs.core._entry_key(sc, e);
      var G__10591 = key;
      return comp.cljs$core$IFn$_invoke$arity$2 ? comp.cljs$core$IFn$_invoke$arity$2(G__10590, G__10591) : comp.call(null, G__10590, G__10591);
    }();
    var G__10589 = 0;
    return test.cljs$core$IFn$_invoke$arity$2 ? test.cljs$core$IFn$_invoke$arity$2(G__10588, G__10589) : test.call(null, G__10588, G__10589);
  };
};
cljs.core.subseq = function cljs$core$subseq(var_args) {
  var args10592 = [];
  var len__7198__auto___10597 = arguments.length;
  var i__7199__auto___10598 = 0;
  while (true) {
    if (i__7199__auto___10598 < len__7198__auto___10597) {
      args10592.push(arguments[i__7199__auto___10598]);
      var G__10599 = i__7199__auto___10598 + 1;
      i__7199__auto___10598 = G__10599;
      continue;
    } else {
    }
    break;
  }
  var G__10594 = args10592.length;
  switch(G__10594) {
    case 3:
      return cljs.core.subseq.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 5:
      return cljs.core.subseq.cljs$core$IFn$_invoke$arity$5(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10592.length)].join(""));;
  }
};
cljs.core.subseq.cljs$core$IFn$_invoke$arity$3 = function(sc, test, key) {
  var include = cljs.core.mk_bound_fn(sc, test, key);
  if (cljs.core.truth_(cljs.core.PersistentHashSet.fromArray([cljs.core._GT_, cljs.core._GT__EQ_], true).call(null, test))) {
    var temp__4425__auto__ = cljs.core._sorted_seq_from(sc, key, true);
    if (cljs.core.truth_(temp__4425__auto__)) {
      var vec__10595 = temp__4425__auto__;
      var e = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10595, 0, null);
      var s = vec__10595;
      if (cljs.core.truth_(include.cljs$core$IFn$_invoke$arity$1 ? include.cljs$core$IFn$_invoke$arity$1(e) : include.call(null, e))) {
        return s;
      } else {
        return cljs.core.next(s);
      }
    } else {
      return null;
    }
  } else {
    return cljs.core.take_while.cljs$core$IFn$_invoke$arity$2(include, cljs.core._sorted_seq(sc, true));
  }
};
cljs.core.subseq.cljs$core$IFn$_invoke$arity$5 = function(sc, start_test, start_key, end_test, end_key) {
  var temp__4425__auto__ = cljs.core._sorted_seq_from(sc, start_key, true);
  if (cljs.core.truth_(temp__4425__auto__)) {
    var vec__10596 = temp__4425__auto__;
    var e = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10596, 0, null);
    var s = vec__10596;
    return cljs.core.take_while.cljs$core$IFn$_invoke$arity$2(cljs.core.mk_bound_fn(sc, end_test, end_key), cljs.core.truth_(cljs.core.mk_bound_fn(sc, start_test, start_key).call(null, e)) ? s : cljs.core.next(s));
  } else {
    return null;
  }
};
cljs.core.subseq.cljs$lang$maxFixedArity = 5;
cljs.core.rsubseq = function cljs$core$rsubseq(var_args) {
  var args10601 = [];
  var len__7198__auto___10606 = arguments.length;
  var i__7199__auto___10607 = 0;
  while (true) {
    if (i__7199__auto___10607 < len__7198__auto___10606) {
      args10601.push(arguments[i__7199__auto___10607]);
      var G__10608 = i__7199__auto___10607 + 1;
      i__7199__auto___10607 = G__10608;
      continue;
    } else {
    }
    break;
  }
  var G__10603 = args10601.length;
  switch(G__10603) {
    case 3:
      return cljs.core.rsubseq.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 5:
      return cljs.core.rsubseq.cljs$core$IFn$_invoke$arity$5(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10601.length)].join(""));;
  }
};
cljs.core.rsubseq.cljs$core$IFn$_invoke$arity$3 = function(sc, test, key) {
  var include = cljs.core.mk_bound_fn(sc, test, key);
  if (cljs.core.truth_(cljs.core.PersistentHashSet.fromArray([cljs.core._LT_, cljs.core._LT__EQ_], true).call(null, test))) {
    var temp__4425__auto__ = cljs.core._sorted_seq_from(sc, key, false);
    if (cljs.core.truth_(temp__4425__auto__)) {
      var vec__10604 = temp__4425__auto__;
      var e = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10604, 0, null);
      var s = vec__10604;
      if (cljs.core.truth_(include.cljs$core$IFn$_invoke$arity$1 ? include.cljs$core$IFn$_invoke$arity$1(e) : include.call(null, e))) {
        return s;
      } else {
        return cljs.core.next(s);
      }
    } else {
      return null;
    }
  } else {
    return cljs.core.take_while.cljs$core$IFn$_invoke$arity$2(include, cljs.core._sorted_seq(sc, false));
  }
};
cljs.core.rsubseq.cljs$core$IFn$_invoke$arity$5 = function(sc, start_test, start_key, end_test, end_key) {
  var temp__4425__auto__ = cljs.core._sorted_seq_from(sc, end_key, false);
  if (cljs.core.truth_(temp__4425__auto__)) {
    var vec__10605 = temp__4425__auto__;
    var e = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10605, 0, null);
    var s = vec__10605;
    return cljs.core.take_while.cljs$core$IFn$_invoke$arity$2(cljs.core.mk_bound_fn(sc, start_test, start_key), cljs.core.truth_(cljs.core.mk_bound_fn(sc, end_test, end_key).call(null, e)) ? s : cljs.core.next(s));
  } else {
    return null;
  }
};
cljs.core.rsubseq.cljs$lang$maxFixedArity = 5;
cljs.core.RangeIterator = function(i, end, step) {
  this.i = i;
  this.end = end;
  this.step = step;
};
cljs.core.RangeIterator.prototype.hasNext = function() {
  var self__ = this;
  var _ = this;
  if (self__.step > 0) {
    return self__.i < self__.end;
  } else {
    return self__.i > self__.end;
  }
};
cljs.core.RangeIterator.prototype.next = function() {
  var self__ = this;
  var _ = this;
  var ret = self__.i;
  self__.i = self__.i + self__.step;
  return ret;
};
cljs.core.RangeIterator.getBasis = function() {
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "i", "i", 253690212, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), new cljs.core.Symbol(null, "end", "end", 1372345569, null), new cljs.core.Symbol(null, "step", "step", -1365547645, null)], null);
};
cljs.core.RangeIterator.cljs$lang$type = true;
cljs.core.RangeIterator.cljs$lang$ctorStr = "cljs.core/RangeIterator";
cljs.core.RangeIterator.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/RangeIterator");
};
cljs.core.__GT_RangeIterator = function cljs$core$__GT_RangeIterator(i, end, step) {
  return new cljs.core.RangeIterator(i, end, step);
};
cljs.core.Range = function(meta, start, end, step, __hash) {
  this.meta = meta;
  this.start = start;
  this.end = end;
  this.step = step;
  this.__hash = __hash;
  this.cljs$lang$protocol_mask$partition0$ = 32375006;
  this.cljs$lang$protocol_mask$partition1$ = 8192;
};
cljs.core.Range.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.Range.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.Range.prototype.cljs$core$IIndexed$_nth$arity$2 = function(rng, n) {
  var self__ = this;
  var rng__$1 = this;
  if (n < cljs.core._count(rng__$1)) {
    return self__.start + n * self__.step;
  } else {
    if (self__.start > self__.end && self__.step === 0) {
      return self__.start;
    } else {
      throw new Error("Index out of bounds");
    }
  }
};
cljs.core.Range.prototype.cljs$core$IIndexed$_nth$arity$3 = function(rng, n, not_found) {
  var self__ = this;
  var rng__$1 = this;
  if (n < cljs.core._count(rng__$1)) {
    return self__.start + n * self__.step;
  } else {
    if (self__.start > self__.end && self__.step === 0) {
      return self__.start;
    } else {
      return not_found;
    }
  }
};
cljs.core.Range.prototype.cljs$core$IIterable$ = true;
cljs.core.Range.prototype.cljs$core$IIterable$_iterator$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return new cljs.core.RangeIterator(self__.start, self__.end, self__.step);
};
cljs.core.Range.prototype.cljs$core$IMeta$_meta$arity$1 = function(rng) {
  var self__ = this;
  var rng__$1 = this;
  return self__.meta;
};
cljs.core.Range.prototype.cljs$core$ICloneable$_clone$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return new cljs.core.Range(self__.meta, self__.start, self__.end, self__.step, self__.__hash);
};
cljs.core.Range.prototype.cljs$core$INext$_next$arity$1 = function(rng) {
  var self__ = this;
  var rng__$1 = this;
  if (self__.step > 0) {
    if (self__.start + self__.step < self__.end) {
      return new cljs.core.Range(self__.meta, self__.start + self__.step, self__.end, self__.step, null);
    } else {
      return null;
    }
  } else {
    if (self__.start + self__.step > self__.end) {
      return new cljs.core.Range(self__.meta, self__.start + self__.step, self__.end, self__.step, null);
    } else {
      return null;
    }
  }
};
cljs.core.Range.prototype.cljs$core$ICounted$_count$arity$1 = function(rng) {
  var self__ = this;
  var rng__$1 = this;
  if (cljs.core.not(cljs.core._seq(rng__$1))) {
    return 0;
  } else {
    var G__10610 = (self__.end - self__.start) / self__.step;
    return Math.ceil(G__10610);
  }
};
cljs.core.Range.prototype.cljs$core$IHash$_hash$arity$1 = function(rng) {
  var self__ = this;
  var rng__$1 = this;
  var h__6575__auto__ = self__.__hash;
  if (!(h__6575__auto__ == null)) {
    return h__6575__auto__;
  } else {
    var h__6575__auto____$1 = cljs.core.hash_ordered_coll(rng__$1);
    self__.__hash = h__6575__auto____$1;
    return h__6575__auto____$1;
  }
};
cljs.core.Range.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(rng, other) {
  var self__ = this;
  var rng__$1 = this;
  return cljs.core.equiv_sequential(rng__$1, other);
};
cljs.core.Range.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(rng) {
  var self__ = this;
  var rng__$1 = this;
  return cljs.core.with_meta(cljs.core.List.EMPTY, self__.meta);
};
cljs.core.Range.prototype.cljs$core$IReduce$_reduce$arity$2 = function(rng, f) {
  var self__ = this;
  var rng__$1 = this;
  return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$2(rng__$1, f);
};
cljs.core.Range.prototype.cljs$core$IReduce$_reduce$arity$3 = function(rng, f, init) {
  var self__ = this;
  var rng__$1 = this;
  var i = self__.start;
  var ret = init;
  while (true) {
    if (self__.step > 0 ? i < self__.end : i > self__.end) {
      var ret__$1 = f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(ret, i) : f.call(null, ret, i);
      if (cljs.core.reduced_QMARK_(ret__$1)) {
        return cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(ret__$1) : cljs.core.deref.call(null, ret__$1);
      } else {
        var G__10611 = i + self__.step;
        var G__10612 = ret__$1;
        i = G__10611;
        ret = G__10612;
        continue;
      }
    } else {
      return ret;
    }
    break;
  }
};
cljs.core.Range.prototype.cljs$core$ISeq$_first$arity$1 = function(rng) {
  var self__ = this;
  var rng__$1 = this;
  if (cljs.core._seq(rng__$1) == null) {
    return null;
  } else {
    return self__.start;
  }
};
cljs.core.Range.prototype.cljs$core$ISeq$_rest$arity$1 = function(rng) {
  var self__ = this;
  var rng__$1 = this;
  if (!(cljs.core._seq(rng__$1) == null)) {
    return new cljs.core.Range(self__.meta, self__.start + self__.step, self__.end, self__.step, null);
  } else {
    return cljs.core.List.EMPTY;
  }
};
cljs.core.Range.prototype.cljs$core$ISeqable$_seq$arity$1 = function(rng) {
  var self__ = this;
  var rng__$1 = this;
  if (self__.step > 0) {
    if (self__.start < self__.end) {
      return rng__$1;
    } else {
      return null;
    }
  } else {
    if (self__.step < 0) {
      if (self__.start > self__.end) {
        return rng__$1;
      } else {
        return null;
      }
    } else {
      if (self__.start === self__.end) {
        return null;
      } else {
        return rng__$1;
      }
    }
  }
};
cljs.core.Range.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(rng, meta__$1) {
  var self__ = this;
  var rng__$1 = this;
  return new cljs.core.Range(meta__$1, self__.start, self__.end, self__.step, self__.__hash);
};
cljs.core.Range.prototype.cljs$core$ICollection$_conj$arity$2 = function(rng, o) {
  var self__ = this;
  var rng__$1 = this;
  return cljs.core.cons(o, rng__$1);
};
cljs.core.Range.getBasis = function() {
  return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "meta", "meta", -1154898805, null), new cljs.core.Symbol(null, "start", "start", 1285322546, null), new cljs.core.Symbol(null, "end", "end", 1372345569, null), new cljs.core.Symbol(null, "step", "step", -1365547645, null), cljs.core.with_meta(new cljs.core.Symbol(null, "__hash", "__hash", -1328796629, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", 
  "mutable", 875778266), true], null))], null);
};
cljs.core.Range.cljs$lang$type = true;
cljs.core.Range.cljs$lang$ctorStr = "cljs.core/Range";
cljs.core.Range.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/Range");
};
cljs.core.__GT_Range = function cljs$core$__GT_Range(meta, start, end, step, __hash) {
  return new cljs.core.Range(meta, start, end, step, __hash);
};
cljs.core.Range.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.range = function cljs$core$range(var_args) {
  var args10613 = [];
  var len__7198__auto___10616 = arguments.length;
  var i__7199__auto___10617 = 0;
  while (true) {
    if (i__7199__auto___10617 < len__7198__auto___10616) {
      args10613.push(arguments[i__7199__auto___10617]);
      var G__10618 = i__7199__auto___10617 + 1;
      i__7199__auto___10617 = G__10618;
      continue;
    } else {
    }
    break;
  }
  var G__10615 = args10613.length;
  switch(G__10615) {
    case 0:
      return cljs.core.range.cljs$core$IFn$_invoke$arity$0();
      break;
    case 1:
      return cljs.core.range.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.range.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.range.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10613.length)].join(""));;
  }
};
cljs.core.range.cljs$core$IFn$_invoke$arity$0 = function() {
  return cljs.core.range.cljs$core$IFn$_invoke$arity$3(0, Number.MAX_VALUE, 1);
};
cljs.core.range.cljs$core$IFn$_invoke$arity$1 = function(end) {
  return cljs.core.range.cljs$core$IFn$_invoke$arity$3(0, end, 1);
};
cljs.core.range.cljs$core$IFn$_invoke$arity$2 = function(start, end) {
  return cljs.core.range.cljs$core$IFn$_invoke$arity$3(start, end, 1);
};
cljs.core.range.cljs$core$IFn$_invoke$arity$3 = function(start, end, step) {
  return new cljs.core.Range(null, start, end, step, null);
};
cljs.core.range.cljs$lang$maxFixedArity = 3;
cljs.core.take_nth = function cljs$core$take_nth(var_args) {
  var args10620 = [];
  var len__7198__auto___10625 = arguments.length;
  var i__7199__auto___10626 = 0;
  while (true) {
    if (i__7199__auto___10626 < len__7198__auto___10625) {
      args10620.push(arguments[i__7199__auto___10626]);
      var G__10627 = i__7199__auto___10626 + 1;
      i__7199__auto___10626 = G__10627;
      continue;
    } else {
    }
    break;
  }
  var G__10622 = args10620.length;
  switch(G__10622) {
    case 1:
      return cljs.core.take_nth.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.take_nth.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10620.length)].join(""));;
  }
};
cljs.core.take_nth.cljs$core$IFn$_invoke$arity$1 = function(n) {
  if (typeof n === "number") {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(function() {
      var G__10623 = cljs.core.list(new cljs.core.Symbol(null, "number?", "number?", -1747282210, null), new cljs.core.Symbol(null, "n", "n", -2092305744, null));
      return cljs.core.pr_str.cljs$core$IFn$_invoke$arity$1 ? cljs.core.pr_str.cljs$core$IFn$_invoke$arity$1(G__10623) : cljs.core.pr_str.call(null, G__10623);
    }())].join(""));
  }
  return function(rf) {
    var ia = cljs.core.volatile_BANG_(-1);
    return function(ia) {
      return function() {
        var G__10629 = null;
        var G__10629__0 = function() {
          return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
        };
        var G__10629__1 = function(result) {
          return rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null, result);
        };
        var G__10629__2 = function(result, input) {
          var i = cljs.core._vreset_BANG_(ia, cljs.core._deref(ia) + 1);
          if (cljs.core.rem(i, n) === 0) {
            return rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result, input) : rf.call(null, result, input);
          } else {
            return result;
          }
        };
        G__10629 = function(result, input) {
          switch(arguments.length) {
            case 0:
              return G__10629__0.call(this);
            case 1:
              return G__10629__1.call(this, result);
            case 2:
              return G__10629__2.call(this, result, input);
          }
          throw new Error("Invalid arity: " + arguments.length);
        };
        G__10629.cljs$core$IFn$_invoke$arity$0 = G__10629__0;
        G__10629.cljs$core$IFn$_invoke$arity$1 = G__10629__1;
        G__10629.cljs$core$IFn$_invoke$arity$2 = G__10629__2;
        return G__10629;
      }();
    }(ia);
  };
};
cljs.core.take_nth.cljs$core$IFn$_invoke$arity$2 = function(n, coll) {
  if (typeof n === "number") {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(function() {
      var G__10624 = cljs.core.list(new cljs.core.Symbol(null, "number?", "number?", -1747282210, null), new cljs.core.Symbol(null, "n", "n", -2092305744, null));
      return cljs.core.pr_str.cljs$core$IFn$_invoke$arity$1 ? cljs.core.pr_str.cljs$core$IFn$_invoke$arity$1(G__10624) : cljs.core.pr_str.call(null, G__10624);
    }())].join(""));
  }
  return new cljs.core.LazySeq(null, function() {
    var temp__4425__auto__ = cljs.core.seq(coll);
    if (temp__4425__auto__) {
      var s = temp__4425__auto__;
      return cljs.core.cons(cljs.core.first(s), cljs.core.take_nth.cljs$core$IFn$_invoke$arity$2(n, cljs.core.drop.cljs$core$IFn$_invoke$arity$2(n, s)));
    } else {
      return null;
    }
  }, null, null);
};
cljs.core.take_nth.cljs$lang$maxFixedArity = 2;
cljs.core.split_with = function cljs$core$split_with(pred, coll) {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.take_while.cljs$core$IFn$_invoke$arity$2(pred, coll), cljs.core.drop_while.cljs$core$IFn$_invoke$arity$2(pred, coll)], null);
};
cljs.core.partition_by = function cljs$core$partition_by(var_args) {
  var args10631 = [];
  var len__7198__auto___10634 = arguments.length;
  var i__7199__auto___10635 = 0;
  while (true) {
    if (i__7199__auto___10635 < len__7198__auto___10634) {
      args10631.push(arguments[i__7199__auto___10635]);
      var G__10636 = i__7199__auto___10635 + 1;
      i__7199__auto___10635 = G__10636;
      continue;
    } else {
    }
    break;
  }
  var G__10633 = args10631.length;
  switch(G__10633) {
    case 1:
      return cljs.core.partition_by.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.partition_by.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10631.length)].join(""));;
  }
};
cljs.core.partition_by.cljs$core$IFn$_invoke$arity$1 = function(f) {
  return function(rf) {
    var a = cljs.core.array_list();
    var pa = cljs.core.volatile_BANG_(new cljs.core.Keyword("cljs.core", "none", "cljs.core/none", 926646439));
    return function(a, pa) {
      return function() {
        var G__10638 = null;
        var G__10638__0 = function() {
          return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
        };
        var G__10638__1 = function(result) {
          var result__$1 = cljs.core.truth_(a.isEmpty()) ? result : function() {
            var v = cljs.core.vec(a.toArray());
            a.clear();
            return cljs.core.unreduced(rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result, v) : rf.call(null, result, v));
          }();
          return rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result__$1) : rf.call(null, result__$1);
        };
        var G__10638__2 = function(result, input) {
          var pval = cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(pa) : cljs.core.deref.call(null, pa);
          var val = f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(input) : f.call(null, input);
          cljs.core.vreset_BANG_(pa, val);
          if (cljs.core.keyword_identical_QMARK_(pval, new cljs.core.Keyword("cljs.core", "none", "cljs.core/none", 926646439)) || cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(val, pval)) {
            a.add(input);
            return result;
          } else {
            var v = cljs.core.vec(a.toArray());
            a.clear();
            var ret = rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result, v) : rf.call(null, result, v);
            if (cljs.core.reduced_QMARK_(ret)) {
            } else {
              a.add(input);
            }
            return ret;
          }
        };
        G__10638 = function(result, input) {
          switch(arguments.length) {
            case 0:
              return G__10638__0.call(this);
            case 1:
              return G__10638__1.call(this, result);
            case 2:
              return G__10638__2.call(this, result, input);
          }
          throw new Error("Invalid arity: " + arguments.length);
        };
        G__10638.cljs$core$IFn$_invoke$arity$0 = G__10638__0;
        G__10638.cljs$core$IFn$_invoke$arity$1 = G__10638__1;
        G__10638.cljs$core$IFn$_invoke$arity$2 = G__10638__2;
        return G__10638;
      }();
    }(a, pa);
  };
};
cljs.core.partition_by.cljs$core$IFn$_invoke$arity$2 = function(f, coll) {
  return new cljs.core.LazySeq(null, function() {
    var temp__4425__auto__ = cljs.core.seq(coll);
    if (temp__4425__auto__) {
      var s = temp__4425__auto__;
      var fst = cljs.core.first(s);
      var fv = f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(fst) : f.call(null, fst);
      var run = cljs.core.cons(fst, cljs.core.take_while.cljs$core$IFn$_invoke$arity$2(function(fst, fv, s, temp__4425__auto__) {
        return function(p1__10630_SHARP_) {
          return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(fv, f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(p1__10630_SHARP_) : f.call(null, p1__10630_SHARP_));
        };
      }(fst, fv, s, temp__4425__auto__), cljs.core.next(s)));
      return cljs.core.cons(run, cljs.core.partition_by.cljs$core$IFn$_invoke$arity$2(f, cljs.core.seq(cljs.core.drop.cljs$core$IFn$_invoke$arity$2(cljs.core.count(run), s))));
    } else {
      return null;
    }
  }, null, null);
};
cljs.core.partition_by.cljs$lang$maxFixedArity = 2;
cljs.core.frequencies = function cljs$core$frequencies(coll) {
  return cljs.core.persistent_BANG_(cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(counts, x) {
    return cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(counts, x, cljs.core.get.cljs$core$IFn$_invoke$arity$3(counts, x, 0) + 1);
  }, cljs.core.transient$(cljs.core.PersistentArrayMap.EMPTY), coll));
};
cljs.core.reductions = function cljs$core$reductions(var_args) {
  var args10639 = [];
  var len__7198__auto___10644 = arguments.length;
  var i__7199__auto___10645 = 0;
  while (true) {
    if (i__7199__auto___10645 < len__7198__auto___10644) {
      args10639.push(arguments[i__7199__auto___10645]);
      var G__10646 = i__7199__auto___10645 + 1;
      i__7199__auto___10645 = G__10646;
      continue;
    } else {
    }
    break;
  }
  var G__10641 = args10639.length;
  switch(G__10641) {
    case 2:
      return cljs.core.reductions.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.reductions.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10639.length)].join(""));;
  }
};
cljs.core.reductions.cljs$core$IFn$_invoke$arity$2 = function(f, coll) {
  return new cljs.core.LazySeq(null, function() {
    var temp__4423__auto__ = cljs.core.seq(coll);
    if (temp__4423__auto__) {
      var s = temp__4423__auto__;
      return cljs.core.reductions.cljs$core$IFn$_invoke$arity$3(f, cljs.core.first(s), cljs.core.rest(s));
    } else {
      return cljs.core._conj(cljs.core.List.EMPTY, f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null));
    }
  }, null, null);
};
cljs.core.reductions.cljs$core$IFn$_invoke$arity$3 = function(f, init, coll) {
  return cljs.core.cons(init, new cljs.core.LazySeq(null, function() {
    var temp__4425__auto__ = cljs.core.seq(coll);
    if (temp__4425__auto__) {
      var s = temp__4425__auto__;
      return cljs.core.reductions.cljs$core$IFn$_invoke$arity$3(f, function() {
        var G__10642 = init;
        var G__10643 = cljs.core.first(s);
        return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__10642, G__10643) : f.call(null, G__10642, G__10643);
      }(), cljs.core.rest(s));
    } else {
      return null;
    }
  }, null, null));
};
cljs.core.reductions.cljs$lang$maxFixedArity = 3;
cljs.core.juxt = function cljs$core$juxt(var_args) {
  var args10658 = [];
  var len__7198__auto___10665 = arguments.length;
  var i__7199__auto___10666 = 0;
  while (true) {
    if (i__7199__auto___10666 < len__7198__auto___10665) {
      args10658.push(arguments[i__7199__auto___10666]);
      var G__10667 = i__7199__auto___10666 + 1;
      i__7199__auto___10666 = G__10667;
      continue;
    } else {
    }
    break;
  }
  var G__10664 = args10658.length;
  switch(G__10664) {
    case 1:
      return cljs.core.juxt.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.juxt.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.juxt.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args10658.slice(3), 0);
      return cljs.core.juxt.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], argseq__7217__auto__);
  }
};
cljs.core.juxt.cljs$core$IFn$_invoke$arity$1 = function(f) {
  return function() {
    var G__10669 = null;
    var G__10669__0 = function() {
      return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null)], null);
    };
    var G__10669__1 = function(x) {
      return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(x) : f.call(null, x)], null);
    };
    var G__10669__2 = function(x, y) {
      return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(x, y) : f.call(null, x, y)], null);
    };
    var G__10669__3 = function(x, y, z) {
      return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(x, y, z) : f.call(null, x, y, z)], null);
    };
    var G__10669__4 = function() {
      var G__10670__delegate = function(x, y, z, args) {
        return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.cljs$core$IFn$_invoke$arity$5(f, x, y, z, args)], null);
      };
      var G__10670 = function(x, y, z, var_args) {
        var args = null;
        if (arguments.length > 3) {
          var G__10671__i = 0, G__10671__a = new Array(arguments.length - 3);
          while (G__10671__i < G__10671__a.length) {
            G__10671__a[G__10671__i] = arguments[G__10671__i + 3];
            ++G__10671__i;
          }
          args = new cljs.core.IndexedSeq(G__10671__a, 0);
        }
        return G__10670__delegate.call(this, x, y, z, args);
      };
      G__10670.cljs$lang$maxFixedArity = 3;
      G__10670.cljs$lang$applyTo = function(arglist__10672) {
        var x = cljs.core.first(arglist__10672);
        arglist__10672 = cljs.core.next(arglist__10672);
        var y = cljs.core.first(arglist__10672);
        arglist__10672 = cljs.core.next(arglist__10672);
        var z = cljs.core.first(arglist__10672);
        var args = cljs.core.rest(arglist__10672);
        return G__10670__delegate(x, y, z, args);
      };
      G__10670.cljs$core$IFn$_invoke$arity$variadic = G__10670__delegate;
      return G__10670;
    }();
    G__10669 = function(x, y, z, var_args) {
      var args = var_args;
      switch(arguments.length) {
        case 0:
          return G__10669__0.call(this);
        case 1:
          return G__10669__1.call(this, x);
        case 2:
          return G__10669__2.call(this, x, y);
        case 3:
          return G__10669__3.call(this, x, y, z);
        default:
          var G__10673 = null;
          if (arguments.length > 3) {
            var G__10674__i = 0, G__10674__a = new Array(arguments.length - 3);
            while (G__10674__i < G__10674__a.length) {
              G__10674__a[G__10674__i] = arguments[G__10674__i + 3];
              ++G__10674__i;
            }
            G__10673 = new cljs.core.IndexedSeq(G__10674__a, 0);
          }
          return G__10669__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__10673);
      }
      throw new Error("Invalid arity: " + arguments.length);
    };
    G__10669.cljs$lang$maxFixedArity = 3;
    G__10669.cljs$lang$applyTo = G__10669__4.cljs$lang$applyTo;
    G__10669.cljs$core$IFn$_invoke$arity$0 = G__10669__0;
    G__10669.cljs$core$IFn$_invoke$arity$1 = G__10669__1;
    G__10669.cljs$core$IFn$_invoke$arity$2 = G__10669__2;
    G__10669.cljs$core$IFn$_invoke$arity$3 = G__10669__3;
    G__10669.cljs$core$IFn$_invoke$arity$variadic = G__10669__4.cljs$core$IFn$_invoke$arity$variadic;
    return G__10669;
  }();
};
cljs.core.juxt.cljs$core$IFn$_invoke$arity$2 = function(f, g) {
  return function() {
    var G__10675 = null;
    var G__10675__0 = function() {
      return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null), g.cljs$core$IFn$_invoke$arity$0 ? g.cljs$core$IFn$_invoke$arity$0() : g.call(null)], null);
    };
    var G__10675__1 = function(x) {
      return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(x) : f.call(null, x), g.cljs$core$IFn$_invoke$arity$1 ? g.cljs$core$IFn$_invoke$arity$1(x) : g.call(null, x)], null);
    };
    var G__10675__2 = function(x, y) {
      return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(x, y) : f.call(null, x, y), g.cljs$core$IFn$_invoke$arity$2 ? g.cljs$core$IFn$_invoke$arity$2(x, y) : g.call(null, x, y)], null);
    };
    var G__10675__3 = function(x, y, z) {
      return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(x, y, z) : f.call(null, x, y, z), g.cljs$core$IFn$_invoke$arity$3 ? g.cljs$core$IFn$_invoke$arity$3(x, y, z) : g.call(null, x, y, z)], null);
    };
    var G__10675__4 = function() {
      var G__10676__delegate = function(x, y, z, args) {
        return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.cljs$core$IFn$_invoke$arity$5(f, x, y, z, args), cljs.core.apply.cljs$core$IFn$_invoke$arity$5(g, x, y, z, args)], null);
      };
      var G__10676 = function(x, y, z, var_args) {
        var args = null;
        if (arguments.length > 3) {
          var G__10677__i = 0, G__10677__a = new Array(arguments.length - 3);
          while (G__10677__i < G__10677__a.length) {
            G__10677__a[G__10677__i] = arguments[G__10677__i + 3];
            ++G__10677__i;
          }
          args = new cljs.core.IndexedSeq(G__10677__a, 0);
        }
        return G__10676__delegate.call(this, x, y, z, args);
      };
      G__10676.cljs$lang$maxFixedArity = 3;
      G__10676.cljs$lang$applyTo = function(arglist__10678) {
        var x = cljs.core.first(arglist__10678);
        arglist__10678 = cljs.core.next(arglist__10678);
        var y = cljs.core.first(arglist__10678);
        arglist__10678 = cljs.core.next(arglist__10678);
        var z = cljs.core.first(arglist__10678);
        var args = cljs.core.rest(arglist__10678);
        return G__10676__delegate(x, y, z, args);
      };
      G__10676.cljs$core$IFn$_invoke$arity$variadic = G__10676__delegate;
      return G__10676;
    }();
    G__10675 = function(x, y, z, var_args) {
      var args = var_args;
      switch(arguments.length) {
        case 0:
          return G__10675__0.call(this);
        case 1:
          return G__10675__1.call(this, x);
        case 2:
          return G__10675__2.call(this, x, y);
        case 3:
          return G__10675__3.call(this, x, y, z);
        default:
          var G__10679 = null;
          if (arguments.length > 3) {
            var G__10680__i = 0, G__10680__a = new Array(arguments.length - 3);
            while (G__10680__i < G__10680__a.length) {
              G__10680__a[G__10680__i] = arguments[G__10680__i + 3];
              ++G__10680__i;
            }
            G__10679 = new cljs.core.IndexedSeq(G__10680__a, 0);
          }
          return G__10675__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__10679);
      }
      throw new Error("Invalid arity: " + arguments.length);
    };
    G__10675.cljs$lang$maxFixedArity = 3;
    G__10675.cljs$lang$applyTo = G__10675__4.cljs$lang$applyTo;
    G__10675.cljs$core$IFn$_invoke$arity$0 = G__10675__0;
    G__10675.cljs$core$IFn$_invoke$arity$1 = G__10675__1;
    G__10675.cljs$core$IFn$_invoke$arity$2 = G__10675__2;
    G__10675.cljs$core$IFn$_invoke$arity$3 = G__10675__3;
    G__10675.cljs$core$IFn$_invoke$arity$variadic = G__10675__4.cljs$core$IFn$_invoke$arity$variadic;
    return G__10675;
  }();
};
cljs.core.juxt.cljs$core$IFn$_invoke$arity$3 = function(f, g, h) {
  return function() {
    var G__10681 = null;
    var G__10681__0 = function() {
      return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null), g.cljs$core$IFn$_invoke$arity$0 ? g.cljs$core$IFn$_invoke$arity$0() : g.call(null), h.cljs$core$IFn$_invoke$arity$0 ? h.cljs$core$IFn$_invoke$arity$0() : h.call(null)], null);
    };
    var G__10681__1 = function(x) {
      return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(x) : f.call(null, x), g.cljs$core$IFn$_invoke$arity$1 ? g.cljs$core$IFn$_invoke$arity$1(x) : g.call(null, x), h.cljs$core$IFn$_invoke$arity$1 ? h.cljs$core$IFn$_invoke$arity$1(x) : h.call(null, x)], null);
    };
    var G__10681__2 = function(x, y) {
      return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(x, y) : f.call(null, x, y), g.cljs$core$IFn$_invoke$arity$2 ? g.cljs$core$IFn$_invoke$arity$2(x, y) : g.call(null, x, y), h.cljs$core$IFn$_invoke$arity$2 ? h.cljs$core$IFn$_invoke$arity$2(x, y) : h.call(null, x, y)], null);
    };
    var G__10681__3 = function(x, y, z) {
      return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(x, y, z) : f.call(null, x, y, z), g.cljs$core$IFn$_invoke$arity$3 ? g.cljs$core$IFn$_invoke$arity$3(x, y, z) : g.call(null, x, y, z), h.cljs$core$IFn$_invoke$arity$3 ? h.cljs$core$IFn$_invoke$arity$3(x, y, z) : h.call(null, x, y, z)], null);
    };
    var G__10681__4 = function() {
      var G__10682__delegate = function(x, y, z, args) {
        return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.cljs$core$IFn$_invoke$arity$5(f, x, y, z, args), cljs.core.apply.cljs$core$IFn$_invoke$arity$5(g, x, y, z, args), cljs.core.apply.cljs$core$IFn$_invoke$arity$5(h, x, y, z, args)], null);
      };
      var G__10682 = function(x, y, z, var_args) {
        var args = null;
        if (arguments.length > 3) {
          var G__10683__i = 0, G__10683__a = new Array(arguments.length - 3);
          while (G__10683__i < G__10683__a.length) {
            G__10683__a[G__10683__i] = arguments[G__10683__i + 3];
            ++G__10683__i;
          }
          args = new cljs.core.IndexedSeq(G__10683__a, 0);
        }
        return G__10682__delegate.call(this, x, y, z, args);
      };
      G__10682.cljs$lang$maxFixedArity = 3;
      G__10682.cljs$lang$applyTo = function(arglist__10684) {
        var x = cljs.core.first(arglist__10684);
        arglist__10684 = cljs.core.next(arglist__10684);
        var y = cljs.core.first(arglist__10684);
        arglist__10684 = cljs.core.next(arglist__10684);
        var z = cljs.core.first(arglist__10684);
        var args = cljs.core.rest(arglist__10684);
        return G__10682__delegate(x, y, z, args);
      };
      G__10682.cljs$core$IFn$_invoke$arity$variadic = G__10682__delegate;
      return G__10682;
    }();
    G__10681 = function(x, y, z, var_args) {
      var args = var_args;
      switch(arguments.length) {
        case 0:
          return G__10681__0.call(this);
        case 1:
          return G__10681__1.call(this, x);
        case 2:
          return G__10681__2.call(this, x, y);
        case 3:
          return G__10681__3.call(this, x, y, z);
        default:
          var G__10685 = null;
          if (arguments.length > 3) {
            var G__10686__i = 0, G__10686__a = new Array(arguments.length - 3);
            while (G__10686__i < G__10686__a.length) {
              G__10686__a[G__10686__i] = arguments[G__10686__i + 3];
              ++G__10686__i;
            }
            G__10685 = new cljs.core.IndexedSeq(G__10686__a, 0);
          }
          return G__10681__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__10685);
      }
      throw new Error("Invalid arity: " + arguments.length);
    };
    G__10681.cljs$lang$maxFixedArity = 3;
    G__10681.cljs$lang$applyTo = G__10681__4.cljs$lang$applyTo;
    G__10681.cljs$core$IFn$_invoke$arity$0 = G__10681__0;
    G__10681.cljs$core$IFn$_invoke$arity$1 = G__10681__1;
    G__10681.cljs$core$IFn$_invoke$arity$2 = G__10681__2;
    G__10681.cljs$core$IFn$_invoke$arity$3 = G__10681__3;
    G__10681.cljs$core$IFn$_invoke$arity$variadic = G__10681__4.cljs$core$IFn$_invoke$arity$variadic;
    return G__10681;
  }();
};
cljs.core.juxt.cljs$core$IFn$_invoke$arity$variadic = function(f, g, h, fs) {
  var fs__$1 = cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$4(f, g, h, fs);
  return function(fs__$1) {
    return function() {
      var G__10687 = null;
      var G__10687__0 = function() {
        return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(fs__$1) {
          return function(p1__10648_SHARP_, p2__10649_SHARP_) {
            return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(p1__10648_SHARP_, p2__10649_SHARP_.cljs$core$IFn$_invoke$arity$0 ? p2__10649_SHARP_.cljs$core$IFn$_invoke$arity$0() : p2__10649_SHARP_.call(null));
          };
        }(fs__$1), cljs.core.PersistentVector.EMPTY, fs__$1);
      };
      var G__10687__1 = function(x) {
        return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(fs__$1) {
          return function(p1__10650_SHARP_, p2__10651_SHARP_) {
            return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(p1__10650_SHARP_, p2__10651_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p2__10651_SHARP_.cljs$core$IFn$_invoke$arity$1(x) : p2__10651_SHARP_.call(null, x));
          };
        }(fs__$1), cljs.core.PersistentVector.EMPTY, fs__$1);
      };
      var G__10687__2 = function(x, y) {
        return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(fs__$1) {
          return function(p1__10652_SHARP_, p2__10653_SHARP_) {
            return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(p1__10652_SHARP_, p2__10653_SHARP_.cljs$core$IFn$_invoke$arity$2 ? p2__10653_SHARP_.cljs$core$IFn$_invoke$arity$2(x, y) : p2__10653_SHARP_.call(null, x, y));
          };
        }(fs__$1), cljs.core.PersistentVector.EMPTY, fs__$1);
      };
      var G__10687__3 = function(x, y, z) {
        return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(fs__$1) {
          return function(p1__10654_SHARP_, p2__10655_SHARP_) {
            return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(p1__10654_SHARP_, p2__10655_SHARP_.cljs$core$IFn$_invoke$arity$3 ? p2__10655_SHARP_.cljs$core$IFn$_invoke$arity$3(x, y, z) : p2__10655_SHARP_.call(null, x, y, z));
          };
        }(fs__$1), cljs.core.PersistentVector.EMPTY, fs__$1);
      };
      var G__10687__4 = function() {
        var G__10688__delegate = function(x, y, z, args) {
          return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(fs__$1) {
            return function(p1__10656_SHARP_, p2__10657_SHARP_) {
              return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(p1__10656_SHARP_, cljs.core.apply.cljs$core$IFn$_invoke$arity$5(p2__10657_SHARP_, x, y, z, args));
            };
          }(fs__$1), cljs.core.PersistentVector.EMPTY, fs__$1);
        };
        var G__10688 = function(x, y, z, var_args) {
          var args = null;
          if (arguments.length > 3) {
            var G__10689__i = 0, G__10689__a = new Array(arguments.length - 3);
            while (G__10689__i < G__10689__a.length) {
              G__10689__a[G__10689__i] = arguments[G__10689__i + 3];
              ++G__10689__i;
            }
            args = new cljs.core.IndexedSeq(G__10689__a, 0);
          }
          return G__10688__delegate.call(this, x, y, z, args);
        };
        G__10688.cljs$lang$maxFixedArity = 3;
        G__10688.cljs$lang$applyTo = function(arglist__10690) {
          var x = cljs.core.first(arglist__10690);
          arglist__10690 = cljs.core.next(arglist__10690);
          var y = cljs.core.first(arglist__10690);
          arglist__10690 = cljs.core.next(arglist__10690);
          var z = cljs.core.first(arglist__10690);
          var args = cljs.core.rest(arglist__10690);
          return G__10688__delegate(x, y, z, args);
        };
        G__10688.cljs$core$IFn$_invoke$arity$variadic = G__10688__delegate;
        return G__10688;
      }();
      G__10687 = function(x, y, z, var_args) {
        var args = var_args;
        switch(arguments.length) {
          case 0:
            return G__10687__0.call(this);
          case 1:
            return G__10687__1.call(this, x);
          case 2:
            return G__10687__2.call(this, x, y);
          case 3:
            return G__10687__3.call(this, x, y, z);
          default:
            var G__10691 = null;
            if (arguments.length > 3) {
              var G__10692__i = 0, G__10692__a = new Array(arguments.length - 3);
              while (G__10692__i < G__10692__a.length) {
                G__10692__a[G__10692__i] = arguments[G__10692__i + 3];
                ++G__10692__i;
              }
              G__10691 = new cljs.core.IndexedSeq(G__10692__a, 0);
            }
            return G__10687__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__10691);
        }
        throw new Error("Invalid arity: " + arguments.length);
      };
      G__10687.cljs$lang$maxFixedArity = 3;
      G__10687.cljs$lang$applyTo = G__10687__4.cljs$lang$applyTo;
      G__10687.cljs$core$IFn$_invoke$arity$0 = G__10687__0;
      G__10687.cljs$core$IFn$_invoke$arity$1 = G__10687__1;
      G__10687.cljs$core$IFn$_invoke$arity$2 = G__10687__2;
      G__10687.cljs$core$IFn$_invoke$arity$3 = G__10687__3;
      G__10687.cljs$core$IFn$_invoke$arity$variadic = G__10687__4.cljs$core$IFn$_invoke$arity$variadic;
      return G__10687;
    }();
  }(fs__$1);
};
cljs.core.juxt.cljs$lang$applyTo = function(seq10659) {
  var G__10660 = cljs.core.first(seq10659);
  var seq10659__$1 = cljs.core.next(seq10659);
  var G__10661 = cljs.core.first(seq10659__$1);
  var seq10659__$2 = cljs.core.next(seq10659__$1);
  var G__10662 = cljs.core.first(seq10659__$2);
  var seq10659__$3 = cljs.core.next(seq10659__$2);
  return cljs.core.juxt.cljs$core$IFn$_invoke$arity$variadic(G__10660, G__10661, G__10662, seq10659__$3);
};
cljs.core.juxt.cljs$lang$maxFixedArity = 3;
cljs.core.dorun = function cljs$core$dorun(var_args) {
  var args10693 = [];
  var len__7198__auto___10696 = arguments.length;
  var i__7199__auto___10697 = 0;
  while (true) {
    if (i__7199__auto___10697 < len__7198__auto___10696) {
      args10693.push(arguments[i__7199__auto___10697]);
      var G__10698 = i__7199__auto___10697 + 1;
      i__7199__auto___10697 = G__10698;
      continue;
    } else {
    }
    break;
  }
  var G__10695 = args10693.length;
  switch(G__10695) {
    case 1:
      return cljs.core.dorun.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.dorun.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10693.length)].join(""));;
  }
};
cljs.core.dorun.cljs$core$IFn$_invoke$arity$1 = function(coll) {
  while (true) {
    if (cljs.core.seq(coll)) {
      var G__10700 = cljs.core.next(coll);
      coll = G__10700;
      continue;
    } else {
      return null;
    }
    break;
  }
};
cljs.core.dorun.cljs$core$IFn$_invoke$arity$2 = function(n, coll) {
  while (true) {
    if (cljs.core.seq(coll) && n > 0) {
      var G__10701 = n - 1;
      var G__10702 = cljs.core.next(coll);
      n = G__10701;
      coll = G__10702;
      continue;
    } else {
      return null;
    }
    break;
  }
};
cljs.core.dorun.cljs$lang$maxFixedArity = 2;
cljs.core.doall = function cljs$core$doall(var_args) {
  var args10703 = [];
  var len__7198__auto___10706 = arguments.length;
  var i__7199__auto___10707 = 0;
  while (true) {
    if (i__7199__auto___10707 < len__7198__auto___10706) {
      args10703.push(arguments[i__7199__auto___10707]);
      var G__10708 = i__7199__auto___10707 + 1;
      i__7199__auto___10707 = G__10708;
      continue;
    } else {
    }
    break;
  }
  var G__10705 = args10703.length;
  switch(G__10705) {
    case 1:
      return cljs.core.doall.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.doall.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10703.length)].join(""));;
  }
};
cljs.core.doall.cljs$core$IFn$_invoke$arity$1 = function(coll) {
  cljs.core.dorun.cljs$core$IFn$_invoke$arity$1(coll);
  return coll;
};
cljs.core.doall.cljs$core$IFn$_invoke$arity$2 = function(n, coll) {
  cljs.core.dorun.cljs$core$IFn$_invoke$arity$2(n, coll);
  return coll;
};
cljs.core.doall.cljs$lang$maxFixedArity = 2;
cljs.core.regexp_QMARK_ = function cljs$core$regexp_QMARK_(x) {
  return x instanceof RegExp;
};
cljs.core.re_matches = function cljs$core$re_matches(re, s) {
  if (typeof s === "string") {
    var matches = re.exec(s);
    if (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(cljs.core.first(matches), s)) {
      if (cljs.core.count(matches) === 1) {
        return cljs.core.first(matches);
      } else {
        return cljs.core.vec(matches);
      }
    } else {
      return null;
    }
  } else {
    throw new TypeError("re-matches must match against a string.");
  }
};
cljs.core.re_find = function cljs$core$re_find(re, s) {
  if (typeof s === "string") {
    var matches = re.exec(s);
    if (matches == null) {
      return null;
    } else {
      if (cljs.core.count(matches) === 1) {
        return cljs.core.first(matches);
      } else {
        return cljs.core.vec(matches);
      }
    }
  } else {
    throw new TypeError("re-find must match against a string.");
  }
};
cljs.core.re_seq = function cljs$core$re_seq(re, s) {
  var match_data = cljs.core.re_find(re, s);
  var match_idx = s.search(re);
  var match_str = cljs.core.coll_QMARK_(match_data) ? cljs.core.first(match_data) : match_data;
  var post_match = cljs.core.subs.cljs$core$IFn$_invoke$arity$2(s, match_idx + cljs.core.count(match_str));
  if (cljs.core.truth_(match_data)) {
    return new cljs.core.LazySeq(null, function(match_data, match_idx, match_str, post_match) {
      return function() {
        return cljs.core.cons(match_data, cljs.core.seq(post_match) ? cljs$core$re_seq(re, post_match) : null);
      };
    }(match_data, match_idx, match_str, post_match), null, null);
  } else {
    return null;
  }
};
cljs.core.re_pattern = function cljs$core$re_pattern(s) {
  if (s instanceof RegExp) {
    return s;
  } else {
    var vec__10711 = cljs.core.re_find(/^\(\?([idmsux]*)\)/, s);
    var prefix = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10711, 0, null);
    var flags = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10711, 1, null);
    var pattern = cljs.core.subs.cljs$core$IFn$_invoke$arity$2(s, cljs.core.count(prefix));
    return new RegExp(pattern, function() {
      var or__6140__auto__ = flags;
      if (cljs.core.truth_(or__6140__auto__)) {
        return or__6140__auto__;
      } else {
        return "";
      }
    }());
  }
};
cljs.core.pr_sequential_writer = function cljs$core$pr_sequential_writer(writer, print_one, begin, sep, end, opts, coll) {
  var _STAR_print_level_STAR_10719 = cljs.core._STAR_print_level_STAR_;
  cljs.core._STAR_print_level_STAR_ = cljs.core._STAR_print_level_STAR_ == null ? null : cljs.core._STAR_print_level_STAR_ - 1;
  try {
    if (!(cljs.core._STAR_print_level_STAR_ == null) && cljs.core._STAR_print_level_STAR_ < 0) {
      return cljs.core._write(writer, "#");
    } else {
      cljs.core._write(writer, begin);
      if ((new cljs.core.Keyword(null, "print-length", "print-length", 1931866356)).cljs$core$IFn$_invoke$arity$1(opts) === 0) {
        if (cljs.core.seq(coll)) {
          cljs.core._write(writer, function() {
            var or__6140__auto__ = (new cljs.core.Keyword(null, "more-marker", "more-marker", -14717935)).cljs$core$IFn$_invoke$arity$1(opts);
            if (cljs.core.truth_(or__6140__auto__)) {
              return or__6140__auto__;
            } else {
              return "...";
            }
          }());
        } else {
        }
      } else {
        if (cljs.core.seq(coll)) {
          var G__10720_10726 = cljs.core.first(coll);
          var G__10721_10727 = writer;
          var G__10722_10728 = opts;
          print_one.cljs$core$IFn$_invoke$arity$3 ? print_one.cljs$core$IFn$_invoke$arity$3(G__10720_10726, G__10721_10727, G__10722_10728) : print_one.call(null, G__10720_10726, G__10721_10727, G__10722_10728);
        } else {
        }
        var coll_10729__$1 = cljs.core.next(coll);
        var n_10730 = (new cljs.core.Keyword(null, "print-length", "print-length", 1931866356)).cljs$core$IFn$_invoke$arity$1(opts) - 1;
        while (true) {
          if (coll_10729__$1 && (n_10730 == null || !(n_10730 === 0))) {
            cljs.core._write(writer, sep);
            var G__10723_10731 = cljs.core.first(coll_10729__$1);
            var G__10724_10732 = writer;
            var G__10725_10733 = opts;
            print_one.cljs$core$IFn$_invoke$arity$3 ? print_one.cljs$core$IFn$_invoke$arity$3(G__10723_10731, G__10724_10732, G__10725_10733) : print_one.call(null, G__10723_10731, G__10724_10732, G__10725_10733);
            var G__10734 = cljs.core.next(coll_10729__$1);
            var G__10735 = n_10730 - 1;
            coll_10729__$1 = G__10734;
            n_10730 = G__10735;
            continue;
          } else {
            if (cljs.core.seq(coll_10729__$1) && n_10730 === 0) {
              cljs.core._write(writer, sep);
              cljs.core._write(writer, function() {
                var or__6140__auto__ = (new cljs.core.Keyword(null, "more-marker", "more-marker", -14717935)).cljs$core$IFn$_invoke$arity$1(opts);
                if (cljs.core.truth_(or__6140__auto__)) {
                  return or__6140__auto__;
                } else {
                  return "...";
                }
              }());
            } else {
            }
          }
          break;
        }
      }
      return cljs.core._write(writer, end);
    }
  } finally {
    cljs.core._STAR_print_level_STAR_ = _STAR_print_level_STAR_10719;
  }
};
cljs.core.write_all = function cljs$core$write_all(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___10742 = arguments.length;
  var i__7199__auto___10743 = 0;
  while (true) {
    if (i__7199__auto___10743 < len__7198__auto___10742) {
      args__7205__auto__.push(arguments[i__7199__auto___10743]);
      var G__10744 = i__7199__auto___10743 + 1;
      i__7199__auto___10743 = G__10744;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return cljs.core.write_all.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
cljs.core.write_all.cljs$core$IFn$_invoke$arity$variadic = function(writer, ss) {
  var seq__10738 = cljs.core.seq(ss);
  var chunk__10739 = null;
  var count__10740 = 0;
  var i__10741 = 0;
  while (true) {
    if (i__10741 < count__10740) {
      var s = chunk__10739.cljs$core$IIndexed$_nth$arity$2(null, i__10741);
      cljs.core._write(writer, s);
      var G__10745 = seq__10738;
      var G__10746 = chunk__10739;
      var G__10747 = count__10740;
      var G__10748 = i__10741 + 1;
      seq__10738 = G__10745;
      chunk__10739 = G__10746;
      count__10740 = G__10747;
      i__10741 = G__10748;
      continue;
    } else {
      var temp__4425__auto__ = cljs.core.seq(seq__10738);
      if (temp__4425__auto__) {
        var seq__10738__$1 = temp__4425__auto__;
        if (cljs.core.chunked_seq_QMARK_(seq__10738__$1)) {
          var c__6943__auto__ = cljs.core.chunk_first(seq__10738__$1);
          var G__10749 = cljs.core.chunk_rest(seq__10738__$1);
          var G__10750 = c__6943__auto__;
          var G__10751 = cljs.core.count(c__6943__auto__);
          var G__10752 = 0;
          seq__10738 = G__10749;
          chunk__10739 = G__10750;
          count__10740 = G__10751;
          i__10741 = G__10752;
          continue;
        } else {
          var s = cljs.core.first(seq__10738__$1);
          cljs.core._write(writer, s);
          var G__10753 = cljs.core.next(seq__10738__$1);
          var G__10754 = null;
          var G__10755 = 0;
          var G__10756 = 0;
          seq__10738 = G__10753;
          chunk__10739 = G__10754;
          count__10740 = G__10755;
          i__10741 = G__10756;
          continue;
        }
      } else {
        return null;
      }
    }
    break;
  }
};
cljs.core.write_all.cljs$lang$maxFixedArity = 1;
cljs.core.write_all.cljs$lang$applyTo = function(seq10736) {
  var G__10737 = cljs.core.first(seq10736);
  var seq10736__$1 = cljs.core.next(seq10736);
  return cljs.core.write_all.cljs$core$IFn$_invoke$arity$variadic(G__10737, seq10736__$1);
};
cljs.core.string_print = function cljs$core$string_print(x) {
  cljs.core._STAR_print_fn_STAR_.cljs$core$IFn$_invoke$arity$1 ? cljs.core._STAR_print_fn_STAR_.cljs$core$IFn$_invoke$arity$1(x) : cljs.core._STAR_print_fn_STAR_.call(null, x);
  return null;
};
cljs.core.flush = function cljs$core$flush() {
  return null;
};
cljs.core.char_escapes = function() {
  var obj10758 = {'"':'\\"', "\\":"\\\\", "\b":"\\b", "\f":"\\f", "\n":"\\n", "\r":"\\r", "\t":"\\t"};
  return obj10758;
}();
cljs.core.quote_string = function cljs$core$quote_string(s) {
  return [cljs.core.str('"'), cljs.core.str(s.replace(RegExp('[\\\\"\b\f\n\r\t]', "g"), function(match) {
    return cljs.core.char_escapes[match];
  })), cljs.core.str('"')].join("");
};
cljs.core.print_meta_QMARK_ = function cljs$core$print_meta_QMARK_(opts, obj) {
  var and__6128__auto__ = cljs.core.boolean$(cljs.core.get.cljs$core$IFn$_invoke$arity$2(opts, new cljs.core.Keyword(null, "meta", "meta", 1499536964)));
  if (and__6128__auto__) {
    var and__6128__auto____$1 = !(obj == null) ? obj.cljs$lang$protocol_mask$partition0$ & 131072 || obj.cljs$core$IMeta$ ? true : false : false;
    if (and__6128__auto____$1) {
      return !(cljs.core.meta(obj) == null);
    } else {
      return and__6128__auto____$1;
    }
  } else {
    return and__6128__auto__;
  }
};
cljs.core.pr_writer_impl = function cljs$core$pr_writer_impl(obj, writer, opts) {
  if (obj == null) {
    return cljs.core._write(writer, "nil");
  } else {
    if (cljs.core.print_meta_QMARK_(opts, obj)) {
      cljs.core._write(writer, "^");
      var G__10774_10783 = cljs.core.meta(obj);
      var G__10775_10784 = writer;
      var G__10776_10785 = opts;
      cljs.core.pr_writer.cljs$core$IFn$_invoke$arity$3 ? cljs.core.pr_writer.cljs$core$IFn$_invoke$arity$3(G__10774_10783, G__10775_10784, G__10776_10785) : cljs.core.pr_writer.call(null, G__10774_10783, G__10775_10784, G__10776_10785);
      cljs.core._write(writer, " ");
    } else {
    }
    if (obj.cljs$lang$type) {
      return obj.cljs$lang$ctorPrWriter(obj, writer, opts);
    } else {
      if (!(obj == null) ? obj.cljs$lang$protocol_mask$partition0$ & 2147483648 || obj.cljs$core$IPrintWithWriter$ ? true : false : false) {
        return obj.cljs$core$IPrintWithWriter$_pr_writer$arity$3(null, writer, opts);
      } else {
        if (obj === true || obj === false || typeof obj === "number") {
          return cljs.core._write(writer, [cljs.core.str(obj)].join(""));
        } else {
          if (cljs.core.object_QMARK_(obj)) {
            cljs.core._write(writer, "#js ");
            var G__10778 = cljs.core.map.cljs$core$IFn$_invoke$arity$2(function(k) {
              return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.cljs$core$IFn$_invoke$arity$1(k), obj[k]], null);
            }, cljs.core.js_keys(obj));
            var G__10779 = cljs.core.pr_writer;
            var G__10780 = writer;
            var G__10781 = opts;
            return cljs.core.print_map.cljs$core$IFn$_invoke$arity$4 ? cljs.core.print_map.cljs$core$IFn$_invoke$arity$4(G__10778, G__10779, G__10780, G__10781) : cljs.core.print_map.call(null, G__10778, G__10779, G__10780, G__10781);
          } else {
            if (cljs.core.array_QMARK_(obj)) {
              return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "#js [", " ", "]", opts, obj);
            } else {
              if (goog.isString(obj)) {
                if (cljs.core.truth_((new cljs.core.Keyword(null, "readably", "readably", 1129599760)).cljs$core$IFn$_invoke$arity$1(opts))) {
                  return cljs.core._write(writer, cljs.core.quote_string(obj));
                } else {
                  return cljs.core._write(writer, obj);
                }
              } else {
                if (goog.isFunction(obj)) {
                  var name = obj.name;
                  var name__$1 = cljs.core.truth_(function() {
                    var or__6140__auto__ = name == null;
                    if (or__6140__auto__) {
                      return or__6140__auto__;
                    } else {
                      return goog.string.isEmpty(name);
                    }
                  }()) ? "Function" : name;
                  return cljs.core.write_all.cljs$core$IFn$_invoke$arity$variadic(writer, cljs.core.array_seq(["#object[", name__$1, ' "', [cljs.core.str(obj)].join(""), '"]'], 0));
                } else {
                  if (obj instanceof Date) {
                    var normalize = function(n, len) {
                      var ns = [cljs.core.str(n)].join("");
                      while (true) {
                        if (cljs.core.count(ns) < len) {
                          var G__10786 = [cljs.core.str("0"), cljs.core.str(ns)].join("");
                          ns = G__10786;
                          continue;
                        } else {
                          return ns;
                        }
                        break;
                      }
                    };
                    return cljs.core.write_all.cljs$core$IFn$_invoke$arity$variadic(writer, cljs.core.array_seq(['#inst "', [cljs.core.str(obj.getUTCFullYear())].join(""), "-", normalize(obj.getUTCMonth() + 1, 2), "-", normalize(obj.getUTCDate(), 2), "T", normalize(obj.getUTCHours(), 2), ":", normalize(obj.getUTCMinutes(), 2), ":", normalize(obj.getUTCSeconds(), 2), ".", normalize(obj.getUTCMilliseconds(), 3), "-", '00:00"'], 0));
                  } else {
                    if (cljs.core.regexp_QMARK_(obj)) {
                      return cljs.core.write_all.cljs$core$IFn$_invoke$arity$variadic(writer, cljs.core.array_seq(['#"', obj.source, '"'], 0));
                    } else {
                      if (!(obj == null) ? obj.cljs$lang$protocol_mask$partition0$ & 2147483648 || obj.cljs$core$IPrintWithWriter$ ? true : false : false) {
                        return cljs.core._pr_writer(obj, writer, opts);
                      } else {
                        if (cljs.core.truth_(obj.constructor.cljs$lang$ctorStr)) {
                          return cljs.core.write_all.cljs$core$IFn$_invoke$arity$variadic(writer, cljs.core.array_seq(["#object[", obj.constructor.cljs$lang$ctorStr.replace(new RegExp("/", "g"), "."), "]"], 0));
                        } else {
                          var name = obj.constructor.name;
                          var name__$1 = cljs.core.truth_(function() {
                            var or__6140__auto__ = name == null;
                            if (or__6140__auto__) {
                              return or__6140__auto__;
                            } else {
                              return goog.string.isEmpty(name);
                            }
                          }()) ? "Object" : name;
                          return cljs.core.write_all.cljs$core$IFn$_invoke$arity$variadic(writer, cljs.core.array_seq(["#object[", name__$1, " ", [cljs.core.str(obj)].join(""), "]"], 0));
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
};
cljs.core.pr_writer = function cljs$core$pr_writer(obj, writer, opts) {
  var temp__4423__auto__ = (new cljs.core.Keyword(null, "alt-impl", "alt-impl", 670969595)).cljs$core$IFn$_invoke$arity$1(opts);
  if (cljs.core.truth_(temp__4423__auto__)) {
    var alt_impl = temp__4423__auto__;
    var G__10790 = obj;
    var G__10791 = writer;
    var G__10792 = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(opts, new cljs.core.Keyword(null, "fallback-impl", "fallback-impl", -1501286995), cljs.core.pr_writer_impl);
    return alt_impl.cljs$core$IFn$_invoke$arity$3 ? alt_impl.cljs$core$IFn$_invoke$arity$3(G__10790, G__10791, G__10792) : alt_impl.call(null, G__10790, G__10791, G__10792);
  } else {
    return cljs.core.pr_writer_impl(obj, writer, opts);
  }
};
cljs.core.pr_seq_writer = function cljs$core$pr_seq_writer(objs, writer, opts) {
  cljs.core.pr_writer(cljs.core.first(objs), writer, opts);
  var seq__10797 = cljs.core.seq(cljs.core.next(objs));
  var chunk__10798 = null;
  var count__10799 = 0;
  var i__10800 = 0;
  while (true) {
    if (i__10800 < count__10799) {
      var obj = chunk__10798.cljs$core$IIndexed$_nth$arity$2(null, i__10800);
      cljs.core._write(writer, " ");
      cljs.core.pr_writer(obj, writer, opts);
      var G__10801 = seq__10797;
      var G__10802 = chunk__10798;
      var G__10803 = count__10799;
      var G__10804 = i__10800 + 1;
      seq__10797 = G__10801;
      chunk__10798 = G__10802;
      count__10799 = G__10803;
      i__10800 = G__10804;
      continue;
    } else {
      var temp__4425__auto__ = cljs.core.seq(seq__10797);
      if (temp__4425__auto__) {
        var seq__10797__$1 = temp__4425__auto__;
        if (cljs.core.chunked_seq_QMARK_(seq__10797__$1)) {
          var c__6943__auto__ = cljs.core.chunk_first(seq__10797__$1);
          var G__10805 = cljs.core.chunk_rest(seq__10797__$1);
          var G__10806 = c__6943__auto__;
          var G__10807 = cljs.core.count(c__6943__auto__);
          var G__10808 = 0;
          seq__10797 = G__10805;
          chunk__10798 = G__10806;
          count__10799 = G__10807;
          i__10800 = G__10808;
          continue;
        } else {
          var obj = cljs.core.first(seq__10797__$1);
          cljs.core._write(writer, " ");
          cljs.core.pr_writer(obj, writer, opts);
          var G__10809 = cljs.core.next(seq__10797__$1);
          var G__10810 = null;
          var G__10811 = 0;
          var G__10812 = 0;
          seq__10797 = G__10809;
          chunk__10798 = G__10810;
          count__10799 = G__10811;
          i__10800 = G__10812;
          continue;
        }
      } else {
        return null;
      }
    }
    break;
  }
};
cljs.core.pr_sb_with_opts = function cljs$core$pr_sb_with_opts(objs, opts) {
  var sb = new goog.string.StringBuffer;
  var writer = new cljs.core.StringBufferWriter(sb);
  cljs.core.pr_seq_writer(objs, writer, opts);
  writer.cljs$core$IWriter$_flush$arity$1(null);
  return sb;
};
cljs.core.pr_str_with_opts = function cljs$core$pr_str_with_opts(objs, opts) {
  if (cljs.core.empty_QMARK_(objs)) {
    return "";
  } else {
    return [cljs.core.str(cljs.core.pr_sb_with_opts(objs, opts))].join("");
  }
};
cljs.core.prn_str_with_opts = function cljs$core$prn_str_with_opts(objs, opts) {
  if (cljs.core.empty_QMARK_(objs)) {
    return "\n";
  } else {
    var sb = cljs.core.pr_sb_with_opts(objs, opts);
    sb.append("\n");
    return [cljs.core.str(sb)].join("");
  }
};
cljs.core.pr_with_opts = function cljs$core$pr_with_opts(objs, opts) {
  return cljs.core.string_print(cljs.core.pr_str_with_opts(objs, opts));
};
cljs.core.newline = function cljs$core$newline(var_args) {
  var args10813 = [];
  var len__7198__auto___10816 = arguments.length;
  var i__7199__auto___10817 = 0;
  while (true) {
    if (i__7199__auto___10817 < len__7198__auto___10816) {
      args10813.push(arguments[i__7199__auto___10817]);
      var G__10818 = i__7199__auto___10817 + 1;
      i__7199__auto___10817 = G__10818;
      continue;
    } else {
    }
    break;
  }
  var G__10815 = args10813.length;
  switch(G__10815) {
    case 0:
      return cljs.core.newline.cljs$core$IFn$_invoke$arity$0();
      break;
    case 1:
      return cljs.core.newline.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10813.length)].join(""));;
  }
};
cljs.core.newline.cljs$core$IFn$_invoke$arity$0 = function() {
  return cljs.core.newline.cljs$core$IFn$_invoke$arity$1(null);
};
cljs.core.newline.cljs$core$IFn$_invoke$arity$1 = function(opts) {
  cljs.core.string_print("\n");
  if (cljs.core.truth_(cljs.core.get.cljs$core$IFn$_invoke$arity$2(opts, new cljs.core.Keyword(null, "flush-on-newline", "flush-on-newline", -151457939)))) {
    return cljs.core.flush();
  } else {
    return null;
  }
};
cljs.core.newline.cljs$lang$maxFixedArity = 1;
cljs.core.pr_str = function cljs$core$pr_str(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___10821 = arguments.length;
  var i__7199__auto___10822 = 0;
  while (true) {
    if (i__7199__auto___10822 < len__7198__auto___10821) {
      args__7205__auto__.push(arguments[i__7199__auto___10822]);
      var G__10823 = i__7199__auto___10822 + 1;
      i__7199__auto___10822 = G__10823;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic = function(objs) {
  return cljs.core.pr_str_with_opts(objs, cljs.core.pr_opts());
};
cljs.core.pr_str.cljs$lang$maxFixedArity = 0;
cljs.core.pr_str.cljs$lang$applyTo = function(seq10820) {
  return cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq10820));
};
cljs.core.prn_str = function cljs$core$prn_str(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___10825 = arguments.length;
  var i__7199__auto___10826 = 0;
  while (true) {
    if (i__7199__auto___10826 < len__7198__auto___10825) {
      args__7205__auto__.push(arguments[i__7199__auto___10826]);
      var G__10827 = i__7199__auto___10826 + 1;
      i__7199__auto___10826 = G__10827;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return cljs.core.prn_str.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
cljs.core.prn_str.cljs$core$IFn$_invoke$arity$variadic = function(objs) {
  return cljs.core.prn_str_with_opts(objs, cljs.core.pr_opts());
};
cljs.core.prn_str.cljs$lang$maxFixedArity = 0;
cljs.core.prn_str.cljs$lang$applyTo = function(seq10824) {
  return cljs.core.prn_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq10824));
};
cljs.core.pr = function cljs$core$pr(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___10829 = arguments.length;
  var i__7199__auto___10830 = 0;
  while (true) {
    if (i__7199__auto___10830 < len__7198__auto___10829) {
      args__7205__auto__.push(arguments[i__7199__auto___10830]);
      var G__10831 = i__7199__auto___10830 + 1;
      i__7199__auto___10830 = G__10831;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return cljs.core.pr.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
cljs.core.pr.cljs$core$IFn$_invoke$arity$variadic = function(objs) {
  return cljs.core.pr_with_opts(objs, cljs.core.pr_opts());
};
cljs.core.pr.cljs$lang$maxFixedArity = 0;
cljs.core.pr.cljs$lang$applyTo = function(seq10828) {
  return cljs.core.pr.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq10828));
};
cljs.core.print = function() {
  var cljs$core$cljs_core_print__delegate = function(objs) {
    return cljs.core.pr_with_opts(objs, cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(cljs.core.pr_opts(), new cljs.core.Keyword(null, "readably", "readably", 1129599760), false));
  };
  var cljs$core$cljs_core_print = function(var_args) {
    var objs = null;
    if (arguments.length > 0) {
      var G__10832__i = 0, G__10832__a = new Array(arguments.length - 0);
      while (G__10832__i < G__10832__a.length) {
        G__10832__a[G__10832__i] = arguments[G__10832__i + 0];
        ++G__10832__i;
      }
      objs = new cljs.core.IndexedSeq(G__10832__a, 0);
    }
    return cljs$core$cljs_core_print__delegate.call(this, objs);
  };
  cljs$core$cljs_core_print.cljs$lang$maxFixedArity = 0;
  cljs$core$cljs_core_print.cljs$lang$applyTo = function(arglist__10833) {
    var objs = cljs.core.seq(arglist__10833);
    return cljs$core$cljs_core_print__delegate(objs);
  };
  cljs$core$cljs_core_print.cljs$core$IFn$_invoke$arity$variadic = cljs$core$cljs_core_print__delegate;
  return cljs$core$cljs_core_print;
}();
cljs.core.print_str = function cljs$core$print_str(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___10835 = arguments.length;
  var i__7199__auto___10836 = 0;
  while (true) {
    if (i__7199__auto___10836 < len__7198__auto___10835) {
      args__7205__auto__.push(arguments[i__7199__auto___10836]);
      var G__10837 = i__7199__auto___10836 + 1;
      i__7199__auto___10836 = G__10837;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return cljs.core.print_str.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
cljs.core.print_str.cljs$core$IFn$_invoke$arity$variadic = function(objs) {
  return cljs.core.pr_str_with_opts(objs, cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(cljs.core.pr_opts(), new cljs.core.Keyword(null, "readably", "readably", 1129599760), false));
};
cljs.core.print_str.cljs$lang$maxFixedArity = 0;
cljs.core.print_str.cljs$lang$applyTo = function(seq10834) {
  return cljs.core.print_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq10834));
};
cljs.core.println = function cljs$core$println(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___10839 = arguments.length;
  var i__7199__auto___10840 = 0;
  while (true) {
    if (i__7199__auto___10840 < len__7198__auto___10839) {
      args__7205__auto__.push(arguments[i__7199__auto___10840]);
      var G__10841 = i__7199__auto___10840 + 1;
      i__7199__auto___10840 = G__10841;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
cljs.core.println.cljs$core$IFn$_invoke$arity$variadic = function(objs) {
  cljs.core.pr_with_opts(objs, cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(cljs.core.pr_opts(), new cljs.core.Keyword(null, "readably", "readably", 1129599760), false));
  if (cljs.core.truth_(cljs.core._STAR_print_newline_STAR_)) {
    return cljs.core.newline.cljs$core$IFn$_invoke$arity$1(cljs.core.pr_opts());
  } else {
    return null;
  }
};
cljs.core.println.cljs$lang$maxFixedArity = 0;
cljs.core.println.cljs$lang$applyTo = function(seq10838) {
  return cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq10838));
};
cljs.core.println_str = function cljs$core$println_str(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___10843 = arguments.length;
  var i__7199__auto___10844 = 0;
  while (true) {
    if (i__7199__auto___10844 < len__7198__auto___10843) {
      args__7205__auto__.push(arguments[i__7199__auto___10844]);
      var G__10845 = i__7199__auto___10844 + 1;
      i__7199__auto___10844 = G__10845;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return cljs.core.println_str.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
cljs.core.println_str.cljs$core$IFn$_invoke$arity$variadic = function(objs) {
  return cljs.core.prn_str_with_opts(objs, cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(cljs.core.pr_opts(), new cljs.core.Keyword(null, "readably", "readably", 1129599760), false));
};
cljs.core.println_str.cljs$lang$maxFixedArity = 0;
cljs.core.println_str.cljs$lang$applyTo = function(seq10842) {
  return cljs.core.println_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq10842));
};
cljs.core.prn = function cljs$core$prn(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___10847 = arguments.length;
  var i__7199__auto___10848 = 0;
  while (true) {
    if (i__7199__auto___10848 < len__7198__auto___10847) {
      args__7205__auto__.push(arguments[i__7199__auto___10848]);
      var G__10849 = i__7199__auto___10848 + 1;
      i__7199__auto___10848 = G__10849;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return cljs.core.prn.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
cljs.core.prn.cljs$core$IFn$_invoke$arity$variadic = function(objs) {
  cljs.core.pr_with_opts(objs, cljs.core.pr_opts());
  if (cljs.core.truth_(cljs.core._STAR_print_newline_STAR_)) {
    return cljs.core.newline.cljs$core$IFn$_invoke$arity$1(cljs.core.pr_opts());
  } else {
    return null;
  }
};
cljs.core.prn.cljs$lang$maxFixedArity = 0;
cljs.core.prn.cljs$lang$applyTo = function(seq10846) {
  return cljs.core.prn.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq10846));
};
cljs.core.print_map = function cljs$core$print_map(m, print_one, writer, opts) {
  return cljs.core.pr_sequential_writer(writer, function(e, w, opts__$1) {
    var G__10856_10862 = cljs.core.key(e);
    var G__10857_10863 = w;
    var G__10858_10864 = opts__$1;
    print_one.cljs$core$IFn$_invoke$arity$3 ? print_one.cljs$core$IFn$_invoke$arity$3(G__10856_10862, G__10857_10863, G__10858_10864) : print_one.call(null, G__10856_10862, G__10857_10863, G__10858_10864);
    cljs.core._write(w, " ");
    var G__10859 = cljs.core.val(e);
    var G__10860 = w;
    var G__10861 = opts__$1;
    return print_one.cljs$core$IFn$_invoke$arity$3 ? print_one.cljs$core$IFn$_invoke$arity$3(G__10859, G__10860, G__10861) : print_one.call(null, G__10859, G__10860, G__10861);
  }, "{", ", ", "}", opts, cljs.core.seq(m));
};
cljs.core.Volatile.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.Volatile.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, writer, opts) {
  var a__$1 = this;
  cljs.core._write(writer, "#object [cljs.core.Volatile ");
  cljs.core.pr_writer(new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "val", "val", 128701612), a__$1.state], null), writer, opts);
  return cljs.core._write(writer, "]");
};
cljs.core.Var.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.Var.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, writer, opts) {
  var a__$1 = this;
  cljs.core._write(writer, "#'");
  return cljs.core.pr_writer(a__$1.sym, writer, opts);
};
cljs.core.IndexedSeq.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.IndexedSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "(", " ", ")", opts, coll__$1);
};
cljs.core.LazySeq.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.LazySeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "(", " ", ")", opts, coll__$1);
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "(", " ", ")", opts, coll__$1);
};
cljs.core.NodeSeq.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.NodeSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "(", " ", ")", opts, coll__$1);
};
cljs.core.BlackNode.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.BlackNode.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "[", " ", "]", opts, coll__$1);
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "(", " ", ")", opts, coll__$1);
};
cljs.core.ES6IteratorSeq.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.ES6IteratorSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "(", " ", ")", opts, coll__$1);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.PersistentTreeSet.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "#{", " ", "}", opts, coll__$1);
};
cljs.core.ChunkedSeq.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.ChunkedSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "(", " ", ")", opts, coll__$1);
};
cljs.core.ObjMap.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.ObjMap.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.print_map(coll__$1, cljs.core.pr_writer, writer, opts);
};
cljs.core.Cons.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.Cons.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "(", " ", ")", opts, coll__$1);
};
cljs.core.RSeq.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.RSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "(", " ", ")", opts, coll__$1);
};
cljs.core.PersistentHashMap.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.PersistentHashMap.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.print_map(coll__$1, cljs.core.pr_writer, writer, opts);
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.ArrayNodeSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "(", " ", ")", opts, coll__$1);
};
cljs.core.Subvec.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.Subvec.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "[", " ", "]", opts, coll__$1);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.PersistentTreeMap.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.print_map(coll__$1, cljs.core.pr_writer, writer, opts);
};
cljs.core.PersistentHashSet.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.PersistentHashSet.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "#{", " ", "}", opts, coll__$1);
};
cljs.core.ChunkedCons.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.ChunkedCons.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "(", " ", ")", opts, coll__$1);
};
cljs.core.Atom.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.Atom.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, writer, opts) {
  var a__$1 = this;
  cljs.core._write(writer, "#object [cljs.core.Atom ");
  cljs.core.pr_writer(new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "val", "val", 128701612), a__$1.state], null), writer, opts);
  return cljs.core._write(writer, "]");
};
cljs.core.ValSeq.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.ValSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "(", " ", ")", opts, coll__$1);
};
cljs.core.RedNode.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.RedNode.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "[", " ", "]", opts, coll__$1);
};
cljs.core.PersistentVector.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.PersistentVector.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "[", " ", "]", opts, coll__$1);
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.PersistentQueueSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "(", " ", ")", opts, coll__$1);
};
cljs.core.EmptyList.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.EmptyList.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core._write(writer, "()");
};
cljs.core.LazyTransformer.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.LazyTransformer.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "(", " ", ")", opts, coll__$1);
};
cljs.core.PersistentQueue.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.PersistentQueue.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "#queue [", " ", "]", opts, cljs.core.seq(coll__$1));
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.PersistentArrayMap.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.print_map(coll__$1, cljs.core.pr_writer, writer, opts);
};
cljs.core.Range.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.Range.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "(", " ", ")", opts, coll__$1);
};
cljs.core.KeySeq.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.KeySeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "(", " ", ")", opts, coll__$1);
};
cljs.core.List.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.List.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
  var coll__$1 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "(", " ", ")", opts, coll__$1);
};
cljs.core.Symbol.prototype.cljs$core$IComparable$ = true;
cljs.core.Symbol.prototype.cljs$core$IComparable$_compare$arity$2 = function(x, y) {
  var x__$1 = this;
  if (y instanceof cljs.core.Symbol) {
    return cljs.core.compare_symbols(x__$1, y);
  } else {
    throw new Error([cljs.core.str("Cannot compare "), cljs.core.str(x__$1), cljs.core.str(" to "), cljs.core.str(y)].join(""));
  }
};
cljs.core.Keyword.prototype.cljs$core$IComparable$ = true;
cljs.core.Keyword.prototype.cljs$core$IComparable$_compare$arity$2 = function(x, y) {
  var x__$1 = this;
  if (y instanceof cljs.core.Keyword) {
    return cljs.core.compare_keywords(x__$1, y);
  } else {
    throw new Error([cljs.core.str("Cannot compare "), cljs.core.str(x__$1), cljs.core.str(" to "), cljs.core.str(y)].join(""));
  }
};
cljs.core.Subvec.prototype.cljs$core$IComparable$ = true;
cljs.core.Subvec.prototype.cljs$core$IComparable$_compare$arity$2 = function(x, y) {
  var x__$1 = this;
  if (cljs.core.vector_QMARK_(y)) {
    return cljs.core.compare_indexed.cljs$core$IFn$_invoke$arity$2(x__$1, y);
  } else {
    throw new Error([cljs.core.str("Cannot compare "), cljs.core.str(x__$1), cljs.core.str(" to "), cljs.core.str(y)].join(""));
  }
};
cljs.core.PersistentVector.prototype.cljs$core$IComparable$ = true;
cljs.core.PersistentVector.prototype.cljs$core$IComparable$_compare$arity$2 = function(x, y) {
  var x__$1 = this;
  if (cljs.core.vector_QMARK_(y)) {
    return cljs.core.compare_indexed.cljs$core$IFn$_invoke$arity$2(x__$1, y);
  } else {
    throw new Error([cljs.core.str("Cannot compare "), cljs.core.str(x__$1), cljs.core.str(" to "), cljs.core.str(y)].join(""));
  }
};
cljs.core.alter_meta_BANG_ = function cljs$core$alter_meta_BANG_(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___10868 = arguments.length;
  var i__7199__auto___10869 = 0;
  while (true) {
    if (i__7199__auto___10869 < len__7198__auto___10868) {
      args__7205__auto__.push(arguments[i__7199__auto___10869]);
      var G__10870 = i__7199__auto___10869 + 1;
      i__7199__auto___10869 = G__10870;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 2 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(2), 0) : null;
  return cljs.core.alter_meta_BANG_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7206__auto__);
};
cljs.core.alter_meta_BANG_.cljs$core$IFn$_invoke$arity$variadic = function(iref, f, args) {
  return iref.meta = cljs.core.apply.cljs$core$IFn$_invoke$arity$3(f, iref.meta, args);
};
cljs.core.alter_meta_BANG_.cljs$lang$maxFixedArity = 2;
cljs.core.alter_meta_BANG_.cljs$lang$applyTo = function(seq10865) {
  var G__10866 = cljs.core.first(seq10865);
  var seq10865__$1 = cljs.core.next(seq10865);
  var G__10867 = cljs.core.first(seq10865__$1);
  var seq10865__$2 = cljs.core.next(seq10865__$1);
  return cljs.core.alter_meta_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__10866, G__10867, seq10865__$2);
};
cljs.core.reset_meta_BANG_ = function cljs$core$reset_meta_BANG_(iref, m) {
  return iref.meta = m;
};
cljs.core.add_watch = function cljs$core$add_watch(iref, key, f) {
  cljs.core._add_watch(iref, key, f);
  return iref;
};
cljs.core.remove_watch = function cljs$core$remove_watch(iref, key) {
  cljs.core._remove_watch(iref, key);
  return iref;
};
cljs.core.gensym_counter = null;
cljs.core.gensym = function cljs$core$gensym(var_args) {
  var args10871 = [];
  var len__7198__auto___10874 = arguments.length;
  var i__7199__auto___10875 = 0;
  while (true) {
    if (i__7199__auto___10875 < len__7198__auto___10874) {
      args10871.push(arguments[i__7199__auto___10875]);
      var G__10876 = i__7199__auto___10875 + 1;
      i__7199__auto___10875 = G__10876;
      continue;
    } else {
    }
    break;
  }
  var G__10873 = args10871.length;
  switch(G__10873) {
    case 0:
      return cljs.core.gensym.cljs$core$IFn$_invoke$arity$0();
      break;
    case 1:
      return cljs.core.gensym.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10871.length)].join(""));;
  }
};
cljs.core.gensym.cljs$core$IFn$_invoke$arity$0 = function() {
  return cljs.core.gensym.cljs$core$IFn$_invoke$arity$1("G__");
};
cljs.core.gensym.cljs$core$IFn$_invoke$arity$1 = function(prefix_string) {
  if (cljs.core.gensym_counter == null) {
    cljs.core.gensym_counter = cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(0) : cljs.core.atom.call(null, 0);
  } else {
  }
  return cljs.core.symbol.cljs$core$IFn$_invoke$arity$1([cljs.core.str(prefix_string), cljs.core.str(cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(cljs.core.gensym_counter, cljs.core.inc))].join(""));
};
cljs.core.gensym.cljs$lang$maxFixedArity = 1;
cljs.core.fixture1 = 1;
cljs.core.fixture2 = 2;
cljs.core.Delay = function(f, value) {
  this.f = f;
  this.value = value;
  this.cljs$lang$protocol_mask$partition0$ = 32768;
  this.cljs$lang$protocol_mask$partition1$ = 1;
};
cljs.core.Delay.prototype.cljs$core$IDeref$_deref$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  if (cljs.core.truth_(self__.f)) {
    self__.value = self__.f.cljs$core$IFn$_invoke$arity$0 ? self__.f.cljs$core$IFn$_invoke$arity$0() : self__.f.call(null);
    self__.f = null;
  } else {
  }
  return self__.value;
};
cljs.core.Delay.prototype.cljs$core$IPending$_realized_QMARK_$arity$1 = function(x) {
  var self__ = this;
  var x__$1 = this;
  return cljs.core.not(self__.f);
};
cljs.core.Delay.getBasis = function() {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "f", "f", 43394975, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null)), cljs.core.with_meta(new cljs.core.Symbol(null, "value", "value", 1946509744, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.Delay.cljs$lang$type = true;
cljs.core.Delay.cljs$lang$ctorStr = "cljs.core/Delay";
cljs.core.Delay.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/Delay");
};
cljs.core.__GT_Delay = function cljs$core$__GT_Delay(f, value) {
  return new cljs.core.Delay(f, value);
};
cljs.core.delay_QMARK_ = function cljs$core$delay_QMARK_(x) {
  return x instanceof cljs.core.Delay;
};
cljs.core.force = function cljs$core$force(x) {
  if (cljs.core.delay_QMARK_(x)) {
    return cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(x) : cljs.core.deref.call(null, x);
  } else {
    return x;
  }
};
cljs.core.realized_QMARK_ = function cljs$core$realized_QMARK_(x) {
  return cljs.core._realized_QMARK_(x);
};
cljs.core.preserving_reduced = function cljs$core$preserving_reduced(rf) {
  return function(p1__10878_SHARP_, p2__10879_SHARP_) {
    var ret = rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(p1__10878_SHARP_, p2__10879_SHARP_) : rf.call(null, p1__10878_SHARP_, p2__10879_SHARP_);
    if (cljs.core.reduced_QMARK_(ret)) {
      return cljs.core.reduced(ret);
    } else {
      return ret;
    }
  };
};
cljs.core.cat = function cljs$core$cat(rf) {
  var rf1 = cljs.core.preserving_reduced(rf);
  return function(rf1) {
    return function() {
      var G__10880 = null;
      var G__10880__0 = function() {
        return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
      };
      var G__10880__1 = function(result) {
        return rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null, result);
      };
      var G__10880__2 = function(result, input) {
        return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(rf1, result, input);
      };
      G__10880 = function(result, input) {
        switch(arguments.length) {
          case 0:
            return G__10880__0.call(this);
          case 1:
            return G__10880__1.call(this, result);
          case 2:
            return G__10880__2.call(this, result, input);
        }
        throw new Error("Invalid arity: " + arguments.length);
      };
      G__10880.cljs$core$IFn$_invoke$arity$0 = G__10880__0;
      G__10880.cljs$core$IFn$_invoke$arity$1 = G__10880__1;
      G__10880.cljs$core$IFn$_invoke$arity$2 = G__10880__2;
      return G__10880;
    }();
  }(rf1);
};
cljs.core.dedupe = function cljs$core$dedupe(var_args) {
  var args10881 = [];
  var len__7198__auto___10884 = arguments.length;
  var i__7199__auto___10885 = 0;
  while (true) {
    if (i__7199__auto___10885 < len__7198__auto___10884) {
      args10881.push(arguments[i__7199__auto___10885]);
      var G__10886 = i__7199__auto___10885 + 1;
      i__7199__auto___10885 = G__10886;
      continue;
    } else {
    }
    break;
  }
  var G__10883 = args10881.length;
  switch(G__10883) {
    case 0:
      return cljs.core.dedupe.cljs$core$IFn$_invoke$arity$0();
      break;
    case 1:
      return cljs.core.dedupe.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10881.length)].join(""));;
  }
};
cljs.core.dedupe.cljs$core$IFn$_invoke$arity$0 = function() {
  return function(rf) {
    var pa = cljs.core.volatile_BANG_(new cljs.core.Keyword("cljs.core", "none", "cljs.core/none", 926646439));
    return function(pa) {
      return function() {
        var G__10888 = null;
        var G__10888__0 = function() {
          return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
        };
        var G__10888__1 = function(result) {
          return rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null, result);
        };
        var G__10888__2 = function(result, input) {
          var prior = cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(pa) : cljs.core.deref.call(null, pa);
          cljs.core.vreset_BANG_(pa, input);
          if (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(prior, input)) {
            return result;
          } else {
            return rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result, input) : rf.call(null, result, input);
          }
        };
        G__10888 = function(result, input) {
          switch(arguments.length) {
            case 0:
              return G__10888__0.call(this);
            case 1:
              return G__10888__1.call(this, result);
            case 2:
              return G__10888__2.call(this, result, input);
          }
          throw new Error("Invalid arity: " + arguments.length);
        };
        G__10888.cljs$core$IFn$_invoke$arity$0 = G__10888__0;
        G__10888.cljs$core$IFn$_invoke$arity$1 = G__10888__1;
        G__10888.cljs$core$IFn$_invoke$arity$2 = G__10888__2;
        return G__10888;
      }();
    }(pa);
  };
};
cljs.core.dedupe.cljs$core$IFn$_invoke$arity$1 = function(coll) {
  return cljs.core.sequence.cljs$core$IFn$_invoke$arity$2(cljs.core.dedupe.cljs$core$IFn$_invoke$arity$0(), coll);
};
cljs.core.dedupe.cljs$lang$maxFixedArity = 1;
cljs.core.random_sample = function cljs$core$random_sample(var_args) {
  var args10889 = [];
  var len__7198__auto___10892 = arguments.length;
  var i__7199__auto___10893 = 0;
  while (true) {
    if (i__7199__auto___10893 < len__7198__auto___10892) {
      args10889.push(arguments[i__7199__auto___10893]);
      var G__10894 = i__7199__auto___10893 + 1;
      i__7199__auto___10893 = G__10894;
      continue;
    } else {
    }
    break;
  }
  var G__10891 = args10889.length;
  switch(G__10891) {
    case 1:
      return cljs.core.random_sample.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.random_sample.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10889.length)].join(""));;
  }
};
cljs.core.random_sample.cljs$core$IFn$_invoke$arity$1 = function(prob) {
  return cljs.core.filter.cljs$core$IFn$_invoke$arity$1(function(_) {
    return (cljs.core.rand.cljs$core$IFn$_invoke$arity$0 ? cljs.core.rand.cljs$core$IFn$_invoke$arity$0() : cljs.core.rand.call(null)) < prob;
  });
};
cljs.core.random_sample.cljs$core$IFn$_invoke$arity$2 = function(prob, coll) {
  return cljs.core.filter.cljs$core$IFn$_invoke$arity$2(function(_) {
    return (cljs.core.rand.cljs$core$IFn$_invoke$arity$0 ? cljs.core.rand.cljs$core$IFn$_invoke$arity$0() : cljs.core.rand.call(null)) < prob;
  }, coll);
};
cljs.core.random_sample.cljs$lang$maxFixedArity = 2;
cljs.core.Eduction = function(xform, coll) {
  this.xform = xform;
  this.coll = coll;
  this.cljs$lang$protocol_mask$partition0$ = 2173173760;
  this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.Eduction.prototype.cljs$core$ISeqable$_seq$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return cljs.core.seq(cljs.core.sequence.cljs$core$IFn$_invoke$arity$2(self__.xform, self__.coll));
};
cljs.core.Eduction.prototype.cljs$core$IReduce$_reduce$arity$2 = function(_, f) {
  var self__ = this;
  var ___$1 = this;
  return cljs.core.transduce.cljs$core$IFn$_invoke$arity$3(self__.xform, cljs.core.completing.cljs$core$IFn$_invoke$arity$1(f), self__.coll);
};
cljs.core.Eduction.prototype.cljs$core$IReduce$_reduce$arity$3 = function(_, f, init) {
  var self__ = this;
  var ___$1 = this;
  return cljs.core.transduce.cljs$core$IFn$_invoke$arity$4(self__.xform, cljs.core.completing.cljs$core$IFn$_invoke$arity$1(f), init, self__.coll);
};
cljs.core.Eduction.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll__$1, writer, opts) {
  var self__ = this;
  var coll__$2 = this;
  return cljs.core.pr_sequential_writer(writer, cljs.core.pr_writer, "(", " ", ")", opts, coll__$2);
};
cljs.core.Eduction.getBasis = function() {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "xform", "xform", -85179481, null), new cljs.core.Symbol(null, "coll", "coll", -1006698606, null)], null);
};
cljs.core.Eduction.cljs$lang$type = true;
cljs.core.Eduction.cljs$lang$ctorStr = "cljs.core/Eduction";
cljs.core.Eduction.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/Eduction");
};
cljs.core.__GT_Eduction = function cljs$core$__GT_Eduction(xform, coll) {
  return new cljs.core.Eduction(xform, coll);
};
cljs.core.Eduction.prototype[cljs.core.ITER_SYMBOL] = function() {
  var this__7134__auto__ = this;
  return cljs.core.es6_iterator(this__7134__auto__);
};
cljs.core.eduction = function cljs$core$eduction(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___10897 = arguments.length;
  var i__7199__auto___10898 = 0;
  while (true) {
    if (i__7199__auto___10898 < len__7198__auto___10897) {
      args__7205__auto__.push(arguments[i__7199__auto___10898]);
      var G__10899 = i__7199__auto___10898 + 1;
      i__7199__auto___10898 = G__10899;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return cljs.core.eduction.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
cljs.core.eduction.cljs$core$IFn$_invoke$arity$variadic = function(xforms) {
  return new cljs.core.Eduction(cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.comp, cljs.core.butlast(xforms)), cljs.core.last(xforms));
};
cljs.core.eduction.cljs$lang$maxFixedArity = 0;
cljs.core.eduction.cljs$lang$applyTo = function(seq10896) {
  return cljs.core.eduction.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq10896));
};
cljs.core.run_BANG_ = function cljs$core$run_BANG_(proc, coll) {
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(p1__10901_SHARP_, p2__10900_SHARP_) {
    return proc.cljs$core$IFn$_invoke$arity$1 ? proc.cljs$core$IFn$_invoke$arity$1(p2__10900_SHARP_) : proc.call(null, p2__10900_SHARP_);
  }, null, coll);
};
cljs.core.IEncodeJS = function() {
};
cljs.core._clj__GT_js = function cljs$core$_clj__GT_js(x) {
  if (!(x == null) && !(x.cljs$core$IEncodeJS$_clj__GT_js$arity$1 == null)) {
    return x.cljs$core$IEncodeJS$_clj__GT_js$arity$1(x);
  } else {
    var x__6795__auto__ = x == null ? null : x;
    var m__6796__auto__ = cljs.core._clj__GT_js[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(x) : m__6796__auto__.call(null, x);
    } else {
      var m__6796__auto____$1 = cljs.core._clj__GT_js["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(x) : m__6796__auto____$1.call(null, x);
      } else {
        throw cljs.core.missing_protocol("IEncodeJS.-clj-\x3ejs", x);
      }
    }
  }
};
cljs.core._key__GT_js = function cljs$core$_key__GT_js(x) {
  if (!(x == null) && !(x.cljs$core$IEncodeJS$_key__GT_js$arity$1 == null)) {
    return x.cljs$core$IEncodeJS$_key__GT_js$arity$1(x);
  } else {
    var x__6795__auto__ = x == null ? null : x;
    var m__6796__auto__ = cljs.core._key__GT_js[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(x) : m__6796__auto__.call(null, x);
    } else {
      var m__6796__auto____$1 = cljs.core._key__GT_js["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(x) : m__6796__auto____$1.call(null, x);
      } else {
        throw cljs.core.missing_protocol("IEncodeJS.-key-\x3ejs", x);
      }
    }
  }
};
cljs.core.key__GT_js = function cljs$core$key__GT_js(k) {
  if (!(k == null) ? false || k.cljs$core$IEncodeJS$ ? true : !k.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_(cljs.core.IEncodeJS, k) : false : cljs.core.native_satisfies_QMARK_(cljs.core.IEncodeJS, k)) {
    return cljs.core._clj__GT_js(k);
  } else {
    if (typeof k === "string" || typeof k === "number" || k instanceof cljs.core.Keyword || k instanceof cljs.core.Symbol) {
      return cljs.core.clj__GT_js.cljs$core$IFn$_invoke$arity$1 ? cljs.core.clj__GT_js.cljs$core$IFn$_invoke$arity$1(k) : cljs.core.clj__GT_js.call(null, k);
    } else {
      return cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.array_seq([k], 0));
    }
  }
};
cljs.core.clj__GT_js = function cljs$core$clj__GT_js(x) {
  if (x == null) {
    return null;
  } else {
    if (!(x == null) ? false || x.cljs$core$IEncodeJS$ ? true : !x.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_(cljs.core.IEncodeJS, x) : false : cljs.core.native_satisfies_QMARK_(cljs.core.IEncodeJS, x)) {
      return cljs.core._clj__GT_js(x);
    } else {
      if (x instanceof cljs.core.Keyword) {
        return cljs.core.name(x);
      } else {
        if (x instanceof cljs.core.Symbol) {
          return [cljs.core.str(x)].join("");
        } else {
          if (cljs.core.map_QMARK_(x)) {
            var m = {};
            var seq__10920_10930 = cljs.core.seq(x);
            var chunk__10921_10931 = null;
            var count__10922_10932 = 0;
            var i__10923_10933 = 0;
            while (true) {
              if (i__10923_10933 < count__10922_10932) {
                var vec__10924_10934 = chunk__10921_10931.cljs$core$IIndexed$_nth$arity$2(null, i__10923_10933);
                var k_10935 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10924_10934, 0, null);
                var v_10936 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10924_10934, 1, null);
                m[cljs.core.key__GT_js(k_10935)] = cljs$core$clj__GT_js(v_10936);
                var G__10937 = seq__10920_10930;
                var G__10938 = chunk__10921_10931;
                var G__10939 = count__10922_10932;
                var G__10940 = i__10923_10933 + 1;
                seq__10920_10930 = G__10937;
                chunk__10921_10931 = G__10938;
                count__10922_10932 = G__10939;
                i__10923_10933 = G__10940;
                continue;
              } else {
                var temp__4425__auto___10941 = cljs.core.seq(seq__10920_10930);
                if (temp__4425__auto___10941) {
                  var seq__10920_10942__$1 = temp__4425__auto___10941;
                  if (cljs.core.chunked_seq_QMARK_(seq__10920_10942__$1)) {
                    var c__6943__auto___10943 = cljs.core.chunk_first(seq__10920_10942__$1);
                    var G__10944 = cljs.core.chunk_rest(seq__10920_10942__$1);
                    var G__10945 = c__6943__auto___10943;
                    var G__10946 = cljs.core.count(c__6943__auto___10943);
                    var G__10947 = 0;
                    seq__10920_10930 = G__10944;
                    chunk__10921_10931 = G__10945;
                    count__10922_10932 = G__10946;
                    i__10923_10933 = G__10947;
                    continue;
                  } else {
                    var vec__10925_10948 = cljs.core.first(seq__10920_10942__$1);
                    var k_10949 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10925_10948, 0, null);
                    var v_10950 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__10925_10948, 1, null);
                    m[cljs.core.key__GT_js(k_10949)] = cljs$core$clj__GT_js(v_10950);
                    var G__10951 = cljs.core.next(seq__10920_10942__$1);
                    var G__10952 = null;
                    var G__10953 = 0;
                    var G__10954 = 0;
                    seq__10920_10930 = G__10951;
                    chunk__10921_10931 = G__10952;
                    count__10922_10932 = G__10953;
                    i__10923_10933 = G__10954;
                    continue;
                  }
                } else {
                }
              }
              break;
            }
            return m;
          } else {
            if (cljs.core.coll_QMARK_(x)) {
              var arr = [];
              var seq__10926_10955 = cljs.core.seq(cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs$core$clj__GT_js, x));
              var chunk__10927_10956 = null;
              var count__10928_10957 = 0;
              var i__10929_10958 = 0;
              while (true) {
                if (i__10929_10958 < count__10928_10957) {
                  var x_10959__$1 = chunk__10927_10956.cljs$core$IIndexed$_nth$arity$2(null, i__10929_10958);
                  arr.push(x_10959__$1);
                  var G__10960 = seq__10926_10955;
                  var G__10961 = chunk__10927_10956;
                  var G__10962 = count__10928_10957;
                  var G__10963 = i__10929_10958 + 1;
                  seq__10926_10955 = G__10960;
                  chunk__10927_10956 = G__10961;
                  count__10928_10957 = G__10962;
                  i__10929_10958 = G__10963;
                  continue;
                } else {
                  var temp__4425__auto___10964 = cljs.core.seq(seq__10926_10955);
                  if (temp__4425__auto___10964) {
                    var seq__10926_10965__$1 = temp__4425__auto___10964;
                    if (cljs.core.chunked_seq_QMARK_(seq__10926_10965__$1)) {
                      var c__6943__auto___10966 = cljs.core.chunk_first(seq__10926_10965__$1);
                      var G__10967 = cljs.core.chunk_rest(seq__10926_10965__$1);
                      var G__10968 = c__6943__auto___10966;
                      var G__10969 = cljs.core.count(c__6943__auto___10966);
                      var G__10970 = 0;
                      seq__10926_10955 = G__10967;
                      chunk__10927_10956 = G__10968;
                      count__10928_10957 = G__10969;
                      i__10929_10958 = G__10970;
                      continue;
                    } else {
                      var x_10971__$1 = cljs.core.first(seq__10926_10965__$1);
                      arr.push(x_10971__$1);
                      var G__10972 = cljs.core.next(seq__10926_10965__$1);
                      var G__10973 = null;
                      var G__10974 = 0;
                      var G__10975 = 0;
                      seq__10926_10955 = G__10972;
                      chunk__10927_10956 = G__10973;
                      count__10928_10957 = G__10974;
                      i__10929_10958 = G__10975;
                      continue;
                    }
                  } else {
                  }
                }
                break;
              }
              return arr;
            } else {
              return x;
            }
          }
        }
      }
    }
  }
};
cljs.core.IEncodeClojure = function() {
};
cljs.core._js__GT_clj = function cljs$core$_js__GT_clj(x, options) {
  if (!(x == null) && !(x.cljs$core$IEncodeClojure$_js__GT_clj$arity$2 == null)) {
    return x.cljs$core$IEncodeClojure$_js__GT_clj$arity$2(x, options);
  } else {
    var x__6795__auto__ = x == null ? null : x;
    var m__6796__auto__ = cljs.core._js__GT_clj[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(x, options) : m__6796__auto__.call(null, x, options);
    } else {
      var m__6796__auto____$1 = cljs.core._js__GT_clj["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(x, options) : m__6796__auto____$1.call(null, x, options);
      } else {
        throw cljs.core.missing_protocol("IEncodeClojure.-js-\x3eclj", x);
      }
    }
  }
};
cljs.core.js__GT_clj = function cljs$core$js__GT_clj(var_args) {
  var args10976 = [];
  var len__7198__auto___11001 = arguments.length;
  var i__7199__auto___11002 = 0;
  while (true) {
    if (i__7199__auto___11002 < len__7198__auto___11001) {
      args10976.push(arguments[i__7199__auto___11002]);
      var G__11003 = i__7199__auto___11002 + 1;
      i__7199__auto___11002 = G__11003;
      continue;
    } else {
    }
    break;
  }
  var G__10980 = args10976.length;
  switch(G__10980) {
    case 1:
      return cljs.core.js__GT_clj.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args10976.slice(1), 0);
      return cljs.core.js__GT_clj.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7217__auto__);
  }
};
cljs.core.js__GT_clj.cljs$core$IFn$_invoke$arity$1 = function(x) {
  return cljs.core.js__GT_clj.cljs$core$IFn$_invoke$arity$variadic(x, cljs.core.array_seq([new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 1310784252), false], null)], 0));
};
cljs.core.js__GT_clj.cljs$core$IFn$_invoke$arity$variadic = function(x, opts) {
  var map__10981 = opts;
  var map__10981__$1 = (!(map__10981 == null) ? map__10981.cljs$lang$protocol_mask$partition0$ & 64 || map__10981.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map, map__10981) : map__10981;
  var keywordize_keys = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__10981__$1, new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 1310784252));
  var keyfn = cljs.core.truth_(keywordize_keys) ? cljs.core.keyword : cljs.core.str;
  var f = function(map__10981, map__10981__$1, keywordize_keys, keyfn) {
    return function cljs$core$thisfn(x__$1) {
      if (!(x__$1 == null) ? false || x__$1.cljs$core$IEncodeClojure$ ? true : !x__$1.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_(cljs.core.IEncodeClojure, x__$1) : false : cljs.core.native_satisfies_QMARK_(cljs.core.IEncodeClojure, x__$1)) {
        return cljs.core._js__GT_clj(x__$1, cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.array_map, opts));
      } else {
        if (cljs.core.seq_QMARK_(x__$1)) {
          return cljs.core.doall.cljs$core$IFn$_invoke$arity$1(cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs$core$thisfn, x__$1));
        } else {
          if (cljs.core.coll_QMARK_(x__$1)) {
            return cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.empty(x__$1), cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs$core$thisfn, x__$1));
          } else {
            if (cljs.core.array_QMARK_(x__$1)) {
              return cljs.core.vec(cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs$core$thisfn, x__$1));
            } else {
              if (cljs.core.type(x__$1) === Object) {
                return cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentArrayMap.EMPTY, function() {
                  var iter__6912__auto__ = function(map__10981, map__10981__$1, keywordize_keys, keyfn) {
                    return function cljs$core$thisfn_$_iter__10995(s__10996) {
                      return new cljs.core.LazySeq(null, function(map__10981, map__10981__$1, keywordize_keys, keyfn) {
                        return function() {
                          var s__10996__$1 = s__10996;
                          while (true) {
                            var temp__4425__auto__ = cljs.core.seq(s__10996__$1);
                            if (temp__4425__auto__) {
                              var s__10996__$2 = temp__4425__auto__;
                              if (cljs.core.chunked_seq_QMARK_(s__10996__$2)) {
                                var c__6910__auto__ = cljs.core.chunk_first(s__10996__$2);
                                var size__6911__auto__ = cljs.core.count(c__6910__auto__);
                                var b__10998 = cljs.core.chunk_buffer(size__6911__auto__);
                                if (function() {
                                  var i__10997 = 0;
                                  while (true) {
                                    if (i__10997 < size__6911__auto__) {
                                      var k = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(c__6910__auto__, i__10997);
                                      cljs.core.chunk_append(b__10998, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [keyfn.cljs$core$IFn$_invoke$arity$1 ? keyfn.cljs$core$IFn$_invoke$arity$1(k) : keyfn.call(null, k), cljs$core$thisfn(x__$1[k])], null));
                                      var G__11005 = i__10997 + 1;
                                      i__10997 = G__11005;
                                      continue;
                                    } else {
                                      return true;
                                    }
                                    break;
                                  }
                                }()) {
                                  return cljs.core.chunk_cons(cljs.core.chunk(b__10998), cljs$core$thisfn_$_iter__10995(cljs.core.chunk_rest(s__10996__$2)));
                                } else {
                                  return cljs.core.chunk_cons(cljs.core.chunk(b__10998), null);
                                }
                              } else {
                                var k = cljs.core.first(s__10996__$2);
                                return cljs.core.cons(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [keyfn.cljs$core$IFn$_invoke$arity$1 ? keyfn.cljs$core$IFn$_invoke$arity$1(k) : keyfn.call(null, k), cljs$core$thisfn(x__$1[k])], null), cljs$core$thisfn_$_iter__10995(cljs.core.rest(s__10996__$2)));
                              }
                            } else {
                              return null;
                            }
                            break;
                          }
                        };
                      }(map__10981, map__10981__$1, keywordize_keys, keyfn), null, null);
                    };
                  }(map__10981, map__10981__$1, keywordize_keys, keyfn);
                  return iter__6912__auto__(cljs.core.js_keys(x__$1));
                }());
              } else {
                return x__$1;
              }
            }
          }
        }
      }
    };
  }(map__10981, map__10981__$1, keywordize_keys, keyfn);
  return f(x);
};
cljs.core.js__GT_clj.cljs$lang$applyTo = function(seq10977) {
  var G__10978 = cljs.core.first(seq10977);
  var seq10977__$1 = cljs.core.next(seq10977);
  return cljs.core.js__GT_clj.cljs$core$IFn$_invoke$arity$variadic(G__10978, seq10977__$1);
};
cljs.core.js__GT_clj.cljs$lang$maxFixedArity = 1;
cljs.core.memoize = function cljs$core$memoize(f) {
  var mem = function() {
    var G__11007 = cljs.core.PersistentArrayMap.EMPTY;
    return cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__11007) : cljs.core.atom.call(null, G__11007);
  }();
  return function(mem) {
    return function() {
      var G__11008__delegate = function(args) {
        var v = cljs.core.get.cljs$core$IFn$_invoke$arity$3(cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(mem) : cljs.core.deref.call(null, mem), args, cljs.core.lookup_sentinel);
        if (v === cljs.core.lookup_sentinel) {
          var ret = cljs.core.apply.cljs$core$IFn$_invoke$arity$2(f, args);
          cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4(mem, cljs.core.assoc, args, ret);
          return ret;
        } else {
          return v;
        }
      };
      var G__11008 = function(var_args) {
        var args = null;
        if (arguments.length > 0) {
          var G__11009__i = 0, G__11009__a = new Array(arguments.length - 0);
          while (G__11009__i < G__11009__a.length) {
            G__11009__a[G__11009__i] = arguments[G__11009__i + 0];
            ++G__11009__i;
          }
          args = new cljs.core.IndexedSeq(G__11009__a, 0);
        }
        return G__11008__delegate.call(this, args);
      };
      G__11008.cljs$lang$maxFixedArity = 0;
      G__11008.cljs$lang$applyTo = function(arglist__11010) {
        var args = cljs.core.seq(arglist__11010);
        return G__11008__delegate(args);
      };
      G__11008.cljs$core$IFn$_invoke$arity$variadic = G__11008__delegate;
      return G__11008;
    }();
  }(mem);
};
cljs.core.trampoline = function cljs$core$trampoline(var_args) {
  var args11011 = [];
  var len__7198__auto___11016 = arguments.length;
  var i__7199__auto___11017 = 0;
  while (true) {
    if (i__7199__auto___11017 < len__7198__auto___11016) {
      args11011.push(arguments[i__7199__auto___11017]);
      var G__11018 = i__7199__auto___11017 + 1;
      i__7199__auto___11017 = G__11018;
      continue;
    } else {
    }
    break;
  }
  var G__11015 = args11011.length;
  switch(G__11015) {
    case 1:
      return cljs.core.trampoline.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args11011.slice(1), 0);
      return cljs.core.trampoline.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7217__auto__);
  }
};
cljs.core.trampoline.cljs$core$IFn$_invoke$arity$1 = function(f) {
  while (true) {
    var ret = f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null);
    if (cljs.core.fn_QMARK_(ret)) {
      var G__11020 = ret;
      f = G__11020;
      continue;
    } else {
      return ret;
    }
    break;
  }
};
cljs.core.trampoline.cljs$core$IFn$_invoke$arity$variadic = function(f, args) {
  return cljs.core.trampoline.cljs$core$IFn$_invoke$arity$1(function() {
    return cljs.core.apply.cljs$core$IFn$_invoke$arity$2(f, args);
  });
};
cljs.core.trampoline.cljs$lang$applyTo = function(seq11012) {
  var G__11013 = cljs.core.first(seq11012);
  var seq11012__$1 = cljs.core.next(seq11012);
  return cljs.core.trampoline.cljs$core$IFn$_invoke$arity$variadic(G__11013, seq11012__$1);
};
cljs.core.trampoline.cljs$lang$maxFixedArity = 1;
cljs.core.rand = function cljs$core$rand(var_args) {
  var args11021 = [];
  var len__7198__auto___11024 = arguments.length;
  var i__7199__auto___11025 = 0;
  while (true) {
    if (i__7199__auto___11025 < len__7198__auto___11024) {
      args11021.push(arguments[i__7199__auto___11025]);
      var G__11026 = i__7199__auto___11025 + 1;
      i__7199__auto___11025 = G__11026;
      continue;
    } else {
    }
    break;
  }
  var G__11023 = args11021.length;
  switch(G__11023) {
    case 0:
      return cljs.core.rand.cljs$core$IFn$_invoke$arity$0();
      break;
    case 1:
      return cljs.core.rand.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args11021.length)].join(""));;
  }
};
cljs.core.rand.cljs$core$IFn$_invoke$arity$0 = function() {
  return cljs.core.rand.cljs$core$IFn$_invoke$arity$1(1);
};
cljs.core.rand.cljs$core$IFn$_invoke$arity$1 = function(n) {
  return Math.random() * n;
};
cljs.core.rand.cljs$lang$maxFixedArity = 1;
cljs.core.rand_int = function cljs$core$rand_int(n) {
  var G__11029 = Math.random() * n;
  return Math.floor(G__11029);
};
cljs.core.rand_nth = function cljs$core$rand_nth(coll) {
  return cljs.core.nth.cljs$core$IFn$_invoke$arity$2(coll, cljs.core.rand_int(cljs.core.count(coll)));
};
cljs.core.group_by = function cljs$core$group_by(f, coll) {
  return cljs.core.persistent_BANG_(cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(ret, x) {
    var k = f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(x) : f.call(null, x);
    return cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(ret, k, cljs.core.conj.cljs$core$IFn$_invoke$arity$2(cljs.core.get.cljs$core$IFn$_invoke$arity$3(ret, k, cljs.core.PersistentVector.EMPTY), x));
  }, cljs.core.transient$(cljs.core.PersistentArrayMap.EMPTY), coll));
};
cljs.core.make_hierarchy = function cljs$core$make_hierarchy() {
  return new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "parents", "parents", -2027538891), cljs.core.PersistentArrayMap.EMPTY, new cljs.core.Keyword(null, "descendants", "descendants", 1824886031), cljs.core.PersistentArrayMap.EMPTY, new cljs.core.Keyword(null, "ancestors", "ancestors", -776045424), cljs.core.PersistentArrayMap.EMPTY], null);
};
cljs.core._global_hierarchy = null;
cljs.core.get_global_hierarchy = function cljs$core$get_global_hierarchy() {
  if (cljs.core._global_hierarchy == null) {
    cljs.core._global_hierarchy = function() {
      var G__11031 = cljs.core.make_hierarchy();
      return cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__11031) : cljs.core.atom.call(null, G__11031);
    }();
  } else {
  }
  return cljs.core._global_hierarchy;
};
cljs.core.swap_global_hierarchy_BANG_ = function cljs$core$swap_global_hierarchy_BANG_(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___11034 = arguments.length;
  var i__7199__auto___11035 = 0;
  while (true) {
    if (i__7199__auto___11035 < len__7198__auto___11034) {
      args__7205__auto__.push(arguments[i__7199__auto___11035]);
      var G__11036 = i__7199__auto___11035 + 1;
      i__7199__auto___11035 = G__11036;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return cljs.core.swap_global_hierarchy_BANG_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
cljs.core.swap_global_hierarchy_BANG_.cljs$core$IFn$_invoke$arity$variadic = function(f, args) {
  return cljs.core.apply.cljs$core$IFn$_invoke$arity$4(cljs.core.swap_BANG_, cljs.core.get_global_hierarchy(), f, args);
};
cljs.core.swap_global_hierarchy_BANG_.cljs$lang$maxFixedArity = 1;
cljs.core.swap_global_hierarchy_BANG_.cljs$lang$applyTo = function(seq11032) {
  var G__11033 = cljs.core.first(seq11032);
  var seq11032__$1 = cljs.core.next(seq11032);
  return cljs.core.swap_global_hierarchy_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__11033, seq11032__$1);
};
cljs.core.isa_QMARK_ = function cljs$core$isa_QMARK_(var_args) {
  var args11037 = [];
  var len__7198__auto___11041 = arguments.length;
  var i__7199__auto___11042 = 0;
  while (true) {
    if (i__7199__auto___11042 < len__7198__auto___11041) {
      args11037.push(arguments[i__7199__auto___11042]);
      var G__11043 = i__7199__auto___11042 + 1;
      i__7199__auto___11042 = G__11043;
      continue;
    } else {
    }
    break;
  }
  var G__11039 = args11037.length;
  switch(G__11039) {
    case 2:
      return cljs.core.isa_QMARK_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.isa_QMARK_.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args11037.length)].join(""));;
  }
};
cljs.core.isa_QMARK_.cljs$core$IFn$_invoke$arity$2 = function(child, parent) {
  return cljs.core.isa_QMARK_.cljs$core$IFn$_invoke$arity$3(function() {
    var G__11040 = cljs.core.get_global_hierarchy();
    return cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(G__11040) : cljs.core.deref.call(null, G__11040);
  }(), child, parent);
};
cljs.core.isa_QMARK_.cljs$core$IFn$_invoke$arity$3 = function(h, child, parent) {
  var or__6140__auto__ = cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(child, parent);
  if (or__6140__auto__) {
    return or__6140__auto__;
  } else {
    var or__6140__auto____$1 = cljs.core.contains_QMARK_((new cljs.core.Keyword(null, "ancestors", "ancestors", -776045424)).cljs$core$IFn$_invoke$arity$1(h).call(null, child), parent);
    if (or__6140__auto____$1) {
      return or__6140__auto____$1;
    } else {
      var and__6128__auto__ = cljs.core.vector_QMARK_(parent);
      if (and__6128__auto__) {
        var and__6128__auto____$1 = cljs.core.vector_QMARK_(child);
        if (and__6128__auto____$1) {
          var and__6128__auto____$2 = cljs.core.count(parent) === cljs.core.count(child);
          if (and__6128__auto____$2) {
            var ret = true;
            var i = 0;
            while (true) {
              if (!ret || i === cljs.core.count(parent)) {
                return ret;
              } else {
                var G__11045 = cljs.core.isa_QMARK_.cljs$core$IFn$_invoke$arity$3(h, child.cljs$core$IFn$_invoke$arity$1 ? child.cljs$core$IFn$_invoke$arity$1(i) : child.call(null, i), parent.cljs$core$IFn$_invoke$arity$1 ? parent.cljs$core$IFn$_invoke$arity$1(i) : parent.call(null, i));
                var G__11046 = i + 1;
                ret = G__11045;
                i = G__11046;
                continue;
              }
              break;
            }
          } else {
            return and__6128__auto____$2;
          }
        } else {
          return and__6128__auto____$1;
        }
      } else {
        return and__6128__auto__;
      }
    }
  }
};
cljs.core.isa_QMARK_.cljs$lang$maxFixedArity = 3;
cljs.core.parents = function cljs$core$parents(var_args) {
  var args11047 = [];
  var len__7198__auto___11051 = arguments.length;
  var i__7199__auto___11052 = 0;
  while (true) {
    if (i__7199__auto___11052 < len__7198__auto___11051) {
      args11047.push(arguments[i__7199__auto___11052]);
      var G__11053 = i__7199__auto___11052 + 1;
      i__7199__auto___11052 = G__11053;
      continue;
    } else {
    }
    break;
  }
  var G__11049 = args11047.length;
  switch(G__11049) {
    case 1:
      return cljs.core.parents.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.parents.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args11047.length)].join(""));;
  }
};
cljs.core.parents.cljs$core$IFn$_invoke$arity$1 = function(tag) {
  return cljs.core.parents.cljs$core$IFn$_invoke$arity$2(function() {
    var G__11050 = cljs.core.get_global_hierarchy();
    return cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(G__11050) : cljs.core.deref.call(null, G__11050);
  }(), tag);
};
cljs.core.parents.cljs$core$IFn$_invoke$arity$2 = function(h, tag) {
  return cljs.core.not_empty(cljs.core.get.cljs$core$IFn$_invoke$arity$2((new cljs.core.Keyword(null, "parents", "parents", -2027538891)).cljs$core$IFn$_invoke$arity$1(h), tag));
};
cljs.core.parents.cljs$lang$maxFixedArity = 2;
cljs.core.ancestors = function cljs$core$ancestors(var_args) {
  var args11055 = [];
  var len__7198__auto___11059 = arguments.length;
  var i__7199__auto___11060 = 0;
  while (true) {
    if (i__7199__auto___11060 < len__7198__auto___11059) {
      args11055.push(arguments[i__7199__auto___11060]);
      var G__11061 = i__7199__auto___11060 + 1;
      i__7199__auto___11060 = G__11061;
      continue;
    } else {
    }
    break;
  }
  var G__11057 = args11055.length;
  switch(G__11057) {
    case 1:
      return cljs.core.ancestors.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.ancestors.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args11055.length)].join(""));;
  }
};
cljs.core.ancestors.cljs$core$IFn$_invoke$arity$1 = function(tag) {
  return cljs.core.ancestors.cljs$core$IFn$_invoke$arity$2(function() {
    var G__11058 = cljs.core.get_global_hierarchy();
    return cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(G__11058) : cljs.core.deref.call(null, G__11058);
  }(), tag);
};
cljs.core.ancestors.cljs$core$IFn$_invoke$arity$2 = function(h, tag) {
  return cljs.core.not_empty(cljs.core.get.cljs$core$IFn$_invoke$arity$2((new cljs.core.Keyword(null, "ancestors", "ancestors", -776045424)).cljs$core$IFn$_invoke$arity$1(h), tag));
};
cljs.core.ancestors.cljs$lang$maxFixedArity = 2;
cljs.core.descendants = function cljs$core$descendants(var_args) {
  var args11063 = [];
  var len__7198__auto___11067 = arguments.length;
  var i__7199__auto___11068 = 0;
  while (true) {
    if (i__7199__auto___11068 < len__7198__auto___11067) {
      args11063.push(arguments[i__7199__auto___11068]);
      var G__11069 = i__7199__auto___11068 + 1;
      i__7199__auto___11068 = G__11069;
      continue;
    } else {
    }
    break;
  }
  var G__11065 = args11063.length;
  switch(G__11065) {
    case 1:
      return cljs.core.descendants.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.descendants.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args11063.length)].join(""));;
  }
};
cljs.core.descendants.cljs$core$IFn$_invoke$arity$1 = function(tag) {
  return cljs.core.descendants.cljs$core$IFn$_invoke$arity$2(function() {
    var G__11066 = cljs.core.get_global_hierarchy();
    return cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(G__11066) : cljs.core.deref.call(null, G__11066);
  }(), tag);
};
cljs.core.descendants.cljs$core$IFn$_invoke$arity$2 = function(h, tag) {
  return cljs.core.not_empty(cljs.core.get.cljs$core$IFn$_invoke$arity$2((new cljs.core.Keyword(null, "descendants", "descendants", 1824886031)).cljs$core$IFn$_invoke$arity$1(h), tag));
};
cljs.core.descendants.cljs$lang$maxFixedArity = 2;
cljs.core.derive = function cljs$core$derive(var_args) {
  var args11071 = [];
  var len__7198__auto___11074 = arguments.length;
  var i__7199__auto___11075 = 0;
  while (true) {
    if (i__7199__auto___11075 < len__7198__auto___11074) {
      args11071.push(arguments[i__7199__auto___11075]);
      var G__11076 = i__7199__auto___11075 + 1;
      i__7199__auto___11075 = G__11076;
      continue;
    } else {
    }
    break;
  }
  var G__11073 = args11071.length;
  switch(G__11073) {
    case 2:
      return cljs.core.derive.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.derive.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args11071.length)].join(""));;
  }
};
cljs.core.derive.cljs$core$IFn$_invoke$arity$2 = function(tag, parent) {
  if (cljs.core.truth_(cljs.core.namespace(parent))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.array_seq([cljs.core.list(new cljs.core.Symbol(null, "namespace", "namespace", 1263021155, null), new cljs.core.Symbol(null, "parent", "parent", 761652748, null))], 0)))].join(""));
  }
  cljs.core.swap_global_hierarchy_BANG_.cljs$core$IFn$_invoke$arity$variadic(cljs.core.derive, cljs.core.array_seq([tag, parent], 0));
  return null;
};
cljs.core.derive.cljs$core$IFn$_invoke$arity$3 = function(h, tag, parent) {
  if (cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$2(tag, parent)) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.array_seq([cljs.core.list(new cljs.core.Symbol(null, "not\x3d", "not\x3d", 1466536204, null), new cljs.core.Symbol(null, "tag", "tag", 350170304, null), new cljs.core.Symbol(null, "parent", "parent", 761652748, null))], 0)))].join(""));
  }
  var tp = (new cljs.core.Keyword(null, "parents", "parents", -2027538891)).cljs$core$IFn$_invoke$arity$1(h);
  var td = (new cljs.core.Keyword(null, "descendants", "descendants", 1824886031)).cljs$core$IFn$_invoke$arity$1(h);
  var ta = (new cljs.core.Keyword(null, "ancestors", "ancestors", -776045424)).cljs$core$IFn$_invoke$arity$1(h);
  var tf = function(tp, td, ta) {
    return function(m, source, sources, target, targets) {
      return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(tp, td, ta) {
        return function(ret, k) {
          return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(ret, k, cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.conj, cljs.core.get.cljs$core$IFn$_invoke$arity$3(targets, k, cljs.core.PersistentHashSet.EMPTY), cljs.core.cons(target, targets.cljs$core$IFn$_invoke$arity$1 ? targets.cljs$core$IFn$_invoke$arity$1(target) : targets.call(null, target))));
        };
      }(tp, td, ta), m, cljs.core.cons(source, sources.cljs$core$IFn$_invoke$arity$1 ? sources.cljs$core$IFn$_invoke$arity$1(source) : sources.call(null, source)));
    };
  }(tp, td, ta);
  var or__6140__auto__ = cljs.core.contains_QMARK_(tp.cljs$core$IFn$_invoke$arity$1 ? tp.cljs$core$IFn$_invoke$arity$1(tag) : tp.call(null, tag), parent) ? null : function() {
    if (cljs.core.contains_QMARK_(ta.cljs$core$IFn$_invoke$arity$1 ? ta.cljs$core$IFn$_invoke$arity$1(tag) : ta.call(null, tag), parent)) {
      throw new Error([cljs.core.str(tag), cljs.core.str("already has"), cljs.core.str(parent), cljs.core.str("as ancestor")].join(""));
    } else {
    }
    if (cljs.core.contains_QMARK_(ta.cljs$core$IFn$_invoke$arity$1 ? ta.cljs$core$IFn$_invoke$arity$1(parent) : ta.call(null, parent), tag)) {
      throw new Error([cljs.core.str("Cyclic derivation:"), cljs.core.str(parent), cljs.core.str("has"), cljs.core.str(tag), cljs.core.str("as ancestor")].join(""));
    } else {
    }
    return new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "parents", "parents", -2027538891), cljs.core.assoc.cljs$core$IFn$_invoke$arity$3((new cljs.core.Keyword(null, "parents", "parents", -2027538891)).cljs$core$IFn$_invoke$arity$1(h), tag, cljs.core.conj.cljs$core$IFn$_invoke$arity$2(cljs.core.get.cljs$core$IFn$_invoke$arity$3(tp, tag, cljs.core.PersistentHashSet.EMPTY), parent)), new cljs.core.Keyword(null, "ancestors", "ancestors", -776045424), tf((new cljs.core.Keyword(null, 
    "ancestors", "ancestors", -776045424)).cljs$core$IFn$_invoke$arity$1(h), tag, td, parent, ta), new cljs.core.Keyword(null, "descendants", "descendants", 1824886031), tf((new cljs.core.Keyword(null, "descendants", "descendants", 1824886031)).cljs$core$IFn$_invoke$arity$1(h), parent, ta, tag, td)], null);
  }();
  if (cljs.core.truth_(or__6140__auto__)) {
    return or__6140__auto__;
  } else {
    return h;
  }
};
cljs.core.derive.cljs$lang$maxFixedArity = 3;
cljs.core.underive = function cljs$core$underive(var_args) {
  var args11081 = [];
  var len__7198__auto___11084 = arguments.length;
  var i__7199__auto___11085 = 0;
  while (true) {
    if (i__7199__auto___11085 < len__7198__auto___11084) {
      args11081.push(arguments[i__7199__auto___11085]);
      var G__11086 = i__7199__auto___11085 + 1;
      i__7199__auto___11085 = G__11086;
      continue;
    } else {
    }
    break;
  }
  var G__11083 = args11081.length;
  switch(G__11083) {
    case 2:
      return cljs.core.underive.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.underive.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args11081.length)].join(""));;
  }
};
cljs.core.underive.cljs$core$IFn$_invoke$arity$2 = function(tag, parent) {
  cljs.core.swap_global_hierarchy_BANG_.cljs$core$IFn$_invoke$arity$variadic(cljs.core.underive, cljs.core.array_seq([tag, parent], 0));
  return null;
};
cljs.core.underive.cljs$core$IFn$_invoke$arity$3 = function(h, tag, parent) {
  var parentMap = (new cljs.core.Keyword(null, "parents", "parents", -2027538891)).cljs$core$IFn$_invoke$arity$1(h);
  var childsParents = cljs.core.truth_(parentMap.cljs$core$IFn$_invoke$arity$1 ? parentMap.cljs$core$IFn$_invoke$arity$1(tag) : parentMap.call(null, tag)) ? cljs.core.disj.cljs$core$IFn$_invoke$arity$2(parentMap.cljs$core$IFn$_invoke$arity$1 ? parentMap.cljs$core$IFn$_invoke$arity$1(tag) : parentMap.call(null, tag), parent) : cljs.core.PersistentHashSet.EMPTY;
  var newParents = cljs.core.truth_(cljs.core.not_empty(childsParents)) ? cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(parentMap, tag, childsParents) : cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(parentMap, tag);
  var deriv_seq = cljs.core.flatten(cljs.core.map.cljs$core$IFn$_invoke$arity$2(function(parentMap, childsParents, newParents) {
    return function(p1__11078_SHARP_) {
      return cljs.core.cons(cljs.core.first(p1__11078_SHARP_), cljs.core.interpose.cljs$core$IFn$_invoke$arity$2(cljs.core.first(p1__11078_SHARP_), cljs.core.second(p1__11078_SHARP_)));
    };
  }(parentMap, childsParents, newParents), cljs.core.seq(newParents)));
  if (cljs.core.contains_QMARK_(parentMap.cljs$core$IFn$_invoke$arity$1 ? parentMap.cljs$core$IFn$_invoke$arity$1(tag) : parentMap.call(null, tag), parent)) {
    return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(parentMap, childsParents, newParents, deriv_seq) {
      return function(p1__11079_SHARP_, p2__11080_SHARP_) {
        return cljs.core.apply.cljs$core$IFn$_invoke$arity$3(cljs.core.derive, p1__11079_SHARP_, p2__11080_SHARP_);
      };
    }(parentMap, childsParents, newParents, deriv_seq), cljs.core.make_hierarchy(), cljs.core.partition.cljs$core$IFn$_invoke$arity$2(2, deriv_seq));
  } else {
    return h;
  }
};
cljs.core.underive.cljs$lang$maxFixedArity = 3;
cljs.core.reset_cache = function cljs$core$reset_cache(method_cache, method_table, cached_hierarchy, hierarchy) {
  cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(method_cache, function(_) {
    return cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(method_table) : cljs.core.deref.call(null, method_table);
  });
  return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(cached_hierarchy, function(_) {
    return cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(hierarchy) : cljs.core.deref.call(null, hierarchy);
  });
};
cljs.core.prefers_STAR_ = function cljs$core$prefers_STAR_(x, y, prefer_table) {
  var xprefs = (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(prefer_table) : cljs.core.deref.call(null, prefer_table)).call(null, x);
  var or__6140__auto__ = cljs.core.truth_(function() {
    var and__6128__auto__ = xprefs;
    if (cljs.core.truth_(and__6128__auto__)) {
      return xprefs.cljs$core$IFn$_invoke$arity$1 ? xprefs.cljs$core$IFn$_invoke$arity$1(y) : xprefs.call(null, y);
    } else {
      return and__6128__auto__;
    }
  }()) ? true : null;
  if (cljs.core.truth_(or__6140__auto__)) {
    return or__6140__auto__;
  } else {
    var or__6140__auto____$1 = function() {
      var ps = cljs.core.parents.cljs$core$IFn$_invoke$arity$1(y);
      while (true) {
        if (cljs.core.count(ps) > 0) {
          if (cljs.core.truth_(cljs$core$prefers_STAR_(x, cljs.core.first(ps), prefer_table))) {
          } else {
          }
          var G__11100 = cljs.core.rest(ps);
          ps = G__11100;
          continue;
        } else {
          return null;
        }
        break;
      }
    }();
    if (cljs.core.truth_(or__6140__auto____$1)) {
      return or__6140__auto____$1;
    } else {
      var or__6140__auto____$2 = function() {
        var ps = cljs.core.parents.cljs$core$IFn$_invoke$arity$1(x);
        while (true) {
          if (cljs.core.count(ps) > 0) {
            if (cljs.core.truth_(cljs$core$prefers_STAR_(cljs.core.first(ps), y, prefer_table))) {
            } else {
            }
            var G__11101 = cljs.core.rest(ps);
            ps = G__11101;
            continue;
          } else {
            return null;
          }
          break;
        }
      }();
      if (cljs.core.truth_(or__6140__auto____$2)) {
        return or__6140__auto____$2;
      } else {
        return false;
      }
    }
  }
};
cljs.core.dominates = function cljs$core$dominates(x, y, prefer_table) {
  var or__6140__auto__ = cljs.core.prefers_STAR_(x, y, prefer_table);
  if (cljs.core.truth_(or__6140__auto__)) {
    return or__6140__auto__;
  } else {
    return cljs.core.isa_QMARK_.cljs$core$IFn$_invoke$arity$2(x, y);
  }
};
cljs.core.find_and_cache_best_method = function cljs$core$find_and_cache_best_method(name, dispatch_val, hierarchy, method_table, prefer_table, method_cache, cached_hierarchy) {
  var best_entry = cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(be, p__11104) {
    var vec__11105 = p__11104;
    var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__11105, 0, null);
    var _ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__11105, 1, null);
    var e = vec__11105;
    if (cljs.core.isa_QMARK_.cljs$core$IFn$_invoke$arity$3(cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(hierarchy) : cljs.core.deref.call(null, hierarchy), dispatch_val, k)) {
      var be2 = cljs.core.truth_(function() {
        var or__6140__auto__ = be == null;
        if (or__6140__auto__) {
          return or__6140__auto__;
        } else {
          return cljs.core.dominates(k, cljs.core.first(be), prefer_table);
        }
      }()) ? e : be;
      if (cljs.core.truth_(cljs.core.dominates(cljs.core.first(be2), k, prefer_table))) {
      } else {
        throw new Error([cljs.core.str("Multiple methods in multimethod '"), cljs.core.str(name), cljs.core.str("' match dispatch value: "), cljs.core.str(dispatch_val), cljs.core.str(" -\x3e "), cljs.core.str(k), cljs.core.str(" and "), cljs.core.str(cljs.core.first(be2)), cljs.core.str(", and neither is preferred")].join(""));
      }
      return be2;
    } else {
      return be;
    }
  }, null, cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(method_table) : cljs.core.deref.call(null, method_table));
  if (cljs.core.truth_(best_entry)) {
    if (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(cached_hierarchy) : cljs.core.deref.call(null, cached_hierarchy), cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(hierarchy) : cljs.core.deref.call(null, hierarchy))) {
      cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4(method_cache, cljs.core.assoc, dispatch_val, cljs.core.second(best_entry));
      return cljs.core.second(best_entry);
    } else {
      cljs.core.reset_cache(method_cache, method_table, cached_hierarchy, hierarchy);
      return cljs$core$find_and_cache_best_method(name, dispatch_val, hierarchy, method_table, prefer_table, method_cache, cached_hierarchy);
    }
  } else {
    return null;
  }
};
cljs.core.IMultiFn = function() {
};
cljs.core._reset = function cljs$core$_reset(mf) {
  if (!(mf == null) && !(mf.cljs$core$IMultiFn$_reset$arity$1 == null)) {
    return mf.cljs$core$IMultiFn$_reset$arity$1(mf);
  } else {
    var x__6795__auto__ = mf == null ? null : mf;
    var m__6796__auto__ = cljs.core._reset[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(mf) : m__6796__auto__.call(null, mf);
    } else {
      var m__6796__auto____$1 = cljs.core._reset["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(mf) : m__6796__auto____$1.call(null, mf);
      } else {
        throw cljs.core.missing_protocol("IMultiFn.-reset", mf);
      }
    }
  }
};
cljs.core._add_method = function cljs$core$_add_method(mf, dispatch_val, method) {
  if (!(mf == null) && !(mf.cljs$core$IMultiFn$_add_method$arity$3 == null)) {
    return mf.cljs$core$IMultiFn$_add_method$arity$3(mf, dispatch_val, method);
  } else {
    var x__6795__auto__ = mf == null ? null : mf;
    var m__6796__auto__ = cljs.core._add_method[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$3(mf, dispatch_val, method) : m__6796__auto__.call(null, mf, dispatch_val, method);
    } else {
      var m__6796__auto____$1 = cljs.core._add_method["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3(mf, dispatch_val, method) : m__6796__auto____$1.call(null, mf, dispatch_val, method);
      } else {
        throw cljs.core.missing_protocol("IMultiFn.-add-method", mf);
      }
    }
  }
};
cljs.core._remove_method = function cljs$core$_remove_method(mf, dispatch_val) {
  if (!(mf == null) && !(mf.cljs$core$IMultiFn$_remove_method$arity$2 == null)) {
    return mf.cljs$core$IMultiFn$_remove_method$arity$2(mf, dispatch_val);
  } else {
    var x__6795__auto__ = mf == null ? null : mf;
    var m__6796__auto__ = cljs.core._remove_method[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(mf, dispatch_val) : m__6796__auto__.call(null, mf, dispatch_val);
    } else {
      var m__6796__auto____$1 = cljs.core._remove_method["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(mf, dispatch_val) : m__6796__auto____$1.call(null, mf, dispatch_val);
      } else {
        throw cljs.core.missing_protocol("IMultiFn.-remove-method", mf);
      }
    }
  }
};
cljs.core._prefer_method = function cljs$core$_prefer_method(mf, dispatch_val, dispatch_val_y) {
  if (!(mf == null) && !(mf.cljs$core$IMultiFn$_prefer_method$arity$3 == null)) {
    return mf.cljs$core$IMultiFn$_prefer_method$arity$3(mf, dispatch_val, dispatch_val_y);
  } else {
    var x__6795__auto__ = mf == null ? null : mf;
    var m__6796__auto__ = cljs.core._prefer_method[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$3(mf, dispatch_val, dispatch_val_y) : m__6796__auto__.call(null, mf, dispatch_val, dispatch_val_y);
    } else {
      var m__6796__auto____$1 = cljs.core._prefer_method["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$3(mf, dispatch_val, dispatch_val_y) : m__6796__auto____$1.call(null, mf, dispatch_val, dispatch_val_y);
      } else {
        throw cljs.core.missing_protocol("IMultiFn.-prefer-method", mf);
      }
    }
  }
};
cljs.core._get_method = function cljs$core$_get_method(mf, dispatch_val) {
  if (!(mf == null) && !(mf.cljs$core$IMultiFn$_get_method$arity$2 == null)) {
    return mf.cljs$core$IMultiFn$_get_method$arity$2(mf, dispatch_val);
  } else {
    var x__6795__auto__ = mf == null ? null : mf;
    var m__6796__auto__ = cljs.core._get_method[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$2(mf, dispatch_val) : m__6796__auto__.call(null, mf, dispatch_val);
    } else {
      var m__6796__auto____$1 = cljs.core._get_method["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$2(mf, dispatch_val) : m__6796__auto____$1.call(null, mf, dispatch_val);
      } else {
        throw cljs.core.missing_protocol("IMultiFn.-get-method", mf);
      }
    }
  }
};
cljs.core._methods = function cljs$core$_methods(mf) {
  if (!(mf == null) && !(mf.cljs$core$IMultiFn$_methods$arity$1 == null)) {
    return mf.cljs$core$IMultiFn$_methods$arity$1(mf);
  } else {
    var x__6795__auto__ = mf == null ? null : mf;
    var m__6796__auto__ = cljs.core._methods[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(mf) : m__6796__auto__.call(null, mf);
    } else {
      var m__6796__auto____$1 = cljs.core._methods["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(mf) : m__6796__auto____$1.call(null, mf);
      } else {
        throw cljs.core.missing_protocol("IMultiFn.-methods", mf);
      }
    }
  }
};
cljs.core._prefers = function cljs$core$_prefers(mf) {
  if (!(mf == null) && !(mf.cljs$core$IMultiFn$_prefers$arity$1 == null)) {
    return mf.cljs$core$IMultiFn$_prefers$arity$1(mf);
  } else {
    var x__6795__auto__ = mf == null ? null : mf;
    var m__6796__auto__ = cljs.core._prefers[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(mf) : m__6796__auto__.call(null, mf);
    } else {
      var m__6796__auto____$1 = cljs.core._prefers["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(mf) : m__6796__auto____$1.call(null, mf);
      } else {
        throw cljs.core.missing_protocol("IMultiFn.-prefers", mf);
      }
    }
  }
};
cljs.core._default_dispatch_val = function cljs$core$_default_dispatch_val(mf) {
  if (!(mf == null) && !(mf.cljs$core$IMultiFn$_default_dispatch_val$arity$1 == null)) {
    return mf.cljs$core$IMultiFn$_default_dispatch_val$arity$1(mf);
  } else {
    var x__6795__auto__ = mf == null ? null : mf;
    var m__6796__auto__ = cljs.core._default_dispatch_val[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(mf) : m__6796__auto__.call(null, mf);
    } else {
      var m__6796__auto____$1 = cljs.core._default_dispatch_val["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(mf) : m__6796__auto____$1.call(null, mf);
      } else {
        throw cljs.core.missing_protocol("IMultiFn.-default-dispatch-val", mf);
      }
    }
  }
};
cljs.core._dispatch_fn = function cljs$core$_dispatch_fn(mf) {
  if (!(mf == null) && !(mf.cljs$core$IMultiFn$_dispatch_fn$arity$1 == null)) {
    return mf.cljs$core$IMultiFn$_dispatch_fn$arity$1(mf);
  } else {
    var x__6795__auto__ = mf == null ? null : mf;
    var m__6796__auto__ = cljs.core._dispatch_fn[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto__.cljs$core$IFn$_invoke$arity$1(mf) : m__6796__auto__.call(null, mf);
    } else {
      var m__6796__auto____$1 = cljs.core._dispatch_fn["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__6796__auto____$1.cljs$core$IFn$_invoke$arity$1(mf) : m__6796__auto____$1.call(null, mf);
      } else {
        throw cljs.core.missing_protocol("IMultiFn.-dispatch-fn", mf);
      }
    }
  }
};
cljs.core.throw_no_method_error = function cljs$core$throw_no_method_error(name, dispatch_val) {
  throw new Error([cljs.core.str("No method in multimethod '"), cljs.core.str(name), cljs.core.str("' for dispatch value: "), cljs.core.str(dispatch_val)].join(""));
};
cljs.core.MultiFn = function(name, dispatch_fn, default_dispatch_val, hierarchy, method_table, prefer_table, method_cache, cached_hierarchy) {
  this.name = name;
  this.dispatch_fn = dispatch_fn;
  this.default_dispatch_val = default_dispatch_val;
  this.hierarchy = hierarchy;
  this.method_table = method_table;
  this.prefer_table = prefer_table;
  this.method_cache = method_cache;
  this.cached_hierarchy = cached_hierarchy;
  this.cljs$lang$protocol_mask$partition0$ = 4194305;
  this.cljs$lang$protocol_mask$partition1$ = 4352;
};
cljs.core.MultiFn.prototype.call = function() {
  var G__11107 = null;
  var G__11107__1 = function(self__) {
    var self__ = this;
    var self____$1 = this;
    var mf = self____$1;
    var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$0 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$0() : self__.dispatch_fn.call(null);
    var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
    if (cljs.core.truth_(target_fn)) {
    } else {
      cljs.core.throw_no_method_error(self__.name, dispatch_val);
    }
    return target_fn.cljs$core$IFn$_invoke$arity$0 ? target_fn.cljs$core$IFn$_invoke$arity$0() : target_fn.call(null);
  };
  var G__11107__2 = function(self__, a) {
    var self__ = this;
    var self____$1 = this;
    var mf = self____$1;
    var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$1 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$1(a) : self__.dispatch_fn.call(null, a);
    var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
    if (cljs.core.truth_(target_fn)) {
    } else {
      cljs.core.throw_no_method_error(self__.name, dispatch_val);
    }
    return target_fn.cljs$core$IFn$_invoke$arity$1 ? target_fn.cljs$core$IFn$_invoke$arity$1(a) : target_fn.call(null, a);
  };
  var G__11107__3 = function(self__, a, b) {
    var self__ = this;
    var self____$1 = this;
    var mf = self____$1;
    var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$2 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$2(a, b) : self__.dispatch_fn.call(null, a, b);
    var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
    if (cljs.core.truth_(target_fn)) {
    } else {
      cljs.core.throw_no_method_error(self__.name, dispatch_val);
    }
    return target_fn.cljs$core$IFn$_invoke$arity$2 ? target_fn.cljs$core$IFn$_invoke$arity$2(a, b) : target_fn.call(null, a, b);
  };
  var G__11107__4 = function(self__, a, b, c) {
    var self__ = this;
    var self____$1 = this;
    var mf = self____$1;
    var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$3 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$3(a, b, c) : self__.dispatch_fn.call(null, a, b, c);
    var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
    if (cljs.core.truth_(target_fn)) {
    } else {
      cljs.core.throw_no_method_error(self__.name, dispatch_val);
    }
    return target_fn.cljs$core$IFn$_invoke$arity$3 ? target_fn.cljs$core$IFn$_invoke$arity$3(a, b, c) : target_fn.call(null, a, b, c);
  };
  var G__11107__5 = function(self__, a, b, c, d) {
    var self__ = this;
    var self____$1 = this;
    var mf = self____$1;
    var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$4 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$4(a, b, c, d) : self__.dispatch_fn.call(null, a, b, c, d);
    var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
    if (cljs.core.truth_(target_fn)) {
    } else {
      cljs.core.throw_no_method_error(self__.name, dispatch_val);
    }
    return target_fn.cljs$core$IFn$_invoke$arity$4 ? target_fn.cljs$core$IFn$_invoke$arity$4(a, b, c, d) : target_fn.call(null, a, b, c, d);
  };
  var G__11107__6 = function(self__, a, b, c, d, e) {
    var self__ = this;
    var self____$1 = this;
    var mf = self____$1;
    var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$5 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$5(a, b, c, d, e) : self__.dispatch_fn.call(null, a, b, c, d, e);
    var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
    if (cljs.core.truth_(target_fn)) {
    } else {
      cljs.core.throw_no_method_error(self__.name, dispatch_val);
    }
    return target_fn.cljs$core$IFn$_invoke$arity$5 ? target_fn.cljs$core$IFn$_invoke$arity$5(a, b, c, d, e) : target_fn.call(null, a, b, c, d, e);
  };
  var G__11107__7 = function(self__, a, b, c, d, e, f) {
    var self__ = this;
    var self____$1 = this;
    var mf = self____$1;
    var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$6 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$6(a, b, c, d, e, f) : self__.dispatch_fn.call(null, a, b, c, d, e, f);
    var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
    if (cljs.core.truth_(target_fn)) {
    } else {
      cljs.core.throw_no_method_error(self__.name, dispatch_val);
    }
    return target_fn.cljs$core$IFn$_invoke$arity$6 ? target_fn.cljs$core$IFn$_invoke$arity$6(a, b, c, d, e, f) : target_fn.call(null, a, b, c, d, e, f);
  };
  var G__11107__8 = function(self__, a, b, c, d, e, f, g) {
    var self__ = this;
    var self____$1 = this;
    var mf = self____$1;
    var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$7 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$7(a, b, c, d, e, f, g) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g);
    var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
    if (cljs.core.truth_(target_fn)) {
    } else {
      cljs.core.throw_no_method_error(self__.name, dispatch_val);
    }
    return target_fn.cljs$core$IFn$_invoke$arity$7 ? target_fn.cljs$core$IFn$_invoke$arity$7(a, b, c, d, e, f, g) : target_fn.call(null, a, b, c, d, e, f, g);
  };
  var G__11107__9 = function(self__, a, b, c, d, e, f, g, h) {
    var self__ = this;
    var self____$1 = this;
    var mf = self____$1;
    var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$8 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$8(a, b, c, d, e, f, g, h) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h);
    var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
    if (cljs.core.truth_(target_fn)) {
    } else {
      cljs.core.throw_no_method_error(self__.name, dispatch_val);
    }
    return target_fn.cljs$core$IFn$_invoke$arity$8 ? target_fn.cljs$core$IFn$_invoke$arity$8(a, b, c, d, e, f, g, h) : target_fn.call(null, a, b, c, d, e, f, g, h);
  };
  var G__11107__10 = function(self__, a, b, c, d, e, f, g, h, i) {
    var self__ = this;
    var self____$1 = this;
    var mf = self____$1;
    var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$9 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$9(a, b, c, d, e, f, g, h, i) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i);
    var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
    if (cljs.core.truth_(target_fn)) {
    } else {
      cljs.core.throw_no_method_error(self__.name, dispatch_val);
    }
    return target_fn.cljs$core$IFn$_invoke$arity$9 ? target_fn.cljs$core$IFn$_invoke$arity$9(a, b, c, d, e, f, g, h, i) : target_fn.call(null, a, b, c, d, e, f, g, h, i);
  };
  var G__11107__11 = function(self__, a, b, c, d, e, f, g, h, i, j) {
    var self__ = this;
    var self____$1 = this;
    var mf = self____$1;
    var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$10 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$10(a, b, c, d, e, f, g, h, i, j) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i, j);
    var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
    if (cljs.core.truth_(target_fn)) {
    } else {
      cljs.core.throw_no_method_error(self__.name, dispatch_val);
    }
    return target_fn.cljs$core$IFn$_invoke$arity$10 ? target_fn.cljs$core$IFn$_invoke$arity$10(a, b, c, d, e, f, g, h, i, j) : target_fn.call(null, a, b, c, d, e, f, g, h, i, j);
  };
  var G__11107__12 = function(self__, a, b, c, d, e, f, g, h, i, j, k) {
    var self__ = this;
    var self____$1 = this;
    var mf = self____$1;
    var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$11 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$11(a, b, c, d, e, f, g, h, i, j, k) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i, j, k);
    var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
    if (cljs.core.truth_(target_fn)) {
    } else {
      cljs.core.throw_no_method_error(self__.name, dispatch_val);
    }
    return target_fn.cljs$core$IFn$_invoke$arity$11 ? target_fn.cljs$core$IFn$_invoke$arity$11(a, b, c, d, e, f, g, h, i, j, k) : target_fn.call(null, a, b, c, d, e, f, g, h, i, j, k);
  };
  var G__11107__13 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l) {
    var self__ = this;
    var self____$1 = this;
    var mf = self____$1;
    var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$12 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$12(a, b, c, d, e, f, g, h, i, j, k, l) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l);
    var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
    if (cljs.core.truth_(target_fn)) {
    } else {
      cljs.core.throw_no_method_error(self__.name, dispatch_val);
    }
    return target_fn.cljs$core$IFn$_invoke$arity$12 ? target_fn.cljs$core$IFn$_invoke$arity$12(a, b, c, d, e, f, g, h, i, j, k, l) : target_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l);
  };
  var G__11107__14 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m) {
    var self__ = this;
    var self____$1 = this;
    var mf = self____$1;
    var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$13 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$13(a, b, c, d, e, f, g, h, i, j, k, l, m) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m);
    var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
    if (cljs.core.truth_(target_fn)) {
    } else {
      cljs.core.throw_no_method_error(self__.name, dispatch_val);
    }
    return target_fn.cljs$core$IFn$_invoke$arity$13 ? target_fn.cljs$core$IFn$_invoke$arity$13(a, b, c, d, e, f, g, h, i, j, k, l, m) : target_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m);
  };
  var G__11107__15 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n) {
    var self__ = this;
    var self____$1 = this;
    var mf = self____$1;
    var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$14 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$14(a, b, c, d, e, f, g, h, i, j, k, l, m, n) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n);
    var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
    if (cljs.core.truth_(target_fn)) {
    } else {
      cljs.core.throw_no_method_error(self__.name, dispatch_val);
    }
    return target_fn.cljs$core$IFn$_invoke$arity$14 ? target_fn.cljs$core$IFn$_invoke$arity$14(a, b, c, d, e, f, g, h, i, j, k, l, m, n) : target_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n);
  };
  var G__11107__16 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) {
    var self__ = this;
    var self____$1 = this;
    var mf = self____$1;
    var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$15 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
    var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
    if (cljs.core.truth_(target_fn)) {
    } else {
      cljs.core.throw_no_method_error(self__.name, dispatch_val);
    }
    return target_fn.cljs$core$IFn$_invoke$arity$15 ? target_fn.cljs$core$IFn$_invoke$arity$15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) : target_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
  };
  var G__11107__17 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
    var self__ = this;
    var self____$1 = this;
    var mf = self____$1;
    var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$16 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
    var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
    if (cljs.core.truth_(target_fn)) {
    } else {
      cljs.core.throw_no_method_error(self__.name, dispatch_val);
    }
    return target_fn.cljs$core$IFn$_invoke$arity$16 ? target_fn.cljs$core$IFn$_invoke$arity$16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) : target_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
  };
  var G__11107__18 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) {
    var self__ = this;
    var self____$1 = this;
    var mf = self____$1;
    var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$17 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q);
    var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
    if (cljs.core.truth_(target_fn)) {
    } else {
      cljs.core.throw_no_method_error(self__.name, dispatch_val);
    }
    return target_fn.cljs$core$IFn$_invoke$arity$17 ? target_fn.cljs$core$IFn$_invoke$arity$17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) : target_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q);
  };
  var G__11107__19 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) {
    var self__ = this;
    var self____$1 = this;
    var mf = self____$1;
    var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$18 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r);
    var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
    if (cljs.core.truth_(target_fn)) {
    } else {
      cljs.core.throw_no_method_error(self__.name, dispatch_val);
    }
    return target_fn.cljs$core$IFn$_invoke$arity$18 ? target_fn.cljs$core$IFn$_invoke$arity$18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) : target_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r);
  };
  var G__11107__20 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) {
    var self__ = this;
    var self____$1 = this;
    var mf = self____$1;
    var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$19 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s);
    var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
    if (cljs.core.truth_(target_fn)) {
    } else {
      cljs.core.throw_no_method_error(self__.name, dispatch_val);
    }
    return target_fn.cljs$core$IFn$_invoke$arity$19 ? target_fn.cljs$core$IFn$_invoke$arity$19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) : target_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s);
  };
  var G__11107__21 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) {
    var self__ = this;
    var self____$1 = this;
    var mf = self____$1;
    var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$20 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t);
    var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
    if (cljs.core.truth_(target_fn)) {
    } else {
      cljs.core.throw_no_method_error(self__.name, dispatch_val);
    }
    return target_fn.cljs$core$IFn$_invoke$arity$20 ? target_fn.cljs$core$IFn$_invoke$arity$20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) : target_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t);
  };
  var G__11107__22 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest) {
    var self__ = this;
    var self____$1 = this;
    var mf = self____$1;
    var dispatch_val = cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(self__.dispatch_fn, a, b, c, d, cljs.core.array_seq([e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest], 0));
    var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
    if (cljs.core.truth_(target_fn)) {
    } else {
      cljs.core.throw_no_method_error(self__.name, dispatch_val);
    }
    return cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(target_fn, a, b, c, d, cljs.core.array_seq([e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest], 0));
  };
  G__11107 = function(self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest) {
    switch(arguments.length) {
      case 1:
        return G__11107__1.call(this, self__);
      case 2:
        return G__11107__2.call(this, self__, a);
      case 3:
        return G__11107__3.call(this, self__, a, b);
      case 4:
        return G__11107__4.call(this, self__, a, b, c);
      case 5:
        return G__11107__5.call(this, self__, a, b, c, d);
      case 6:
        return G__11107__6.call(this, self__, a, b, c, d, e);
      case 7:
        return G__11107__7.call(this, self__, a, b, c, d, e, f);
      case 8:
        return G__11107__8.call(this, self__, a, b, c, d, e, f, g);
      case 9:
        return G__11107__9.call(this, self__, a, b, c, d, e, f, g, h);
      case 10:
        return G__11107__10.call(this, self__, a, b, c, d, e, f, g, h, i);
      case 11:
        return G__11107__11.call(this, self__, a, b, c, d, e, f, g, h, i, j);
      case 12:
        return G__11107__12.call(this, self__, a, b, c, d, e, f, g, h, i, j, k);
      case 13:
        return G__11107__13.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l);
      case 14:
        return G__11107__14.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m);
      case 15:
        return G__11107__15.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n);
      case 16:
        return G__11107__16.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
      case 17:
        return G__11107__17.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
      case 18:
        return G__11107__18.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q);
      case 19:
        return G__11107__19.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r);
      case 20:
        return G__11107__20.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s);
      case 21:
        return G__11107__21.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t);
      case 22:
        return G__11107__22.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest);
    }
    throw new Error("Invalid arity: " + arguments.length);
  };
  G__11107.cljs$core$IFn$_invoke$arity$1 = G__11107__1;
  G__11107.cljs$core$IFn$_invoke$arity$2 = G__11107__2;
  G__11107.cljs$core$IFn$_invoke$arity$3 = G__11107__3;
  G__11107.cljs$core$IFn$_invoke$arity$4 = G__11107__4;
  G__11107.cljs$core$IFn$_invoke$arity$5 = G__11107__5;
  G__11107.cljs$core$IFn$_invoke$arity$6 = G__11107__6;
  G__11107.cljs$core$IFn$_invoke$arity$7 = G__11107__7;
  G__11107.cljs$core$IFn$_invoke$arity$8 = G__11107__8;
  G__11107.cljs$core$IFn$_invoke$arity$9 = G__11107__9;
  G__11107.cljs$core$IFn$_invoke$arity$10 = G__11107__10;
  G__11107.cljs$core$IFn$_invoke$arity$11 = G__11107__11;
  G__11107.cljs$core$IFn$_invoke$arity$12 = G__11107__12;
  G__11107.cljs$core$IFn$_invoke$arity$13 = G__11107__13;
  G__11107.cljs$core$IFn$_invoke$arity$14 = G__11107__14;
  G__11107.cljs$core$IFn$_invoke$arity$15 = G__11107__15;
  G__11107.cljs$core$IFn$_invoke$arity$16 = G__11107__16;
  G__11107.cljs$core$IFn$_invoke$arity$17 = G__11107__17;
  G__11107.cljs$core$IFn$_invoke$arity$18 = G__11107__18;
  G__11107.cljs$core$IFn$_invoke$arity$19 = G__11107__19;
  G__11107.cljs$core$IFn$_invoke$arity$20 = G__11107__20;
  G__11107.cljs$core$IFn$_invoke$arity$21 = G__11107__21;
  G__11107.cljs$core$IFn$_invoke$arity$22 = G__11107__22;
  return G__11107;
}();
cljs.core.MultiFn.prototype.apply = function(self__, args11106) {
  var self__ = this;
  var self____$1 = this;
  return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args11106)));
};
cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$0 = function() {
  var self__ = this;
  var mf = this;
  var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$0 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$0() : self__.dispatch_fn.call(null);
  var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
  if (cljs.core.truth_(target_fn)) {
  } else {
    cljs.core.throw_no_method_error(self__.name, dispatch_val);
  }
  return target_fn.cljs$core$IFn$_invoke$arity$0 ? target_fn.cljs$core$IFn$_invoke$arity$0() : target_fn.call(null);
};
cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$1 = function(a) {
  var self__ = this;
  var mf = this;
  var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$1 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$1(a) : self__.dispatch_fn.call(null, a);
  var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
  if (cljs.core.truth_(target_fn)) {
  } else {
    cljs.core.throw_no_method_error(self__.name, dispatch_val);
  }
  return target_fn.cljs$core$IFn$_invoke$arity$1 ? target_fn.cljs$core$IFn$_invoke$arity$1(a) : target_fn.call(null, a);
};
cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
  var self__ = this;
  var mf = this;
  var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$2 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$2(a, b) : self__.dispatch_fn.call(null, a, b);
  var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
  if (cljs.core.truth_(target_fn)) {
  } else {
    cljs.core.throw_no_method_error(self__.name, dispatch_val);
  }
  return target_fn.cljs$core$IFn$_invoke$arity$2 ? target_fn.cljs$core$IFn$_invoke$arity$2(a, b) : target_fn.call(null, a, b);
};
cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$3 = function(a, b, c) {
  var self__ = this;
  var mf = this;
  var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$3 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$3(a, b, c) : self__.dispatch_fn.call(null, a, b, c);
  var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
  if (cljs.core.truth_(target_fn)) {
  } else {
    cljs.core.throw_no_method_error(self__.name, dispatch_val);
  }
  return target_fn.cljs$core$IFn$_invoke$arity$3 ? target_fn.cljs$core$IFn$_invoke$arity$3(a, b, c) : target_fn.call(null, a, b, c);
};
cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$4 = function(a, b, c, d) {
  var self__ = this;
  var mf = this;
  var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$4 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$4(a, b, c, d) : self__.dispatch_fn.call(null, a, b, c, d);
  var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
  if (cljs.core.truth_(target_fn)) {
  } else {
    cljs.core.throw_no_method_error(self__.name, dispatch_val);
  }
  return target_fn.cljs$core$IFn$_invoke$arity$4 ? target_fn.cljs$core$IFn$_invoke$arity$4(a, b, c, d) : target_fn.call(null, a, b, c, d);
};
cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$5 = function(a, b, c, d, e) {
  var self__ = this;
  var mf = this;
  var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$5 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$5(a, b, c, d, e) : self__.dispatch_fn.call(null, a, b, c, d, e);
  var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
  if (cljs.core.truth_(target_fn)) {
  } else {
    cljs.core.throw_no_method_error(self__.name, dispatch_val);
  }
  return target_fn.cljs$core$IFn$_invoke$arity$5 ? target_fn.cljs$core$IFn$_invoke$arity$5(a, b, c, d, e) : target_fn.call(null, a, b, c, d, e);
};
cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$6 = function(a, b, c, d, e, f) {
  var self__ = this;
  var mf = this;
  var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$6 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$6(a, b, c, d, e, f) : self__.dispatch_fn.call(null, a, b, c, d, e, f);
  var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
  if (cljs.core.truth_(target_fn)) {
  } else {
    cljs.core.throw_no_method_error(self__.name, dispatch_val);
  }
  return target_fn.cljs$core$IFn$_invoke$arity$6 ? target_fn.cljs$core$IFn$_invoke$arity$6(a, b, c, d, e, f) : target_fn.call(null, a, b, c, d, e, f);
};
cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$7 = function(a, b, c, d, e, f, g) {
  var self__ = this;
  var mf = this;
  var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$7 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$7(a, b, c, d, e, f, g) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g);
  var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
  if (cljs.core.truth_(target_fn)) {
  } else {
    cljs.core.throw_no_method_error(self__.name, dispatch_val);
  }
  return target_fn.cljs$core$IFn$_invoke$arity$7 ? target_fn.cljs$core$IFn$_invoke$arity$7(a, b, c, d, e, f, g) : target_fn.call(null, a, b, c, d, e, f, g);
};
cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$8 = function(a, b, c, d, e, f, g, h) {
  var self__ = this;
  var mf = this;
  var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$8 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$8(a, b, c, d, e, f, g, h) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h);
  var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
  if (cljs.core.truth_(target_fn)) {
  } else {
    cljs.core.throw_no_method_error(self__.name, dispatch_val);
  }
  return target_fn.cljs$core$IFn$_invoke$arity$8 ? target_fn.cljs$core$IFn$_invoke$arity$8(a, b, c, d, e, f, g, h) : target_fn.call(null, a, b, c, d, e, f, g, h);
};
cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$9 = function(a, b, c, d, e, f, g, h, i) {
  var self__ = this;
  var mf = this;
  var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$9 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$9(a, b, c, d, e, f, g, h, i) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i);
  var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
  if (cljs.core.truth_(target_fn)) {
  } else {
    cljs.core.throw_no_method_error(self__.name, dispatch_val);
  }
  return target_fn.cljs$core$IFn$_invoke$arity$9 ? target_fn.cljs$core$IFn$_invoke$arity$9(a, b, c, d, e, f, g, h, i) : target_fn.call(null, a, b, c, d, e, f, g, h, i);
};
cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$10 = function(a, b, c, d, e, f, g, h, i, j) {
  var self__ = this;
  var mf = this;
  var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$10 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$10(a, b, c, d, e, f, g, h, i, j) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i, j);
  var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
  if (cljs.core.truth_(target_fn)) {
  } else {
    cljs.core.throw_no_method_error(self__.name, dispatch_val);
  }
  return target_fn.cljs$core$IFn$_invoke$arity$10 ? target_fn.cljs$core$IFn$_invoke$arity$10(a, b, c, d, e, f, g, h, i, j) : target_fn.call(null, a, b, c, d, e, f, g, h, i, j);
};
cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$11 = function(a, b, c, d, e, f, g, h, i, j, k) {
  var self__ = this;
  var mf = this;
  var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$11 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$11(a, b, c, d, e, f, g, h, i, j, k) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i, j, k);
  var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
  if (cljs.core.truth_(target_fn)) {
  } else {
    cljs.core.throw_no_method_error(self__.name, dispatch_val);
  }
  return target_fn.cljs$core$IFn$_invoke$arity$11 ? target_fn.cljs$core$IFn$_invoke$arity$11(a, b, c, d, e, f, g, h, i, j, k) : target_fn.call(null, a, b, c, d, e, f, g, h, i, j, k);
};
cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$12 = function(a, b, c, d, e, f, g, h, i, j, k, l) {
  var self__ = this;
  var mf = this;
  var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$12 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$12(a, b, c, d, e, f, g, h, i, j, k, l) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l);
  var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
  if (cljs.core.truth_(target_fn)) {
  } else {
    cljs.core.throw_no_method_error(self__.name, dispatch_val);
  }
  return target_fn.cljs$core$IFn$_invoke$arity$12 ? target_fn.cljs$core$IFn$_invoke$arity$12(a, b, c, d, e, f, g, h, i, j, k, l) : target_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l);
};
cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$13 = function(a, b, c, d, e, f, g, h, i, j, k, l, m) {
  var self__ = this;
  var mf = this;
  var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$13 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$13(a, b, c, d, e, f, g, h, i, j, k, l, m) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m);
  var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
  if (cljs.core.truth_(target_fn)) {
  } else {
    cljs.core.throw_no_method_error(self__.name, dispatch_val);
  }
  return target_fn.cljs$core$IFn$_invoke$arity$13 ? target_fn.cljs$core$IFn$_invoke$arity$13(a, b, c, d, e, f, g, h, i, j, k, l, m) : target_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m);
};
cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$14 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n) {
  var self__ = this;
  var mf = this;
  var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$14 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$14(a, b, c, d, e, f, g, h, i, j, k, l, m, n) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n);
  var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
  if (cljs.core.truth_(target_fn)) {
  } else {
    cljs.core.throw_no_method_error(self__.name, dispatch_val);
  }
  return target_fn.cljs$core$IFn$_invoke$arity$14 ? target_fn.cljs$core$IFn$_invoke$arity$14(a, b, c, d, e, f, g, h, i, j, k, l, m, n) : target_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n);
};
cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$15 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) {
  var self__ = this;
  var mf = this;
  var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$15 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
  var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
  if (cljs.core.truth_(target_fn)) {
  } else {
    cljs.core.throw_no_method_error(self__.name, dispatch_val);
  }
  return target_fn.cljs$core$IFn$_invoke$arity$15 ? target_fn.cljs$core$IFn$_invoke$arity$15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) : target_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
};
cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$16 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
  var self__ = this;
  var mf = this;
  var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$16 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
  var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
  if (cljs.core.truth_(target_fn)) {
  } else {
    cljs.core.throw_no_method_error(self__.name, dispatch_val);
  }
  return target_fn.cljs$core$IFn$_invoke$arity$16 ? target_fn.cljs$core$IFn$_invoke$arity$16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) : target_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
};
cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$17 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) {
  var self__ = this;
  var mf = this;
  var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$17 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q);
  var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
  if (cljs.core.truth_(target_fn)) {
  } else {
    cljs.core.throw_no_method_error(self__.name, dispatch_val);
  }
  return target_fn.cljs$core$IFn$_invoke$arity$17 ? target_fn.cljs$core$IFn$_invoke$arity$17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) : target_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q);
};
cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$18 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) {
  var self__ = this;
  var mf = this;
  var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$18 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r);
  var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
  if (cljs.core.truth_(target_fn)) {
  } else {
    cljs.core.throw_no_method_error(self__.name, dispatch_val);
  }
  return target_fn.cljs$core$IFn$_invoke$arity$18 ? target_fn.cljs$core$IFn$_invoke$arity$18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) : target_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r);
};
cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$19 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) {
  var self__ = this;
  var mf = this;
  var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$19 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s);
  var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
  if (cljs.core.truth_(target_fn)) {
  } else {
    cljs.core.throw_no_method_error(self__.name, dispatch_val);
  }
  return target_fn.cljs$core$IFn$_invoke$arity$19 ? target_fn.cljs$core$IFn$_invoke$arity$19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) : target_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s);
};
cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$20 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) {
  var self__ = this;
  var mf = this;
  var dispatch_val = self__.dispatch_fn.cljs$core$IFn$_invoke$arity$20 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) : self__.dispatch_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t);
  var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
  if (cljs.core.truth_(target_fn)) {
  } else {
    cljs.core.throw_no_method_error(self__.name, dispatch_val);
  }
  return target_fn.cljs$core$IFn$_invoke$arity$20 ? target_fn.cljs$core$IFn$_invoke$arity$20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) : target_fn.call(null, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t);
};
cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$21 = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest) {
  var self__ = this;
  var mf = this;
  var dispatch_val = cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(self__.dispatch_fn, a, b, c, d, cljs.core.array_seq([e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest], 0));
  var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null, dispatch_val);
  if (cljs.core.truth_(target_fn)) {
  } else {
    cljs.core.throw_no_method_error(self__.name, dispatch_val);
  }
  return cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(target_fn, a, b, c, d, cljs.core.array_seq([e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, rest], 0));
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_prefer_method$arity$3 = function(mf, dispatch_val_x, dispatch_val_y) {
  var self__ = this;
  var mf__$1 = this;
  if (cljs.core.truth_(cljs.core.prefers_STAR_(dispatch_val_x, dispatch_val_y, self__.prefer_table))) {
    throw new Error([cljs.core.str("Preference conflict in multimethod '"), cljs.core.str(self__.name), cljs.core.str("': "), cljs.core.str(dispatch_val_y), cljs.core.str(" is already preferred to "), cljs.core.str(dispatch_val_x)].join(""));
  } else {
  }
  cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(self__.prefer_table, function(mf__$1) {
    return function(old) {
      return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(old, dispatch_val_x, cljs.core.conj.cljs$core$IFn$_invoke$arity$2(cljs.core.get.cljs$core$IFn$_invoke$arity$3(old, dispatch_val_x, cljs.core.PersistentHashSet.EMPTY), dispatch_val_y));
    };
  }(mf__$1));
  return cljs.core.reset_cache(self__.method_cache, self__.method_table, self__.cached_hierarchy, self__.hierarchy);
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_default_dispatch_val$arity$1 = function(mf) {
  var self__ = this;
  var mf__$1 = this;
  return self__.default_dispatch_val;
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_remove_method$arity$2 = function(mf, dispatch_val) {
  var self__ = this;
  var mf__$1 = this;
  cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$3(self__.method_table, cljs.core.dissoc, dispatch_val);
  cljs.core.reset_cache(self__.method_cache, self__.method_table, self__.cached_hierarchy, self__.hierarchy);
  return mf__$1;
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_methods$arity$1 = function(mf) {
  var self__ = this;
  var mf__$1 = this;
  return cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(self__.method_table) : cljs.core.deref.call(null, self__.method_table);
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_prefers$arity$1 = function(mf) {
  var self__ = this;
  var mf__$1 = this;
  return cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(self__.prefer_table) : cljs.core.deref.call(null, self__.prefer_table);
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_dispatch_fn$arity$1 = function(mf) {
  var self__ = this;
  var mf__$1 = this;
  return self__.dispatch_fn;
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_add_method$arity$3 = function(mf, dispatch_val, method) {
  var self__ = this;
  var mf__$1 = this;
  cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4(self__.method_table, cljs.core.assoc, dispatch_val, method);
  cljs.core.reset_cache(self__.method_cache, self__.method_table, self__.cached_hierarchy, self__.hierarchy);
  return mf__$1;
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_reset$arity$1 = function(mf) {
  var self__ = this;
  var mf__$1 = this;
  cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(self__.method_table, function(mf__$1) {
    return function(mf__$2) {
      return cljs.core.PersistentArrayMap.EMPTY;
    };
  }(mf__$1));
  cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(self__.method_cache, function(mf__$1) {
    return function(mf__$2) {
      return cljs.core.PersistentArrayMap.EMPTY;
    };
  }(mf__$1));
  cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(self__.prefer_table, function(mf__$1) {
    return function(mf__$2) {
      return cljs.core.PersistentArrayMap.EMPTY;
    };
  }(mf__$1));
  cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(self__.cached_hierarchy, function(mf__$1) {
    return function(mf__$2) {
      return null;
    };
  }(mf__$1));
  return mf__$1;
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_get_method$arity$2 = function(mf, dispatch_val) {
  var self__ = this;
  var mf__$1 = this;
  if (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(self__.cached_hierarchy) : cljs.core.deref.call(null, self__.cached_hierarchy), cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(self__.hierarchy) : cljs.core.deref.call(null, self__.hierarchy))) {
  } else {
    cljs.core.reset_cache(self__.method_cache, self__.method_table, self__.cached_hierarchy, self__.hierarchy);
  }
  var temp__4423__auto__ = (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(self__.method_cache) : cljs.core.deref.call(null, self__.method_cache)).call(null, dispatch_val);
  if (cljs.core.truth_(temp__4423__auto__)) {
    var target_fn = temp__4423__auto__;
    return target_fn;
  } else {
    var temp__4423__auto____$1 = cljs.core.find_and_cache_best_method(self__.name, dispatch_val, self__.hierarchy, self__.method_table, self__.prefer_table, self__.method_cache, self__.cached_hierarchy);
    if (cljs.core.truth_(temp__4423__auto____$1)) {
      var target_fn = temp__4423__auto____$1;
      return target_fn;
    } else {
      return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(self__.method_table) : cljs.core.deref.call(null, self__.method_table)).call(null, self__.default_dispatch_val);
    }
  }
};
cljs.core.MultiFn.prototype.cljs$core$INamed$_name$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  return cljs.core._name(self__.name);
};
cljs.core.MultiFn.prototype.cljs$core$INamed$_namespace$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  return cljs.core._namespace(self__.name);
};
cljs.core.MultiFn.prototype.cljs$core$IHash$_hash$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  return goog.getUid(this$__$1);
};
cljs.core.MultiFn.getBasis = function() {
  return new cljs.core.PersistentVector(null, 8, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "name", "name", -810760592, null), new cljs.core.Symbol(null, "dispatch-fn", "dispatch-fn", -1401088155, null), new cljs.core.Symbol(null, "default-dispatch-val", "default-dispatch-val", -1231201266, null), new cljs.core.Symbol(null, "hierarchy", "hierarchy", 587061186, null), new cljs.core.Symbol(null, "method-table", "method-table", -1878263165, null), new cljs.core.Symbol(null, 
  "prefer-table", "prefer-table", 462168584, null), new cljs.core.Symbol(null, "method-cache", "method-cache", 1230193905, null), new cljs.core.Symbol(null, "cached-hierarchy", "cached-hierarchy", -1085460203, null)], null);
};
cljs.core.MultiFn.cljs$lang$type = true;
cljs.core.MultiFn.cljs$lang$ctorStr = "cljs.core/MultiFn";
cljs.core.MultiFn.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/MultiFn");
};
cljs.core.__GT_MultiFn = function cljs$core$__GT_MultiFn(name, dispatch_fn, default_dispatch_val, hierarchy, method_table, prefer_table, method_cache, cached_hierarchy) {
  return new cljs.core.MultiFn(name, dispatch_fn, default_dispatch_val, hierarchy, method_table, prefer_table, method_cache, cached_hierarchy);
};
cljs.core.remove_all_methods = function cljs$core$remove_all_methods(multifn) {
  return cljs.core._reset(multifn);
};
cljs.core.remove_method = function cljs$core$remove_method(multifn, dispatch_val) {
  return cljs.core._remove_method(multifn, dispatch_val);
};
cljs.core.prefer_method = function cljs$core$prefer_method(multifn, dispatch_val_x, dispatch_val_y) {
  return cljs.core._prefer_method(multifn, dispatch_val_x, dispatch_val_y);
};
cljs.core.methods$ = function cljs$core$methods(multifn) {
  return cljs.core._methods(multifn);
};
cljs.core.get_method = function cljs$core$get_method(multifn, dispatch_val) {
  return cljs.core._get_method(multifn, dispatch_val);
};
cljs.core.prefers = function cljs$core$prefers(multifn) {
  return cljs.core._prefers(multifn);
};
cljs.core.default_dispatch_val = function cljs$core$default_dispatch_val(multifn) {
  return cljs.core._default_dispatch_val(multifn);
};
cljs.core.dispatch_fn = function cljs$core$dispatch_fn(multifn) {
  return cljs.core._dispatch_fn(multifn);
};
cljs.core.UUID = function(uuid, __hash) {
  this.uuid = uuid;
  this.__hash = __hash;
  this.cljs$lang$protocol_mask$partition0$ = 2153775104;
  this.cljs$lang$protocol_mask$partition1$ = 2048;
};
cljs.core.UUID.prototype.toString = function() {
  var self__ = this;
  var _ = this;
  return self__.uuid;
};
cljs.core.UUID.prototype.equiv = function(other) {
  var self__ = this;
  var this$ = this;
  return this$.cljs$core$IEquiv$_equiv$arity$2(null, other);
};
cljs.core.UUID.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(_, other) {
  var self__ = this;
  var ___$1 = this;
  return other instanceof cljs.core.UUID && self__.uuid === other.uuid;
};
cljs.core.UUID.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(_, writer, ___$1) {
  var self__ = this;
  var ___$2 = this;
  return cljs.core._write(writer, [cljs.core.str('#uuid "'), cljs.core.str(self__.uuid), cljs.core.str('"')].join(""));
};
cljs.core.UUID.prototype.cljs$core$IHash$_hash$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  if (self__.__hash == null) {
    self__.__hash = cljs.core.hash(self__.uuid);
  } else {
  }
  return self__.__hash;
};
cljs.core.UUID.prototype.cljs$core$IComparable$_compare$arity$2 = function(_, other) {
  var self__ = this;
  var ___$1 = this;
  var G__11108 = self__.uuid;
  var G__11109 = other.uuid;
  return goog.array.defaultCompare(G__11108, G__11109);
};
cljs.core.UUID.getBasis = function() {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "uuid", "uuid", -504564192, null), cljs.core.with_meta(new cljs.core.Symbol(null, "__hash", "__hash", -1328796629, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.core.UUID.cljs$lang$type = true;
cljs.core.UUID.cljs$lang$ctorStr = "cljs.core/UUID";
cljs.core.UUID.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/UUID");
};
cljs.core.__GT_UUID = function cljs$core$__GT_UUID(uuid, __hash) {
  return new cljs.core.UUID(uuid, __hash);
};
cljs.core.uuid = function cljs$core$uuid(s) {
  return new cljs.core.UUID(s, null);
};
cljs.core.random_uuid = function cljs$core$random_uuid() {
  var hex = function cljs$core$random_uuid_$_hex() {
    return cljs.core.rand_int(16).toString(16);
  };
  var rhex = (8 | 3 & cljs.core.rand_int(16)).toString(16);
  return cljs.core.uuid([cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str("-"), cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str("-"), cljs.core.str("4"), cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str("-"), cljs.core.str(rhex), cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str(hex()), 
  cljs.core.str("-"), cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str(hex()), cljs.core.str(hex())].join(""));
};
cljs.core.pr_writer_ex_info = function cljs$core$pr_writer_ex_info(obj, writer, opts) {
  cljs.core._write(writer, "#error {:message ");
  cljs.core.pr_writer(obj.message, writer, opts);
  if (cljs.core.truth_(obj.data)) {
    cljs.core._write(writer, ", :data ");
    cljs.core.pr_writer(obj.data, writer, opts);
  } else {
  }
  if (cljs.core.truth_(obj.cause)) {
    cljs.core._write(writer, ", :cause ");
    cljs.core.pr_writer(obj.cause, writer, opts);
  } else {
  }
  return cljs.core._write(writer, "}");
};
cljs.core.ExceptionInfo = function cljs$core$ExceptionInfo(message, data, cause) {
  var e = new Error(message);
  var this$ = this;
  this$.message = message;
  this$.data = data;
  this$.cause = cause;
  this$.name = e.name;
  this$.description = e.description;
  this$.number = e.number;
  this$.fileName = e.fileName;
  this$.lineNumber = e.lineNumber;
  this$.columnNumber = e.columnNumber;
  this$.stack = e.stack;
  return this$;
};
cljs.core.ExceptionInfo.prototype.__proto__ = Error.prototype;
cljs.core.ExceptionInfo.prototype.cljs$core$IPrintWithWriter$ = true;
cljs.core.ExceptionInfo.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(obj, writer, opts) {
  var obj__$1 = this;
  return cljs.core.pr_writer_ex_info(obj__$1, writer, opts);
};
cljs.core.ExceptionInfo.prototype.toString = function() {
  var this$ = this;
  return cljs.core.pr_str_STAR_(this$);
};
cljs.core.ex_info = function cljs$core$ex_info(var_args) {
  var args11110 = [];
  var len__7198__auto___11113 = arguments.length;
  var i__7199__auto___11114 = 0;
  while (true) {
    if (i__7199__auto___11114 < len__7198__auto___11113) {
      args11110.push(arguments[i__7199__auto___11114]);
      var G__11115 = i__7199__auto___11114 + 1;
      i__7199__auto___11114 = G__11115;
      continue;
    } else {
    }
    break;
  }
  var G__11112 = args11110.length;
  switch(G__11112) {
    case 2:
      return cljs.core.ex_info.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return cljs.core.ex_info.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args11110.length)].join(""));;
  }
};
cljs.core.ex_info.cljs$core$IFn$_invoke$arity$2 = function(msg, data) {
  return cljs.core.ex_info.cljs$core$IFn$_invoke$arity$3(msg, data, null);
};
cljs.core.ex_info.cljs$core$IFn$_invoke$arity$3 = function(msg, data, cause) {
  return new cljs.core.ExceptionInfo(msg, data, cause);
};
cljs.core.ex_info.cljs$lang$maxFixedArity = 3;
cljs.core.ex_data = function cljs$core$ex_data(ex) {
  if (ex instanceof cljs.core.ExceptionInfo) {
    return ex.data;
  } else {
    return null;
  }
};
cljs.core.ex_message = function cljs$core$ex_message(ex) {
  if (ex instanceof Error) {
    return ex.message;
  } else {
    return null;
  }
};
cljs.core.ex_cause = function cljs$core$ex_cause(ex) {
  if (ex instanceof cljs.core.ExceptionInfo) {
    return ex.cause;
  } else {
    return null;
  }
};
cljs.core.comparator = function cljs$core$comparator(pred) {
  return function(x, y) {
    if (cljs.core.truth_(pred.cljs$core$IFn$_invoke$arity$2 ? pred.cljs$core$IFn$_invoke$arity$2(x, y) : pred.call(null, x, y))) {
      return -1;
    } else {
      if (cljs.core.truth_(pred.cljs$core$IFn$_invoke$arity$2 ? pred.cljs$core$IFn$_invoke$arity$2(y, x) : pred.call(null, y, x))) {
        return 1;
      } else {
        return 0;
      }
    }
  };
};
cljs.core.special_symbol_QMARK_ = function cljs$core$special_symbol_QMARK_(x) {
  return cljs.core.contains_QMARK_(new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 19, [new cljs.core.Symbol(null, "\x26", "\x26", -2144855648, null), null, new cljs.core.Symbol(null, "defrecord*", "defrecord*", -1936366207, null), null, new cljs.core.Symbol(null, "try", "try", -1273693247, null), null, new cljs.core.Symbol(null, "loop*", "loop*", 615029416, null), null, new cljs.core.Symbol(null, "do", "do", 1686842252, null), null, new cljs.core.Symbol(null, "letfn*", 
  "letfn*", -110097810, null), null, new cljs.core.Symbol(null, "if", "if", 1181717262, null), null, new cljs.core.Symbol(null, "new", "new", -444906321, null), null, new cljs.core.Symbol(null, "ns", "ns", 2082130287, null), null, new cljs.core.Symbol(null, "deftype*", "deftype*", 962659890, null), null, new cljs.core.Symbol(null, "let*", "let*", 1920721458, null), null, new cljs.core.Symbol(null, "js*", "js*", -1134233646, null), null, new cljs.core.Symbol(null, "fn*", "fn*", -752876845, null), 
  null, new cljs.core.Symbol(null, "recur", "recur", 1202958259, null), null, new cljs.core.Symbol(null, "set!", "set!", 250714521, null), null, new cljs.core.Symbol(null, ".", ".", 1975675962, null), null, new cljs.core.Symbol(null, "quote", "quote", 1377916282, null), null, new cljs.core.Symbol(null, "throw", "throw", 595905694, null), null, new cljs.core.Symbol(null, "def", "def", 597100991, null), null], null), null), x);
};
cljs.core.test = function cljs$core$test(v) {
  var f = v.cljs$lang$test;
  if (cljs.core.truth_(f)) {
    f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null);
    return new cljs.core.Keyword(null, "ok", "ok", 967785236);
  } else {
    return new cljs.core.Keyword(null, "no-test", "no-test", -1679482642);
  }
};
cljs.core.TaggedLiteral = function(tag, form) {
  this.tag = tag;
  this.form = form;
  this.cljs$lang$protocol_mask$partition0$ = 2153775360;
  this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.TaggedLiteral.prototype.toString = function() {
  var self__ = this;
  var coll = this;
  return cljs.core.pr_str_STAR_(coll);
};
cljs.core.TaggedLiteral.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(this$, other) {
  var self__ = this;
  var this$__$1 = this;
  return other instanceof cljs.core.TaggedLiteral && cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(self__.tag, other.tag) && cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(self__.form, other.form);
};
cljs.core.TaggedLiteral.prototype.cljs$core$IHash$_hash$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  return 31 * cljs.core.hash(self__.tag) + cljs.core.hash(self__.form);
};
cljs.core.TaggedLiteral.prototype.cljs$core$ILookup$_lookup$arity$2 = function(this$, v) {
  var self__ = this;
  var this$__$1 = this;
  return cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(this$__$1, v, null);
};
cljs.core.TaggedLiteral.prototype.cljs$core$ILookup$_lookup$arity$3 = function(this$, v, not_found) {
  var self__ = this;
  var this$__$1 = this;
  var G__11117 = v instanceof cljs.core.Keyword ? v.fqn : null;
  switch(G__11117) {
    case "tag":
      return self__.tag;
      break;
    case "form":
      return self__.form;
      break;
    default:
      return not_found;
  }
};
cljs.core.TaggedLiteral.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(o, writer, opts) {
  var self__ = this;
  var o__$1 = this;
  cljs.core._write(writer, [cljs.core.str("#"), cljs.core.str(self__.tag), cljs.core.str(" ")].join(""));
  return cljs.core.pr_writer(self__.form, writer, opts);
};
cljs.core.TaggedLiteral.getBasis = function() {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "tag", "tag", 350170304, null), new cljs.core.Symbol(null, "form", "form", 16469056, null)], null);
};
cljs.core.TaggedLiteral.cljs$lang$type = true;
cljs.core.TaggedLiteral.cljs$lang$ctorStr = "cljs.core/TaggedLiteral";
cljs.core.TaggedLiteral.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/TaggedLiteral");
};
cljs.core.__GT_TaggedLiteral = function cljs$core$__GT_TaggedLiteral(tag, form) {
  return new cljs.core.TaggedLiteral(tag, form);
};
cljs.core.tagged_literal_QMARK_ = function cljs$core$tagged_literal_QMARK_(value) {
  return value instanceof cljs.core.TaggedLiteral;
};
cljs.core.tagged_literal = function cljs$core$tagged_literal(tag, form) {
  if (tag instanceof cljs.core.Symbol) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.array_seq([cljs.core.list(new cljs.core.Symbol(null, "symbol?", "symbol?", 1820680511, null), new cljs.core.Symbol(null, "tag", "tag", 350170304, null))], 0)))].join(""));
  }
  return new cljs.core.TaggedLiteral(tag, form);
};
cljs.core.js_reserved_arr = ["abstract", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue", "debugger", "default", "delete", "do", "double", "else", "enum", "export", "extends", "final", "finally", "float", "for", "function", "goto", "if", "implements", "import", "in", "instanceof", "int", "interface", "let", "long", "native", "new", "package", "private", "protected", "public", "return", "short", "static", "super", "switch", "synchronized", "this", "throw", "throws", 
"transient", "try", "typeof", "var", "void", "volatile", "while", "with", "yield", "methods", "null"];
cljs.core.js_reserved = null;
cljs.core.js_reserved_QMARK_ = function cljs$core$js_reserved_QMARK_(x) {
  if (cljs.core.js_reserved == null) {
    cljs.core.js_reserved = cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(p1__11119_SHARP_, p2__11120_SHARP_) {
      goog.object.set(p1__11119_SHARP_, p2__11120_SHARP_, true);
      return p1__11119_SHARP_;
    }, {}, cljs.core.js_reserved_arr);
  } else {
  }
  return cljs.core.js_reserved.hasOwnProperty(x);
};
cljs.core.demunge_pattern = function cljs$core$demunge_pattern() {
  if (cljs.core.truth_(cljs.core.DEMUNGE_PATTERN)) {
  } else {
    cljs.core.DEMUNGE_PATTERN = function() {
      var ks = cljs.core.sort.cljs$core$IFn$_invoke$arity$2(function(a, b) {
        return b.length - a.length;
      }, cljs.core.js_keys(cljs.core.DEMUNGE_MAP));
      var ks__$1 = ks;
      var ret = "";
      while (true) {
        if (cljs.core.seq(ks__$1)) {
          var G__11123 = cljs.core.next(ks__$1);
          var G__11124 = [cljs.core.str(function() {
            var G__11122 = ret;
            var G__11122__$1 = !(ret === "") ? [cljs.core.str(G__11122), cljs.core.str("|")].join("") : G__11122;
            return G__11122__$1;
          }()), cljs.core.str(cljs.core.first(ks__$1))].join("");
          ks__$1 = G__11123;
          ret = G__11124;
          continue;
        } else {
          return [cljs.core.str(ret), cljs.core.str("|\\$")].join("");
        }
        break;
      }
    }();
  }
  return cljs.core.DEMUNGE_PATTERN;
};
cljs.core.munge_str = function cljs$core$munge_str(name) {
  var sb = new goog.string.StringBuffer;
  var i_11125 = 0;
  while (true) {
    if (i_11125 < name.length) {
      var c_11126 = name.charAt(i_11125);
      var sub_11127 = goog.object.get(cljs.core.CHAR_MAP, c_11126);
      if (!(sub_11127 == null)) {
        sb.append(sub_11127);
      } else {
        sb.append(c_11126);
      }
      var G__11128 = i_11125 + 1;
      i_11125 = G__11128;
      continue;
    } else {
    }
    break;
  }
  return sb.toString();
};
cljs.core.munge = function cljs$core$munge(name) {
  var name_SINGLEQUOTE_ = cljs.core.munge_str([cljs.core.str(name)].join(""));
  var name_SINGLEQUOTE___$1 = name_SINGLEQUOTE_ === ".." ? "_DOT__DOT_" : cljs.core.truth_(cljs.core.js_reserved_QMARK_(name_SINGLEQUOTE_)) ? [cljs.core.str(name_SINGLEQUOTE_), cljs.core.str("$")].join("") : name_SINGLEQUOTE_;
  if (name instanceof cljs.core.Symbol) {
    return cljs.core.symbol.cljs$core$IFn$_invoke$arity$1(name_SINGLEQUOTE___$1);
  } else {
    return [cljs.core.str(name_SINGLEQUOTE___$1)].join("");
  }
};
cljs.core.demunge_str = function cljs$core$demunge_str(munged_name) {
  var r = new RegExp(cljs.core.demunge_pattern(), "g");
  var munged_name__$1 = cljs.core.truth_(goog.string.endsWith(munged_name, "$")) ? munged_name.substring(0, munged_name.length - 1) : munged_name;
  var ret = "";
  var last_match_end = 0;
  while (true) {
    var temp__4423__auto__ = r.exec(munged_name__$1);
    if (cljs.core.truth_(temp__4423__auto__)) {
      var match = temp__4423__auto__;
      var vec__11130 = match;
      var x = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__11130, 0, null);
      var G__11131 = [cljs.core.str(ret), cljs.core.str(munged_name__$1.substring(last_match_end, r.lastIndex - x.length)), cljs.core.str(x === "$" ? "/" : goog.object.get(cljs.core.DEMUNGE_MAP, x))].join("");
      var G__11132 = r.lastIndex;
      ret = G__11131;
      last_match_end = G__11132;
      continue;
    } else {
      return [cljs.core.str(ret), cljs.core.str(munged_name__$1.substring(last_match_end, munged_name__$1.length))].join("");
    }
    break;
  }
};
cljs.core.demunge = function cljs$core$demunge(name) {
  return (name instanceof cljs.core.Symbol ? cljs.core.symbol : cljs.core.str).call(null, function() {
    var name_SINGLEQUOTE_ = [cljs.core.str(name)].join("");
    if (name_SINGLEQUOTE_ === "_DOT__DOT_") {
      return "..";
    } else {
      return cljs.core.demunge_str([cljs.core.str(name)].join(""));
    }
  }());
};
cljs.core.ns_lookup = function cljs$core$ns_lookup(ns_obj, k) {
  return function() {
    return goog.object.get(ns_obj, k);
  };
};
cljs.core.Namespace = function(obj, name) {
  this.obj = obj;
  this.name = name;
  this.cljs$lang$protocol_mask$partition0$ = 6291456;
  this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.Namespace.prototype.findInternedVar = function(sym) {
  var self__ = this;
  var this$ = this;
  var k = cljs.core.munge([cljs.core.str(sym)].join(""));
  if (goog.object.containsKey(self__.obj, k)) {
    var var_sym = cljs.core.symbol.cljs$core$IFn$_invoke$arity$2([cljs.core.str(self__.name)].join(""), [cljs.core.str(sym)].join(""));
    var var_meta = new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "ns", "ns", 441598760), this$], null);
    return new cljs.core.Var(cljs.core.ns_lookup(self__.obj, k), var_sym, var_meta);
  } else {
    return null;
  }
};
cljs.core.Namespace.prototype.getName = function() {
  var self__ = this;
  var _ = this;
  return self__.name;
};
cljs.core.Namespace.prototype.toString = function() {
  var self__ = this;
  var _ = this;
  return [cljs.core.str(self__.name)].join("");
};
cljs.core.Namespace.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(_, other) {
  var self__ = this;
  var ___$1 = this;
  if (other instanceof cljs.core.Namespace) {
    return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(self__.name, other.name);
  } else {
    return false;
  }
};
cljs.core.Namespace.prototype.cljs$core$IHash$_hash$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return cljs.core.hash(self__.name);
};
cljs.core.Namespace.getBasis = function() {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "obj", "obj", -1672671807, null), new cljs.core.Symbol(null, "name", "name", -810760592, null)], null);
};
cljs.core.Namespace.cljs$lang$type = true;
cljs.core.Namespace.cljs$lang$ctorStr = "cljs.core/Namespace";
cljs.core.Namespace.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write(writer__6739__auto__, "cljs.core/Namespace");
};
cljs.core.__GT_Namespace = function cljs$core$__GT_Namespace(obj, name) {
  return new cljs.core.Namespace(obj, name);
};
cljs.core.NS_CACHE = null;
cljs.core.find_ns_obj_STAR_ = function cljs$core$find_ns_obj_STAR_(ctxt, xs) {
  while (true) {
    if (ctxt == null) {
      return null;
    } else {
      if (xs == null) {
        return ctxt;
      } else {
        var G__11137 = function() {
          var G__11135 = ctxt;
          var G__11136 = cljs.core.first(xs);
          return goog.object.get(G__11135, G__11136);
        }();
        var G__11138 = cljs.core.next(xs);
        ctxt = G__11137;
        xs = G__11138;
        continue;
      }
    }
    break;
  }
};
cljs.core.find_ns_obj = function cljs$core$find_ns_obj(ns) {
  var munged_ns = cljs.core.munge([cljs.core.str(ns)].join(""));
  var segs = munged_ns.split(".");
  var G__11142 = cljs.core._STAR_target_STAR_;
  switch(G__11142) {
    case "nodejs":
      if (COMPILED) {
        return cljs.core.find_ns_obj_STAR_(function() {
          try {
            var G__11144 = cljs.core.first(segs);
            return eval(G__11144);
          } catch (e11143) {
            if (e11143 instanceof ReferenceError) {
              var e = e11143;
              return null;
            } else {
              throw e11143;
            }
          }
        }(), cljs.core.next(segs));
      } else {
        return cljs.core.find_ns_obj_STAR_(global, segs);
      }
      break;
    case "default":
      return cljs.core.find_ns_obj_STAR_(goog.global, segs);
      break;
    default:
      throw new Error([cljs.core.str("find-ns-obj not supported for target "), cljs.core.str(cljs.core._STAR_target_STAR_)].join(""));;
  }
};
cljs.core.ns_interns_STAR_ = function cljs$core$ns_interns_STAR_(sym) {
  var ns_obj = cljs.core.find_ns_obj(sym);
  var ns = new cljs.core.Namespace(ns_obj, sym);
  var step = function(ns_obj, ns) {
    return function cljs$core$ns_interns_STAR__$_step(ret, k) {
      var var_sym = cljs.core.symbol.cljs$core$IFn$_invoke$arity$1(cljs.core.demunge(k));
      return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(ret, var_sym, new cljs.core.Var(function(var_sym, ns_obj, ns) {
        return function() {
          return goog.object.get(ns_obj, k);
        };
      }(var_sym, ns_obj, ns), cljs.core.symbol.cljs$core$IFn$_invoke$arity$2([cljs.core.str(sym)].join(""), [cljs.core.str(var_sym)].join("")), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "ns", "ns", 441598760), ns], null)));
    };
  }(ns_obj, ns);
  return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(step, cljs.core.PersistentArrayMap.EMPTY, cljs.core.js_keys(ns_obj));
};
cljs.core.create_ns = function cljs$core$create_ns(var_args) {
  var args11146 = [];
  var len__7198__auto___11149 = arguments.length;
  var i__7199__auto___11150 = 0;
  while (true) {
    if (i__7199__auto___11150 < len__7198__auto___11149) {
      args11146.push(arguments[i__7199__auto___11150]);
      var G__11151 = i__7199__auto___11150 + 1;
      i__7199__auto___11150 = G__11151;
      continue;
    } else {
    }
    break;
  }
  var G__11148 = args11146.length;
  switch(G__11148) {
    case 1:
      return cljs.core.create_ns.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return cljs.core.create_ns.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args11146.length)].join(""));;
  }
};
cljs.core.create_ns.cljs$core$IFn$_invoke$arity$1 = function(sym) {
  return cljs.core.create_ns.cljs$core$IFn$_invoke$arity$2(sym, cljs.core.find_ns_obj(sym));
};
cljs.core.create_ns.cljs$core$IFn$_invoke$arity$2 = function(sym, ns_obj) {
  return new cljs.core.Namespace(ns_obj, sym);
};
cljs.core.create_ns.cljs$lang$maxFixedArity = 2;
cljs.core.find_ns = function cljs$core$find_ns(ns) {
  if (cljs.core.NS_CACHE == null) {
    cljs.core.NS_CACHE = function() {
      var G__11154 = cljs.core.PersistentArrayMap.EMPTY;
      return cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__11154) : cljs.core.atom.call(null, G__11154);
    }();
  } else {
  }
  var the_ns = cljs.core.get.cljs$core$IFn$_invoke$arity$2(cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(cljs.core.NS_CACHE) : cljs.core.deref.call(null, cljs.core.NS_CACHE), ns);
  if (!(the_ns == null)) {
    return the_ns;
  } else {
    var ns_obj = cljs.core.find_ns_obj(ns);
    if (ns_obj == null) {
      return null;
    } else {
      var new_ns = cljs.core.create_ns.cljs$core$IFn$_invoke$arity$2(ns, ns_obj);
      cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4(cljs.core.NS_CACHE, cljs.core.assoc, ns, new_ns);
      return new_ns;
    }
  }
};
cljs.core.find_macros_ns = function cljs$core$find_macros_ns(ns) {
  if (cljs.core.NS_CACHE == null) {
    cljs.core.NS_CACHE = function() {
      var G__11156 = cljs.core.PersistentArrayMap.EMPTY;
      return cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__11156) : cljs.core.atom.call(null, G__11156);
    }();
  } else {
  }
  var the_ns = cljs.core.get.cljs$core$IFn$_invoke$arity$2(cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(cljs.core.NS_CACHE) : cljs.core.deref.call(null, cljs.core.NS_CACHE), ns);
  if (!(the_ns == null)) {
    return the_ns;
  } else {
    var ns_str = [cljs.core.str(ns)].join("");
    var ns__$1 = !goog.string.contains(ns_str, "$macros") ? cljs.core.symbol.cljs$core$IFn$_invoke$arity$1([cljs.core.str(ns_str), cljs.core.str("$macros")].join("")) : ns;
    var ns_obj = cljs.core.find_ns_obj(ns__$1);
    if (ns_obj == null) {
      return null;
    } else {
      var new_ns = cljs.core.create_ns.cljs$core$IFn$_invoke$arity$2(ns__$1, ns_obj);
      cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4(cljs.core.NS_CACHE, cljs.core.assoc, ns__$1, new_ns);
      return new_ns;
    }
  }
};
cljs.core.ns_name = function cljs$core$ns_name(ns_obj) {
  return ns_obj.name;
};
goog.provide("om.dom");
goog.require("cljs.core");
goog.require("goog.object");
om.dom.a = function om$dom$a(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12241 = arguments.length;
  var i__7199__auto___12242 = 0;
  while (true) {
    if (i__7199__auto___12242 < len__7198__auto___12241) {
      args__7205__auto__.push(arguments[i__7199__auto___12242]);
      var G__12243 = i__7199__auto___12242 + 1;
      i__7199__auto___12242 = G__12243;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.a.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.a.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.a.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.a.cljs$lang$maxFixedArity = 1;
om.dom.a.cljs$lang$applyTo = function(seq11997) {
  var G__11998 = cljs.core.first.call(null, seq11997);
  var seq11997__$1 = cljs.core.next.call(null, seq11997);
  return om.dom.a.cljs$core$IFn$_invoke$arity$variadic(G__11998, seq11997__$1);
};
om.dom.abbr = function om$dom$abbr(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12244 = arguments.length;
  var i__7199__auto___12245 = 0;
  while (true) {
    if (i__7199__auto___12245 < len__7198__auto___12244) {
      args__7205__auto__.push(arguments[i__7199__auto___12245]);
      var G__12246 = i__7199__auto___12245 + 1;
      i__7199__auto___12245 = G__12246;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.abbr.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.abbr.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.abbr.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.abbr.cljs$lang$maxFixedArity = 1;
om.dom.abbr.cljs$lang$applyTo = function(seq11999) {
  var G__12000 = cljs.core.first.call(null, seq11999);
  var seq11999__$1 = cljs.core.next.call(null, seq11999);
  return om.dom.abbr.cljs$core$IFn$_invoke$arity$variadic(G__12000, seq11999__$1);
};
om.dom.address = function om$dom$address(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12247 = arguments.length;
  var i__7199__auto___12248 = 0;
  while (true) {
    if (i__7199__auto___12248 < len__7198__auto___12247) {
      args__7205__auto__.push(arguments[i__7199__auto___12248]);
      var G__12249 = i__7199__auto___12248 + 1;
      i__7199__auto___12248 = G__12249;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.address.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.address.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.address.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.address.cljs$lang$maxFixedArity = 1;
om.dom.address.cljs$lang$applyTo = function(seq12001) {
  var G__12002 = cljs.core.first.call(null, seq12001);
  var seq12001__$1 = cljs.core.next.call(null, seq12001);
  return om.dom.address.cljs$core$IFn$_invoke$arity$variadic(G__12002, seq12001__$1);
};
om.dom.area = function om$dom$area(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12250 = arguments.length;
  var i__7199__auto___12251 = 0;
  while (true) {
    if (i__7199__auto___12251 < len__7198__auto___12250) {
      args__7205__auto__.push(arguments[i__7199__auto___12251]);
      var G__12252 = i__7199__auto___12251 + 1;
      i__7199__auto___12251 = G__12252;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.area.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.area.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.area.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.area.cljs$lang$maxFixedArity = 1;
om.dom.area.cljs$lang$applyTo = function(seq12003) {
  var G__12004 = cljs.core.first.call(null, seq12003);
  var seq12003__$1 = cljs.core.next.call(null, seq12003);
  return om.dom.area.cljs$core$IFn$_invoke$arity$variadic(G__12004, seq12003__$1);
};
om.dom.article = function om$dom$article(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12253 = arguments.length;
  var i__7199__auto___12254 = 0;
  while (true) {
    if (i__7199__auto___12254 < len__7198__auto___12253) {
      args__7205__auto__.push(arguments[i__7199__auto___12254]);
      var G__12255 = i__7199__auto___12254 + 1;
      i__7199__auto___12254 = G__12255;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.article.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.article.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.article.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.article.cljs$lang$maxFixedArity = 1;
om.dom.article.cljs$lang$applyTo = function(seq12005) {
  var G__12006 = cljs.core.first.call(null, seq12005);
  var seq12005__$1 = cljs.core.next.call(null, seq12005);
  return om.dom.article.cljs$core$IFn$_invoke$arity$variadic(G__12006, seq12005__$1);
};
om.dom.aside = function om$dom$aside(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12256 = arguments.length;
  var i__7199__auto___12257 = 0;
  while (true) {
    if (i__7199__auto___12257 < len__7198__auto___12256) {
      args__7205__auto__.push(arguments[i__7199__auto___12257]);
      var G__12258 = i__7199__auto___12257 + 1;
      i__7199__auto___12257 = G__12258;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.aside.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.aside.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.aside.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.aside.cljs$lang$maxFixedArity = 1;
om.dom.aside.cljs$lang$applyTo = function(seq12007) {
  var G__12008 = cljs.core.first.call(null, seq12007);
  var seq12007__$1 = cljs.core.next.call(null, seq12007);
  return om.dom.aside.cljs$core$IFn$_invoke$arity$variadic(G__12008, seq12007__$1);
};
om.dom.audio = function om$dom$audio(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12259 = arguments.length;
  var i__7199__auto___12260 = 0;
  while (true) {
    if (i__7199__auto___12260 < len__7198__auto___12259) {
      args__7205__auto__.push(arguments[i__7199__auto___12260]);
      var G__12261 = i__7199__auto___12260 + 1;
      i__7199__auto___12260 = G__12261;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.audio.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.audio.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.audio.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.audio.cljs$lang$maxFixedArity = 1;
om.dom.audio.cljs$lang$applyTo = function(seq12009) {
  var G__12010 = cljs.core.first.call(null, seq12009);
  var seq12009__$1 = cljs.core.next.call(null, seq12009);
  return om.dom.audio.cljs$core$IFn$_invoke$arity$variadic(G__12010, seq12009__$1);
};
om.dom.b = function om$dom$b(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12262 = arguments.length;
  var i__7199__auto___12263 = 0;
  while (true) {
    if (i__7199__auto___12263 < len__7198__auto___12262) {
      args__7205__auto__.push(arguments[i__7199__auto___12263]);
      var G__12264 = i__7199__auto___12263 + 1;
      i__7199__auto___12263 = G__12264;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.b.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.b.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.b.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.b.cljs$lang$maxFixedArity = 1;
om.dom.b.cljs$lang$applyTo = function(seq12011) {
  var G__12012 = cljs.core.first.call(null, seq12011);
  var seq12011__$1 = cljs.core.next.call(null, seq12011);
  return om.dom.b.cljs$core$IFn$_invoke$arity$variadic(G__12012, seq12011__$1);
};
om.dom.base = function om$dom$base(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12265 = arguments.length;
  var i__7199__auto___12266 = 0;
  while (true) {
    if (i__7199__auto___12266 < len__7198__auto___12265) {
      args__7205__auto__.push(arguments[i__7199__auto___12266]);
      var G__12267 = i__7199__auto___12266 + 1;
      i__7199__auto___12266 = G__12267;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.base.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.base.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.base.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.base.cljs$lang$maxFixedArity = 1;
om.dom.base.cljs$lang$applyTo = function(seq12013) {
  var G__12014 = cljs.core.first.call(null, seq12013);
  var seq12013__$1 = cljs.core.next.call(null, seq12013);
  return om.dom.base.cljs$core$IFn$_invoke$arity$variadic(G__12014, seq12013__$1);
};
om.dom.bdi = function om$dom$bdi(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12268 = arguments.length;
  var i__7199__auto___12269 = 0;
  while (true) {
    if (i__7199__auto___12269 < len__7198__auto___12268) {
      args__7205__auto__.push(arguments[i__7199__auto___12269]);
      var G__12270 = i__7199__auto___12269 + 1;
      i__7199__auto___12269 = G__12270;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.bdi.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.bdi.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.bdi.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.bdi.cljs$lang$maxFixedArity = 1;
om.dom.bdi.cljs$lang$applyTo = function(seq12015) {
  var G__12016 = cljs.core.first.call(null, seq12015);
  var seq12015__$1 = cljs.core.next.call(null, seq12015);
  return om.dom.bdi.cljs$core$IFn$_invoke$arity$variadic(G__12016, seq12015__$1);
};
om.dom.bdo = function om$dom$bdo(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12271 = arguments.length;
  var i__7199__auto___12272 = 0;
  while (true) {
    if (i__7199__auto___12272 < len__7198__auto___12271) {
      args__7205__auto__.push(arguments[i__7199__auto___12272]);
      var G__12273 = i__7199__auto___12272 + 1;
      i__7199__auto___12272 = G__12273;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.bdo.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.bdo.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.bdo.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.bdo.cljs$lang$maxFixedArity = 1;
om.dom.bdo.cljs$lang$applyTo = function(seq12017) {
  var G__12018 = cljs.core.first.call(null, seq12017);
  var seq12017__$1 = cljs.core.next.call(null, seq12017);
  return om.dom.bdo.cljs$core$IFn$_invoke$arity$variadic(G__12018, seq12017__$1);
};
om.dom.big = function om$dom$big(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12274 = arguments.length;
  var i__7199__auto___12275 = 0;
  while (true) {
    if (i__7199__auto___12275 < len__7198__auto___12274) {
      args__7205__auto__.push(arguments[i__7199__auto___12275]);
      var G__12276 = i__7199__auto___12275 + 1;
      i__7199__auto___12275 = G__12276;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.big.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.big.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.big.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.big.cljs$lang$maxFixedArity = 1;
om.dom.big.cljs$lang$applyTo = function(seq12019) {
  var G__12020 = cljs.core.first.call(null, seq12019);
  var seq12019__$1 = cljs.core.next.call(null, seq12019);
  return om.dom.big.cljs$core$IFn$_invoke$arity$variadic(G__12020, seq12019__$1);
};
om.dom.blockquote = function om$dom$blockquote(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12277 = arguments.length;
  var i__7199__auto___12278 = 0;
  while (true) {
    if (i__7199__auto___12278 < len__7198__auto___12277) {
      args__7205__auto__.push(arguments[i__7199__auto___12278]);
      var G__12279 = i__7199__auto___12278 + 1;
      i__7199__auto___12278 = G__12279;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.blockquote.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.blockquote.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.blockquote.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.blockquote.cljs$lang$maxFixedArity = 1;
om.dom.blockquote.cljs$lang$applyTo = function(seq12021) {
  var G__12022 = cljs.core.first.call(null, seq12021);
  var seq12021__$1 = cljs.core.next.call(null, seq12021);
  return om.dom.blockquote.cljs$core$IFn$_invoke$arity$variadic(G__12022, seq12021__$1);
};
om.dom.body = function om$dom$body(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12280 = arguments.length;
  var i__7199__auto___12281 = 0;
  while (true) {
    if (i__7199__auto___12281 < len__7198__auto___12280) {
      args__7205__auto__.push(arguments[i__7199__auto___12281]);
      var G__12282 = i__7199__auto___12281 + 1;
      i__7199__auto___12281 = G__12282;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.body.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.body.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.body.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.body.cljs$lang$maxFixedArity = 1;
om.dom.body.cljs$lang$applyTo = function(seq12023) {
  var G__12024 = cljs.core.first.call(null, seq12023);
  var seq12023__$1 = cljs.core.next.call(null, seq12023);
  return om.dom.body.cljs$core$IFn$_invoke$arity$variadic(G__12024, seq12023__$1);
};
om.dom.br = function om$dom$br(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12283 = arguments.length;
  var i__7199__auto___12284 = 0;
  while (true) {
    if (i__7199__auto___12284 < len__7198__auto___12283) {
      args__7205__auto__.push(arguments[i__7199__auto___12284]);
      var G__12285 = i__7199__auto___12284 + 1;
      i__7199__auto___12284 = G__12285;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.br.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.br.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.br.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.br.cljs$lang$maxFixedArity = 1;
om.dom.br.cljs$lang$applyTo = function(seq12025) {
  var G__12026 = cljs.core.first.call(null, seq12025);
  var seq12025__$1 = cljs.core.next.call(null, seq12025);
  return om.dom.br.cljs$core$IFn$_invoke$arity$variadic(G__12026, seq12025__$1);
};
om.dom.button = function om$dom$button(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12286 = arguments.length;
  var i__7199__auto___12287 = 0;
  while (true) {
    if (i__7199__auto___12287 < len__7198__auto___12286) {
      args__7205__auto__.push(arguments[i__7199__auto___12287]);
      var G__12288 = i__7199__auto___12287 + 1;
      i__7199__auto___12287 = G__12288;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.button.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.button.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.button.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.button.cljs$lang$maxFixedArity = 1;
om.dom.button.cljs$lang$applyTo = function(seq12027) {
  var G__12028 = cljs.core.first.call(null, seq12027);
  var seq12027__$1 = cljs.core.next.call(null, seq12027);
  return om.dom.button.cljs$core$IFn$_invoke$arity$variadic(G__12028, seq12027__$1);
};
om.dom.canvas = function om$dom$canvas(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12289 = arguments.length;
  var i__7199__auto___12290 = 0;
  while (true) {
    if (i__7199__auto___12290 < len__7198__auto___12289) {
      args__7205__auto__.push(arguments[i__7199__auto___12290]);
      var G__12291 = i__7199__auto___12290 + 1;
      i__7199__auto___12290 = G__12291;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.canvas.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.canvas.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.canvas.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.canvas.cljs$lang$maxFixedArity = 1;
om.dom.canvas.cljs$lang$applyTo = function(seq12029) {
  var G__12030 = cljs.core.first.call(null, seq12029);
  var seq12029__$1 = cljs.core.next.call(null, seq12029);
  return om.dom.canvas.cljs$core$IFn$_invoke$arity$variadic(G__12030, seq12029__$1);
};
om.dom.caption = function om$dom$caption(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12292 = arguments.length;
  var i__7199__auto___12293 = 0;
  while (true) {
    if (i__7199__auto___12293 < len__7198__auto___12292) {
      args__7205__auto__.push(arguments[i__7199__auto___12293]);
      var G__12294 = i__7199__auto___12293 + 1;
      i__7199__auto___12293 = G__12294;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.caption.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.caption.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.caption.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.caption.cljs$lang$maxFixedArity = 1;
om.dom.caption.cljs$lang$applyTo = function(seq12031) {
  var G__12032 = cljs.core.first.call(null, seq12031);
  var seq12031__$1 = cljs.core.next.call(null, seq12031);
  return om.dom.caption.cljs$core$IFn$_invoke$arity$variadic(G__12032, seq12031__$1);
};
om.dom.cite = function om$dom$cite(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12295 = arguments.length;
  var i__7199__auto___12296 = 0;
  while (true) {
    if (i__7199__auto___12296 < len__7198__auto___12295) {
      args__7205__auto__.push(arguments[i__7199__auto___12296]);
      var G__12297 = i__7199__auto___12296 + 1;
      i__7199__auto___12296 = G__12297;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.cite.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.cite.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.cite.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.cite.cljs$lang$maxFixedArity = 1;
om.dom.cite.cljs$lang$applyTo = function(seq12033) {
  var G__12034 = cljs.core.first.call(null, seq12033);
  var seq12033__$1 = cljs.core.next.call(null, seq12033);
  return om.dom.cite.cljs$core$IFn$_invoke$arity$variadic(G__12034, seq12033__$1);
};
om.dom.code = function om$dom$code(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12298 = arguments.length;
  var i__7199__auto___12299 = 0;
  while (true) {
    if (i__7199__auto___12299 < len__7198__auto___12298) {
      args__7205__auto__.push(arguments[i__7199__auto___12299]);
      var G__12300 = i__7199__auto___12299 + 1;
      i__7199__auto___12299 = G__12300;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.code.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.code.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.code.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.code.cljs$lang$maxFixedArity = 1;
om.dom.code.cljs$lang$applyTo = function(seq12035) {
  var G__12036 = cljs.core.first.call(null, seq12035);
  var seq12035__$1 = cljs.core.next.call(null, seq12035);
  return om.dom.code.cljs$core$IFn$_invoke$arity$variadic(G__12036, seq12035__$1);
};
om.dom.col = function om$dom$col(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12301 = arguments.length;
  var i__7199__auto___12302 = 0;
  while (true) {
    if (i__7199__auto___12302 < len__7198__auto___12301) {
      args__7205__auto__.push(arguments[i__7199__auto___12302]);
      var G__12303 = i__7199__auto___12302 + 1;
      i__7199__auto___12302 = G__12303;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.col.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.col.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.col.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.col.cljs$lang$maxFixedArity = 1;
om.dom.col.cljs$lang$applyTo = function(seq12037) {
  var G__12038 = cljs.core.first.call(null, seq12037);
  var seq12037__$1 = cljs.core.next.call(null, seq12037);
  return om.dom.col.cljs$core$IFn$_invoke$arity$variadic(G__12038, seq12037__$1);
};
om.dom.colgroup = function om$dom$colgroup(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12304 = arguments.length;
  var i__7199__auto___12305 = 0;
  while (true) {
    if (i__7199__auto___12305 < len__7198__auto___12304) {
      args__7205__auto__.push(arguments[i__7199__auto___12305]);
      var G__12306 = i__7199__auto___12305 + 1;
      i__7199__auto___12305 = G__12306;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.colgroup.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.colgroup.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.colgroup.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.colgroup.cljs$lang$maxFixedArity = 1;
om.dom.colgroup.cljs$lang$applyTo = function(seq12039) {
  var G__12040 = cljs.core.first.call(null, seq12039);
  var seq12039__$1 = cljs.core.next.call(null, seq12039);
  return om.dom.colgroup.cljs$core$IFn$_invoke$arity$variadic(G__12040, seq12039__$1);
};
om.dom.data = function om$dom$data(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12307 = arguments.length;
  var i__7199__auto___12308 = 0;
  while (true) {
    if (i__7199__auto___12308 < len__7198__auto___12307) {
      args__7205__auto__.push(arguments[i__7199__auto___12308]);
      var G__12309 = i__7199__auto___12308 + 1;
      i__7199__auto___12308 = G__12309;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.data.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.data.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.data.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.data.cljs$lang$maxFixedArity = 1;
om.dom.data.cljs$lang$applyTo = function(seq12041) {
  var G__12042 = cljs.core.first.call(null, seq12041);
  var seq12041__$1 = cljs.core.next.call(null, seq12041);
  return om.dom.data.cljs$core$IFn$_invoke$arity$variadic(G__12042, seq12041__$1);
};
om.dom.datalist = function om$dom$datalist(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12310 = arguments.length;
  var i__7199__auto___12311 = 0;
  while (true) {
    if (i__7199__auto___12311 < len__7198__auto___12310) {
      args__7205__auto__.push(arguments[i__7199__auto___12311]);
      var G__12312 = i__7199__auto___12311 + 1;
      i__7199__auto___12311 = G__12312;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.datalist.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.datalist.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.datalist.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.datalist.cljs$lang$maxFixedArity = 1;
om.dom.datalist.cljs$lang$applyTo = function(seq12043) {
  var G__12044 = cljs.core.first.call(null, seq12043);
  var seq12043__$1 = cljs.core.next.call(null, seq12043);
  return om.dom.datalist.cljs$core$IFn$_invoke$arity$variadic(G__12044, seq12043__$1);
};
om.dom.dd = function om$dom$dd(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12313 = arguments.length;
  var i__7199__auto___12314 = 0;
  while (true) {
    if (i__7199__auto___12314 < len__7198__auto___12313) {
      args__7205__auto__.push(arguments[i__7199__auto___12314]);
      var G__12315 = i__7199__auto___12314 + 1;
      i__7199__auto___12314 = G__12315;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.dd.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.dd.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.dd.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.dd.cljs$lang$maxFixedArity = 1;
om.dom.dd.cljs$lang$applyTo = function(seq12045) {
  var G__12046 = cljs.core.first.call(null, seq12045);
  var seq12045__$1 = cljs.core.next.call(null, seq12045);
  return om.dom.dd.cljs$core$IFn$_invoke$arity$variadic(G__12046, seq12045__$1);
};
om.dom.del = function om$dom$del(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12316 = arguments.length;
  var i__7199__auto___12317 = 0;
  while (true) {
    if (i__7199__auto___12317 < len__7198__auto___12316) {
      args__7205__auto__.push(arguments[i__7199__auto___12317]);
      var G__12318 = i__7199__auto___12317 + 1;
      i__7199__auto___12317 = G__12318;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.del.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.del.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.del.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.del.cljs$lang$maxFixedArity = 1;
om.dom.del.cljs$lang$applyTo = function(seq12047) {
  var G__12048 = cljs.core.first.call(null, seq12047);
  var seq12047__$1 = cljs.core.next.call(null, seq12047);
  return om.dom.del.cljs$core$IFn$_invoke$arity$variadic(G__12048, seq12047__$1);
};
om.dom.dfn = function om$dom$dfn(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12319 = arguments.length;
  var i__7199__auto___12320 = 0;
  while (true) {
    if (i__7199__auto___12320 < len__7198__auto___12319) {
      args__7205__auto__.push(arguments[i__7199__auto___12320]);
      var G__12321 = i__7199__auto___12320 + 1;
      i__7199__auto___12320 = G__12321;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.dfn.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.dfn.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.dfn.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.dfn.cljs$lang$maxFixedArity = 1;
om.dom.dfn.cljs$lang$applyTo = function(seq12049) {
  var G__12050 = cljs.core.first.call(null, seq12049);
  var seq12049__$1 = cljs.core.next.call(null, seq12049);
  return om.dom.dfn.cljs$core$IFn$_invoke$arity$variadic(G__12050, seq12049__$1);
};
om.dom.div = function om$dom$div(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12322 = arguments.length;
  var i__7199__auto___12323 = 0;
  while (true) {
    if (i__7199__auto___12323 < len__7198__auto___12322) {
      args__7205__auto__.push(arguments[i__7199__auto___12323]);
      var G__12324 = i__7199__auto___12323 + 1;
      i__7199__auto___12323 = G__12324;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.div.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.div.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.div.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.div.cljs$lang$maxFixedArity = 1;
om.dom.div.cljs$lang$applyTo = function(seq12051) {
  var G__12052 = cljs.core.first.call(null, seq12051);
  var seq12051__$1 = cljs.core.next.call(null, seq12051);
  return om.dom.div.cljs$core$IFn$_invoke$arity$variadic(G__12052, seq12051__$1);
};
om.dom.dl = function om$dom$dl(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12325 = arguments.length;
  var i__7199__auto___12326 = 0;
  while (true) {
    if (i__7199__auto___12326 < len__7198__auto___12325) {
      args__7205__auto__.push(arguments[i__7199__auto___12326]);
      var G__12327 = i__7199__auto___12326 + 1;
      i__7199__auto___12326 = G__12327;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.dl.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.dl.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.dl.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.dl.cljs$lang$maxFixedArity = 1;
om.dom.dl.cljs$lang$applyTo = function(seq12053) {
  var G__12054 = cljs.core.first.call(null, seq12053);
  var seq12053__$1 = cljs.core.next.call(null, seq12053);
  return om.dom.dl.cljs$core$IFn$_invoke$arity$variadic(G__12054, seq12053__$1);
};
om.dom.dt = function om$dom$dt(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12328 = arguments.length;
  var i__7199__auto___12329 = 0;
  while (true) {
    if (i__7199__auto___12329 < len__7198__auto___12328) {
      args__7205__auto__.push(arguments[i__7199__auto___12329]);
      var G__12330 = i__7199__auto___12329 + 1;
      i__7199__auto___12329 = G__12330;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.dt.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.dt.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.dt.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.dt.cljs$lang$maxFixedArity = 1;
om.dom.dt.cljs$lang$applyTo = function(seq12055) {
  var G__12056 = cljs.core.first.call(null, seq12055);
  var seq12055__$1 = cljs.core.next.call(null, seq12055);
  return om.dom.dt.cljs$core$IFn$_invoke$arity$variadic(G__12056, seq12055__$1);
};
om.dom.em = function om$dom$em(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12331 = arguments.length;
  var i__7199__auto___12332 = 0;
  while (true) {
    if (i__7199__auto___12332 < len__7198__auto___12331) {
      args__7205__auto__.push(arguments[i__7199__auto___12332]);
      var G__12333 = i__7199__auto___12332 + 1;
      i__7199__auto___12332 = G__12333;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.em.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.em.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.em.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.em.cljs$lang$maxFixedArity = 1;
om.dom.em.cljs$lang$applyTo = function(seq12057) {
  var G__12058 = cljs.core.first.call(null, seq12057);
  var seq12057__$1 = cljs.core.next.call(null, seq12057);
  return om.dom.em.cljs$core$IFn$_invoke$arity$variadic(G__12058, seq12057__$1);
};
om.dom.embed = function om$dom$embed(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12334 = arguments.length;
  var i__7199__auto___12335 = 0;
  while (true) {
    if (i__7199__auto___12335 < len__7198__auto___12334) {
      args__7205__auto__.push(arguments[i__7199__auto___12335]);
      var G__12336 = i__7199__auto___12335 + 1;
      i__7199__auto___12335 = G__12336;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.embed.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.embed.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.embed.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.embed.cljs$lang$maxFixedArity = 1;
om.dom.embed.cljs$lang$applyTo = function(seq12059) {
  var G__12060 = cljs.core.first.call(null, seq12059);
  var seq12059__$1 = cljs.core.next.call(null, seq12059);
  return om.dom.embed.cljs$core$IFn$_invoke$arity$variadic(G__12060, seq12059__$1);
};
om.dom.fieldset = function om$dom$fieldset(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12337 = arguments.length;
  var i__7199__auto___12338 = 0;
  while (true) {
    if (i__7199__auto___12338 < len__7198__auto___12337) {
      args__7205__auto__.push(arguments[i__7199__auto___12338]);
      var G__12339 = i__7199__auto___12338 + 1;
      i__7199__auto___12338 = G__12339;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.fieldset.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.fieldset.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.fieldset.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.fieldset.cljs$lang$maxFixedArity = 1;
om.dom.fieldset.cljs$lang$applyTo = function(seq12063) {
  var G__12064 = cljs.core.first.call(null, seq12063);
  var seq12063__$1 = cljs.core.next.call(null, seq12063);
  return om.dom.fieldset.cljs$core$IFn$_invoke$arity$variadic(G__12064, seq12063__$1);
};
om.dom.figcaption = function om$dom$figcaption(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12340 = arguments.length;
  var i__7199__auto___12341 = 0;
  while (true) {
    if (i__7199__auto___12341 < len__7198__auto___12340) {
      args__7205__auto__.push(arguments[i__7199__auto___12341]);
      var G__12342 = i__7199__auto___12341 + 1;
      i__7199__auto___12341 = G__12342;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.figcaption.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.figcaption.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.figcaption.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.figcaption.cljs$lang$maxFixedArity = 1;
om.dom.figcaption.cljs$lang$applyTo = function(seq12065) {
  var G__12066 = cljs.core.first.call(null, seq12065);
  var seq12065__$1 = cljs.core.next.call(null, seq12065);
  return om.dom.figcaption.cljs$core$IFn$_invoke$arity$variadic(G__12066, seq12065__$1);
};
om.dom.figure = function om$dom$figure(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12343 = arguments.length;
  var i__7199__auto___12344 = 0;
  while (true) {
    if (i__7199__auto___12344 < len__7198__auto___12343) {
      args__7205__auto__.push(arguments[i__7199__auto___12344]);
      var G__12345 = i__7199__auto___12344 + 1;
      i__7199__auto___12344 = G__12345;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.figure.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.figure.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.figure.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.figure.cljs$lang$maxFixedArity = 1;
om.dom.figure.cljs$lang$applyTo = function(seq12067) {
  var G__12068 = cljs.core.first.call(null, seq12067);
  var seq12067__$1 = cljs.core.next.call(null, seq12067);
  return om.dom.figure.cljs$core$IFn$_invoke$arity$variadic(G__12068, seq12067__$1);
};
om.dom.footer = function om$dom$footer(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12346 = arguments.length;
  var i__7199__auto___12347 = 0;
  while (true) {
    if (i__7199__auto___12347 < len__7198__auto___12346) {
      args__7205__auto__.push(arguments[i__7199__auto___12347]);
      var G__12348 = i__7199__auto___12347 + 1;
      i__7199__auto___12347 = G__12348;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.footer.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.footer.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.footer.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.footer.cljs$lang$maxFixedArity = 1;
om.dom.footer.cljs$lang$applyTo = function(seq12069) {
  var G__12070 = cljs.core.first.call(null, seq12069);
  var seq12069__$1 = cljs.core.next.call(null, seq12069);
  return om.dom.footer.cljs$core$IFn$_invoke$arity$variadic(G__12070, seq12069__$1);
};
om.dom.form = function om$dom$form(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12349 = arguments.length;
  var i__7199__auto___12350 = 0;
  while (true) {
    if (i__7199__auto___12350 < len__7198__auto___12349) {
      args__7205__auto__.push(arguments[i__7199__auto___12350]);
      var G__12351 = i__7199__auto___12350 + 1;
      i__7199__auto___12350 = G__12351;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.form.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.form.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.form.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.form.cljs$lang$maxFixedArity = 1;
om.dom.form.cljs$lang$applyTo = function(seq12071) {
  var G__12072 = cljs.core.first.call(null, seq12071);
  var seq12071__$1 = cljs.core.next.call(null, seq12071);
  return om.dom.form.cljs$core$IFn$_invoke$arity$variadic(G__12072, seq12071__$1);
};
om.dom.h1 = function om$dom$h1(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12352 = arguments.length;
  var i__7199__auto___12353 = 0;
  while (true) {
    if (i__7199__auto___12353 < len__7198__auto___12352) {
      args__7205__auto__.push(arguments[i__7199__auto___12353]);
      var G__12354 = i__7199__auto___12353 + 1;
      i__7199__auto___12353 = G__12354;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.h1.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.h1.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.h1.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.h1.cljs$lang$maxFixedArity = 1;
om.dom.h1.cljs$lang$applyTo = function(seq12073) {
  var G__12074 = cljs.core.first.call(null, seq12073);
  var seq12073__$1 = cljs.core.next.call(null, seq12073);
  return om.dom.h1.cljs$core$IFn$_invoke$arity$variadic(G__12074, seq12073__$1);
};
om.dom.h2 = function om$dom$h2(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12355 = arguments.length;
  var i__7199__auto___12356 = 0;
  while (true) {
    if (i__7199__auto___12356 < len__7198__auto___12355) {
      args__7205__auto__.push(arguments[i__7199__auto___12356]);
      var G__12357 = i__7199__auto___12356 + 1;
      i__7199__auto___12356 = G__12357;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.h2.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.h2.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.h2.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.h2.cljs$lang$maxFixedArity = 1;
om.dom.h2.cljs$lang$applyTo = function(seq12075) {
  var G__12076 = cljs.core.first.call(null, seq12075);
  var seq12075__$1 = cljs.core.next.call(null, seq12075);
  return om.dom.h2.cljs$core$IFn$_invoke$arity$variadic(G__12076, seq12075__$1);
};
om.dom.h3 = function om$dom$h3(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12358 = arguments.length;
  var i__7199__auto___12359 = 0;
  while (true) {
    if (i__7199__auto___12359 < len__7198__auto___12358) {
      args__7205__auto__.push(arguments[i__7199__auto___12359]);
      var G__12360 = i__7199__auto___12359 + 1;
      i__7199__auto___12359 = G__12360;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.h3.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.h3.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.h3.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.h3.cljs$lang$maxFixedArity = 1;
om.dom.h3.cljs$lang$applyTo = function(seq12077) {
  var G__12078 = cljs.core.first.call(null, seq12077);
  var seq12077__$1 = cljs.core.next.call(null, seq12077);
  return om.dom.h3.cljs$core$IFn$_invoke$arity$variadic(G__12078, seq12077__$1);
};
om.dom.h4 = function om$dom$h4(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12361 = arguments.length;
  var i__7199__auto___12362 = 0;
  while (true) {
    if (i__7199__auto___12362 < len__7198__auto___12361) {
      args__7205__auto__.push(arguments[i__7199__auto___12362]);
      var G__12363 = i__7199__auto___12362 + 1;
      i__7199__auto___12362 = G__12363;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.h4.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.h4.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.h4.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.h4.cljs$lang$maxFixedArity = 1;
om.dom.h4.cljs$lang$applyTo = function(seq12079) {
  var G__12080 = cljs.core.first.call(null, seq12079);
  var seq12079__$1 = cljs.core.next.call(null, seq12079);
  return om.dom.h4.cljs$core$IFn$_invoke$arity$variadic(G__12080, seq12079__$1);
};
om.dom.h5 = function om$dom$h5(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12364 = arguments.length;
  var i__7199__auto___12365 = 0;
  while (true) {
    if (i__7199__auto___12365 < len__7198__auto___12364) {
      args__7205__auto__.push(arguments[i__7199__auto___12365]);
      var G__12366 = i__7199__auto___12365 + 1;
      i__7199__auto___12365 = G__12366;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.h5.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.h5.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.h5.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.h5.cljs$lang$maxFixedArity = 1;
om.dom.h5.cljs$lang$applyTo = function(seq12081) {
  var G__12082 = cljs.core.first.call(null, seq12081);
  var seq12081__$1 = cljs.core.next.call(null, seq12081);
  return om.dom.h5.cljs$core$IFn$_invoke$arity$variadic(G__12082, seq12081__$1);
};
om.dom.h6 = function om$dom$h6(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12367 = arguments.length;
  var i__7199__auto___12368 = 0;
  while (true) {
    if (i__7199__auto___12368 < len__7198__auto___12367) {
      args__7205__auto__.push(arguments[i__7199__auto___12368]);
      var G__12369 = i__7199__auto___12368 + 1;
      i__7199__auto___12368 = G__12369;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.h6.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.h6.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.h6.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.h6.cljs$lang$maxFixedArity = 1;
om.dom.h6.cljs$lang$applyTo = function(seq12083) {
  var G__12084 = cljs.core.first.call(null, seq12083);
  var seq12083__$1 = cljs.core.next.call(null, seq12083);
  return om.dom.h6.cljs$core$IFn$_invoke$arity$variadic(G__12084, seq12083__$1);
};
om.dom.head = function om$dom$head(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12370 = arguments.length;
  var i__7199__auto___12371 = 0;
  while (true) {
    if (i__7199__auto___12371 < len__7198__auto___12370) {
      args__7205__auto__.push(arguments[i__7199__auto___12371]);
      var G__12372 = i__7199__auto___12371 + 1;
      i__7199__auto___12371 = G__12372;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.head.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.head.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.head.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.head.cljs$lang$maxFixedArity = 1;
om.dom.head.cljs$lang$applyTo = function(seq12085) {
  var G__12086 = cljs.core.first.call(null, seq12085);
  var seq12085__$1 = cljs.core.next.call(null, seq12085);
  return om.dom.head.cljs$core$IFn$_invoke$arity$variadic(G__12086, seq12085__$1);
};
om.dom.header = function om$dom$header(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12373 = arguments.length;
  var i__7199__auto___12374 = 0;
  while (true) {
    if (i__7199__auto___12374 < len__7198__auto___12373) {
      args__7205__auto__.push(arguments[i__7199__auto___12374]);
      var G__12375 = i__7199__auto___12374 + 1;
      i__7199__auto___12374 = G__12375;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.header.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.header.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.header.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.header.cljs$lang$maxFixedArity = 1;
om.dom.header.cljs$lang$applyTo = function(seq12087) {
  var G__12088 = cljs.core.first.call(null, seq12087);
  var seq12087__$1 = cljs.core.next.call(null, seq12087);
  return om.dom.header.cljs$core$IFn$_invoke$arity$variadic(G__12088, seq12087__$1);
};
om.dom.hr = function om$dom$hr(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12376 = arguments.length;
  var i__7199__auto___12377 = 0;
  while (true) {
    if (i__7199__auto___12377 < len__7198__auto___12376) {
      args__7205__auto__.push(arguments[i__7199__auto___12377]);
      var G__12378 = i__7199__auto___12377 + 1;
      i__7199__auto___12377 = G__12378;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.hr.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.hr.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.hr.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.hr.cljs$lang$maxFixedArity = 1;
om.dom.hr.cljs$lang$applyTo = function(seq12089) {
  var G__12090 = cljs.core.first.call(null, seq12089);
  var seq12089__$1 = cljs.core.next.call(null, seq12089);
  return om.dom.hr.cljs$core$IFn$_invoke$arity$variadic(G__12090, seq12089__$1);
};
om.dom.html = function om$dom$html(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12379 = arguments.length;
  var i__7199__auto___12380 = 0;
  while (true) {
    if (i__7199__auto___12380 < len__7198__auto___12379) {
      args__7205__auto__.push(arguments[i__7199__auto___12380]);
      var G__12381 = i__7199__auto___12380 + 1;
      i__7199__auto___12380 = G__12381;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.html.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.html.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.html.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.html.cljs$lang$maxFixedArity = 1;
om.dom.html.cljs$lang$applyTo = function(seq12091) {
  var G__12092 = cljs.core.first.call(null, seq12091);
  var seq12091__$1 = cljs.core.next.call(null, seq12091);
  return om.dom.html.cljs$core$IFn$_invoke$arity$variadic(G__12092, seq12091__$1);
};
om.dom.i = function om$dom$i(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12382 = arguments.length;
  var i__7199__auto___12383 = 0;
  while (true) {
    if (i__7199__auto___12383 < len__7198__auto___12382) {
      args__7205__auto__.push(arguments[i__7199__auto___12383]);
      var G__12384 = i__7199__auto___12383 + 1;
      i__7199__auto___12383 = G__12384;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.i.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.i.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.i.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.i.cljs$lang$maxFixedArity = 1;
om.dom.i.cljs$lang$applyTo = function(seq12093) {
  var G__12094 = cljs.core.first.call(null, seq12093);
  var seq12093__$1 = cljs.core.next.call(null, seq12093);
  return om.dom.i.cljs$core$IFn$_invoke$arity$variadic(G__12094, seq12093__$1);
};
om.dom.iframe = function om$dom$iframe(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12385 = arguments.length;
  var i__7199__auto___12386 = 0;
  while (true) {
    if (i__7199__auto___12386 < len__7198__auto___12385) {
      args__7205__auto__.push(arguments[i__7199__auto___12386]);
      var G__12387 = i__7199__auto___12386 + 1;
      i__7199__auto___12386 = G__12387;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.iframe.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.iframe.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.iframe.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.iframe.cljs$lang$maxFixedArity = 1;
om.dom.iframe.cljs$lang$applyTo = function(seq12095) {
  var G__12096 = cljs.core.first.call(null, seq12095);
  var seq12095__$1 = cljs.core.next.call(null, seq12095);
  return om.dom.iframe.cljs$core$IFn$_invoke$arity$variadic(G__12096, seq12095__$1);
};
om.dom.img = function om$dom$img(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12388 = arguments.length;
  var i__7199__auto___12389 = 0;
  while (true) {
    if (i__7199__auto___12389 < len__7198__auto___12388) {
      args__7205__auto__.push(arguments[i__7199__auto___12389]);
      var G__12390 = i__7199__auto___12389 + 1;
      i__7199__auto___12389 = G__12390;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.img.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.img.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.img.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.img.cljs$lang$maxFixedArity = 1;
om.dom.img.cljs$lang$applyTo = function(seq12097) {
  var G__12098 = cljs.core.first.call(null, seq12097);
  var seq12097__$1 = cljs.core.next.call(null, seq12097);
  return om.dom.img.cljs$core$IFn$_invoke$arity$variadic(G__12098, seq12097__$1);
};
om.dom.ins = function om$dom$ins(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12391 = arguments.length;
  var i__7199__auto___12392 = 0;
  while (true) {
    if (i__7199__auto___12392 < len__7198__auto___12391) {
      args__7205__auto__.push(arguments[i__7199__auto___12392]);
      var G__12393 = i__7199__auto___12392 + 1;
      i__7199__auto___12392 = G__12393;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.ins.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.ins.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.ins.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.ins.cljs$lang$maxFixedArity = 1;
om.dom.ins.cljs$lang$applyTo = function(seq12099) {
  var G__12100 = cljs.core.first.call(null, seq12099);
  var seq12099__$1 = cljs.core.next.call(null, seq12099);
  return om.dom.ins.cljs$core$IFn$_invoke$arity$variadic(G__12100, seq12099__$1);
};
om.dom.kbd = function om$dom$kbd(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12394 = arguments.length;
  var i__7199__auto___12395 = 0;
  while (true) {
    if (i__7199__auto___12395 < len__7198__auto___12394) {
      args__7205__auto__.push(arguments[i__7199__auto___12395]);
      var G__12396 = i__7199__auto___12395 + 1;
      i__7199__auto___12395 = G__12396;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.kbd.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.kbd.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.kbd.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.kbd.cljs$lang$maxFixedArity = 1;
om.dom.kbd.cljs$lang$applyTo = function(seq12101) {
  var G__12102 = cljs.core.first.call(null, seq12101);
  var seq12101__$1 = cljs.core.next.call(null, seq12101);
  return om.dom.kbd.cljs$core$IFn$_invoke$arity$variadic(G__12102, seq12101__$1);
};
om.dom.keygen = function om$dom$keygen(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12397 = arguments.length;
  var i__7199__auto___12398 = 0;
  while (true) {
    if (i__7199__auto___12398 < len__7198__auto___12397) {
      args__7205__auto__.push(arguments[i__7199__auto___12398]);
      var G__12399 = i__7199__auto___12398 + 1;
      i__7199__auto___12398 = G__12399;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.keygen.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.keygen.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.keygen.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.keygen.cljs$lang$maxFixedArity = 1;
om.dom.keygen.cljs$lang$applyTo = function(seq12103) {
  var G__12104 = cljs.core.first.call(null, seq12103);
  var seq12103__$1 = cljs.core.next.call(null, seq12103);
  return om.dom.keygen.cljs$core$IFn$_invoke$arity$variadic(G__12104, seq12103__$1);
};
om.dom.label = function om$dom$label(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12400 = arguments.length;
  var i__7199__auto___12401 = 0;
  while (true) {
    if (i__7199__auto___12401 < len__7198__auto___12400) {
      args__7205__auto__.push(arguments[i__7199__auto___12401]);
      var G__12402 = i__7199__auto___12401 + 1;
      i__7199__auto___12401 = G__12402;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.label.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.label.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.label.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.label.cljs$lang$maxFixedArity = 1;
om.dom.label.cljs$lang$applyTo = function(seq12105) {
  var G__12106 = cljs.core.first.call(null, seq12105);
  var seq12105__$1 = cljs.core.next.call(null, seq12105);
  return om.dom.label.cljs$core$IFn$_invoke$arity$variadic(G__12106, seq12105__$1);
};
om.dom.legend = function om$dom$legend(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12403 = arguments.length;
  var i__7199__auto___12404 = 0;
  while (true) {
    if (i__7199__auto___12404 < len__7198__auto___12403) {
      args__7205__auto__.push(arguments[i__7199__auto___12404]);
      var G__12405 = i__7199__auto___12404 + 1;
      i__7199__auto___12404 = G__12405;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.legend.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.legend.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.legend.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.legend.cljs$lang$maxFixedArity = 1;
om.dom.legend.cljs$lang$applyTo = function(seq12107) {
  var G__12108 = cljs.core.first.call(null, seq12107);
  var seq12107__$1 = cljs.core.next.call(null, seq12107);
  return om.dom.legend.cljs$core$IFn$_invoke$arity$variadic(G__12108, seq12107__$1);
};
om.dom.li = function om$dom$li(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12406 = arguments.length;
  var i__7199__auto___12407 = 0;
  while (true) {
    if (i__7199__auto___12407 < len__7198__auto___12406) {
      args__7205__auto__.push(arguments[i__7199__auto___12407]);
      var G__12408 = i__7199__auto___12407 + 1;
      i__7199__auto___12407 = G__12408;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.li.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.li.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.li.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.li.cljs$lang$maxFixedArity = 1;
om.dom.li.cljs$lang$applyTo = function(seq12109) {
  var G__12110 = cljs.core.first.call(null, seq12109);
  var seq12109__$1 = cljs.core.next.call(null, seq12109);
  return om.dom.li.cljs$core$IFn$_invoke$arity$variadic(G__12110, seq12109__$1);
};
om.dom.link = function om$dom$link(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12409 = arguments.length;
  var i__7199__auto___12410 = 0;
  while (true) {
    if (i__7199__auto___12410 < len__7198__auto___12409) {
      args__7205__auto__.push(arguments[i__7199__auto___12410]);
      var G__12411 = i__7199__auto___12410 + 1;
      i__7199__auto___12410 = G__12411;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.link.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.link.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.link.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.link.cljs$lang$maxFixedArity = 1;
om.dom.link.cljs$lang$applyTo = function(seq12111) {
  var G__12112 = cljs.core.first.call(null, seq12111);
  var seq12111__$1 = cljs.core.next.call(null, seq12111);
  return om.dom.link.cljs$core$IFn$_invoke$arity$variadic(G__12112, seq12111__$1);
};
om.dom.main = function om$dom$main(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12412 = arguments.length;
  var i__7199__auto___12413 = 0;
  while (true) {
    if (i__7199__auto___12413 < len__7198__auto___12412) {
      args__7205__auto__.push(arguments[i__7199__auto___12413]);
      var G__12414 = i__7199__auto___12413 + 1;
      i__7199__auto___12413 = G__12414;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.main.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.main.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.main.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.main.cljs$lang$maxFixedArity = 1;
om.dom.main.cljs$lang$applyTo = function(seq12113) {
  var G__12114 = cljs.core.first.call(null, seq12113);
  var seq12113__$1 = cljs.core.next.call(null, seq12113);
  return om.dom.main.cljs$core$IFn$_invoke$arity$variadic(G__12114, seq12113__$1);
};
om.dom.map = function om$dom$map(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12415 = arguments.length;
  var i__7199__auto___12416 = 0;
  while (true) {
    if (i__7199__auto___12416 < len__7198__auto___12415) {
      args__7205__auto__.push(arguments[i__7199__auto___12416]);
      var G__12417 = i__7199__auto___12416 + 1;
      i__7199__auto___12416 = G__12417;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.map.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.map.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.map.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.map.cljs$lang$maxFixedArity = 1;
om.dom.map.cljs$lang$applyTo = function(seq12115) {
  var G__12116 = cljs.core.first.call(null, seq12115);
  var seq12115__$1 = cljs.core.next.call(null, seq12115);
  return om.dom.map.cljs$core$IFn$_invoke$arity$variadic(G__12116, seq12115__$1);
};
om.dom.mark = function om$dom$mark(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12418 = arguments.length;
  var i__7199__auto___12419 = 0;
  while (true) {
    if (i__7199__auto___12419 < len__7198__auto___12418) {
      args__7205__auto__.push(arguments[i__7199__auto___12419]);
      var G__12420 = i__7199__auto___12419 + 1;
      i__7199__auto___12419 = G__12420;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.mark.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.mark.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.mark.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.mark.cljs$lang$maxFixedArity = 1;
om.dom.mark.cljs$lang$applyTo = function(seq12117) {
  var G__12118 = cljs.core.first.call(null, seq12117);
  var seq12117__$1 = cljs.core.next.call(null, seq12117);
  return om.dom.mark.cljs$core$IFn$_invoke$arity$variadic(G__12118, seq12117__$1);
};
om.dom.marquee = function om$dom$marquee(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12421 = arguments.length;
  var i__7199__auto___12422 = 0;
  while (true) {
    if (i__7199__auto___12422 < len__7198__auto___12421) {
      args__7205__auto__.push(arguments[i__7199__auto___12422]);
      var G__12423 = i__7199__auto___12422 + 1;
      i__7199__auto___12422 = G__12423;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.marquee.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.marquee.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.marquee.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.marquee.cljs$lang$maxFixedArity = 1;
om.dom.marquee.cljs$lang$applyTo = function(seq12119) {
  var G__12120 = cljs.core.first.call(null, seq12119);
  var seq12119__$1 = cljs.core.next.call(null, seq12119);
  return om.dom.marquee.cljs$core$IFn$_invoke$arity$variadic(G__12120, seq12119__$1);
};
om.dom.menu = function om$dom$menu(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12424 = arguments.length;
  var i__7199__auto___12425 = 0;
  while (true) {
    if (i__7199__auto___12425 < len__7198__auto___12424) {
      args__7205__auto__.push(arguments[i__7199__auto___12425]);
      var G__12426 = i__7199__auto___12425 + 1;
      i__7199__auto___12425 = G__12426;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.menu.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.menu.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.menu.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.menu.cljs$lang$maxFixedArity = 1;
om.dom.menu.cljs$lang$applyTo = function(seq12121) {
  var G__12122 = cljs.core.first.call(null, seq12121);
  var seq12121__$1 = cljs.core.next.call(null, seq12121);
  return om.dom.menu.cljs$core$IFn$_invoke$arity$variadic(G__12122, seq12121__$1);
};
om.dom.menuitem = function om$dom$menuitem(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12427 = arguments.length;
  var i__7199__auto___12428 = 0;
  while (true) {
    if (i__7199__auto___12428 < len__7198__auto___12427) {
      args__7205__auto__.push(arguments[i__7199__auto___12428]);
      var G__12429 = i__7199__auto___12428 + 1;
      i__7199__auto___12428 = G__12429;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.menuitem.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.menuitem.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.menuitem.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.menuitem.cljs$lang$maxFixedArity = 1;
om.dom.menuitem.cljs$lang$applyTo = function(seq12123) {
  var G__12124 = cljs.core.first.call(null, seq12123);
  var seq12123__$1 = cljs.core.next.call(null, seq12123);
  return om.dom.menuitem.cljs$core$IFn$_invoke$arity$variadic(G__12124, seq12123__$1);
};
om.dom.meta = function om$dom$meta(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12430 = arguments.length;
  var i__7199__auto___12431 = 0;
  while (true) {
    if (i__7199__auto___12431 < len__7198__auto___12430) {
      args__7205__auto__.push(arguments[i__7199__auto___12431]);
      var G__12432 = i__7199__auto___12431 + 1;
      i__7199__auto___12431 = G__12432;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.meta.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.meta.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.meta.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.meta.cljs$lang$maxFixedArity = 1;
om.dom.meta.cljs$lang$applyTo = function(seq12125) {
  var G__12126 = cljs.core.first.call(null, seq12125);
  var seq12125__$1 = cljs.core.next.call(null, seq12125);
  return om.dom.meta.cljs$core$IFn$_invoke$arity$variadic(G__12126, seq12125__$1);
};
om.dom.meter = function om$dom$meter(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12433 = arguments.length;
  var i__7199__auto___12434 = 0;
  while (true) {
    if (i__7199__auto___12434 < len__7198__auto___12433) {
      args__7205__auto__.push(arguments[i__7199__auto___12434]);
      var G__12435 = i__7199__auto___12434 + 1;
      i__7199__auto___12434 = G__12435;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.meter.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.meter.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.meter.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.meter.cljs$lang$maxFixedArity = 1;
om.dom.meter.cljs$lang$applyTo = function(seq12127) {
  var G__12128 = cljs.core.first.call(null, seq12127);
  var seq12127__$1 = cljs.core.next.call(null, seq12127);
  return om.dom.meter.cljs$core$IFn$_invoke$arity$variadic(G__12128, seq12127__$1);
};
om.dom.nav = function om$dom$nav(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12436 = arguments.length;
  var i__7199__auto___12437 = 0;
  while (true) {
    if (i__7199__auto___12437 < len__7198__auto___12436) {
      args__7205__auto__.push(arguments[i__7199__auto___12437]);
      var G__12438 = i__7199__auto___12437 + 1;
      i__7199__auto___12437 = G__12438;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.nav.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.nav.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.nav.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.nav.cljs$lang$maxFixedArity = 1;
om.dom.nav.cljs$lang$applyTo = function(seq12129) {
  var G__12130 = cljs.core.first.call(null, seq12129);
  var seq12129__$1 = cljs.core.next.call(null, seq12129);
  return om.dom.nav.cljs$core$IFn$_invoke$arity$variadic(G__12130, seq12129__$1);
};
om.dom.noscript = function om$dom$noscript(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12439 = arguments.length;
  var i__7199__auto___12440 = 0;
  while (true) {
    if (i__7199__auto___12440 < len__7198__auto___12439) {
      args__7205__auto__.push(arguments[i__7199__auto___12440]);
      var G__12441 = i__7199__auto___12440 + 1;
      i__7199__auto___12440 = G__12441;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.noscript.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.noscript.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.noscript.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.noscript.cljs$lang$maxFixedArity = 1;
om.dom.noscript.cljs$lang$applyTo = function(seq12131) {
  var G__12132 = cljs.core.first.call(null, seq12131);
  var seq12131__$1 = cljs.core.next.call(null, seq12131);
  return om.dom.noscript.cljs$core$IFn$_invoke$arity$variadic(G__12132, seq12131__$1);
};
om.dom.object = function om$dom$object(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12442 = arguments.length;
  var i__7199__auto___12443 = 0;
  while (true) {
    if (i__7199__auto___12443 < len__7198__auto___12442) {
      args__7205__auto__.push(arguments[i__7199__auto___12443]);
      var G__12444 = i__7199__auto___12443 + 1;
      i__7199__auto___12443 = G__12444;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.object.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.object.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.object.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.object.cljs$lang$maxFixedArity = 1;
om.dom.object.cljs$lang$applyTo = function(seq12133) {
  var G__12134 = cljs.core.first.call(null, seq12133);
  var seq12133__$1 = cljs.core.next.call(null, seq12133);
  return om.dom.object.cljs$core$IFn$_invoke$arity$variadic(G__12134, seq12133__$1);
};
om.dom.ol = function om$dom$ol(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12445 = arguments.length;
  var i__7199__auto___12446 = 0;
  while (true) {
    if (i__7199__auto___12446 < len__7198__auto___12445) {
      args__7205__auto__.push(arguments[i__7199__auto___12446]);
      var G__12447 = i__7199__auto___12446 + 1;
      i__7199__auto___12446 = G__12447;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.ol.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.ol.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.ol.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.ol.cljs$lang$maxFixedArity = 1;
om.dom.ol.cljs$lang$applyTo = function(seq12135) {
  var G__12136 = cljs.core.first.call(null, seq12135);
  var seq12135__$1 = cljs.core.next.call(null, seq12135);
  return om.dom.ol.cljs$core$IFn$_invoke$arity$variadic(G__12136, seq12135__$1);
};
om.dom.optgroup = function om$dom$optgroup(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12448 = arguments.length;
  var i__7199__auto___12449 = 0;
  while (true) {
    if (i__7199__auto___12449 < len__7198__auto___12448) {
      args__7205__auto__.push(arguments[i__7199__auto___12449]);
      var G__12450 = i__7199__auto___12449 + 1;
      i__7199__auto___12449 = G__12450;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.optgroup.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.optgroup.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.optgroup.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.optgroup.cljs$lang$maxFixedArity = 1;
om.dom.optgroup.cljs$lang$applyTo = function(seq12137) {
  var G__12138 = cljs.core.first.call(null, seq12137);
  var seq12137__$1 = cljs.core.next.call(null, seq12137);
  return om.dom.optgroup.cljs$core$IFn$_invoke$arity$variadic(G__12138, seq12137__$1);
};
om.dom.output = function om$dom$output(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12451 = arguments.length;
  var i__7199__auto___12452 = 0;
  while (true) {
    if (i__7199__auto___12452 < len__7198__auto___12451) {
      args__7205__auto__.push(arguments[i__7199__auto___12452]);
      var G__12453 = i__7199__auto___12452 + 1;
      i__7199__auto___12452 = G__12453;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.output.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.output.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.output.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.output.cljs$lang$maxFixedArity = 1;
om.dom.output.cljs$lang$applyTo = function(seq12139) {
  var G__12140 = cljs.core.first.call(null, seq12139);
  var seq12139__$1 = cljs.core.next.call(null, seq12139);
  return om.dom.output.cljs$core$IFn$_invoke$arity$variadic(G__12140, seq12139__$1);
};
om.dom.p = function om$dom$p(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12454 = arguments.length;
  var i__7199__auto___12455 = 0;
  while (true) {
    if (i__7199__auto___12455 < len__7198__auto___12454) {
      args__7205__auto__.push(arguments[i__7199__auto___12455]);
      var G__12456 = i__7199__auto___12455 + 1;
      i__7199__auto___12455 = G__12456;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.p.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.p.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.p.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.p.cljs$lang$maxFixedArity = 1;
om.dom.p.cljs$lang$applyTo = function(seq12141) {
  var G__12142 = cljs.core.first.call(null, seq12141);
  var seq12141__$1 = cljs.core.next.call(null, seq12141);
  return om.dom.p.cljs$core$IFn$_invoke$arity$variadic(G__12142, seq12141__$1);
};
om.dom.param = function om$dom$param(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12457 = arguments.length;
  var i__7199__auto___12458 = 0;
  while (true) {
    if (i__7199__auto___12458 < len__7198__auto___12457) {
      args__7205__auto__.push(arguments[i__7199__auto___12458]);
      var G__12459 = i__7199__auto___12458 + 1;
      i__7199__auto___12458 = G__12459;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.param.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.param.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.param.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.param.cljs$lang$maxFixedArity = 1;
om.dom.param.cljs$lang$applyTo = function(seq12143) {
  var G__12144 = cljs.core.first.call(null, seq12143);
  var seq12143__$1 = cljs.core.next.call(null, seq12143);
  return om.dom.param.cljs$core$IFn$_invoke$arity$variadic(G__12144, seq12143__$1);
};
om.dom.pre = function om$dom$pre(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12460 = arguments.length;
  var i__7199__auto___12461 = 0;
  while (true) {
    if (i__7199__auto___12461 < len__7198__auto___12460) {
      args__7205__auto__.push(arguments[i__7199__auto___12461]);
      var G__12462 = i__7199__auto___12461 + 1;
      i__7199__auto___12461 = G__12462;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.pre.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.pre.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.pre.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.pre.cljs$lang$maxFixedArity = 1;
om.dom.pre.cljs$lang$applyTo = function(seq12145) {
  var G__12146 = cljs.core.first.call(null, seq12145);
  var seq12145__$1 = cljs.core.next.call(null, seq12145);
  return om.dom.pre.cljs$core$IFn$_invoke$arity$variadic(G__12146, seq12145__$1);
};
om.dom.progress = function om$dom$progress(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12463 = arguments.length;
  var i__7199__auto___12464 = 0;
  while (true) {
    if (i__7199__auto___12464 < len__7198__auto___12463) {
      args__7205__auto__.push(arguments[i__7199__auto___12464]);
      var G__12465 = i__7199__auto___12464 + 1;
      i__7199__auto___12464 = G__12465;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.progress.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.progress.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.progress.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.progress.cljs$lang$maxFixedArity = 1;
om.dom.progress.cljs$lang$applyTo = function(seq12147) {
  var G__12148 = cljs.core.first.call(null, seq12147);
  var seq12147__$1 = cljs.core.next.call(null, seq12147);
  return om.dom.progress.cljs$core$IFn$_invoke$arity$variadic(G__12148, seq12147__$1);
};
om.dom.q = function om$dom$q(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12466 = arguments.length;
  var i__7199__auto___12467 = 0;
  while (true) {
    if (i__7199__auto___12467 < len__7198__auto___12466) {
      args__7205__auto__.push(arguments[i__7199__auto___12467]);
      var G__12468 = i__7199__auto___12467 + 1;
      i__7199__auto___12467 = G__12468;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.q.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.q.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.q.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.q.cljs$lang$maxFixedArity = 1;
om.dom.q.cljs$lang$applyTo = function(seq12149) {
  var G__12150 = cljs.core.first.call(null, seq12149);
  var seq12149__$1 = cljs.core.next.call(null, seq12149);
  return om.dom.q.cljs$core$IFn$_invoke$arity$variadic(G__12150, seq12149__$1);
};
om.dom.rp = function om$dom$rp(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12469 = arguments.length;
  var i__7199__auto___12470 = 0;
  while (true) {
    if (i__7199__auto___12470 < len__7198__auto___12469) {
      args__7205__auto__.push(arguments[i__7199__auto___12470]);
      var G__12471 = i__7199__auto___12470 + 1;
      i__7199__auto___12470 = G__12471;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.rp.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.rp.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.rp.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.rp.cljs$lang$maxFixedArity = 1;
om.dom.rp.cljs$lang$applyTo = function(seq12151) {
  var G__12152 = cljs.core.first.call(null, seq12151);
  var seq12151__$1 = cljs.core.next.call(null, seq12151);
  return om.dom.rp.cljs$core$IFn$_invoke$arity$variadic(G__12152, seq12151__$1);
};
om.dom.rt = function om$dom$rt(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12472 = arguments.length;
  var i__7199__auto___12473 = 0;
  while (true) {
    if (i__7199__auto___12473 < len__7198__auto___12472) {
      args__7205__auto__.push(arguments[i__7199__auto___12473]);
      var G__12474 = i__7199__auto___12473 + 1;
      i__7199__auto___12473 = G__12474;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.rt.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.rt.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.rt.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.rt.cljs$lang$maxFixedArity = 1;
om.dom.rt.cljs$lang$applyTo = function(seq12153) {
  var G__12154 = cljs.core.first.call(null, seq12153);
  var seq12153__$1 = cljs.core.next.call(null, seq12153);
  return om.dom.rt.cljs$core$IFn$_invoke$arity$variadic(G__12154, seq12153__$1);
};
om.dom.ruby = function om$dom$ruby(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12475 = arguments.length;
  var i__7199__auto___12476 = 0;
  while (true) {
    if (i__7199__auto___12476 < len__7198__auto___12475) {
      args__7205__auto__.push(arguments[i__7199__auto___12476]);
      var G__12477 = i__7199__auto___12476 + 1;
      i__7199__auto___12476 = G__12477;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.ruby.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.ruby.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.ruby.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.ruby.cljs$lang$maxFixedArity = 1;
om.dom.ruby.cljs$lang$applyTo = function(seq12155) {
  var G__12156 = cljs.core.first.call(null, seq12155);
  var seq12155__$1 = cljs.core.next.call(null, seq12155);
  return om.dom.ruby.cljs$core$IFn$_invoke$arity$variadic(G__12156, seq12155__$1);
};
om.dom.s = function om$dom$s(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12478 = arguments.length;
  var i__7199__auto___12479 = 0;
  while (true) {
    if (i__7199__auto___12479 < len__7198__auto___12478) {
      args__7205__auto__.push(arguments[i__7199__auto___12479]);
      var G__12480 = i__7199__auto___12479 + 1;
      i__7199__auto___12479 = G__12480;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.s.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.s.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.s.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.s.cljs$lang$maxFixedArity = 1;
om.dom.s.cljs$lang$applyTo = function(seq12157) {
  var G__12158 = cljs.core.first.call(null, seq12157);
  var seq12157__$1 = cljs.core.next.call(null, seq12157);
  return om.dom.s.cljs$core$IFn$_invoke$arity$variadic(G__12158, seq12157__$1);
};
om.dom.samp = function om$dom$samp(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12481 = arguments.length;
  var i__7199__auto___12482 = 0;
  while (true) {
    if (i__7199__auto___12482 < len__7198__auto___12481) {
      args__7205__auto__.push(arguments[i__7199__auto___12482]);
      var G__12483 = i__7199__auto___12482 + 1;
      i__7199__auto___12482 = G__12483;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.samp.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.samp.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.samp.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.samp.cljs$lang$maxFixedArity = 1;
om.dom.samp.cljs$lang$applyTo = function(seq12159) {
  var G__12160 = cljs.core.first.call(null, seq12159);
  var seq12159__$1 = cljs.core.next.call(null, seq12159);
  return om.dom.samp.cljs$core$IFn$_invoke$arity$variadic(G__12160, seq12159__$1);
};
om.dom.script = function om$dom$script(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12484 = arguments.length;
  var i__7199__auto___12485 = 0;
  while (true) {
    if (i__7199__auto___12485 < len__7198__auto___12484) {
      args__7205__auto__.push(arguments[i__7199__auto___12485]);
      var G__12486 = i__7199__auto___12485 + 1;
      i__7199__auto___12485 = G__12486;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.script.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.script.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.script.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.script.cljs$lang$maxFixedArity = 1;
om.dom.script.cljs$lang$applyTo = function(seq12161) {
  var G__12162 = cljs.core.first.call(null, seq12161);
  var seq12161__$1 = cljs.core.next.call(null, seq12161);
  return om.dom.script.cljs$core$IFn$_invoke$arity$variadic(G__12162, seq12161__$1);
};
om.dom.section = function om$dom$section(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12487 = arguments.length;
  var i__7199__auto___12488 = 0;
  while (true) {
    if (i__7199__auto___12488 < len__7198__auto___12487) {
      args__7205__auto__.push(arguments[i__7199__auto___12488]);
      var G__12489 = i__7199__auto___12488 + 1;
      i__7199__auto___12488 = G__12489;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.section.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.section.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.section.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.section.cljs$lang$maxFixedArity = 1;
om.dom.section.cljs$lang$applyTo = function(seq12163) {
  var G__12164 = cljs.core.first.call(null, seq12163);
  var seq12163__$1 = cljs.core.next.call(null, seq12163);
  return om.dom.section.cljs$core$IFn$_invoke$arity$variadic(G__12164, seq12163__$1);
};
om.dom.select = function om$dom$select(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12490 = arguments.length;
  var i__7199__auto___12491 = 0;
  while (true) {
    if (i__7199__auto___12491 < len__7198__auto___12490) {
      args__7205__auto__.push(arguments[i__7199__auto___12491]);
      var G__12492 = i__7199__auto___12491 + 1;
      i__7199__auto___12491 = G__12492;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.select.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.select.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.select.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.select.cljs$lang$maxFixedArity = 1;
om.dom.select.cljs$lang$applyTo = function(seq12165) {
  var G__12166 = cljs.core.first.call(null, seq12165);
  var seq12165__$1 = cljs.core.next.call(null, seq12165);
  return om.dom.select.cljs$core$IFn$_invoke$arity$variadic(G__12166, seq12165__$1);
};
om.dom.small = function om$dom$small(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12493 = arguments.length;
  var i__7199__auto___12494 = 0;
  while (true) {
    if (i__7199__auto___12494 < len__7198__auto___12493) {
      args__7205__auto__.push(arguments[i__7199__auto___12494]);
      var G__12495 = i__7199__auto___12494 + 1;
      i__7199__auto___12494 = G__12495;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.small.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.small.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.small.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.small.cljs$lang$maxFixedArity = 1;
om.dom.small.cljs$lang$applyTo = function(seq12167) {
  var G__12168 = cljs.core.first.call(null, seq12167);
  var seq12167__$1 = cljs.core.next.call(null, seq12167);
  return om.dom.small.cljs$core$IFn$_invoke$arity$variadic(G__12168, seq12167__$1);
};
om.dom.source = function om$dom$source(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12496 = arguments.length;
  var i__7199__auto___12497 = 0;
  while (true) {
    if (i__7199__auto___12497 < len__7198__auto___12496) {
      args__7205__auto__.push(arguments[i__7199__auto___12497]);
      var G__12498 = i__7199__auto___12497 + 1;
      i__7199__auto___12497 = G__12498;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.source.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.source.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.source.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.source.cljs$lang$maxFixedArity = 1;
om.dom.source.cljs$lang$applyTo = function(seq12169) {
  var G__12170 = cljs.core.first.call(null, seq12169);
  var seq12169__$1 = cljs.core.next.call(null, seq12169);
  return om.dom.source.cljs$core$IFn$_invoke$arity$variadic(G__12170, seq12169__$1);
};
om.dom.span = function om$dom$span(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12499 = arguments.length;
  var i__7199__auto___12500 = 0;
  while (true) {
    if (i__7199__auto___12500 < len__7198__auto___12499) {
      args__7205__auto__.push(arguments[i__7199__auto___12500]);
      var G__12501 = i__7199__auto___12500 + 1;
      i__7199__auto___12500 = G__12501;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.span.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.span.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.span.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.span.cljs$lang$maxFixedArity = 1;
om.dom.span.cljs$lang$applyTo = function(seq12171) {
  var G__12172 = cljs.core.first.call(null, seq12171);
  var seq12171__$1 = cljs.core.next.call(null, seq12171);
  return om.dom.span.cljs$core$IFn$_invoke$arity$variadic(G__12172, seq12171__$1);
};
om.dom.strong = function om$dom$strong(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12502 = arguments.length;
  var i__7199__auto___12503 = 0;
  while (true) {
    if (i__7199__auto___12503 < len__7198__auto___12502) {
      args__7205__auto__.push(arguments[i__7199__auto___12503]);
      var G__12504 = i__7199__auto___12503 + 1;
      i__7199__auto___12503 = G__12504;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.strong.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.strong.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.strong.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.strong.cljs$lang$maxFixedArity = 1;
om.dom.strong.cljs$lang$applyTo = function(seq12173) {
  var G__12174 = cljs.core.first.call(null, seq12173);
  var seq12173__$1 = cljs.core.next.call(null, seq12173);
  return om.dom.strong.cljs$core$IFn$_invoke$arity$variadic(G__12174, seq12173__$1);
};
om.dom.style = function om$dom$style(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12505 = arguments.length;
  var i__7199__auto___12506 = 0;
  while (true) {
    if (i__7199__auto___12506 < len__7198__auto___12505) {
      args__7205__auto__.push(arguments[i__7199__auto___12506]);
      var G__12507 = i__7199__auto___12506 + 1;
      i__7199__auto___12506 = G__12507;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.style.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.style.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.style.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.style.cljs$lang$maxFixedArity = 1;
om.dom.style.cljs$lang$applyTo = function(seq12175) {
  var G__12176 = cljs.core.first.call(null, seq12175);
  var seq12175__$1 = cljs.core.next.call(null, seq12175);
  return om.dom.style.cljs$core$IFn$_invoke$arity$variadic(G__12176, seq12175__$1);
};
om.dom.sub = function om$dom$sub(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12508 = arguments.length;
  var i__7199__auto___12509 = 0;
  while (true) {
    if (i__7199__auto___12509 < len__7198__auto___12508) {
      args__7205__auto__.push(arguments[i__7199__auto___12509]);
      var G__12510 = i__7199__auto___12509 + 1;
      i__7199__auto___12509 = G__12510;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.sub.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.sub.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.sub.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.sub.cljs$lang$maxFixedArity = 1;
om.dom.sub.cljs$lang$applyTo = function(seq12177) {
  var G__12178 = cljs.core.first.call(null, seq12177);
  var seq12177__$1 = cljs.core.next.call(null, seq12177);
  return om.dom.sub.cljs$core$IFn$_invoke$arity$variadic(G__12178, seq12177__$1);
};
om.dom.summary = function om$dom$summary(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12511 = arguments.length;
  var i__7199__auto___12512 = 0;
  while (true) {
    if (i__7199__auto___12512 < len__7198__auto___12511) {
      args__7205__auto__.push(arguments[i__7199__auto___12512]);
      var G__12513 = i__7199__auto___12512 + 1;
      i__7199__auto___12512 = G__12513;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.summary.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.summary.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.summary.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.summary.cljs$lang$maxFixedArity = 1;
om.dom.summary.cljs$lang$applyTo = function(seq12179) {
  var G__12180 = cljs.core.first.call(null, seq12179);
  var seq12179__$1 = cljs.core.next.call(null, seq12179);
  return om.dom.summary.cljs$core$IFn$_invoke$arity$variadic(G__12180, seq12179__$1);
};
om.dom.sup = function om$dom$sup(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12514 = arguments.length;
  var i__7199__auto___12515 = 0;
  while (true) {
    if (i__7199__auto___12515 < len__7198__auto___12514) {
      args__7205__auto__.push(arguments[i__7199__auto___12515]);
      var G__12516 = i__7199__auto___12515 + 1;
      i__7199__auto___12515 = G__12516;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.sup.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.sup.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.sup.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.sup.cljs$lang$maxFixedArity = 1;
om.dom.sup.cljs$lang$applyTo = function(seq12181) {
  var G__12182 = cljs.core.first.call(null, seq12181);
  var seq12181__$1 = cljs.core.next.call(null, seq12181);
  return om.dom.sup.cljs$core$IFn$_invoke$arity$variadic(G__12182, seq12181__$1);
};
om.dom.table = function om$dom$table(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12517 = arguments.length;
  var i__7199__auto___12518 = 0;
  while (true) {
    if (i__7199__auto___12518 < len__7198__auto___12517) {
      args__7205__auto__.push(arguments[i__7199__auto___12518]);
      var G__12519 = i__7199__auto___12518 + 1;
      i__7199__auto___12518 = G__12519;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.table.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.table.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.table.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.table.cljs$lang$maxFixedArity = 1;
om.dom.table.cljs$lang$applyTo = function(seq12183) {
  var G__12184 = cljs.core.first.call(null, seq12183);
  var seq12183__$1 = cljs.core.next.call(null, seq12183);
  return om.dom.table.cljs$core$IFn$_invoke$arity$variadic(G__12184, seq12183__$1);
};
om.dom.tbody = function om$dom$tbody(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12520 = arguments.length;
  var i__7199__auto___12521 = 0;
  while (true) {
    if (i__7199__auto___12521 < len__7198__auto___12520) {
      args__7205__auto__.push(arguments[i__7199__auto___12521]);
      var G__12522 = i__7199__auto___12521 + 1;
      i__7199__auto___12521 = G__12522;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.tbody.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.tbody.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.tbody.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.tbody.cljs$lang$maxFixedArity = 1;
om.dom.tbody.cljs$lang$applyTo = function(seq12185) {
  var G__12186 = cljs.core.first.call(null, seq12185);
  var seq12185__$1 = cljs.core.next.call(null, seq12185);
  return om.dom.tbody.cljs$core$IFn$_invoke$arity$variadic(G__12186, seq12185__$1);
};
om.dom.td = function om$dom$td(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12523 = arguments.length;
  var i__7199__auto___12524 = 0;
  while (true) {
    if (i__7199__auto___12524 < len__7198__auto___12523) {
      args__7205__auto__.push(arguments[i__7199__auto___12524]);
      var G__12525 = i__7199__auto___12524 + 1;
      i__7199__auto___12524 = G__12525;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.td.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.td.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.td.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.td.cljs$lang$maxFixedArity = 1;
om.dom.td.cljs$lang$applyTo = function(seq12187) {
  var G__12188 = cljs.core.first.call(null, seq12187);
  var seq12187__$1 = cljs.core.next.call(null, seq12187);
  return om.dom.td.cljs$core$IFn$_invoke$arity$variadic(G__12188, seq12187__$1);
};
om.dom.tfoot = function om$dom$tfoot(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12526 = arguments.length;
  var i__7199__auto___12527 = 0;
  while (true) {
    if (i__7199__auto___12527 < len__7198__auto___12526) {
      args__7205__auto__.push(arguments[i__7199__auto___12527]);
      var G__12528 = i__7199__auto___12527 + 1;
      i__7199__auto___12527 = G__12528;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.tfoot.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.tfoot.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.tfoot.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.tfoot.cljs$lang$maxFixedArity = 1;
om.dom.tfoot.cljs$lang$applyTo = function(seq12189) {
  var G__12190 = cljs.core.first.call(null, seq12189);
  var seq12189__$1 = cljs.core.next.call(null, seq12189);
  return om.dom.tfoot.cljs$core$IFn$_invoke$arity$variadic(G__12190, seq12189__$1);
};
om.dom.th = function om$dom$th(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12529 = arguments.length;
  var i__7199__auto___12530 = 0;
  while (true) {
    if (i__7199__auto___12530 < len__7198__auto___12529) {
      args__7205__auto__.push(arguments[i__7199__auto___12530]);
      var G__12531 = i__7199__auto___12530 + 1;
      i__7199__auto___12530 = G__12531;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.th.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.th.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.th.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.th.cljs$lang$maxFixedArity = 1;
om.dom.th.cljs$lang$applyTo = function(seq12191) {
  var G__12192 = cljs.core.first.call(null, seq12191);
  var seq12191__$1 = cljs.core.next.call(null, seq12191);
  return om.dom.th.cljs$core$IFn$_invoke$arity$variadic(G__12192, seq12191__$1);
};
om.dom.thead = function om$dom$thead(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12532 = arguments.length;
  var i__7199__auto___12533 = 0;
  while (true) {
    if (i__7199__auto___12533 < len__7198__auto___12532) {
      args__7205__auto__.push(arguments[i__7199__auto___12533]);
      var G__12534 = i__7199__auto___12533 + 1;
      i__7199__auto___12533 = G__12534;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.thead.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.thead.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.thead.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.thead.cljs$lang$maxFixedArity = 1;
om.dom.thead.cljs$lang$applyTo = function(seq12193) {
  var G__12194 = cljs.core.first.call(null, seq12193);
  var seq12193__$1 = cljs.core.next.call(null, seq12193);
  return om.dom.thead.cljs$core$IFn$_invoke$arity$variadic(G__12194, seq12193__$1);
};
om.dom.time = function om$dom$time(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12535 = arguments.length;
  var i__7199__auto___12536 = 0;
  while (true) {
    if (i__7199__auto___12536 < len__7198__auto___12535) {
      args__7205__auto__.push(arguments[i__7199__auto___12536]);
      var G__12537 = i__7199__auto___12536 + 1;
      i__7199__auto___12536 = G__12537;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.time.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.time.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.time.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.time.cljs$lang$maxFixedArity = 1;
om.dom.time.cljs$lang$applyTo = function(seq12195) {
  var G__12196 = cljs.core.first.call(null, seq12195);
  var seq12195__$1 = cljs.core.next.call(null, seq12195);
  return om.dom.time.cljs$core$IFn$_invoke$arity$variadic(G__12196, seq12195__$1);
};
om.dom.title = function om$dom$title(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12538 = arguments.length;
  var i__7199__auto___12539 = 0;
  while (true) {
    if (i__7199__auto___12539 < len__7198__auto___12538) {
      args__7205__auto__.push(arguments[i__7199__auto___12539]);
      var G__12540 = i__7199__auto___12539 + 1;
      i__7199__auto___12539 = G__12540;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.title.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.title.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.title.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.title.cljs$lang$maxFixedArity = 1;
om.dom.title.cljs$lang$applyTo = function(seq12197) {
  var G__12198 = cljs.core.first.call(null, seq12197);
  var seq12197__$1 = cljs.core.next.call(null, seq12197);
  return om.dom.title.cljs$core$IFn$_invoke$arity$variadic(G__12198, seq12197__$1);
};
om.dom.tr = function om$dom$tr(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12541 = arguments.length;
  var i__7199__auto___12542 = 0;
  while (true) {
    if (i__7199__auto___12542 < len__7198__auto___12541) {
      args__7205__auto__.push(arguments[i__7199__auto___12542]);
      var G__12543 = i__7199__auto___12542 + 1;
      i__7199__auto___12542 = G__12543;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.tr.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.tr.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.tr.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.tr.cljs$lang$maxFixedArity = 1;
om.dom.tr.cljs$lang$applyTo = function(seq12199) {
  var G__12200 = cljs.core.first.call(null, seq12199);
  var seq12199__$1 = cljs.core.next.call(null, seq12199);
  return om.dom.tr.cljs$core$IFn$_invoke$arity$variadic(G__12200, seq12199__$1);
};
om.dom.track = function om$dom$track(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12544 = arguments.length;
  var i__7199__auto___12545 = 0;
  while (true) {
    if (i__7199__auto___12545 < len__7198__auto___12544) {
      args__7205__auto__.push(arguments[i__7199__auto___12545]);
      var G__12546 = i__7199__auto___12545 + 1;
      i__7199__auto___12545 = G__12546;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.track.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.track.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.track.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.track.cljs$lang$maxFixedArity = 1;
om.dom.track.cljs$lang$applyTo = function(seq12201) {
  var G__12202 = cljs.core.first.call(null, seq12201);
  var seq12201__$1 = cljs.core.next.call(null, seq12201);
  return om.dom.track.cljs$core$IFn$_invoke$arity$variadic(G__12202, seq12201__$1);
};
om.dom.u = function om$dom$u(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12547 = arguments.length;
  var i__7199__auto___12548 = 0;
  while (true) {
    if (i__7199__auto___12548 < len__7198__auto___12547) {
      args__7205__auto__.push(arguments[i__7199__auto___12548]);
      var G__12549 = i__7199__auto___12548 + 1;
      i__7199__auto___12548 = G__12549;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.u.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.u.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.u.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.u.cljs$lang$maxFixedArity = 1;
om.dom.u.cljs$lang$applyTo = function(seq12203) {
  var G__12204 = cljs.core.first.call(null, seq12203);
  var seq12203__$1 = cljs.core.next.call(null, seq12203);
  return om.dom.u.cljs$core$IFn$_invoke$arity$variadic(G__12204, seq12203__$1);
};
om.dom.ul = function om$dom$ul(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12550 = arguments.length;
  var i__7199__auto___12551 = 0;
  while (true) {
    if (i__7199__auto___12551 < len__7198__auto___12550) {
      args__7205__auto__.push(arguments[i__7199__auto___12551]);
      var G__12552 = i__7199__auto___12551 + 1;
      i__7199__auto___12551 = G__12552;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.ul.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.ul.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.ul.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.ul.cljs$lang$maxFixedArity = 1;
om.dom.ul.cljs$lang$applyTo = function(seq12205) {
  var G__12206 = cljs.core.first.call(null, seq12205);
  var seq12205__$1 = cljs.core.next.call(null, seq12205);
  return om.dom.ul.cljs$core$IFn$_invoke$arity$variadic(G__12206, seq12205__$1);
};
om.dom.var$ = function om$dom$var(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12553 = arguments.length;
  var i__7199__auto___12554 = 0;
  while (true) {
    if (i__7199__auto___12554 < len__7198__auto___12553) {
      args__7205__auto__.push(arguments[i__7199__auto___12554]);
      var G__12555 = i__7199__auto___12554 + 1;
      i__7199__auto___12554 = G__12555;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.var$.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.var$.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.var$.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.var$.cljs$lang$maxFixedArity = 1;
om.dom.var$.cljs$lang$applyTo = function(seq12207) {
  var G__12208 = cljs.core.first.call(null, seq12207);
  var seq12207__$1 = cljs.core.next.call(null, seq12207);
  return om.dom.var$.cljs$core$IFn$_invoke$arity$variadic(G__12208, seq12207__$1);
};
om.dom.video = function om$dom$video(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12556 = arguments.length;
  var i__7199__auto___12557 = 0;
  while (true) {
    if (i__7199__auto___12557 < len__7198__auto___12556) {
      args__7205__auto__.push(arguments[i__7199__auto___12557]);
      var G__12558 = i__7199__auto___12557 + 1;
      i__7199__auto___12557 = G__12558;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.video.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.video.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.video.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.video.cljs$lang$maxFixedArity = 1;
om.dom.video.cljs$lang$applyTo = function(seq12209) {
  var G__12210 = cljs.core.first.call(null, seq12209);
  var seq12209__$1 = cljs.core.next.call(null, seq12209);
  return om.dom.video.cljs$core$IFn$_invoke$arity$variadic(G__12210, seq12209__$1);
};
om.dom.wbr = function om$dom$wbr(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12559 = arguments.length;
  var i__7199__auto___12560 = 0;
  while (true) {
    if (i__7199__auto___12560 < len__7198__auto___12559) {
      args__7205__auto__.push(arguments[i__7199__auto___12560]);
      var G__12561 = i__7199__auto___12560 + 1;
      i__7199__auto___12560 = G__12561;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.wbr.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.wbr.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.wbr.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.wbr.cljs$lang$maxFixedArity = 1;
om.dom.wbr.cljs$lang$applyTo = function(seq12211) {
  var G__12212 = cljs.core.first.call(null, seq12211);
  var seq12211__$1 = cljs.core.next.call(null, seq12211);
  return om.dom.wbr.cljs$core$IFn$_invoke$arity$variadic(G__12212, seq12211__$1);
};
om.dom.circle = function om$dom$circle(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12562 = arguments.length;
  var i__7199__auto___12563 = 0;
  while (true) {
    if (i__7199__auto___12563 < len__7198__auto___12562) {
      args__7205__auto__.push(arguments[i__7199__auto___12563]);
      var G__12564 = i__7199__auto___12563 + 1;
      i__7199__auto___12563 = G__12564;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.circle.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.circle.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.circle.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.circle.cljs$lang$maxFixedArity = 1;
om.dom.circle.cljs$lang$applyTo = function(seq12213) {
  var G__12214 = cljs.core.first.call(null, seq12213);
  var seq12213__$1 = cljs.core.next.call(null, seq12213);
  return om.dom.circle.cljs$core$IFn$_invoke$arity$variadic(G__12214, seq12213__$1);
};
om.dom.ellipse = function om$dom$ellipse(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12565 = arguments.length;
  var i__7199__auto___12566 = 0;
  while (true) {
    if (i__7199__auto___12566 < len__7198__auto___12565) {
      args__7205__auto__.push(arguments[i__7199__auto___12566]);
      var G__12567 = i__7199__auto___12566 + 1;
      i__7199__auto___12566 = G__12567;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.ellipse.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.ellipse.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.ellipse.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.ellipse.cljs$lang$maxFixedArity = 1;
om.dom.ellipse.cljs$lang$applyTo = function(seq12215) {
  var G__12216 = cljs.core.first.call(null, seq12215);
  var seq12215__$1 = cljs.core.next.call(null, seq12215);
  return om.dom.ellipse.cljs$core$IFn$_invoke$arity$variadic(G__12216, seq12215__$1);
};
om.dom.g = function om$dom$g(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12568 = arguments.length;
  var i__7199__auto___12569 = 0;
  while (true) {
    if (i__7199__auto___12569 < len__7198__auto___12568) {
      args__7205__auto__.push(arguments[i__7199__auto___12569]);
      var G__12570 = i__7199__auto___12569 + 1;
      i__7199__auto___12569 = G__12570;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.g.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.g.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.g.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.g.cljs$lang$maxFixedArity = 1;
om.dom.g.cljs$lang$applyTo = function(seq12217) {
  var G__12218 = cljs.core.first.call(null, seq12217);
  var seq12217__$1 = cljs.core.next.call(null, seq12217);
  return om.dom.g.cljs$core$IFn$_invoke$arity$variadic(G__12218, seq12217__$1);
};
om.dom.line = function om$dom$line(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12571 = arguments.length;
  var i__7199__auto___12572 = 0;
  while (true) {
    if (i__7199__auto___12572 < len__7198__auto___12571) {
      args__7205__auto__.push(arguments[i__7199__auto___12572]);
      var G__12573 = i__7199__auto___12572 + 1;
      i__7199__auto___12572 = G__12573;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.line.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.line.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.line.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.line.cljs$lang$maxFixedArity = 1;
om.dom.line.cljs$lang$applyTo = function(seq12219) {
  var G__12220 = cljs.core.first.call(null, seq12219);
  var seq12219__$1 = cljs.core.next.call(null, seq12219);
  return om.dom.line.cljs$core$IFn$_invoke$arity$variadic(G__12220, seq12219__$1);
};
om.dom.path = function om$dom$path(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12574 = arguments.length;
  var i__7199__auto___12575 = 0;
  while (true) {
    if (i__7199__auto___12575 < len__7198__auto___12574) {
      args__7205__auto__.push(arguments[i__7199__auto___12575]);
      var G__12576 = i__7199__auto___12575 + 1;
      i__7199__auto___12575 = G__12576;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.path.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.path.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.path.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.path.cljs$lang$maxFixedArity = 1;
om.dom.path.cljs$lang$applyTo = function(seq12221) {
  var G__12222 = cljs.core.first.call(null, seq12221);
  var seq12221__$1 = cljs.core.next.call(null, seq12221);
  return om.dom.path.cljs$core$IFn$_invoke$arity$variadic(G__12222, seq12221__$1);
};
om.dom.polyline = function om$dom$polyline(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12577 = arguments.length;
  var i__7199__auto___12578 = 0;
  while (true) {
    if (i__7199__auto___12578 < len__7198__auto___12577) {
      args__7205__auto__.push(arguments[i__7199__auto___12578]);
      var G__12579 = i__7199__auto___12578 + 1;
      i__7199__auto___12578 = G__12579;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.polyline.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.polyline.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.polyline.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.polyline.cljs$lang$maxFixedArity = 1;
om.dom.polyline.cljs$lang$applyTo = function(seq12223) {
  var G__12224 = cljs.core.first.call(null, seq12223);
  var seq12223__$1 = cljs.core.next.call(null, seq12223);
  return om.dom.polyline.cljs$core$IFn$_invoke$arity$variadic(G__12224, seq12223__$1);
};
om.dom.rect = function om$dom$rect(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12580 = arguments.length;
  var i__7199__auto___12581 = 0;
  while (true) {
    if (i__7199__auto___12581 < len__7198__auto___12580) {
      args__7205__auto__.push(arguments[i__7199__auto___12581]);
      var G__12582 = i__7199__auto___12581 + 1;
      i__7199__auto___12581 = G__12582;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.rect.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.rect.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.rect.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.rect.cljs$lang$maxFixedArity = 1;
om.dom.rect.cljs$lang$applyTo = function(seq12225) {
  var G__12226 = cljs.core.first.call(null, seq12225);
  var seq12225__$1 = cljs.core.next.call(null, seq12225);
  return om.dom.rect.cljs$core$IFn$_invoke$arity$variadic(G__12226, seq12225__$1);
};
om.dom.svg = function om$dom$svg(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12583 = arguments.length;
  var i__7199__auto___12584 = 0;
  while (true) {
    if (i__7199__auto___12584 < len__7198__auto___12583) {
      args__7205__auto__.push(arguments[i__7199__auto___12584]);
      var G__12585 = i__7199__auto___12584 + 1;
      i__7199__auto___12584 = G__12585;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.svg.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.svg.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.svg.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.svg.cljs$lang$maxFixedArity = 1;
om.dom.svg.cljs$lang$applyTo = function(seq12227) {
  var G__12228 = cljs.core.first.call(null, seq12227);
  var seq12227__$1 = cljs.core.next.call(null, seq12227);
  return om.dom.svg.cljs$core$IFn$_invoke$arity$variadic(G__12228, seq12227__$1);
};
om.dom.text = function om$dom$text(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12586 = arguments.length;
  var i__7199__auto___12587 = 0;
  while (true) {
    if (i__7199__auto___12587 < len__7198__auto___12586) {
      args__7205__auto__.push(arguments[i__7199__auto___12587]);
      var G__12588 = i__7199__auto___12587 + 1;
      i__7199__auto___12587 = G__12588;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.text.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.text.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.text.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.text.cljs$lang$maxFixedArity = 1;
om.dom.text.cljs$lang$applyTo = function(seq12229) {
  var G__12230 = cljs.core.first.call(null, seq12229);
  var seq12229__$1 = cljs.core.next.call(null, seq12229);
  return om.dom.text.cljs$core$IFn$_invoke$arity$variadic(G__12230, seq12229__$1);
};
om.dom.defs = function om$dom$defs(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12589 = arguments.length;
  var i__7199__auto___12590 = 0;
  while (true) {
    if (i__7199__auto___12590 < len__7198__auto___12589) {
      args__7205__auto__.push(arguments[i__7199__auto___12590]);
      var G__12591 = i__7199__auto___12590 + 1;
      i__7199__auto___12590 = G__12591;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.defs.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.defs.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.defs.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.defs.cljs$lang$maxFixedArity = 1;
om.dom.defs.cljs$lang$applyTo = function(seq12231) {
  var G__12232 = cljs.core.first.call(null, seq12231);
  var seq12231__$1 = cljs.core.next.call(null, seq12231);
  return om.dom.defs.cljs$core$IFn$_invoke$arity$variadic(G__12232, seq12231__$1);
};
om.dom.linearGradient = function om$dom$linearGradient(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12592 = arguments.length;
  var i__7199__auto___12593 = 0;
  while (true) {
    if (i__7199__auto___12593 < len__7198__auto___12592) {
      args__7205__auto__.push(arguments[i__7199__auto___12593]);
      var G__12594 = i__7199__auto___12593 + 1;
      i__7199__auto___12593 = G__12594;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.linearGradient.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.linearGradient.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.linearGradient.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.linearGradient.cljs$lang$maxFixedArity = 1;
om.dom.linearGradient.cljs$lang$applyTo = function(seq12233) {
  var G__12234 = cljs.core.first.call(null, seq12233);
  var seq12233__$1 = cljs.core.next.call(null, seq12233);
  return om.dom.linearGradient.cljs$core$IFn$_invoke$arity$variadic(G__12234, seq12233__$1);
};
om.dom.polygon = function om$dom$polygon(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12595 = arguments.length;
  var i__7199__auto___12596 = 0;
  while (true) {
    if (i__7199__auto___12596 < len__7198__auto___12595) {
      args__7205__auto__.push(arguments[i__7199__auto___12596]);
      var G__12597 = i__7199__auto___12596 + 1;
      i__7199__auto___12596 = G__12597;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.polygon.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.polygon.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.polygon.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.polygon.cljs$lang$maxFixedArity = 1;
om.dom.polygon.cljs$lang$applyTo = function(seq12235) {
  var G__12236 = cljs.core.first.call(null, seq12235);
  var seq12235__$1 = cljs.core.next.call(null, seq12235);
  return om.dom.polygon.cljs$core$IFn$_invoke$arity$variadic(G__12236, seq12235__$1);
};
om.dom.radialGradient = function om$dom$radialGradient(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12598 = arguments.length;
  var i__7199__auto___12599 = 0;
  while (true) {
    if (i__7199__auto___12599 < len__7198__auto___12598) {
      args__7205__auto__.push(arguments[i__7199__auto___12599]);
      var G__12600 = i__7199__auto___12599 + 1;
      i__7199__auto___12599 = G__12600;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.radialGradient.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.radialGradient.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.radialGradient.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.radialGradient.cljs$lang$maxFixedArity = 1;
om.dom.radialGradient.cljs$lang$applyTo = function(seq12237) {
  var G__12238 = cljs.core.first.call(null, seq12237);
  var seq12237__$1 = cljs.core.next.call(null, seq12237);
  return om.dom.radialGradient.cljs$core$IFn$_invoke$arity$variadic(G__12238, seq12237__$1);
};
om.dom.stop = function om$dom$stop(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12601 = arguments.length;
  var i__7199__auto___12602 = 0;
  while (true) {
    if (i__7199__auto___12602 < len__7198__auto___12601) {
      args__7205__auto__.push(arguments[i__7199__auto___12602]);
      var G__12603 = i__7199__auto___12602 + 1;
      i__7199__auto___12602 = G__12603;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.stop.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.stop.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.stop.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.stop.cljs$lang$maxFixedArity = 1;
om.dom.stop.cljs$lang$applyTo = function(seq12239) {
  var G__12240 = cljs.core.first.call(null, seq12239);
  var seq12239__$1 = cljs.core.next.call(null, seq12239);
  return om.dom.stop.cljs$core$IFn$_invoke$arity$variadic(G__12240, seq12239__$1);
};
om.dom.tspan = function om$dom$tspan(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12604 = arguments.length;
  var i__7199__auto___12605 = 0;
  while (true) {
    if (i__7199__auto___12605 < len__7198__auto___12604) {
      args__7205__auto__.push(arguments[i__7199__auto___12605]);
      var G__12606 = i__7199__auto___12605 + 1;
      i__7199__auto___12605 = G__12606;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return om.dom.tspan.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
om.dom.tspan.cljs$core$IFn$_invoke$arity$variadic = function(opts__11987__auto__, children__11988__auto__) {
  return React.DOM.tspan.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__11987__auto__, children__11988__auto__)));
};
om.dom.tspan.cljs$lang$maxFixedArity = 1;
om.dom.tspan.cljs$lang$applyTo = function(seq12061) {
  var G__12062 = cljs.core.first.call(null, seq12061);
  var seq12061__$1 = cljs.core.next.call(null, seq12061);
  return om.dom.tspan.cljs$core$IFn$_invoke$arity$variadic(G__12062, seq12061__$1);
};
om.dom.wrap_form_element = function om$dom$wrap_form_element(ctor, display_name) {
  return React.createFactory(React.createClass({"getDisplayName":function() {
    return display_name;
  }, "getInitialState":function() {
    var this$ = this;
    return {"value":this$.props["value"]};
  }, "onChange":function(e) {
    var this$ = this;
    var handler = this$.props["onChange"];
    if (handler == null) {
      return null;
    } else {
      handler.call(null, e);
      return this$.setState({"value":e.target.value});
    }
  }, "componentWillReceiveProps":function(new_props) {
    var this$ = this;
    return this$.setState({"value":new_props["value"]});
  }, "render":function() {
    var this$ = this;
    var props = {};
    goog.object.extend(props, this$.props, {"value":this$.state["value"], "onChange":this$["onChange"], "children":this$.props["children"]});
    return ctor.call(null, props);
  }}));
};
om.dom.input = om.dom.wrap_form_element.call(null, React.DOM.input, "input");
om.dom.textarea = om.dom.wrap_form_element.call(null, React.DOM.textarea, "textarea");
om.dom.option = om.dom.wrap_form_element.call(null, React.DOM.option, "option");
om.dom.render = function om$dom$render(component, el) {
  return React.render(component, el);
};
om.dom.render_to_str = function om$dom$render_to_str(c) {
  return React.renderToString(c);
};
goog.provide("goog.labs.userAgent.util");
goog.require("goog.string");
goog.labs.userAgent.util.getNativeUserAgentString_ = function() {
  var navigator = goog.labs.userAgent.util.getNavigator_();
  if (navigator) {
    var userAgent = navigator.userAgent;
    if (userAgent) {
      return userAgent;
    }
  }
  return "";
};
goog.labs.userAgent.util.getNavigator_ = function() {
  return goog.global.navigator;
};
goog.labs.userAgent.util.userAgent_ = goog.labs.userAgent.util.getNativeUserAgentString_();
goog.labs.userAgent.util.setUserAgent = function(opt_userAgent) {
  goog.labs.userAgent.util.userAgent_ = opt_userAgent || goog.labs.userAgent.util.getNativeUserAgentString_();
};
goog.labs.userAgent.util.getUserAgent = function() {
  return goog.labs.userAgent.util.userAgent_;
};
goog.labs.userAgent.util.matchUserAgent = function(str) {
  var userAgent = goog.labs.userAgent.util.getUserAgent();
  return goog.string.contains(userAgent, str);
};
goog.labs.userAgent.util.matchUserAgentIgnoreCase = function(str) {
  var userAgent = goog.labs.userAgent.util.getUserAgent();
  return goog.string.caseInsensitiveContains(userAgent, str);
};
goog.labs.userAgent.util.extractVersionTuples = function(userAgent) {
  var versionRegExp = new RegExp("(\\w[\\w ]+)" + "/" + "([^\\s]+)" + "\\s*" + "(?:\\((.*?)\\))?", "g");
  var data = [];
  var match;
  while (match = versionRegExp.exec(userAgent)) {
    data.push([match[1], match[2], match[3] || undefined]);
  }
  return data;
};
goog.provide("goog.labs.userAgent.browser");
goog.require("goog.array");
goog.require("goog.labs.userAgent.util");
goog.require("goog.object");
goog.require("goog.string");
goog.labs.userAgent.browser.matchOpera_ = function() {
  return goog.labs.userAgent.util.matchUserAgent("Opera") || goog.labs.userAgent.util.matchUserAgent("OPR");
};
goog.labs.userAgent.browser.matchIE_ = function() {
  return goog.labs.userAgent.util.matchUserAgent("Trident") || goog.labs.userAgent.util.matchUserAgent("MSIE");
};
goog.labs.userAgent.browser.matchEdge_ = function() {
  return goog.labs.userAgent.util.matchUserAgent("Edge");
};
goog.labs.userAgent.browser.matchFirefox_ = function() {
  return goog.labs.userAgent.util.matchUserAgent("Firefox");
};
goog.labs.userAgent.browser.matchSafari_ = function() {
  return goog.labs.userAgent.util.matchUserAgent("Safari") && !(goog.labs.userAgent.browser.matchChrome_() || goog.labs.userAgent.browser.matchCoast_() || goog.labs.userAgent.browser.matchOpera_() || goog.labs.userAgent.browser.matchEdge_() || goog.labs.userAgent.browser.isSilk() || goog.labs.userAgent.util.matchUserAgent("Android"));
};
goog.labs.userAgent.browser.matchCoast_ = function() {
  return goog.labs.userAgent.util.matchUserAgent("Coast");
};
goog.labs.userAgent.browser.matchIosWebview_ = function() {
  return (goog.labs.userAgent.util.matchUserAgent("iPad") || goog.labs.userAgent.util.matchUserAgent("iPhone")) && !goog.labs.userAgent.browser.matchSafari_() && !goog.labs.userAgent.browser.matchChrome_() && !goog.labs.userAgent.browser.matchCoast_() && goog.labs.userAgent.util.matchUserAgent("AppleWebKit");
};
goog.labs.userAgent.browser.matchChrome_ = function() {
  return (goog.labs.userAgent.util.matchUserAgent("Chrome") || goog.labs.userAgent.util.matchUserAgent("CriOS")) && !goog.labs.userAgent.browser.matchOpera_() && !goog.labs.userAgent.browser.matchEdge_();
};
goog.labs.userAgent.browser.matchAndroidBrowser_ = function() {
  return goog.labs.userAgent.util.matchUserAgent("Android") && !(goog.labs.userAgent.browser.isChrome() || goog.labs.userAgent.browser.isFirefox() || goog.labs.userAgent.browser.isOpera() || goog.labs.userAgent.browser.isSilk());
};
goog.labs.userAgent.browser.isOpera = goog.labs.userAgent.browser.matchOpera_;
goog.labs.userAgent.browser.isIE = goog.labs.userAgent.browser.matchIE_;
goog.labs.userAgent.browser.isEdge = goog.labs.userAgent.browser.matchEdge_;
goog.labs.userAgent.browser.isFirefox = goog.labs.userAgent.browser.matchFirefox_;
goog.labs.userAgent.browser.isSafari = goog.labs.userAgent.browser.matchSafari_;
goog.labs.userAgent.browser.isCoast = goog.labs.userAgent.browser.matchCoast_;
goog.labs.userAgent.browser.isIosWebview = goog.labs.userAgent.browser.matchIosWebview_;
goog.labs.userAgent.browser.isChrome = goog.labs.userAgent.browser.matchChrome_;
goog.labs.userAgent.browser.isAndroidBrowser = goog.labs.userAgent.browser.matchAndroidBrowser_;
goog.labs.userAgent.browser.isSilk = function() {
  return goog.labs.userAgent.util.matchUserAgent("Silk");
};
goog.labs.userAgent.browser.getVersion = function() {
  var userAgentString = goog.labs.userAgent.util.getUserAgent();
  if (goog.labs.userAgent.browser.isIE()) {
    return goog.labs.userAgent.browser.getIEVersion_(userAgentString);
  }
  var versionTuples = goog.labs.userAgent.util.extractVersionTuples(userAgentString);
  var versionMap = {};
  goog.array.forEach(versionTuples, function(tuple) {
    var key = tuple[0];
    var value = tuple[1];
    versionMap[key] = value;
  });
  var versionMapHasKey = goog.partial(goog.object.containsKey, versionMap);
  function lookUpValueWithKeys(keys) {
    var key = goog.array.find(keys, versionMapHasKey);
    return versionMap[key] || "";
  }
  if (goog.labs.userAgent.browser.isOpera()) {
    return lookUpValueWithKeys(["Version", "Opera", "OPR"]);
  }
  if (goog.labs.userAgent.browser.isEdge()) {
    return lookUpValueWithKeys(["Edge"]);
  }
  if (goog.labs.userAgent.browser.isChrome()) {
    return lookUpValueWithKeys(["Chrome", "CriOS"]);
  }
  var tuple = versionTuples[2];
  return tuple && tuple[1] || "";
};
goog.labs.userAgent.browser.isVersionOrHigher = function(version) {
  return goog.string.compareVersions(goog.labs.userAgent.browser.getVersion(), version) >= 0;
};
goog.labs.userAgent.browser.getIEVersion_ = function(userAgent) {
  var rv = /rv: *([\d\.]*)/.exec(userAgent);
  if (rv && rv[1]) {
    return rv[1];
  }
  var version = "";
  var msie = /MSIE +([\d\.]+)/.exec(userAgent);
  if (msie && msie[1]) {
    var tridentVersion = /Trident\/(\d.\d)/.exec(userAgent);
    if (msie[1] == "7.0") {
      if (tridentVersion && tridentVersion[1]) {
        switch(tridentVersion[1]) {
          case "4.0":
            version = "8.0";
            break;
          case "5.0":
            version = "9.0";
            break;
          case "6.0":
            version = "10.0";
            break;
          case "7.0":
            version = "11.0";
            break;
        }
      } else {
        version = "7.0";
      }
    } else {
      version = msie[1];
    }
  }
  return version;
};
goog.provide("goog.labs.userAgent.engine");
goog.require("goog.array");
goog.require("goog.labs.userAgent.util");
goog.require("goog.string");
goog.labs.userAgent.engine.isPresto = function() {
  return goog.labs.userAgent.util.matchUserAgent("Presto");
};
goog.labs.userAgent.engine.isTrident = function() {
  return goog.labs.userAgent.util.matchUserAgent("Trident") || goog.labs.userAgent.util.matchUserAgent("MSIE");
};
goog.labs.userAgent.engine.isEdge = function() {
  return goog.labs.userAgent.util.matchUserAgent("Edge");
};
goog.labs.userAgent.engine.isWebKit = function() {
  return goog.labs.userAgent.util.matchUserAgentIgnoreCase("WebKit") && !goog.labs.userAgent.engine.isEdge();
};
goog.labs.userAgent.engine.isGecko = function() {
  return goog.labs.userAgent.util.matchUserAgent("Gecko") && !goog.labs.userAgent.engine.isWebKit() && !goog.labs.userAgent.engine.isTrident() && !goog.labs.userAgent.engine.isEdge();
};
goog.labs.userAgent.engine.getVersion = function() {
  var userAgentString = goog.labs.userAgent.util.getUserAgent();
  if (userAgentString) {
    var tuples = goog.labs.userAgent.util.extractVersionTuples(userAgentString);
    var engineTuple = goog.labs.userAgent.engine.getEngineTuple_(tuples);
    if (engineTuple) {
      if (engineTuple[0] == "Gecko") {
        return goog.labs.userAgent.engine.getVersionForKey_(tuples, "Firefox");
      }
      return engineTuple[1];
    }
    var browserTuple = tuples[0];
    var info;
    if (browserTuple && (info = browserTuple[2])) {
      var match = /Trident\/([^\s;]+)/.exec(info);
      if (match) {
        return match[1];
      }
    }
  }
  return "";
};
goog.labs.userAgent.engine.getEngineTuple_ = function(tuples) {
  if (!goog.labs.userAgent.engine.isEdge()) {
    return tuples[1];
  }
  for (var i = 0;i < tuples.length;i++) {
    var tuple = tuples[i];
    if (tuple[0] == "Edge") {
      return tuple;
    }
  }
};
goog.labs.userAgent.engine.isVersionOrHigher = function(version) {
  return goog.string.compareVersions(goog.labs.userAgent.engine.getVersion(), version) >= 0;
};
goog.labs.userAgent.engine.getVersionForKey_ = function(tuples, key) {
  var pair = goog.array.find(tuples, function(pair) {
    return key == pair[0];
  });
  return pair && pair[1] || "";
};
goog.provide("goog.labs.userAgent.platform");
goog.require("goog.labs.userAgent.util");
goog.require("goog.string");
goog.labs.userAgent.platform.isAndroid = function() {
  return goog.labs.userAgent.util.matchUserAgent("Android");
};
goog.labs.userAgent.platform.isIpod = function() {
  return goog.labs.userAgent.util.matchUserAgent("iPod");
};
goog.labs.userAgent.platform.isIphone = function() {
  return goog.labs.userAgent.util.matchUserAgent("iPhone") && !goog.labs.userAgent.util.matchUserAgent("iPod") && !goog.labs.userAgent.util.matchUserAgent("iPad");
};
goog.labs.userAgent.platform.isIpad = function() {
  return goog.labs.userAgent.util.matchUserAgent("iPad");
};
goog.labs.userAgent.platform.isIos = function() {
  return goog.labs.userAgent.platform.isIphone() || goog.labs.userAgent.platform.isIpad() || goog.labs.userAgent.platform.isIpod();
};
goog.labs.userAgent.platform.isMacintosh = function() {
  return goog.labs.userAgent.util.matchUserAgent("Macintosh");
};
goog.labs.userAgent.platform.isLinux = function() {
  return goog.labs.userAgent.util.matchUserAgent("Linux");
};
goog.labs.userAgent.platform.isWindows = function() {
  return goog.labs.userAgent.util.matchUserAgent("Windows");
};
goog.labs.userAgent.platform.isChromeOS = function() {
  return goog.labs.userAgent.util.matchUserAgent("CrOS");
};
goog.labs.userAgent.platform.getVersion = function() {
  var userAgentString = goog.labs.userAgent.util.getUserAgent();
  var version = "", re;
  if (goog.labs.userAgent.platform.isWindows()) {
    re = /Windows (?:NT|Phone) ([0-9.]+)/;
    var match = re.exec(userAgentString);
    if (match) {
      version = match[1];
    } else {
      version = "0.0";
    }
  } else {
    if (goog.labs.userAgent.platform.isIos()) {
      re = /(?:iPhone|iPod|iPad|CPU)\s+OS\s+(\S+)/;
      var match = re.exec(userAgentString);
      version = match && match[1].replace(/_/g, ".");
    } else {
      if (goog.labs.userAgent.platform.isMacintosh()) {
        re = /Mac OS X ([0-9_.]+)/;
        var match = re.exec(userAgentString);
        version = match ? match[1].replace(/_/g, ".") : "10";
      } else {
        if (goog.labs.userAgent.platform.isAndroid()) {
          re = /Android\s+([^\);]+)(\)|;)/;
          var match = re.exec(userAgentString);
          version = match && match[1];
        } else {
          if (goog.labs.userAgent.platform.isChromeOS()) {
            re = /(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/;
            var match = re.exec(userAgentString);
            version = match && match[1];
          }
        }
      }
    }
  }
  return version || "";
};
goog.labs.userAgent.platform.isVersionOrHigher = function(version) {
  return goog.string.compareVersions(goog.labs.userAgent.platform.getVersion(), version) >= 0;
};
goog.provide("goog.userAgent");
goog.require("goog.labs.userAgent.browser");
goog.require("goog.labs.userAgent.engine");
goog.require("goog.labs.userAgent.platform");
goog.require("goog.labs.userAgent.util");
goog.require("goog.string");
goog.define("goog.userAgent.ASSUME_IE", false);
goog.define("goog.userAgent.ASSUME_EDGE", false);
goog.define("goog.userAgent.ASSUME_GECKO", false);
goog.define("goog.userAgent.ASSUME_WEBKIT", false);
goog.define("goog.userAgent.ASSUME_MOBILE_WEBKIT", false);
goog.define("goog.userAgent.ASSUME_OPERA", false);
goog.define("goog.userAgent.ASSUME_ANY_VERSION", false);
goog.userAgent.BROWSER_KNOWN_ = goog.userAgent.ASSUME_IE || goog.userAgent.ASSUME_EDGE || goog.userAgent.ASSUME_GECKO || goog.userAgent.ASSUME_MOBILE_WEBKIT || goog.userAgent.ASSUME_WEBKIT || goog.userAgent.ASSUME_OPERA;
goog.userAgent.getUserAgentString = function() {
  return goog.labs.userAgent.util.getUserAgent();
};
goog.userAgent.getNavigator = function() {
  return goog.global["navigator"] || null;
};
goog.userAgent.OPERA = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_OPERA : goog.labs.userAgent.browser.isOpera();
goog.userAgent.IE = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_IE : goog.labs.userAgent.browser.isIE();
goog.userAgent.EDGE = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_EDGE : goog.labs.userAgent.engine.isEdge();
goog.userAgent.EDGE_OR_IE = goog.userAgent.EDGE || goog.userAgent.IE;
goog.userAgent.GECKO = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_GECKO : goog.labs.userAgent.engine.isGecko();
goog.userAgent.WEBKIT = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_WEBKIT || goog.userAgent.ASSUME_MOBILE_WEBKIT : goog.labs.userAgent.engine.isWebKit();
goog.userAgent.isMobile_ = function() {
  return goog.userAgent.WEBKIT && goog.labs.userAgent.util.matchUserAgent("Mobile");
};
goog.userAgent.MOBILE = goog.userAgent.ASSUME_MOBILE_WEBKIT || goog.userAgent.isMobile_();
goog.userAgent.SAFARI = goog.userAgent.WEBKIT;
goog.userAgent.determinePlatform_ = function() {
  var navigator = goog.userAgent.getNavigator();
  return navigator && navigator.platform || "";
};
goog.userAgent.PLATFORM = goog.userAgent.determinePlatform_();
goog.define("goog.userAgent.ASSUME_MAC", false);
goog.define("goog.userAgent.ASSUME_WINDOWS", false);
goog.define("goog.userAgent.ASSUME_LINUX", false);
goog.define("goog.userAgent.ASSUME_X11", false);
goog.define("goog.userAgent.ASSUME_ANDROID", false);
goog.define("goog.userAgent.ASSUME_IPHONE", false);
goog.define("goog.userAgent.ASSUME_IPAD", false);
goog.userAgent.PLATFORM_KNOWN_ = goog.userAgent.ASSUME_MAC || goog.userAgent.ASSUME_WINDOWS || goog.userAgent.ASSUME_LINUX || goog.userAgent.ASSUME_X11 || goog.userAgent.ASSUME_ANDROID || goog.userAgent.ASSUME_IPHONE || goog.userAgent.ASSUME_IPAD;
goog.userAgent.MAC = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_MAC : goog.labs.userAgent.platform.isMacintosh();
goog.userAgent.WINDOWS = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_WINDOWS : goog.labs.userAgent.platform.isWindows();
goog.userAgent.isLegacyLinux_ = function() {
  return goog.labs.userAgent.platform.isLinux() || goog.labs.userAgent.platform.isChromeOS();
};
goog.userAgent.LINUX = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_LINUX : goog.userAgent.isLegacyLinux_();
goog.userAgent.isX11_ = function() {
  var navigator = goog.userAgent.getNavigator();
  return !!navigator && goog.string.contains(navigator["appVersion"] || "", "X11");
};
goog.userAgent.X11 = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_X11 : goog.userAgent.isX11_();
goog.userAgent.ANDROID = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_ANDROID : goog.labs.userAgent.platform.isAndroid();
goog.userAgent.IPHONE = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPHONE : goog.labs.userAgent.platform.isIphone();
goog.userAgent.IPAD = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPAD : goog.labs.userAgent.platform.isIpad();
goog.userAgent.operaVersion_ = function() {
  var version = goog.global.opera.version;
  try {
    return version();
  } catch (e) {
    return version;
  }
};
goog.userAgent.determineVersion_ = function() {
  if (goog.userAgent.OPERA && goog.global["opera"]) {
    return goog.userAgent.operaVersion_();
  }
  var version = "";
  var arr = goog.userAgent.getVersionRegexResult_();
  if (arr) {
    version = arr ? arr[1] : "";
  }
  if (goog.userAgent.IE) {
    var docMode = goog.userAgent.getDocumentMode_();
    if (docMode > parseFloat(version)) {
      return String(docMode);
    }
  }
  return version;
};
goog.userAgent.getVersionRegexResult_ = function() {
  var userAgent = goog.userAgent.getUserAgentString();
  if (goog.userAgent.GECKO) {
    return /rv\:([^\);]+)(\)|;)/.exec(userAgent);
  }
  if (goog.userAgent.EDGE) {
    return /Edge\/([\d\.]+)/.exec(userAgent);
  }
  if (goog.userAgent.IE) {
    return /\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(userAgent);
  }
  if (goog.userAgent.WEBKIT) {
    return /WebKit\/(\S+)/.exec(userAgent);
  }
};
goog.userAgent.getDocumentMode_ = function() {
  var doc = goog.global["document"];
  return doc ? doc["documentMode"] : undefined;
};
goog.userAgent.VERSION = goog.userAgent.determineVersion_();
goog.userAgent.compare = function(v1, v2) {
  return goog.string.compareVersions(v1, v2);
};
goog.userAgent.isVersionOrHigherCache_ = {};
goog.userAgent.isVersionOrHigher = function(version) {
  return goog.userAgent.ASSUME_ANY_VERSION || goog.userAgent.isVersionOrHigherCache_[version] || (goog.userAgent.isVersionOrHigherCache_[version] = goog.string.compareVersions(goog.userAgent.VERSION, version) >= 0);
};
goog.userAgent.isVersion = goog.userAgent.isVersionOrHigher;
goog.userAgent.isDocumentModeOrHigher = function(documentMode) {
  return goog.userAgent.DOCUMENT_MODE >= documentMode;
};
goog.userAgent.isDocumentMode = goog.userAgent.isDocumentModeOrHigher;
goog.userAgent.DOCUMENT_MODE = function() {
  var doc = goog.global["document"];
  var mode = goog.userAgent.getDocumentMode_();
  if (!doc || !goog.userAgent.IE) {
    return undefined;
  }
  return mode || (doc["compatMode"] == "CSS1Compat" ? parseInt(goog.userAgent.VERSION, 10) : 5);
}();
goog.provide("goog.dom.BrowserFeature");
goog.require("goog.userAgent");
goog.dom.BrowserFeature = {CAN_ADD_NAME_OR_TYPE_ATTRIBUTES:!goog.userAgent.IE || goog.userAgent.isDocumentModeOrHigher(9), CAN_USE_CHILDREN_ATTRIBUTE:!goog.userAgent.GECKO && !goog.userAgent.IE || goog.userAgent.IE && goog.userAgent.isDocumentModeOrHigher(9) || goog.userAgent.GECKO && goog.userAgent.isVersionOrHigher("1.9.1"), CAN_USE_INNER_TEXT:goog.userAgent.IE && !goog.userAgent.isVersionOrHigher("9"), CAN_USE_PARENT_ELEMENT_PROPERTY:goog.userAgent.IE || goog.userAgent.OPERA || goog.userAgent.WEBKIT, 
INNER_HTML_NEEDS_SCOPED_ELEMENT:goog.userAgent.IE, LEGACY_IE_RANGES:goog.userAgent.IE && !goog.userAgent.isDocumentModeOrHigher(9)};
goog.provide("goog.dom.TagName");
goog.dom.TagName = {A:"A", ABBR:"ABBR", ACRONYM:"ACRONYM", ADDRESS:"ADDRESS", APPLET:"APPLET", AREA:"AREA", ARTICLE:"ARTICLE", ASIDE:"ASIDE", AUDIO:"AUDIO", B:"B", BASE:"BASE", BASEFONT:"BASEFONT", BDI:"BDI", BDO:"BDO", BIG:"BIG", BLOCKQUOTE:"BLOCKQUOTE", BODY:"BODY", BR:"BR", BUTTON:"BUTTON", CANVAS:"CANVAS", CAPTION:"CAPTION", CENTER:"CENTER", CITE:"CITE", CODE:"CODE", COL:"COL", COLGROUP:"COLGROUP", COMMAND:"COMMAND", DATA:"DATA", DATALIST:"DATALIST", DD:"DD", DEL:"DEL", DETAILS:"DETAILS", DFN:"DFN", 
DIALOG:"DIALOG", DIR:"DIR", DIV:"DIV", DL:"DL", DT:"DT", EM:"EM", EMBED:"EMBED", FIELDSET:"FIELDSET", FIGCAPTION:"FIGCAPTION", FIGURE:"FIGURE", FONT:"FONT", FOOTER:"FOOTER", FORM:"FORM", FRAME:"FRAME", FRAMESET:"FRAMESET", H1:"H1", H2:"H2", H3:"H3", H4:"H4", H5:"H5", H6:"H6", HEAD:"HEAD", HEADER:"HEADER", HGROUP:"HGROUP", HR:"HR", HTML:"HTML", I:"I", IFRAME:"IFRAME", IMG:"IMG", INPUT:"INPUT", INS:"INS", ISINDEX:"ISINDEX", KBD:"KBD", KEYGEN:"KEYGEN", LABEL:"LABEL", LEGEND:"LEGEND", LI:"LI", LINK:"LINK", 
MAP:"MAP", MARK:"MARK", MATH:"MATH", MENU:"MENU", META:"META", METER:"METER", NAV:"NAV", NOFRAMES:"NOFRAMES", NOSCRIPT:"NOSCRIPT", OBJECT:"OBJECT", OL:"OL", OPTGROUP:"OPTGROUP", OPTION:"OPTION", OUTPUT:"OUTPUT", P:"P", PARAM:"PARAM", PRE:"PRE", PROGRESS:"PROGRESS", Q:"Q", RP:"RP", RT:"RT", RUBY:"RUBY", S:"S", SAMP:"SAMP", SCRIPT:"SCRIPT", SECTION:"SECTION", SELECT:"SELECT", SMALL:"SMALL", SOURCE:"SOURCE", SPAN:"SPAN", STRIKE:"STRIKE", STRONG:"STRONG", STYLE:"STYLE", SUB:"SUB", SUMMARY:"SUMMARY", 
SUP:"SUP", SVG:"SVG", TABLE:"TABLE", TBODY:"TBODY", TD:"TD", TEMPLATE:"TEMPLATE", TEXTAREA:"TEXTAREA", TFOOT:"TFOOT", TH:"TH", THEAD:"THEAD", TIME:"TIME", TITLE:"TITLE", TR:"TR", TRACK:"TRACK", TT:"TT", U:"U", UL:"UL", VAR:"VAR", VIDEO:"VIDEO", WBR:"WBR"};
goog.provide("goog.dom.tags");
goog.require("goog.object");
goog.dom.tags.VOID_TAGS_ = goog.object.createSet("area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr");
goog.dom.tags.isVoidTag = function(tagName) {
  return goog.dom.tags.VOID_TAGS_[tagName] === true;
};
goog.provide("goog.string.TypedString");
goog.string.TypedString = function() {
};
goog.string.TypedString.prototype.implementsGoogStringTypedString;
goog.string.TypedString.prototype.getTypedStringValue;
goog.provide("goog.string.Const");
goog.require("goog.asserts");
goog.require("goog.string.TypedString");
goog.string.Const = function() {
  this.stringConstValueWithSecurityContract__googStringSecurityPrivate_ = "";
  this.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_ = goog.string.Const.TYPE_MARKER_;
};
goog.string.Const.prototype.implementsGoogStringTypedString = true;
goog.string.Const.prototype.getTypedStringValue = function() {
  return this.stringConstValueWithSecurityContract__googStringSecurityPrivate_;
};
goog.string.Const.prototype.toString = function() {
  return "Const{" + this.stringConstValueWithSecurityContract__googStringSecurityPrivate_ + "}";
};
goog.string.Const.unwrap = function(stringConst) {
  if (stringConst instanceof goog.string.Const && stringConst.constructor === goog.string.Const && stringConst.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_ === goog.string.Const.TYPE_MARKER_) {
    return stringConst.stringConstValueWithSecurityContract__googStringSecurityPrivate_;
  } else {
    goog.asserts.fail("expected object of type Const, got '" + stringConst + "'");
    return "type_error:Const";
  }
};
goog.string.Const.from = function(s) {
  return goog.string.Const.create__googStringSecurityPrivate_(s);
};
goog.string.Const.TYPE_MARKER_ = {};
goog.string.Const.create__googStringSecurityPrivate_ = function(s) {
  var stringConst = new goog.string.Const;
  stringConst.stringConstValueWithSecurityContract__googStringSecurityPrivate_ = s;
  return stringConst;
};
goog.provide("goog.html.SafeStyle");
goog.require("goog.array");
goog.require("goog.asserts");
goog.require("goog.string");
goog.require("goog.string.Const");
goog.require("goog.string.TypedString");
goog.html.SafeStyle = function() {
  this.privateDoNotAccessOrElseSafeStyleWrappedValue_ = "";
  this.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
};
goog.html.SafeStyle.prototype.implementsGoogStringTypedString = true;
goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
goog.html.SafeStyle.fromConstant = function(style) {
  var styleString = goog.string.Const.unwrap(style);
  if (styleString.length === 0) {
    return goog.html.SafeStyle.EMPTY;
  }
  goog.html.SafeStyle.checkStyle_(styleString);
  goog.asserts.assert(goog.string.endsWith(styleString, ";"), "Last character of style string is not ';': " + styleString);
  goog.asserts.assert(goog.string.contains(styleString, ":"), "Style string must contain at least one ':', to " + 'specify a "name: value" pair: ' + styleString);
  return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(styleString);
};
goog.html.SafeStyle.checkStyle_ = function(style) {
  goog.asserts.assert(!/[<>]/.test(style), "Forbidden characters in style string: " + style);
};
goog.html.SafeStyle.prototype.getTypedStringValue = function() {
  return this.privateDoNotAccessOrElseSafeStyleWrappedValue_;
};
if (goog.DEBUG) {
  goog.html.SafeStyle.prototype.toString = function() {
    return "SafeStyle{" + this.privateDoNotAccessOrElseSafeStyleWrappedValue_ + "}";
  };
}
goog.html.SafeStyle.unwrap = function(safeStyle) {
  if (safeStyle instanceof goog.html.SafeStyle && safeStyle.constructor === goog.html.SafeStyle && safeStyle.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
    return safeStyle.privateDoNotAccessOrElseSafeStyleWrappedValue_;
  } else {
    goog.asserts.fail("expected object of type SafeStyle, got '" + safeStyle + "'");
    return "type_error:SafeStyle";
  }
};
goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse = function(style) {
  return (new goog.html.SafeStyle).initSecurityPrivateDoNotAccessOrElse_(style);
};
goog.html.SafeStyle.prototype.initSecurityPrivateDoNotAccessOrElse_ = function(style) {
  this.privateDoNotAccessOrElseSafeStyleWrappedValue_ = style;
  return this;
};
goog.html.SafeStyle.EMPTY = goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse("");
goog.html.SafeStyle.INNOCUOUS_STRING = "zClosurez";
goog.html.SafeStyle.PropertyMap;
goog.html.SafeStyle.create = function(map) {
  var style = "";
  for (var name in map) {
    if (!/^[-_a-zA-Z0-9]+$/.test(name)) {
      throw Error("Name allows only [-_a-zA-Z0-9], got: " + name);
    }
    var value = map[name];
    if (value == null) {
      continue;
    }
    if (value instanceof goog.string.Const) {
      value = goog.string.Const.unwrap(value);
      goog.asserts.assert(!/[{;}]/.test(value), "Value does not allow [{;}].");
    } else {
      if (!goog.html.SafeStyle.VALUE_RE_.test(value)) {
        goog.asserts.fail("String value allows only [-,.\"'%_!# a-zA-Z0-9], got: " + value);
        value = goog.html.SafeStyle.INNOCUOUS_STRING;
      } else {
        if (!goog.html.SafeStyle.hasBalancedQuotes_(value)) {
          goog.asserts.fail("String value requires balanced quotes, got: " + value);
          value = goog.html.SafeStyle.INNOCUOUS_STRING;
        }
      }
    }
    style += name + ":" + value + ";";
  }
  if (!style) {
    return goog.html.SafeStyle.EMPTY;
  }
  goog.html.SafeStyle.checkStyle_(style);
  return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(style);
};
goog.html.SafeStyle.hasBalancedQuotes_ = function(value) {
  var outsideSingle = true;
  var outsideDouble = true;
  for (var i = 0;i < value.length;i++) {
    var c = value.charAt(i);
    if (c == "'" && outsideDouble) {
      outsideSingle = !outsideSingle;
    } else {
      if (c == '"' && outsideSingle) {
        outsideDouble = !outsideDouble;
      }
    }
  }
  return outsideSingle && outsideDouble;
};
goog.html.SafeStyle.VALUE_RE_ = /^[-,."'%_!# a-zA-Z0-9]+$/;
goog.html.SafeStyle.concat = function(var_args) {
  var style = "";
  var addArgument = function(argument) {
    if (goog.isArray(argument)) {
      goog.array.forEach(argument, addArgument);
    } else {
      style += goog.html.SafeStyle.unwrap(argument);
    }
  };
  goog.array.forEach(arguments, addArgument);
  if (!style) {
    return goog.html.SafeStyle.EMPTY;
  }
  return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(style);
};
goog.provide("goog.html.SafeStyleSheet");
goog.require("goog.array");
goog.require("goog.asserts");
goog.require("goog.string");
goog.require("goog.string.Const");
goog.require("goog.string.TypedString");
goog.html.SafeStyleSheet = function() {
  this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_ = "";
  this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
};
goog.html.SafeStyleSheet.prototype.implementsGoogStringTypedString = true;
goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
goog.html.SafeStyleSheet.concat = function(var_args) {
  var result = "";
  var addArgument = function(argument) {
    if (goog.isArray(argument)) {
      goog.array.forEach(argument, addArgument);
    } else {
      result += goog.html.SafeStyleSheet.unwrap(argument);
    }
  };
  goog.array.forEach(arguments, addArgument);
  return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(result);
};
goog.html.SafeStyleSheet.fromConstant = function(styleSheet) {
  var styleSheetString = goog.string.Const.unwrap(styleSheet);
  if (styleSheetString.length === 0) {
    return goog.html.SafeStyleSheet.EMPTY;
  }
  goog.asserts.assert(!goog.string.contains(styleSheetString, "\x3c"), "Forbidden '\x3c' character in style sheet string: " + styleSheetString);
  return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(styleSheetString);
};
goog.html.SafeStyleSheet.prototype.getTypedStringValue = function() {
  return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_;
};
if (goog.DEBUG) {
  goog.html.SafeStyleSheet.prototype.toString = function() {
    return "SafeStyleSheet{" + this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_ + "}";
  };
}
goog.html.SafeStyleSheet.unwrap = function(safeStyleSheet) {
  if (safeStyleSheet instanceof goog.html.SafeStyleSheet && safeStyleSheet.constructor === goog.html.SafeStyleSheet && safeStyleSheet.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
    return safeStyleSheet.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_;
  } else {
    goog.asserts.fail("expected object of type SafeStyleSheet, got '" + safeStyleSheet + "'");
    return "type_error:SafeStyleSheet";
  }
};
goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse = function(styleSheet) {
  return (new goog.html.SafeStyleSheet).initSecurityPrivateDoNotAccessOrElse_(styleSheet);
};
goog.html.SafeStyleSheet.prototype.initSecurityPrivateDoNotAccessOrElse_ = function(styleSheet) {
  this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_ = styleSheet;
  return this;
};
goog.html.SafeStyleSheet.EMPTY = goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse("");
goog.provide("goog.fs.url");
goog.fs.url.createObjectUrl = function(blob) {
  return goog.fs.url.getUrlObject_().createObjectURL(blob);
};
goog.fs.url.revokeObjectUrl = function(url) {
  goog.fs.url.getUrlObject_().revokeObjectURL(url);
};
goog.fs.url.UrlObject_;
goog.fs.url.getUrlObject_ = function() {
  var urlObject = goog.fs.url.findUrlObject_();
  if (urlObject != null) {
    return urlObject;
  } else {
    throw Error("This browser doesn't seem to support blob URLs");
  }
};
goog.fs.url.findUrlObject_ = function() {
  if (goog.isDef(goog.global.URL) && goog.isDef(goog.global.URL.createObjectURL)) {
    return (goog.global.URL);
  } else {
    if (goog.isDef(goog.global.webkitURL) && goog.isDef(goog.global.webkitURL.createObjectURL)) {
      return (goog.global.webkitURL);
    } else {
      if (goog.isDef(goog.global.createObjectURL)) {
        return (goog.global);
      } else {
        return null;
      }
    }
  }
};
goog.fs.url.browserSupportsObjectUrls = function() {
  return goog.fs.url.findUrlObject_() != null;
};
goog.provide("goog.i18n.bidi");
goog.provide("goog.i18n.bidi.Dir");
goog.provide("goog.i18n.bidi.DirectionalString");
goog.provide("goog.i18n.bidi.Format");
goog.define("goog.i18n.bidi.FORCE_RTL", false);
goog.i18n.bidi.IS_RTL = goog.i18n.bidi.FORCE_RTL || (goog.LOCALE.substring(0, 2).toLowerCase() == "ar" || goog.LOCALE.substring(0, 2).toLowerCase() == "fa" || goog.LOCALE.substring(0, 2).toLowerCase() == "he" || goog.LOCALE.substring(0, 2).toLowerCase() == "iw" || goog.LOCALE.substring(0, 2).toLowerCase() == "ps" || goog.LOCALE.substring(0, 2).toLowerCase() == "sd" || goog.LOCALE.substring(0, 2).toLowerCase() == "ug" || goog.LOCALE.substring(0, 2).toLowerCase() == "ur" || goog.LOCALE.substring(0, 
2).toLowerCase() == "yi") && (goog.LOCALE.length == 2 || goog.LOCALE.substring(2, 3) == "-" || goog.LOCALE.substring(2, 3) == "_") || goog.LOCALE.length >= 3 && goog.LOCALE.substring(0, 3).toLowerCase() == "ckb" && (goog.LOCALE.length == 3 || goog.LOCALE.substring(3, 4) == "-" || goog.LOCALE.substring(3, 4) == "_");
goog.i18n.bidi.Format = {LRE:"\u202a", RLE:"\u202b", PDF:"\u202c", LRM:"\u200e", RLM:"\u200f"};
goog.i18n.bidi.Dir = {LTR:1, RTL:-1, NEUTRAL:0};
goog.i18n.bidi.RIGHT = "right";
goog.i18n.bidi.LEFT = "left";
goog.i18n.bidi.I18N_RIGHT = goog.i18n.bidi.IS_RTL ? goog.i18n.bidi.LEFT : goog.i18n.bidi.RIGHT;
goog.i18n.bidi.I18N_LEFT = goog.i18n.bidi.IS_RTL ? goog.i18n.bidi.RIGHT : goog.i18n.bidi.LEFT;
goog.i18n.bidi.toDir = function(givenDir, opt_noNeutral) {
  if (typeof givenDir == "number") {
    return givenDir > 0 ? goog.i18n.bidi.Dir.LTR : givenDir < 0 ? goog.i18n.bidi.Dir.RTL : opt_noNeutral ? null : goog.i18n.bidi.Dir.NEUTRAL;
  } else {
    if (givenDir == null) {
      return null;
    } else {
      return givenDir ? goog.i18n.bidi.Dir.RTL : goog.i18n.bidi.Dir.LTR;
    }
  }
};
goog.i18n.bidi.ltrChars_ = "A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff" + "\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff";
goog.i18n.bidi.rtlChars_ = "\u0591-\u06ef\u06fa-\u07ff\u200f\ufb1d-\ufdff\ufe70-\ufefc";
goog.i18n.bidi.htmlSkipReg_ = /<[^>]*>|&[^;]+;/g;
goog.i18n.bidi.stripHtmlIfNeeded_ = function(str, opt_isStripNeeded) {
  return opt_isStripNeeded ? str.replace(goog.i18n.bidi.htmlSkipReg_, "") : str;
};
goog.i18n.bidi.rtlCharReg_ = new RegExp("[" + goog.i18n.bidi.rtlChars_ + "]");
goog.i18n.bidi.ltrCharReg_ = new RegExp("[" + goog.i18n.bidi.ltrChars_ + "]");
goog.i18n.bidi.hasAnyRtl = function(str, opt_isHtml) {
  return goog.i18n.bidi.rtlCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(str, opt_isHtml));
};
goog.i18n.bidi.hasRtlChar = goog.i18n.bidi.hasAnyRtl;
goog.i18n.bidi.hasAnyLtr = function(str, opt_isHtml) {
  return goog.i18n.bidi.ltrCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(str, opt_isHtml));
};
goog.i18n.bidi.ltrRe_ = new RegExp("^[" + goog.i18n.bidi.ltrChars_ + "]");
goog.i18n.bidi.rtlRe_ = new RegExp("^[" + goog.i18n.bidi.rtlChars_ + "]");
goog.i18n.bidi.isRtlChar = function(str) {
  return goog.i18n.bidi.rtlRe_.test(str);
};
goog.i18n.bidi.isLtrChar = function(str) {
  return goog.i18n.bidi.ltrRe_.test(str);
};
goog.i18n.bidi.isNeutralChar = function(str) {
  return !goog.i18n.bidi.isLtrChar(str) && !goog.i18n.bidi.isRtlChar(str);
};
goog.i18n.bidi.ltrDirCheckRe_ = new RegExp("^[^" + goog.i18n.bidi.rtlChars_ + "]*[" + goog.i18n.bidi.ltrChars_ + "]");
goog.i18n.bidi.rtlDirCheckRe_ = new RegExp("^[^" + goog.i18n.bidi.ltrChars_ + "]*[" + goog.i18n.bidi.rtlChars_ + "]");
goog.i18n.bidi.startsWithRtl = function(str, opt_isHtml) {
  return goog.i18n.bidi.rtlDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(str, opt_isHtml));
};
goog.i18n.bidi.isRtlText = goog.i18n.bidi.startsWithRtl;
goog.i18n.bidi.startsWithLtr = function(str, opt_isHtml) {
  return goog.i18n.bidi.ltrDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(str, opt_isHtml));
};
goog.i18n.bidi.isLtrText = goog.i18n.bidi.startsWithLtr;
goog.i18n.bidi.isRequiredLtrRe_ = /^http:\/\/.*/;
goog.i18n.bidi.isNeutralText = function(str, opt_isHtml) {
  str = goog.i18n.bidi.stripHtmlIfNeeded_(str, opt_isHtml);
  return goog.i18n.bidi.isRequiredLtrRe_.test(str) || !goog.i18n.bidi.hasAnyLtr(str) && !goog.i18n.bidi.hasAnyRtl(str);
};
goog.i18n.bidi.ltrExitDirCheckRe_ = new RegExp("[" + goog.i18n.bidi.ltrChars_ + "][^" + goog.i18n.bidi.rtlChars_ + "]*$");
goog.i18n.bidi.rtlExitDirCheckRe_ = new RegExp("[" + goog.i18n.bidi.rtlChars_ + "][^" + goog.i18n.bidi.ltrChars_ + "]*$");
goog.i18n.bidi.endsWithLtr = function(str, opt_isHtml) {
  return goog.i18n.bidi.ltrExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(str, opt_isHtml));
};
goog.i18n.bidi.isLtrExitText = goog.i18n.bidi.endsWithLtr;
goog.i18n.bidi.endsWithRtl = function(str, opt_isHtml) {
  return goog.i18n.bidi.rtlExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(str, opt_isHtml));
};
goog.i18n.bidi.isRtlExitText = goog.i18n.bidi.endsWithRtl;
goog.i18n.bidi.rtlLocalesRe_ = new RegExp("^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|" + ".*[-_](Arab|Hebr|Thaa|Nkoo|Tfng))" + "(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)", "i");
goog.i18n.bidi.isRtlLanguage = function(lang) {
  return goog.i18n.bidi.rtlLocalesRe_.test(lang);
};
goog.i18n.bidi.bracketGuardHtmlRe_ = /(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(&lt;.*?(&gt;)+)/g;
goog.i18n.bidi.bracketGuardTextRe_ = /(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?>+)/g;
goog.i18n.bidi.guardBracketInHtml = function(s, opt_isRtlContext) {
  var useRtl = opt_isRtlContext === undefined ? goog.i18n.bidi.hasAnyRtl(s) : opt_isRtlContext;
  if (useRtl) {
    return s.replace(goog.i18n.bidi.bracketGuardHtmlRe_, "\x3cspan dir\x3drtl\x3e$\x26\x3c/span\x3e");
  }
  return s.replace(goog.i18n.bidi.bracketGuardHtmlRe_, "\x3cspan dir\x3dltr\x3e$\x26\x3c/span\x3e");
};
goog.i18n.bidi.guardBracketInText = function(s, opt_isRtlContext) {
  var useRtl = opt_isRtlContext === undefined ? goog.i18n.bidi.hasAnyRtl(s) : opt_isRtlContext;
  var mark = useRtl ? goog.i18n.bidi.Format.RLM : goog.i18n.bidi.Format.LRM;
  return s.replace(goog.i18n.bidi.bracketGuardTextRe_, mark + "$\x26" + mark);
};
goog.i18n.bidi.enforceRtlInHtml = function(html) {
  if (html.charAt(0) == "\x3c") {
    return html.replace(/<\w+/, "$\x26 dir\x3drtl");
  }
  return "\n\x3cspan dir\x3drtl\x3e" + html + "\x3c/span\x3e";
};
goog.i18n.bidi.enforceRtlInText = function(text) {
  return goog.i18n.bidi.Format.RLE + text + goog.i18n.bidi.Format.PDF;
};
goog.i18n.bidi.enforceLtrInHtml = function(html) {
  if (html.charAt(0) == "\x3c") {
    return html.replace(/<\w+/, "$\x26 dir\x3dltr");
  }
  return "\n\x3cspan dir\x3dltr\x3e" + html + "\x3c/span\x3e";
};
goog.i18n.bidi.enforceLtrInText = function(text) {
  return goog.i18n.bidi.Format.LRE + text + goog.i18n.bidi.Format.PDF;
};
goog.i18n.bidi.dimensionsRe_ = /:\s*([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)/g;
goog.i18n.bidi.leftRe_ = /left/gi;
goog.i18n.bidi.rightRe_ = /right/gi;
goog.i18n.bidi.tempRe_ = /%%%%/g;
goog.i18n.bidi.mirrorCSS = function(cssStr) {
  return cssStr.replace(goog.i18n.bidi.dimensionsRe_, ":$1 $4 $3 $2").replace(goog.i18n.bidi.leftRe_, "%%%%").replace(goog.i18n.bidi.rightRe_, goog.i18n.bidi.LEFT).replace(goog.i18n.bidi.tempRe_, goog.i18n.bidi.RIGHT);
};
goog.i18n.bidi.doubleQuoteSubstituteRe_ = /([\u0591-\u05f2])"/g;
goog.i18n.bidi.singleQuoteSubstituteRe_ = /([\u0591-\u05f2])'/g;
goog.i18n.bidi.normalizeHebrewQuote = function(str) {
  return str.replace(goog.i18n.bidi.doubleQuoteSubstituteRe_, "$1\u05f4").replace(goog.i18n.bidi.singleQuoteSubstituteRe_, "$1\u05f3");
};
goog.i18n.bidi.wordSeparatorRe_ = /\s+/;
goog.i18n.bidi.hasNumeralsRe_ = /[\d\u06f0-\u06f9]/;
goog.i18n.bidi.rtlDetectionThreshold_ = .4;
goog.i18n.bidi.estimateDirection = function(str, opt_isHtml) {
  var rtlCount = 0;
  var totalCount = 0;
  var hasWeaklyLtr = false;
  var tokens = goog.i18n.bidi.stripHtmlIfNeeded_(str, opt_isHtml).split(goog.i18n.bidi.wordSeparatorRe_);
  for (var i = 0;i < tokens.length;i++) {
    var token = tokens[i];
    if (goog.i18n.bidi.startsWithRtl(token)) {
      rtlCount++;
      totalCount++;
    } else {
      if (goog.i18n.bidi.isRequiredLtrRe_.test(token)) {
        hasWeaklyLtr = true;
      } else {
        if (goog.i18n.bidi.hasAnyLtr(token)) {
          totalCount++;
        } else {
          if (goog.i18n.bidi.hasNumeralsRe_.test(token)) {
            hasWeaklyLtr = true;
          }
        }
      }
    }
  }
  return totalCount == 0 ? hasWeaklyLtr ? goog.i18n.bidi.Dir.LTR : goog.i18n.bidi.Dir.NEUTRAL : rtlCount / totalCount > goog.i18n.bidi.rtlDetectionThreshold_ ? goog.i18n.bidi.Dir.RTL : goog.i18n.bidi.Dir.LTR;
};
goog.i18n.bidi.detectRtlDirectionality = function(str, opt_isHtml) {
  return goog.i18n.bidi.estimateDirection(str, opt_isHtml) == goog.i18n.bidi.Dir.RTL;
};
goog.i18n.bidi.setElementDirAndAlign = function(element, dir) {
  if (element) {
    dir = goog.i18n.bidi.toDir(dir);
    if (dir) {
      element.style.textAlign = dir == goog.i18n.bidi.Dir.RTL ? goog.i18n.bidi.RIGHT : goog.i18n.bidi.LEFT;
      element.dir = dir == goog.i18n.bidi.Dir.RTL ? "rtl" : "ltr";
    }
  }
};
goog.i18n.bidi.setElementDirByTextDirectionality = function(element, text) {
  switch(goog.i18n.bidi.estimateDirection(text)) {
    case goog.i18n.bidi.Dir.LTR:
      element.dir = "ltr";
      break;
    case goog.i18n.bidi.Dir.RTL:
      element.dir = "rtl";
      break;
    default:
      element.removeAttribute("dir");
  }
};
goog.i18n.bidi.DirectionalString = function() {
};
goog.i18n.bidi.DirectionalString.prototype.implementsGoogI18nBidiDirectionalString;
goog.i18n.bidi.DirectionalString.prototype.getDirection;
goog.provide("goog.html.SafeUrl");
goog.require("goog.asserts");
goog.require("goog.fs.url");
goog.require("goog.i18n.bidi.Dir");
goog.require("goog.i18n.bidi.DirectionalString");
goog.require("goog.string.Const");
goog.require("goog.string.TypedString");
goog.html.SafeUrl = function() {
  this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = "";
  this.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
};
goog.html.SafeUrl.INNOCUOUS_STRING = "about:invalid#zClosurez";
goog.html.SafeUrl.prototype.implementsGoogStringTypedString = true;
goog.html.SafeUrl.prototype.getTypedStringValue = function() {
  return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
};
goog.html.SafeUrl.prototype.implementsGoogI18nBidiDirectionalString = true;
goog.html.SafeUrl.prototype.getDirection = function() {
  return goog.i18n.bidi.Dir.LTR;
};
if (goog.DEBUG) {
  goog.html.SafeUrl.prototype.toString = function() {
    return "SafeUrl{" + this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ + "}";
  };
}
goog.html.SafeUrl.unwrap = function(safeUrl) {
  if (safeUrl instanceof goog.html.SafeUrl && safeUrl.constructor === goog.html.SafeUrl && safeUrl.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
    return safeUrl.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
  } else {
    goog.asserts.fail("expected object of type SafeUrl, got '" + safeUrl + "'");
    return "type_error:SafeUrl";
  }
};
goog.html.SafeUrl.fromConstant = function(url) {
  return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(url));
};
goog.html.SAFE_MIME_TYPE_PATTERN_ = /^(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm))$/i;
goog.html.SafeUrl.fromBlob = function(blob) {
  var url = goog.html.SAFE_MIME_TYPE_PATTERN_.test(blob.type) ? goog.fs.url.createObjectUrl(blob) : goog.html.SafeUrl.INNOCUOUS_STRING;
  return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(url);
};
goog.html.DATA_URL_PATTERN_ = /^data:([^;,]*);base64,[a-z0-9+\/]+=*$/i;
goog.html.SafeUrl.fromDataUrl = function(dataUrl) {
  var match = dataUrl.match(goog.html.DATA_URL_PATTERN_);
  var valid = match && goog.html.SAFE_MIME_TYPE_PATTERN_.test(match[1]);
  return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(valid ? dataUrl : goog.html.SafeUrl.INNOCUOUS_STRING);
};
goog.html.SAFE_URL_PATTERN_ = /^(?:(?:https?|mailto|ftp):|[^&:/?#]*(?:[/?#]|$))/i;
goog.html.SafeUrl.sanitize = function(url) {
  if (url instanceof goog.html.SafeUrl) {
    return url;
  } else {
    if (url.implementsGoogStringTypedString) {
      url = url.getTypedStringValue();
    } else {
      url = String(url);
    }
  }
  if (!goog.html.SAFE_URL_PATTERN_.test(url)) {
    url = goog.html.SafeUrl.INNOCUOUS_STRING;
  }
  return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(url);
};
goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse = function(url) {
  var safeUrl = new goog.html.SafeUrl;
  safeUrl.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = url;
  return safeUrl;
};
goog.provide("goog.html.TrustedResourceUrl");
goog.require("goog.asserts");
goog.require("goog.i18n.bidi.Dir");
goog.require("goog.i18n.bidi.DirectionalString");
goog.require("goog.string.Const");
goog.require("goog.string.TypedString");
goog.html.TrustedResourceUrl = function() {
  this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ = "";
  this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
};
goog.html.TrustedResourceUrl.prototype.implementsGoogStringTypedString = true;
goog.html.TrustedResourceUrl.prototype.getTypedStringValue = function() {
  return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;
};
goog.html.TrustedResourceUrl.prototype.implementsGoogI18nBidiDirectionalString = true;
goog.html.TrustedResourceUrl.prototype.getDirection = function() {
  return goog.i18n.bidi.Dir.LTR;
};
if (goog.DEBUG) {
  goog.html.TrustedResourceUrl.prototype.toString = function() {
    return "TrustedResourceUrl{" + this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ + "}";
  };
}
goog.html.TrustedResourceUrl.unwrap = function(trustedResourceUrl) {
  if (trustedResourceUrl instanceof goog.html.TrustedResourceUrl && trustedResourceUrl.constructor === goog.html.TrustedResourceUrl && trustedResourceUrl.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
    return trustedResourceUrl.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;
  } else {
    goog.asserts.fail("expected object of type TrustedResourceUrl, got '" + trustedResourceUrl + "'");
    return "type_error:TrustedResourceUrl";
  }
};
goog.html.TrustedResourceUrl.fromConstant = function(url) {
  return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(url));
};
goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse = function(url) {
  var trustedResourceUrl = new goog.html.TrustedResourceUrl;
  trustedResourceUrl.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ = url;
  return trustedResourceUrl;
};
goog.provide("goog.html.SafeHtml");
goog.require("goog.array");
goog.require("goog.asserts");
goog.require("goog.dom.TagName");
goog.require("goog.dom.tags");
goog.require("goog.html.SafeStyle");
goog.require("goog.html.SafeStyleSheet");
goog.require("goog.html.SafeUrl");
goog.require("goog.html.TrustedResourceUrl");
goog.require("goog.i18n.bidi.Dir");
goog.require("goog.i18n.bidi.DirectionalString");
goog.require("goog.object");
goog.require("goog.string");
goog.require("goog.string.Const");
goog.require("goog.string.TypedString");
goog.html.SafeHtml = function() {
  this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = "";
  this.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
  this.dir_ = null;
};
goog.html.SafeHtml.prototype.implementsGoogI18nBidiDirectionalString = true;
goog.html.SafeHtml.prototype.getDirection = function() {
  return this.dir_;
};
goog.html.SafeHtml.prototype.implementsGoogStringTypedString = true;
goog.html.SafeHtml.prototype.getTypedStringValue = function() {
  return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
};
if (goog.DEBUG) {
  goog.html.SafeHtml.prototype.toString = function() {
    return "SafeHtml{" + this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ + "}";
  };
}
goog.html.SafeHtml.unwrap = function(safeHtml) {
  if (safeHtml instanceof goog.html.SafeHtml && safeHtml.constructor === goog.html.SafeHtml && safeHtml.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
    return safeHtml.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
  } else {
    goog.asserts.fail("expected object of type SafeHtml, got '" + safeHtml + "'");
    return "type_error:SafeHtml";
  }
};
goog.html.SafeHtml.TextOrHtml_;
goog.html.SafeHtml.htmlEscape = function(textOrHtml) {
  if (textOrHtml instanceof goog.html.SafeHtml) {
    return textOrHtml;
  }
  var dir = null;
  if (textOrHtml.implementsGoogI18nBidiDirectionalString) {
    dir = textOrHtml.getDirection();
  }
  var textAsString;
  if (textOrHtml.implementsGoogStringTypedString) {
    textAsString = textOrHtml.getTypedStringValue();
  } else {
    textAsString = String(textOrHtml);
  }
  return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.htmlEscape(textAsString), dir);
};
goog.html.SafeHtml.htmlEscapePreservingNewlines = function(textOrHtml) {
  if (textOrHtml instanceof goog.html.SafeHtml) {
    return textOrHtml;
  }
  var html = goog.html.SafeHtml.htmlEscape(textOrHtml);
  return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.newLineToBr(goog.html.SafeHtml.unwrap(html)), html.getDirection());
};
goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces = function(textOrHtml) {
  if (textOrHtml instanceof goog.html.SafeHtml) {
    return textOrHtml;
  }
  var html = goog.html.SafeHtml.htmlEscape(textOrHtml);
  return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.whitespaceEscape(goog.html.SafeHtml.unwrap(html)), html.getDirection());
};
goog.html.SafeHtml.from = goog.html.SafeHtml.htmlEscape;
goog.html.SafeHtml.VALID_NAMES_IN_TAG_ = /^[a-zA-Z0-9-]+$/;
goog.html.SafeHtml.URL_ATTRIBUTES_ = goog.object.createSet("action", "cite", "data", "formaction", "href", "manifest", "poster", "src");
goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_ = goog.object.createSet(goog.dom.TagName.EMBED, goog.dom.TagName.IFRAME, goog.dom.TagName.LINK, goog.dom.TagName.OBJECT, goog.dom.TagName.SCRIPT, goog.dom.TagName.STYLE, goog.dom.TagName.TEMPLATE);
goog.html.SafeHtml.AttributeValue_;
goog.html.SafeHtml.create = function(tagName, opt_attributes, opt_content) {
  if (!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(tagName)) {
    throw Error("Invalid tag name \x3c" + tagName + "\x3e.");
  }
  if (tagName.toUpperCase() in goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_) {
    throw Error("Tag name \x3c" + tagName + "\x3e is not allowed for SafeHtml.");
  }
  return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse(tagName, opt_attributes, opt_content);
};
goog.html.SafeHtml.createIframe = function(opt_src, opt_srcdoc, opt_attributes, opt_content) {
  var fixedAttributes = {};
  fixedAttributes["src"] = opt_src || null;
  fixedAttributes["srcdoc"] = opt_srcdoc || null;
  var defaultAttributes = {"sandbox":""};
  var attributes = goog.html.SafeHtml.combineAttributes(fixedAttributes, defaultAttributes, opt_attributes);
  return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe", attributes, opt_content);
};
goog.html.SafeHtml.createStyle = function(styleSheet, opt_attributes) {
  var fixedAttributes = {"type":"text/css"};
  var defaultAttributes = {};
  var attributes = goog.html.SafeHtml.combineAttributes(fixedAttributes, defaultAttributes, opt_attributes);
  var content = "";
  styleSheet = goog.array.concat(styleSheet);
  for (var i = 0;i < styleSheet.length;i++) {
    content += goog.html.SafeStyleSheet.unwrap(styleSheet[i]);
  }
  var htmlContent = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(content, goog.i18n.bidi.Dir.NEUTRAL);
  return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("style", attributes, htmlContent);
};
goog.html.SafeHtml.getAttrNameAndValue_ = function(tagName, name, value) {
  if (value instanceof goog.string.Const) {
    value = goog.string.Const.unwrap(value);
  } else {
    if (name.toLowerCase() == "style") {
      value = goog.html.SafeHtml.getStyleValue_(value);
    } else {
      if (/^on/i.test(name)) {
        throw Error('Attribute "' + name + '" requires goog.string.Const value, "' + value + '" given.');
      } else {
        if (name.toLowerCase() in goog.html.SafeHtml.URL_ATTRIBUTES_) {
          if (value instanceof goog.html.TrustedResourceUrl) {
            value = goog.html.TrustedResourceUrl.unwrap(value);
          } else {
            if (value instanceof goog.html.SafeUrl) {
              value = goog.html.SafeUrl.unwrap(value);
            } else {
              if (goog.isString(value)) {
                value = goog.html.SafeUrl.sanitize(value).getTypedStringValue();
              } else {
                throw Error('Attribute "' + name + '" on tag "' + tagName + '" requires goog.html.SafeUrl, goog.string.Const, or string,' + ' value "' + value + '" given.');
              }
            }
          }
        }
      }
    }
  }
  if (value.implementsGoogStringTypedString) {
    value = value.getTypedStringValue();
  }
  goog.asserts.assert(goog.isString(value) || goog.isNumber(value), "String or number value expected, got " + typeof value + " with value: " + value);
  return name + '\x3d"' + goog.string.htmlEscape(String(value)) + '"';
};
goog.html.SafeHtml.getStyleValue_ = function(value) {
  if (!goog.isObject(value)) {
    throw Error('The "style" attribute requires goog.html.SafeStyle or map ' + "of style properties, " + typeof value + " given: " + value);
  }
  if (!(value instanceof goog.html.SafeStyle)) {
    value = goog.html.SafeStyle.create(value);
  }
  return goog.html.SafeStyle.unwrap(value);
};
goog.html.SafeHtml.createWithDir = function(dir, tagName, opt_attributes, opt_content) {
  var html = goog.html.SafeHtml.create(tagName, opt_attributes, opt_content);
  html.dir_ = dir;
  return html;
};
goog.html.SafeHtml.concat = function(var_args) {
  var dir = goog.i18n.bidi.Dir.NEUTRAL;
  var content = "";
  var addArgument = function(argument) {
    if (goog.isArray(argument)) {
      goog.array.forEach(argument, addArgument);
    } else {
      var html = goog.html.SafeHtml.htmlEscape(argument);
      content += goog.html.SafeHtml.unwrap(html);
      var htmlDir = html.getDirection();
      if (dir == goog.i18n.bidi.Dir.NEUTRAL) {
        dir = htmlDir;
      } else {
        if (htmlDir != goog.i18n.bidi.Dir.NEUTRAL && dir != htmlDir) {
          dir = null;
        }
      }
    }
  };
  goog.array.forEach(arguments, addArgument);
  return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(content, dir);
};
goog.html.SafeHtml.concatWithDir = function(dir, var_args) {
  var html = goog.html.SafeHtml.concat(goog.array.slice(arguments, 1));
  html.dir_ = dir;
  return html;
};
goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse = function(html, dir) {
  return (new goog.html.SafeHtml).initSecurityPrivateDoNotAccessOrElse_(html, dir);
};
goog.html.SafeHtml.prototype.initSecurityPrivateDoNotAccessOrElse_ = function(html, dir) {
  this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = html;
  this.dir_ = dir;
  return this;
};
goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse = function(tagName, opt_attributes, opt_content) {
  var dir = null;
  var result = "\x3c" + tagName;
  if (opt_attributes) {
    for (var name in opt_attributes) {
      if (!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(name)) {
        throw Error('Invalid attribute name "' + name + '".');
      }
      var value = opt_attributes[name];
      if (!goog.isDefAndNotNull(value)) {
        continue;
      }
      result += " " + goog.html.SafeHtml.getAttrNameAndValue_(tagName, name, value);
    }
  }
  var content = opt_content;
  if (!goog.isDefAndNotNull(content)) {
    content = [];
  } else {
    if (!goog.isArray(content)) {
      content = [content];
    }
  }
  if (goog.dom.tags.isVoidTag(tagName.toLowerCase())) {
    goog.asserts.assert(!content.length, "Void tag \x3c" + tagName + "\x3e does not allow content.");
    result += "\x3e";
  } else {
    var html = goog.html.SafeHtml.concat(content);
    result += "\x3e" + goog.html.SafeHtml.unwrap(html) + "\x3c/" + tagName + "\x3e";
    dir = html.getDirection();
  }
  var dirAttribute = opt_attributes && opt_attributes["dir"];
  if (dirAttribute) {
    if (/^(ltr|rtl|auto)$/i.test(dirAttribute)) {
      dir = goog.i18n.bidi.Dir.NEUTRAL;
    } else {
      dir = null;
    }
  }
  return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(result, dir);
};
goog.html.SafeHtml.combineAttributes = function(fixedAttributes, defaultAttributes, opt_attributes) {
  var combinedAttributes = {};
  var name;
  for (name in fixedAttributes) {
    goog.asserts.assert(name.toLowerCase() == name, "Must be lower case");
    combinedAttributes[name] = fixedAttributes[name];
  }
  for (name in defaultAttributes) {
    goog.asserts.assert(name.toLowerCase() == name, "Must be lower case");
    combinedAttributes[name] = defaultAttributes[name];
  }
  for (name in opt_attributes) {
    var nameLower = name.toLowerCase();
    if (nameLower in fixedAttributes) {
      throw Error('Cannot override "' + nameLower + '" attribute, got "' + name + '" with value "' + opt_attributes[name] + '"');
    }
    if (nameLower in defaultAttributes) {
      delete combinedAttributes[nameLower];
    }
    combinedAttributes[name] = opt_attributes[name];
  }
  return combinedAttributes;
};
goog.html.SafeHtml.DOCTYPE_HTML = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("\x3c!DOCTYPE html\x3e", goog.i18n.bidi.Dir.NEUTRAL);
goog.html.SafeHtml.EMPTY = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("", goog.i18n.bidi.Dir.NEUTRAL);
goog.provide("goog.dom.safe");
goog.provide("goog.dom.safe.InsertAdjacentHtmlPosition");
goog.require("goog.asserts");
goog.require("goog.html.SafeHtml");
goog.require("goog.html.SafeUrl");
goog.require("goog.html.TrustedResourceUrl");
goog.require("goog.string");
goog.require("goog.string.Const");
goog.dom.safe.InsertAdjacentHtmlPosition = {AFTERBEGIN:"afterbegin", AFTEREND:"afterend", BEFOREBEGIN:"beforebegin", BEFOREEND:"beforeend"};
goog.dom.safe.insertAdjacentHtml = function(node, position, html) {
  node.insertAdjacentHTML(position, goog.html.SafeHtml.unwrap(html));
};
goog.dom.safe.setInnerHtml = function(elem, html) {
  elem.innerHTML = goog.html.SafeHtml.unwrap(html);
};
goog.dom.safe.setOuterHtml = function(elem, html) {
  elem.outerHTML = goog.html.SafeHtml.unwrap(html);
};
goog.dom.safe.documentWrite = function(doc, html) {
  doc.write(goog.html.SafeHtml.unwrap(html));
};
goog.dom.safe.setAnchorHref = function(anchor, url) {
  var safeUrl;
  if (url instanceof goog.html.SafeUrl) {
    safeUrl = url;
  } else {
    safeUrl = goog.html.SafeUrl.sanitize(url);
  }
  anchor.href = goog.html.SafeUrl.unwrap(safeUrl);
};
goog.dom.safe.setEmbedSrc = function(embed, url) {
  embed.src = goog.html.TrustedResourceUrl.unwrap(url);
};
goog.dom.safe.setFrameSrc = function(frame, url) {
  frame.src = goog.html.TrustedResourceUrl.unwrap(url);
};
goog.dom.safe.setIframeSrc = function(iframe, url) {
  iframe.src = goog.html.TrustedResourceUrl.unwrap(url);
};
goog.dom.safe.setLinkHrefAndRel = function(link, url, rel) {
  link.rel = rel;
  if (goog.string.caseInsensitiveContains(rel, "stylesheet")) {
    goog.asserts.assert(url instanceof goog.html.TrustedResourceUrl, 'URL must be TrustedResourceUrl because "rel" contains "stylesheet"');
    link.href = goog.html.TrustedResourceUrl.unwrap(url);
  } else {
    if (url instanceof goog.html.TrustedResourceUrl) {
      link.href = goog.html.TrustedResourceUrl.unwrap(url);
    } else {
      if (url instanceof goog.html.SafeUrl) {
        link.href = goog.html.SafeUrl.unwrap(url);
      } else {
        link.href = goog.html.SafeUrl.sanitize(url).getTypedStringValue();
      }
    }
  }
};
goog.dom.safe.setObjectData = function(object, url) {
  object.data = goog.html.TrustedResourceUrl.unwrap(url);
};
goog.dom.safe.setScriptSrc = function(script, url) {
  script.src = goog.html.TrustedResourceUrl.unwrap(url);
};
goog.dom.safe.setLocationHref = function(loc, url) {
  var safeUrl;
  if (url instanceof goog.html.SafeUrl) {
    safeUrl = url;
  } else {
    safeUrl = goog.html.SafeUrl.sanitize(url);
  }
  loc.href = goog.html.SafeUrl.unwrap(safeUrl);
};
goog.dom.safe.openInWindow = function(url, opt_openerWin, opt_name, opt_specs, opt_replace) {
  var safeUrl;
  if (url instanceof goog.html.SafeUrl) {
    safeUrl = url;
  } else {
    safeUrl = goog.html.SafeUrl.sanitize(url);
  }
  var win = opt_openerWin || window;
  return win.open(goog.html.SafeUrl.unwrap(safeUrl), opt_name ? goog.string.Const.unwrap(opt_name) : "", opt_specs, opt_replace);
};
goog.provide("goog.math");
goog.require("goog.array");
goog.require("goog.asserts");
goog.math.randomInt = function(a) {
  return Math.floor(Math.random() * a);
};
goog.math.uniformRandom = function(a, b) {
  return a + Math.random() * (b - a);
};
goog.math.clamp = function(value, min, max) {
  return Math.min(Math.max(value, min), max);
};
goog.math.modulo = function(a, b) {
  var r = a % b;
  return r * b < 0 ? r + b : r;
};
goog.math.lerp = function(a, b, x) {
  return a + x * (b - a);
};
goog.math.nearlyEquals = function(a, b, opt_tolerance) {
  return Math.abs(a - b) <= (opt_tolerance || 1E-6);
};
goog.math.standardAngle = function(angle) {
  return goog.math.modulo(angle, 360);
};
goog.math.standardAngleInRadians = function(angle) {
  return goog.math.modulo(angle, 2 * Math.PI);
};
goog.math.toRadians = function(angleDegrees) {
  return angleDegrees * Math.PI / 180;
};
goog.math.toDegrees = function(angleRadians) {
  return angleRadians * 180 / Math.PI;
};
goog.math.angleDx = function(degrees, radius) {
  return radius * Math.cos(goog.math.toRadians(degrees));
};
goog.math.angleDy = function(degrees, radius) {
  return radius * Math.sin(goog.math.toRadians(degrees));
};
goog.math.angle = function(x1, y1, x2, y2) {
  return goog.math.standardAngle(goog.math.toDegrees(Math.atan2(y2 - y1, x2 - x1)));
};
goog.math.angleDifference = function(startAngle, endAngle) {
  var d = goog.math.standardAngle(endAngle) - goog.math.standardAngle(startAngle);
  if (d > 180) {
    d = d - 360;
  } else {
    if (d <= -180) {
      d = 360 + d;
    }
  }
  return d;
};
goog.math.sign = Math.sign || function(x) {
  if (x > 0) {
    return 1;
  }
  if (x < 0) {
    return -1;
  }
  return x;
};
goog.math.longestCommonSubsequence = function(array1, array2, opt_compareFn, opt_collectorFn) {
  var compare = opt_compareFn || function(a, b) {
    return a == b;
  };
  var collect = opt_collectorFn || function(i1, i2) {
    return array1[i1];
  };
  var length1 = array1.length;
  var length2 = array2.length;
  var arr = [];
  for (var i = 0;i < length1 + 1;i++) {
    arr[i] = [];
    arr[i][0] = 0;
  }
  for (var j = 0;j < length2 + 1;j++) {
    arr[0][j] = 0;
  }
  for (i = 1;i <= length1;i++) {
    for (j = 1;j <= length2;j++) {
      if (compare(array1[i - 1], array2[j - 1])) {
        arr[i][j] = arr[i - 1][j - 1] + 1;
      } else {
        arr[i][j] = Math.max(arr[i - 1][j], arr[i][j - 1]);
      }
    }
  }
  var result = [];
  var i = length1, j = length2;
  while (i > 0 && j > 0) {
    if (compare(array1[i - 1], array2[j - 1])) {
      result.unshift(collect(i - 1, j - 1));
      i--;
      j--;
    } else {
      if (arr[i - 1][j] > arr[i][j - 1]) {
        i--;
      } else {
        j--;
      }
    }
  }
  return result;
};
goog.math.sum = function(var_args) {
  return (goog.array.reduce(arguments, function(sum, value) {
    return sum + value;
  }, 0));
};
goog.math.average = function(var_args) {
  return goog.math.sum.apply(null, arguments) / arguments.length;
};
goog.math.sampleVariance = function(var_args) {
  var sampleSize = arguments.length;
  if (sampleSize < 2) {
    return 0;
  }
  var mean = goog.math.average.apply(null, arguments);
  var variance = goog.math.sum.apply(null, goog.array.map(arguments, function(val) {
    return Math.pow(val - mean, 2);
  })) / (sampleSize - 1);
  return variance;
};
goog.math.standardDeviation = function(var_args) {
  return Math.sqrt(goog.math.sampleVariance.apply(null, arguments));
};
goog.math.isInt = function(num) {
  return isFinite(num) && num % 1 == 0;
};
goog.math.isFiniteNumber = function(num) {
  return isFinite(num) && !isNaN(num);
};
goog.math.isNegativeZero = function(num) {
  return num == 0 && 1 / num < 0;
};
goog.math.log10Floor = function(num) {
  if (num > 0) {
    var x = Math.round(Math.log(num) * Math.LOG10E);
    return x - (parseFloat("1e" + x) > num ? 1 : 0);
  }
  return num == 0 ? -Infinity : NaN;
};
goog.math.safeFloor = function(num, opt_epsilon) {
  goog.asserts.assert(!goog.isDef(opt_epsilon) || opt_epsilon > 0);
  return Math.floor(num + (opt_epsilon || 2E-15));
};
goog.math.safeCeil = function(num, opt_epsilon) {
  goog.asserts.assert(!goog.isDef(opt_epsilon) || opt_epsilon > 0);
  return Math.ceil(num - (opt_epsilon || 2E-15));
};
goog.provide("goog.math.Coordinate");
goog.require("goog.math");
goog.math.Coordinate = function(opt_x, opt_y) {
  this.x = goog.isDef(opt_x) ? opt_x : 0;
  this.y = goog.isDef(opt_y) ? opt_y : 0;
};
goog.math.Coordinate.prototype.clone = function() {
  return new goog.math.Coordinate(this.x, this.y);
};
if (goog.DEBUG) {
  goog.math.Coordinate.prototype.toString = function() {
    return "(" + this.x + ", " + this.y + ")";
  };
}
goog.math.Coordinate.equals = function(a, b) {
  if (a == b) {
    return true;
  }
  if (!a || !b) {
    return false;
  }
  return a.x == b.x && a.y == b.y;
};
goog.math.Coordinate.distance = function(a, b) {
  var dx = a.x - b.x;
  var dy = a.y - b.y;
  return Math.sqrt(dx * dx + dy * dy);
};
goog.math.Coordinate.magnitude = function(a) {
  return Math.sqrt(a.x * a.x + a.y * a.y);
};
goog.math.Coordinate.azimuth = function(a) {
  return goog.math.angle(0, 0, a.x, a.y);
};
goog.math.Coordinate.squaredDistance = function(a, b) {
  var dx = a.x - b.x;
  var dy = a.y - b.y;
  return dx * dx + dy * dy;
};
goog.math.Coordinate.difference = function(a, b) {
  return new goog.math.Coordinate(a.x - b.x, a.y - b.y);
};
goog.math.Coordinate.sum = function(a, b) {
  return new goog.math.Coordinate(a.x + b.x, a.y + b.y);
};
goog.math.Coordinate.prototype.ceil = function() {
  this.x = Math.ceil(this.x);
  this.y = Math.ceil(this.y);
  return this;
};
goog.math.Coordinate.prototype.floor = function() {
  this.x = Math.floor(this.x);
  this.y = Math.floor(this.y);
  return this;
};
goog.math.Coordinate.prototype.round = function() {
  this.x = Math.round(this.x);
  this.y = Math.round(this.y);
  return this;
};
goog.math.Coordinate.prototype.translate = function(tx, opt_ty) {
  if (tx instanceof goog.math.Coordinate) {
    this.x += tx.x;
    this.y += tx.y;
  } else {
    this.x += tx;
    if (goog.isNumber(opt_ty)) {
      this.y += opt_ty;
    }
  }
  return this;
};
goog.math.Coordinate.prototype.scale = function(sx, opt_sy) {
  var sy = goog.isNumber(opt_sy) ? opt_sy : sx;
  this.x *= sx;
  this.y *= sy;
  return this;
};
goog.math.Coordinate.prototype.rotateRadians = function(radians, opt_center) {
  var center = opt_center || new goog.math.Coordinate(0, 0);
  var x = this.x;
  var y = this.y;
  var cos = Math.cos(radians);
  var sin = Math.sin(radians);
  this.x = (x - center.x) * cos - (y - center.y) * sin + center.x;
  this.y = (x - center.x) * sin + (y - center.y) * cos + center.y;
};
goog.math.Coordinate.prototype.rotateDegrees = function(degrees, opt_center) {
  this.rotateRadians(goog.math.toRadians(degrees), opt_center);
};
goog.provide("goog.math.Size");
goog.math.Size = function(width, height) {
  this.width = width;
  this.height = height;
};
goog.math.Size.equals = function(a, b) {
  if (a == b) {
    return true;
  }
  if (!a || !b) {
    return false;
  }
  return a.width == b.width && a.height == b.height;
};
goog.math.Size.prototype.clone = function() {
  return new goog.math.Size(this.width, this.height);
};
if (goog.DEBUG) {
  goog.math.Size.prototype.toString = function() {
    return "(" + this.width + " x " + this.height + ")";
  };
}
goog.math.Size.prototype.getLongest = function() {
  return Math.max(this.width, this.height);
};
goog.math.Size.prototype.getShortest = function() {
  return Math.min(this.width, this.height);
};
goog.math.Size.prototype.area = function() {
  return this.width * this.height;
};
goog.math.Size.prototype.perimeter = function() {
  return (this.width + this.height) * 2;
};
goog.math.Size.prototype.aspectRatio = function() {
  return this.width / this.height;
};
goog.math.Size.prototype.isEmpty = function() {
  return !this.area();
};
goog.math.Size.prototype.ceil = function() {
  this.width = Math.ceil(this.width);
  this.height = Math.ceil(this.height);
  return this;
};
goog.math.Size.prototype.fitsInside = function(target) {
  return this.width <= target.width && this.height <= target.height;
};
goog.math.Size.prototype.floor = function() {
  this.width = Math.floor(this.width);
  this.height = Math.floor(this.height);
  return this;
};
goog.math.Size.prototype.round = function() {
  this.width = Math.round(this.width);
  this.height = Math.round(this.height);
  return this;
};
goog.math.Size.prototype.scale = function(sx, opt_sy) {
  var sy = goog.isNumber(opt_sy) ? opt_sy : sx;
  this.width *= sx;
  this.height *= sy;
  return this;
};
goog.math.Size.prototype.scaleToCover = function(target) {
  var s = this.aspectRatio() <= target.aspectRatio() ? target.width / this.width : target.height / this.height;
  return this.scale(s);
};
goog.math.Size.prototype.scaleToFit = function(target) {
  var s = this.aspectRatio() > target.aspectRatio() ? target.width / this.width : target.height / this.height;
  return this.scale(s);
};
goog.provide("goog.dom");
goog.provide("goog.dom.Appendable");
goog.provide("goog.dom.DomHelper");
goog.require("goog.array");
goog.require("goog.asserts");
goog.require("goog.dom.BrowserFeature");
goog.require("goog.dom.NodeType");
goog.require("goog.dom.TagName");
goog.require("goog.dom.safe");
goog.require("goog.html.SafeHtml");
goog.require("goog.math.Coordinate");
goog.require("goog.math.Size");
goog.require("goog.object");
goog.require("goog.string");
goog.require("goog.string.Unicode");
goog.require("goog.userAgent");
goog.define("goog.dom.ASSUME_QUIRKS_MODE", false);
goog.define("goog.dom.ASSUME_STANDARDS_MODE", false);
goog.dom.COMPAT_MODE_KNOWN_ = goog.dom.ASSUME_QUIRKS_MODE || goog.dom.ASSUME_STANDARDS_MODE;
goog.dom.getDomHelper = function(opt_element) {
  return opt_element ? new goog.dom.DomHelper(goog.dom.getOwnerDocument(opt_element)) : goog.dom.defaultDomHelper_ || (goog.dom.defaultDomHelper_ = new goog.dom.DomHelper);
};
goog.dom.defaultDomHelper_;
goog.dom.getDocument = function() {
  return document;
};
goog.dom.getElement = function(element) {
  return goog.dom.getElementHelper_(document, element);
};
goog.dom.getElementHelper_ = function(doc, element) {
  return goog.isString(element) ? doc.getElementById(element) : element;
};
goog.dom.getRequiredElement = function(id) {
  return goog.dom.getRequiredElementHelper_(document, id);
};
goog.dom.getRequiredElementHelper_ = function(doc, id) {
  goog.asserts.assertString(id);
  var element = goog.dom.getElementHelper_(doc, id);
  element = goog.asserts.assertElement(element, "No element found with id: " + id);
  return element;
};
goog.dom.$ = goog.dom.getElement;
goog.dom.getElementsByTagNameAndClass = function(opt_tag, opt_class, opt_el) {
  return goog.dom.getElementsByTagNameAndClass_(document, opt_tag, opt_class, opt_el);
};
goog.dom.getElementsByClass = function(className, opt_el) {
  var parent = opt_el || document;
  if (goog.dom.canUseQuerySelector_(parent)) {
    return parent.querySelectorAll("." + className);
  }
  return goog.dom.getElementsByTagNameAndClass_(document, "*", className, opt_el);
};
goog.dom.getElementByClass = function(className, opt_el) {
  var parent = opt_el || document;
  var retVal = null;
  if (parent.getElementsByClassName) {
    retVal = parent.getElementsByClassName(className)[0];
  } else {
    if (goog.dom.canUseQuerySelector_(parent)) {
      retVal = parent.querySelector("." + className);
    } else {
      retVal = goog.dom.getElementsByTagNameAndClass_(document, "*", className, opt_el)[0];
    }
  }
  return retVal || null;
};
goog.dom.getRequiredElementByClass = function(className, opt_root) {
  var retValue = goog.dom.getElementByClass(className, opt_root);
  return goog.asserts.assert(retValue, "No element found with className: " + className);
};
goog.dom.canUseQuerySelector_ = function(parent) {
  return !!(parent.querySelectorAll && parent.querySelector);
};
goog.dom.getElementsByTagNameAndClass_ = function(doc, opt_tag, opt_class, opt_el) {
  var parent = opt_el || doc;
  var tagName = opt_tag && opt_tag != "*" ? opt_tag.toUpperCase() : "";
  if (goog.dom.canUseQuerySelector_(parent) && (tagName || opt_class)) {
    var query = tagName + (opt_class ? "." + opt_class : "");
    return parent.querySelectorAll(query);
  }
  if (opt_class && parent.getElementsByClassName) {
    var els = parent.getElementsByClassName(opt_class);
    if (tagName) {
      var arrayLike = {};
      var len = 0;
      for (var i = 0, el;el = els[i];i++) {
        if (tagName == el.nodeName) {
          arrayLike[len++] = el;
        }
      }
      arrayLike.length = len;
      return arrayLike;
    } else {
      return els;
    }
  }
  var els = parent.getElementsByTagName(tagName || "*");
  if (opt_class) {
    var arrayLike = {};
    var len = 0;
    for (var i = 0, el;el = els[i];i++) {
      var className = el.className;
      if (typeof className.split == "function" && goog.array.contains(className.split(/\s+/), opt_class)) {
        arrayLike[len++] = el;
      }
    }
    arrayLike.length = len;
    return arrayLike;
  } else {
    return els;
  }
};
goog.dom.$$ = goog.dom.getElementsByTagNameAndClass;
goog.dom.setProperties = function(element, properties) {
  goog.object.forEach(properties, function(val, key) {
    if (key == "style") {
      element.style.cssText = val;
    } else {
      if (key == "class") {
        element.className = val;
      } else {
        if (key == "for") {
          element.htmlFor = val;
        } else {
          if (goog.dom.DIRECT_ATTRIBUTE_MAP_.hasOwnProperty(key)) {
            element.setAttribute(goog.dom.DIRECT_ATTRIBUTE_MAP_[key], val);
          } else {
            if (goog.string.startsWith(key, "aria-") || goog.string.startsWith(key, "data-")) {
              element.setAttribute(key, val);
            } else {
              element[key] = val;
            }
          }
        }
      }
    }
  });
};
goog.dom.DIRECT_ATTRIBUTE_MAP_ = {"cellpadding":"cellPadding", "cellspacing":"cellSpacing", "colspan":"colSpan", "frameborder":"frameBorder", "height":"height", "maxlength":"maxLength", "role":"role", "rowspan":"rowSpan", "type":"type", "usemap":"useMap", "valign":"vAlign", "width":"width"};
goog.dom.getViewportSize = function(opt_window) {
  return goog.dom.getViewportSize_(opt_window || window);
};
goog.dom.getViewportSize_ = function(win) {
  var doc = win.document;
  var el = goog.dom.isCss1CompatMode_(doc) ? doc.documentElement : doc.body;
  return new goog.math.Size(el.clientWidth, el.clientHeight);
};
goog.dom.getDocumentHeight = function() {
  return goog.dom.getDocumentHeight_(window);
};
goog.dom.getDocumentHeight_ = function(win) {
  var doc = win.document;
  var height = 0;
  if (doc) {
    var body = doc.body;
    var docEl = (doc.documentElement);
    if (!(docEl && body)) {
      return 0;
    }
    var vh = goog.dom.getViewportSize_(win).height;
    if (goog.dom.isCss1CompatMode_(doc) && docEl.scrollHeight) {
      height = docEl.scrollHeight != vh ? docEl.scrollHeight : docEl.offsetHeight;
    } else {
      var sh = docEl.scrollHeight;
      var oh = docEl.offsetHeight;
      if (docEl.clientHeight != oh) {
        sh = body.scrollHeight;
        oh = body.offsetHeight;
      }
      if (sh > vh) {
        height = sh > oh ? sh : oh;
      } else {
        height = sh < oh ? sh : oh;
      }
    }
  }
  return height;
};
goog.dom.getPageScroll = function(opt_window) {
  var win = opt_window || goog.global || window;
  return goog.dom.getDomHelper(win.document).getDocumentScroll();
};
goog.dom.getDocumentScroll = function() {
  return goog.dom.getDocumentScroll_(document);
};
goog.dom.getDocumentScroll_ = function(doc) {
  var el = goog.dom.getDocumentScrollElement_(doc);
  var win = goog.dom.getWindow_(doc);
  if (goog.userAgent.IE && goog.userAgent.isVersionOrHigher("10") && win.pageYOffset != el.scrollTop) {
    return new goog.math.Coordinate(el.scrollLeft, el.scrollTop);
  }
  return new goog.math.Coordinate(win.pageXOffset || el.scrollLeft, win.pageYOffset || el.scrollTop);
};
goog.dom.getDocumentScrollElement = function() {
  return goog.dom.getDocumentScrollElement_(document);
};
goog.dom.getDocumentScrollElement_ = function(doc) {
  if (doc.scrollingElement) {
    return doc.scrollingElement;
  }
  if (!goog.userAgent.WEBKIT && goog.dom.isCss1CompatMode_(doc)) {
    return doc.documentElement;
  }
  return doc.body || doc.documentElement;
};
goog.dom.getWindow = function(opt_doc) {
  return opt_doc ? goog.dom.getWindow_(opt_doc) : window;
};
goog.dom.getWindow_ = function(doc) {
  return doc.parentWindow || doc.defaultView;
};
goog.dom.createDom = function(tagName, opt_attributes, var_args) {
  return goog.dom.createDom_(document, arguments);
};
goog.dom.createDom_ = function(doc, args) {
  var tagName = args[0];
  var attributes = args[1];
  if (!goog.dom.BrowserFeature.CAN_ADD_NAME_OR_TYPE_ATTRIBUTES && attributes && (attributes.name || attributes.type)) {
    var tagNameArr = ["\x3c", tagName];
    if (attributes.name) {
      tagNameArr.push(' name\x3d"', goog.string.htmlEscape(attributes.name), '"');
    }
    if (attributes.type) {
      tagNameArr.push(' type\x3d"', goog.string.htmlEscape(attributes.type), '"');
      var clone = {};
      goog.object.extend(clone, attributes);
      delete clone["type"];
      attributes = clone;
    }
    tagNameArr.push("\x3e");
    tagName = tagNameArr.join("");
  }
  var element = doc.createElement(tagName);
  if (attributes) {
    if (goog.isString(attributes)) {
      element.className = attributes;
    } else {
      if (goog.isArray(attributes)) {
        element.className = attributes.join(" ");
      } else {
        goog.dom.setProperties(element, attributes);
      }
    }
  }
  if (args.length > 2) {
    goog.dom.append_(doc, element, args, 2);
  }
  return element;
};
goog.dom.append_ = function(doc, parent, args, startIndex) {
  function childHandler(child) {
    if (child) {
      parent.appendChild(goog.isString(child) ? doc.createTextNode(child) : child);
    }
  }
  for (var i = startIndex;i < args.length;i++) {
    var arg = args[i];
    if (goog.isArrayLike(arg) && !goog.dom.isNodeLike(arg)) {
      goog.array.forEach(goog.dom.isNodeList(arg) ? goog.array.toArray(arg) : arg, childHandler);
    } else {
      childHandler(arg);
    }
  }
};
goog.dom.$dom = goog.dom.createDom;
goog.dom.createElement = function(name) {
  return document.createElement(name);
};
goog.dom.createTextNode = function(content) {
  return document.createTextNode(String(content));
};
goog.dom.createTable = function(rows, columns, opt_fillWithNbsp) {
  return goog.dom.createTable_(document, rows, columns, !!opt_fillWithNbsp);
};
goog.dom.createTable_ = function(doc, rows, columns, fillWithNbsp) {
  var table = (doc.createElement(goog.dom.TagName.TABLE));
  var tbody = table.appendChild(doc.createElement(goog.dom.TagName.TBODY));
  for (var i = 0;i < rows;i++) {
    var tr = doc.createElement(goog.dom.TagName.TR);
    for (var j = 0;j < columns;j++) {
      var td = doc.createElement(goog.dom.TagName.TD);
      if (fillWithNbsp) {
        goog.dom.setTextContent(td, goog.string.Unicode.NBSP);
      }
      tr.appendChild(td);
    }
    tbody.appendChild(tr);
  }
  return table;
};
goog.dom.safeHtmlToNode = function(html) {
  return goog.dom.safeHtmlToNode_(document, html);
};
goog.dom.safeHtmlToNode_ = function(doc, html) {
  var tempDiv = doc.createElement(goog.dom.TagName.DIV);
  if (goog.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT) {
    goog.dom.safe.setInnerHtml(tempDiv, goog.html.SafeHtml.concat(goog.html.SafeHtml.create("br"), html));
    tempDiv.removeChild(tempDiv.firstChild);
  } else {
    goog.dom.safe.setInnerHtml(tempDiv, html);
  }
  return goog.dom.childrenToNode_(doc, tempDiv);
};
goog.dom.htmlToDocumentFragment = function(htmlString) {
  return goog.dom.htmlToDocumentFragment_(document, htmlString);
};
goog.dom.htmlToDocumentFragment_ = function(doc, htmlString) {
  var tempDiv = doc.createElement(goog.dom.TagName.DIV);
  if (goog.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT) {
    tempDiv.innerHTML = "\x3cbr\x3e" + htmlString;
    tempDiv.removeChild(tempDiv.firstChild);
  } else {
    tempDiv.innerHTML = htmlString;
  }
  return goog.dom.childrenToNode_(doc, tempDiv);
};
goog.dom.childrenToNode_ = function(doc, tempDiv) {
  if (tempDiv.childNodes.length == 1) {
    return tempDiv.removeChild(tempDiv.firstChild);
  } else {
    var fragment = doc.createDocumentFragment();
    while (tempDiv.firstChild) {
      fragment.appendChild(tempDiv.firstChild);
    }
    return fragment;
  }
};
goog.dom.isCss1CompatMode = function() {
  return goog.dom.isCss1CompatMode_(document);
};
goog.dom.isCss1CompatMode_ = function(doc) {
  if (goog.dom.COMPAT_MODE_KNOWN_) {
    return goog.dom.ASSUME_STANDARDS_MODE;
  }
  return doc.compatMode == "CSS1Compat";
};
goog.dom.canHaveChildren = function(node) {
  if (node.nodeType != goog.dom.NodeType.ELEMENT) {
    return false;
  }
  switch((node).tagName) {
    case goog.dom.TagName.APPLET:
    ;
    case goog.dom.TagName.AREA:
    ;
    case goog.dom.TagName.BASE:
    ;
    case goog.dom.TagName.BR:
    ;
    case goog.dom.TagName.COL:
    ;
    case goog.dom.TagName.COMMAND:
    ;
    case goog.dom.TagName.EMBED:
    ;
    case goog.dom.TagName.FRAME:
    ;
    case goog.dom.TagName.HR:
    ;
    case goog.dom.TagName.IMG:
    ;
    case goog.dom.TagName.INPUT:
    ;
    case goog.dom.TagName.IFRAME:
    ;
    case goog.dom.TagName.ISINDEX:
    ;
    case goog.dom.TagName.KEYGEN:
    ;
    case goog.dom.TagName.LINK:
    ;
    case goog.dom.TagName.NOFRAMES:
    ;
    case goog.dom.TagName.NOSCRIPT:
    ;
    case goog.dom.TagName.META:
    ;
    case goog.dom.TagName.OBJECT:
    ;
    case goog.dom.TagName.PARAM:
    ;
    case goog.dom.TagName.SCRIPT:
    ;
    case goog.dom.TagName.SOURCE:
    ;
    case goog.dom.TagName.STYLE:
    ;
    case goog.dom.TagName.TRACK:
    ;
    case goog.dom.TagName.WBR:
      return false;
  }
  return true;
};
goog.dom.appendChild = function(parent, child) {
  parent.appendChild(child);
};
goog.dom.append = function(parent, var_args) {
  goog.dom.append_(goog.dom.getOwnerDocument(parent), parent, arguments, 1);
};
goog.dom.removeChildren = function(node) {
  var child;
  while (child = node.firstChild) {
    node.removeChild(child);
  }
};
goog.dom.insertSiblingBefore = function(newNode, refNode) {
  if (refNode.parentNode) {
    refNode.parentNode.insertBefore(newNode, refNode);
  }
};
goog.dom.insertSiblingAfter = function(newNode, refNode) {
  if (refNode.parentNode) {
    refNode.parentNode.insertBefore(newNode, refNode.nextSibling);
  }
};
goog.dom.insertChildAt = function(parent, child, index) {
  parent.insertBefore(child, parent.childNodes[index] || null);
};
goog.dom.removeNode = function(node) {
  return node && node.parentNode ? node.parentNode.removeChild(node) : null;
};
goog.dom.replaceNode = function(newNode, oldNode) {
  var parent = oldNode.parentNode;
  if (parent) {
    parent.replaceChild(newNode, oldNode);
  }
};
goog.dom.flattenElement = function(element) {
  var child, parent = element.parentNode;
  if (parent && parent.nodeType != goog.dom.NodeType.DOCUMENT_FRAGMENT) {
    if (element.removeNode) {
      return (element.removeNode(false));
    } else {
      while (child = element.firstChild) {
        parent.insertBefore(child, element);
      }
      return (goog.dom.removeNode(element));
    }
  }
};
goog.dom.getChildren = function(element) {
  if (goog.dom.BrowserFeature.CAN_USE_CHILDREN_ATTRIBUTE && element.children != undefined) {
    return element.children;
  }
  return goog.array.filter(element.childNodes, function(node) {
    return node.nodeType == goog.dom.NodeType.ELEMENT;
  });
};
goog.dom.getFirstElementChild = function(node) {
  if (goog.isDef(node.firstElementChild)) {
    return (node).firstElementChild;
  }
  return goog.dom.getNextElementNode_(node.firstChild, true);
};
goog.dom.getLastElementChild = function(node) {
  if (goog.isDef(node.lastElementChild)) {
    return (node).lastElementChild;
  }
  return goog.dom.getNextElementNode_(node.lastChild, false);
};
goog.dom.getNextElementSibling = function(node) {
  if (goog.isDef(node.nextElementSibling)) {
    return (node).nextElementSibling;
  }
  return goog.dom.getNextElementNode_(node.nextSibling, true);
};
goog.dom.getPreviousElementSibling = function(node) {
  if (goog.isDef(node.previousElementSibling)) {
    return (node).previousElementSibling;
  }
  return goog.dom.getNextElementNode_(node.previousSibling, false);
};
goog.dom.getNextElementNode_ = function(node, forward) {
  while (node && node.nodeType != goog.dom.NodeType.ELEMENT) {
    node = forward ? node.nextSibling : node.previousSibling;
  }
  return (node);
};
goog.dom.getNextNode = function(node) {
  if (!node) {
    return null;
  }
  if (node.firstChild) {
    return node.firstChild;
  }
  while (node && !node.nextSibling) {
    node = node.parentNode;
  }
  return node ? node.nextSibling : null;
};
goog.dom.getPreviousNode = function(node) {
  if (!node) {
    return null;
  }
  if (!node.previousSibling) {
    return node.parentNode;
  }
  node = node.previousSibling;
  while (node && node.lastChild) {
    node = node.lastChild;
  }
  return node;
};
goog.dom.isNodeLike = function(obj) {
  return goog.isObject(obj) && obj.nodeType > 0;
};
goog.dom.isElement = function(obj) {
  return goog.isObject(obj) && obj.nodeType == goog.dom.NodeType.ELEMENT;
};
goog.dom.isWindow = function(obj) {
  return goog.isObject(obj) && obj["window"] == obj;
};
goog.dom.getParentElement = function(element) {
  var parent;
  if (goog.dom.BrowserFeature.CAN_USE_PARENT_ELEMENT_PROPERTY) {
    var isIe9 = goog.userAgent.IE && goog.userAgent.isVersionOrHigher("9") && !goog.userAgent.isVersionOrHigher("10");
    if (!(isIe9 && goog.global["SVGElement"] && element instanceof goog.global["SVGElement"])) {
      parent = element.parentElement;
      if (parent) {
        return parent;
      }
    }
  }
  parent = element.parentNode;
  return goog.dom.isElement(parent) ? (parent) : null;
};
goog.dom.contains = function(parent, descendant) {
  if (parent.contains && descendant.nodeType == goog.dom.NodeType.ELEMENT) {
    return parent == descendant || parent.contains(descendant);
  }
  if (typeof parent.compareDocumentPosition != "undefined") {
    return parent == descendant || Boolean(parent.compareDocumentPosition(descendant) & 16);
  }
  while (descendant && parent != descendant) {
    descendant = descendant.parentNode;
  }
  return descendant == parent;
};
goog.dom.compareNodeOrder = function(node1, node2) {
  if (node1 == node2) {
    return 0;
  }
  if (node1.compareDocumentPosition) {
    return node1.compareDocumentPosition(node2) & 2 ? 1 : -1;
  }
  if (goog.userAgent.IE && !goog.userAgent.isDocumentModeOrHigher(9)) {
    if (node1.nodeType == goog.dom.NodeType.DOCUMENT) {
      return -1;
    }
    if (node2.nodeType == goog.dom.NodeType.DOCUMENT) {
      return 1;
    }
  }
  if ("sourceIndex" in node1 || node1.parentNode && "sourceIndex" in node1.parentNode) {
    var isElement1 = node1.nodeType == goog.dom.NodeType.ELEMENT;
    var isElement2 = node2.nodeType == goog.dom.NodeType.ELEMENT;
    if (isElement1 && isElement2) {
      return node1.sourceIndex - node2.sourceIndex;
    } else {
      var parent1 = node1.parentNode;
      var parent2 = node2.parentNode;
      if (parent1 == parent2) {
        return goog.dom.compareSiblingOrder_(node1, node2);
      }
      if (!isElement1 && goog.dom.contains(parent1, node2)) {
        return -1 * goog.dom.compareParentsDescendantNodeIe_(node1, node2);
      }
      if (!isElement2 && goog.dom.contains(parent2, node1)) {
        return goog.dom.compareParentsDescendantNodeIe_(node2, node1);
      }
      return (isElement1 ? node1.sourceIndex : parent1.sourceIndex) - (isElement2 ? node2.sourceIndex : parent2.sourceIndex);
    }
  }
  var doc = goog.dom.getOwnerDocument(node1);
  var range1, range2;
  range1 = doc.createRange();
  range1.selectNode(node1);
  range1.collapse(true);
  range2 = doc.createRange();
  range2.selectNode(node2);
  range2.collapse(true);
  return range1.compareBoundaryPoints(goog.global["Range"].START_TO_END, range2);
};
goog.dom.compareParentsDescendantNodeIe_ = function(textNode, node) {
  var parent = textNode.parentNode;
  if (parent == node) {
    return -1;
  }
  var sibling = node;
  while (sibling.parentNode != parent) {
    sibling = sibling.parentNode;
  }
  return goog.dom.compareSiblingOrder_(sibling, textNode);
};
goog.dom.compareSiblingOrder_ = function(node1, node2) {
  var s = node2;
  while (s = s.previousSibling) {
    if (s == node1) {
      return -1;
    }
  }
  return 1;
};
goog.dom.findCommonAncestor = function(var_args) {
  var i, count = arguments.length;
  if (!count) {
    return null;
  } else {
    if (count == 1) {
      return arguments[0];
    }
  }
  var paths = [];
  var minLength = Infinity;
  for (i = 0;i < count;i++) {
    var ancestors = [];
    var node = arguments[i];
    while (node) {
      ancestors.unshift(node);
      node = node.parentNode;
    }
    paths.push(ancestors);
    minLength = Math.min(minLength, ancestors.length);
  }
  var output = null;
  for (i = 0;i < minLength;i++) {
    var first = paths[0][i];
    for (var j = 1;j < count;j++) {
      if (first != paths[j][i]) {
        return output;
      }
    }
    output = first;
  }
  return output;
};
goog.dom.getOwnerDocument = function(node) {
  goog.asserts.assert(node, "Node cannot be null or undefined.");
  return (node.nodeType == goog.dom.NodeType.DOCUMENT ? node : node.ownerDocument || node.document);
};
goog.dom.getFrameContentDocument = function(frame) {
  var doc = frame.contentDocument || frame.contentWindow.document;
  return doc;
};
goog.dom.getFrameContentWindow = function(frame) {
  return frame.contentWindow || goog.dom.getWindow(goog.dom.getFrameContentDocument(frame));
};
goog.dom.setTextContent = function(node, text) {
  goog.asserts.assert(node != null, "goog.dom.setTextContent expects a non-null value for node");
  if ("textContent" in node) {
    node.textContent = text;
  } else {
    if (node.nodeType == goog.dom.NodeType.TEXT) {
      node.data = text;
    } else {
      if (node.firstChild && node.firstChild.nodeType == goog.dom.NodeType.TEXT) {
        while (node.lastChild != node.firstChild) {
          node.removeChild(node.lastChild);
        }
        node.firstChild.data = text;
      } else {
        goog.dom.removeChildren(node);
        var doc = goog.dom.getOwnerDocument(node);
        node.appendChild(doc.createTextNode(String(text)));
      }
    }
  }
};
goog.dom.getOuterHtml = function(element) {
  if ("outerHTML" in element) {
    return element.outerHTML;
  } else {
    var doc = goog.dom.getOwnerDocument(element);
    var div = doc.createElement(goog.dom.TagName.DIV);
    div.appendChild(element.cloneNode(true));
    return div.innerHTML;
  }
};
goog.dom.findNode = function(root, p) {
  var rv = [];
  var found = goog.dom.findNodes_(root, p, rv, true);
  return found ? rv[0] : undefined;
};
goog.dom.findNodes = function(root, p) {
  var rv = [];
  goog.dom.findNodes_(root, p, rv, false);
  return rv;
};
goog.dom.findNodes_ = function(root, p, rv, findOne) {
  if (root != null) {
    var child = root.firstChild;
    while (child) {
      if (p(child)) {
        rv.push(child);
        if (findOne) {
          return true;
        }
      }
      if (goog.dom.findNodes_(child, p, rv, findOne)) {
        return true;
      }
      child = child.nextSibling;
    }
  }
  return false;
};
goog.dom.TAGS_TO_IGNORE_ = {"SCRIPT":1, "STYLE":1, "HEAD":1, "IFRAME":1, "OBJECT":1};
goog.dom.PREDEFINED_TAG_VALUES_ = {"IMG":" ", "BR":"\n"};
goog.dom.isFocusableTabIndex = function(element) {
  return goog.dom.hasSpecifiedTabIndex_(element) && goog.dom.isTabIndexFocusable_(element);
};
goog.dom.setFocusableTabIndex = function(element, enable) {
  if (enable) {
    element.tabIndex = 0;
  } else {
    element.tabIndex = -1;
    element.removeAttribute("tabIndex");
  }
};
goog.dom.isFocusable = function(element) {
  var focusable;
  if (goog.dom.nativelySupportsFocus_(element)) {
    focusable = !element.disabled && (!goog.dom.hasSpecifiedTabIndex_(element) || goog.dom.isTabIndexFocusable_(element));
  } else {
    focusable = goog.dom.isFocusableTabIndex(element);
  }
  return focusable && goog.userAgent.IE ? goog.dom.hasNonZeroBoundingRect_(element) : focusable;
};
goog.dom.hasSpecifiedTabIndex_ = function(element) {
  var attrNode = element.getAttributeNode("tabindex");
  return goog.isDefAndNotNull(attrNode) && attrNode.specified;
};
goog.dom.isTabIndexFocusable_ = function(element) {
  var index = element.tabIndex;
  return goog.isNumber(index) && index >= 0 && index < 32768;
};
goog.dom.nativelySupportsFocus_ = function(element) {
  return element.tagName == goog.dom.TagName.A || element.tagName == goog.dom.TagName.INPUT || element.tagName == goog.dom.TagName.TEXTAREA || element.tagName == goog.dom.TagName.SELECT || element.tagName == goog.dom.TagName.BUTTON;
};
goog.dom.hasNonZeroBoundingRect_ = function(element) {
  var rect = goog.isFunction(element["getBoundingClientRect"]) ? element.getBoundingClientRect() : {"height":element.offsetHeight, "width":element.offsetWidth};
  return goog.isDefAndNotNull(rect) && rect.height > 0 && rect.width > 0;
};
goog.dom.getTextContent = function(node) {
  var textContent;
  if (goog.dom.BrowserFeature.CAN_USE_INNER_TEXT && "innerText" in node) {
    textContent = goog.string.canonicalizeNewlines(node.innerText);
  } else {
    var buf = [];
    goog.dom.getTextContent_(node, buf, true);
    textContent = buf.join("");
  }
  textContent = textContent.replace(/ \xAD /g, " ").replace(/\xAD/g, "");
  textContent = textContent.replace(/\u200B/g, "");
  if (!goog.dom.BrowserFeature.CAN_USE_INNER_TEXT) {
    textContent = textContent.replace(/ +/g, " ");
  }
  if (textContent != " ") {
    textContent = textContent.replace(/^\s*/, "");
  }
  return textContent;
};
goog.dom.getRawTextContent = function(node) {
  var buf = [];
  goog.dom.getTextContent_(node, buf, false);
  return buf.join("");
};
goog.dom.getTextContent_ = function(node, buf, normalizeWhitespace) {
  if (node.nodeName in goog.dom.TAGS_TO_IGNORE_) {
  } else {
    if (node.nodeType == goog.dom.NodeType.TEXT) {
      if (normalizeWhitespace) {
        buf.push(String(node.nodeValue).replace(/(\r\n|\r|\n)/g, ""));
      } else {
        buf.push(node.nodeValue);
      }
    } else {
      if (node.nodeName in goog.dom.PREDEFINED_TAG_VALUES_) {
        buf.push(goog.dom.PREDEFINED_TAG_VALUES_[node.nodeName]);
      } else {
        var child = node.firstChild;
        while (child) {
          goog.dom.getTextContent_(child, buf, normalizeWhitespace);
          child = child.nextSibling;
        }
      }
    }
  }
};
goog.dom.getNodeTextLength = function(node) {
  return goog.dom.getTextContent(node).length;
};
goog.dom.getNodeTextOffset = function(node, opt_offsetParent) {
  var root = opt_offsetParent || goog.dom.getOwnerDocument(node).body;
  var buf = [];
  while (node && node != root) {
    var cur = node;
    while (cur = cur.previousSibling) {
      buf.unshift(goog.dom.getTextContent(cur));
    }
    node = node.parentNode;
  }
  return goog.string.trimLeft(buf.join("")).replace(/ +/g, " ").length;
};
goog.dom.getNodeAtOffset = function(parent, offset, opt_result) {
  var stack = [parent], pos = 0, cur = null;
  while (stack.length > 0 && pos < offset) {
    cur = stack.pop();
    if (cur.nodeName in goog.dom.TAGS_TO_IGNORE_) {
    } else {
      if (cur.nodeType == goog.dom.NodeType.TEXT) {
        var text = cur.nodeValue.replace(/(\r\n|\r|\n)/g, "").replace(/ +/g, " ");
        pos += text.length;
      } else {
        if (cur.nodeName in goog.dom.PREDEFINED_TAG_VALUES_) {
          pos += goog.dom.PREDEFINED_TAG_VALUES_[cur.nodeName].length;
        } else {
          for (var i = cur.childNodes.length - 1;i >= 0;i--) {
            stack.push(cur.childNodes[i]);
          }
        }
      }
    }
  }
  if (goog.isObject(opt_result)) {
    opt_result.remainder = cur ? cur.nodeValue.length + offset - pos - 1 : 0;
    opt_result.node = cur;
  }
  return cur;
};
goog.dom.isNodeList = function(val) {
  if (val && typeof val.length == "number") {
    if (goog.isObject(val)) {
      return typeof val.item == "function" || typeof val.item == "string";
    } else {
      if (goog.isFunction(val)) {
        return typeof val.item == "function";
      }
    }
  }
  return false;
};
goog.dom.getAncestorByTagNameAndClass = function(element, opt_tag, opt_class, opt_maxSearchSteps) {
  if (!opt_tag && !opt_class) {
    return null;
  }
  var tagName = opt_tag ? opt_tag.toUpperCase() : null;
  return (goog.dom.getAncestor(element, function(node) {
    return (!tagName || node.nodeName == tagName) && (!opt_class || goog.isString(node.className) && goog.array.contains(node.className.split(/\s+/), opt_class));
  }, true, opt_maxSearchSteps));
};
goog.dom.getAncestorByClass = function(element, className, opt_maxSearchSteps) {
  return goog.dom.getAncestorByTagNameAndClass(element, null, className, opt_maxSearchSteps);
};
goog.dom.getAncestor = function(element, matcher, opt_includeNode, opt_maxSearchSteps) {
  if (!opt_includeNode) {
    element = element.parentNode;
  }
  var ignoreSearchSteps = opt_maxSearchSteps == null;
  var steps = 0;
  while (element && (ignoreSearchSteps || steps <= opt_maxSearchSteps)) {
    goog.asserts.assert(element.name != "parentNode");
    if (matcher(element)) {
      return element;
    }
    element = element.parentNode;
    steps++;
  }
  return null;
};
goog.dom.getActiveElement = function(doc) {
  try {
    return doc && doc.activeElement;
  } catch (e) {
  }
  return null;
};
goog.dom.getPixelRatio = function() {
  var win = goog.dom.getWindow();
  if (goog.isDef(win.devicePixelRatio)) {
    return win.devicePixelRatio;
  } else {
    if (win.matchMedia) {
      return goog.dom.matchesPixelRatio_(.75) || goog.dom.matchesPixelRatio_(1.5) || goog.dom.matchesPixelRatio_(2) || goog.dom.matchesPixelRatio_(3) || 1;
    }
  }
  return 1;
};
goog.dom.matchesPixelRatio_ = function(pixelRatio) {
  var win = goog.dom.getWindow();
  var query = "(-webkit-min-device-pixel-ratio: " + pixelRatio + ")," + "(min--moz-device-pixel-ratio: " + pixelRatio + ")," + "(min-resolution: " + pixelRatio + "dppx)";
  return win.matchMedia(query).matches ? pixelRatio : 0;
};
goog.dom.DomHelper = function(opt_document) {
  this.document_ = opt_document || goog.global.document || document;
};
goog.dom.DomHelper.prototype.getDomHelper = goog.dom.getDomHelper;
goog.dom.DomHelper.prototype.setDocument = function(document) {
  this.document_ = document;
};
goog.dom.DomHelper.prototype.getDocument = function() {
  return this.document_;
};
goog.dom.DomHelper.prototype.getElement = function(element) {
  return goog.dom.getElementHelper_(this.document_, element);
};
goog.dom.DomHelper.prototype.getRequiredElement = function(id) {
  return goog.dom.getRequiredElementHelper_(this.document_, id);
};
goog.dom.DomHelper.prototype.$ = goog.dom.DomHelper.prototype.getElement;
goog.dom.DomHelper.prototype.getElementsByTagNameAndClass = function(opt_tag, opt_class, opt_el) {
  return goog.dom.getElementsByTagNameAndClass_(this.document_, opt_tag, opt_class, opt_el);
};
goog.dom.DomHelper.prototype.getElementsByClass = function(className, opt_el) {
  var doc = opt_el || this.document_;
  return goog.dom.getElementsByClass(className, doc);
};
goog.dom.DomHelper.prototype.getElementByClass = function(className, opt_el) {
  var doc = opt_el || this.document_;
  return goog.dom.getElementByClass(className, doc);
};
goog.dom.DomHelper.prototype.getRequiredElementByClass = function(className, opt_root) {
  var root = opt_root || this.document_;
  return goog.dom.getRequiredElementByClass(className, root);
};
goog.dom.DomHelper.prototype.$$ = goog.dom.DomHelper.prototype.getElementsByTagNameAndClass;
goog.dom.DomHelper.prototype.setProperties = goog.dom.setProperties;
goog.dom.DomHelper.prototype.getViewportSize = function(opt_window) {
  return goog.dom.getViewportSize(opt_window || this.getWindow());
};
goog.dom.DomHelper.prototype.getDocumentHeight = function() {
  return goog.dom.getDocumentHeight_(this.getWindow());
};
goog.dom.Appendable;
goog.dom.DomHelper.prototype.createDom = function(tagName, opt_attributes, var_args) {
  return goog.dom.createDom_(this.document_, arguments);
};
goog.dom.DomHelper.prototype.$dom = goog.dom.DomHelper.prototype.createDom;
goog.dom.DomHelper.prototype.createElement = function(name) {
  return this.document_.createElement(name);
};
goog.dom.DomHelper.prototype.createTextNode = function(content) {
  return this.document_.createTextNode(String(content));
};
goog.dom.DomHelper.prototype.createTable = function(rows, columns, opt_fillWithNbsp) {
  return goog.dom.createTable_(this.document_, rows, columns, !!opt_fillWithNbsp);
};
goog.dom.DomHelper.prototype.safeHtmlToNode = function(html) {
  return goog.dom.safeHtmlToNode_(this.document_, html);
};
goog.dom.DomHelper.prototype.htmlToDocumentFragment = function(htmlString) {
  return goog.dom.htmlToDocumentFragment_(this.document_, htmlString);
};
goog.dom.DomHelper.prototype.isCss1CompatMode = function() {
  return goog.dom.isCss1CompatMode_(this.document_);
};
goog.dom.DomHelper.prototype.getWindow = function() {
  return goog.dom.getWindow_(this.document_);
};
goog.dom.DomHelper.prototype.getDocumentScrollElement = function() {
  return goog.dom.getDocumentScrollElement_(this.document_);
};
goog.dom.DomHelper.prototype.getDocumentScroll = function() {
  return goog.dom.getDocumentScroll_(this.document_);
};
goog.dom.DomHelper.prototype.getActiveElement = function(opt_doc) {
  return goog.dom.getActiveElement(opt_doc || this.document_);
};
goog.dom.DomHelper.prototype.appendChild = goog.dom.appendChild;
goog.dom.DomHelper.prototype.append = goog.dom.append;
goog.dom.DomHelper.prototype.canHaveChildren = goog.dom.canHaveChildren;
goog.dom.DomHelper.prototype.removeChildren = goog.dom.removeChildren;
goog.dom.DomHelper.prototype.insertSiblingBefore = goog.dom.insertSiblingBefore;
goog.dom.DomHelper.prototype.insertSiblingAfter = goog.dom.insertSiblingAfter;
goog.dom.DomHelper.prototype.insertChildAt = goog.dom.insertChildAt;
goog.dom.DomHelper.prototype.removeNode = goog.dom.removeNode;
goog.dom.DomHelper.prototype.replaceNode = goog.dom.replaceNode;
goog.dom.DomHelper.prototype.flattenElement = goog.dom.flattenElement;
goog.dom.DomHelper.prototype.getChildren = goog.dom.getChildren;
goog.dom.DomHelper.prototype.getFirstElementChild = goog.dom.getFirstElementChild;
goog.dom.DomHelper.prototype.getLastElementChild = goog.dom.getLastElementChild;
goog.dom.DomHelper.prototype.getNextElementSibling = goog.dom.getNextElementSibling;
goog.dom.DomHelper.prototype.getPreviousElementSibling = goog.dom.getPreviousElementSibling;
goog.dom.DomHelper.prototype.getNextNode = goog.dom.getNextNode;
goog.dom.DomHelper.prototype.getPreviousNode = goog.dom.getPreviousNode;
goog.dom.DomHelper.prototype.isNodeLike = goog.dom.isNodeLike;
goog.dom.DomHelper.prototype.isElement = goog.dom.isElement;
goog.dom.DomHelper.prototype.isWindow = goog.dom.isWindow;
goog.dom.DomHelper.prototype.getParentElement = goog.dom.getParentElement;
goog.dom.DomHelper.prototype.contains = goog.dom.contains;
goog.dom.DomHelper.prototype.compareNodeOrder = goog.dom.compareNodeOrder;
goog.dom.DomHelper.prototype.findCommonAncestor = goog.dom.findCommonAncestor;
goog.dom.DomHelper.prototype.getOwnerDocument = goog.dom.getOwnerDocument;
goog.dom.DomHelper.prototype.getFrameContentDocument = goog.dom.getFrameContentDocument;
goog.dom.DomHelper.prototype.getFrameContentWindow = goog.dom.getFrameContentWindow;
goog.dom.DomHelper.prototype.setTextContent = goog.dom.setTextContent;
goog.dom.DomHelper.prototype.getOuterHtml = goog.dom.getOuterHtml;
goog.dom.DomHelper.prototype.findNode = goog.dom.findNode;
goog.dom.DomHelper.prototype.findNodes = goog.dom.findNodes;
goog.dom.DomHelper.prototype.isFocusableTabIndex = goog.dom.isFocusableTabIndex;
goog.dom.DomHelper.prototype.setFocusableTabIndex = goog.dom.setFocusableTabIndex;
goog.dom.DomHelper.prototype.isFocusable = goog.dom.isFocusable;
goog.dom.DomHelper.prototype.getTextContent = goog.dom.getTextContent;
goog.dom.DomHelper.prototype.getNodeTextLength = goog.dom.getNodeTextLength;
goog.dom.DomHelper.prototype.getNodeTextOffset = goog.dom.getNodeTextOffset;
goog.dom.DomHelper.prototype.getNodeAtOffset = goog.dom.getNodeAtOffset;
goog.dom.DomHelper.prototype.isNodeList = goog.dom.isNodeList;
goog.dom.DomHelper.prototype.getAncestorByTagNameAndClass = goog.dom.getAncestorByTagNameAndClass;
goog.dom.DomHelper.prototype.getAncestorByClass = goog.dom.getAncestorByClass;
goog.dom.DomHelper.prototype.getAncestor = goog.dom.getAncestor;
goog.provide("goog.structs");
goog.require("goog.array");
goog.require("goog.object");
goog.structs.getCount = function(col) {
  if (col.getCount && typeof col.getCount == "function") {
    return col.getCount();
  }
  if (goog.isArrayLike(col) || goog.isString(col)) {
    return col.length;
  }
  return goog.object.getCount(col);
};
goog.structs.getValues = function(col) {
  if (col.getValues && typeof col.getValues == "function") {
    return col.getValues();
  }
  if (goog.isString(col)) {
    return col.split("");
  }
  if (goog.isArrayLike(col)) {
    var rv = [];
    var l = col.length;
    for (var i = 0;i < l;i++) {
      rv.push(col[i]);
    }
    return rv;
  }
  return goog.object.getValues(col);
};
goog.structs.getKeys = function(col) {
  if (col.getKeys && typeof col.getKeys == "function") {
    return col.getKeys();
  }
  if (col.getValues && typeof col.getValues == "function") {
    return undefined;
  }
  if (goog.isArrayLike(col) || goog.isString(col)) {
    var rv = [];
    var l = col.length;
    for (var i = 0;i < l;i++) {
      rv.push(i);
    }
    return rv;
  }
  return goog.object.getKeys(col);
};
goog.structs.contains = function(col, val) {
  if (col.contains && typeof col.contains == "function") {
    return col.contains(val);
  }
  if (col.containsValue && typeof col.containsValue == "function") {
    return col.containsValue(val);
  }
  if (goog.isArrayLike(col) || goog.isString(col)) {
    return goog.array.contains((col), val);
  }
  return goog.object.containsValue(col, val);
};
goog.structs.isEmpty = function(col) {
  if (col.isEmpty && typeof col.isEmpty == "function") {
    return col.isEmpty();
  }
  if (goog.isArrayLike(col) || goog.isString(col)) {
    return goog.array.isEmpty((col));
  }
  return goog.object.isEmpty(col);
};
goog.structs.clear = function(col) {
  if (col.clear && typeof col.clear == "function") {
    col.clear();
  } else {
    if (goog.isArrayLike(col)) {
      goog.array.clear((col));
    } else {
      goog.object.clear(col);
    }
  }
};
goog.structs.forEach = function(col, f, opt_obj) {
  if (col.forEach && typeof col.forEach == "function") {
    col.forEach(f, opt_obj);
  } else {
    if (goog.isArrayLike(col) || goog.isString(col)) {
      goog.array.forEach((col), f, opt_obj);
    } else {
      var keys = goog.structs.getKeys(col);
      var values = goog.structs.getValues(col);
      var l = values.length;
      for (var i = 0;i < l;i++) {
        f.call(opt_obj, values[i], keys && keys[i], col);
      }
    }
  }
};
goog.structs.filter = function(col, f, opt_obj) {
  if (typeof col.filter == "function") {
    return col.filter(f, opt_obj);
  }
  if (goog.isArrayLike(col) || goog.isString(col)) {
    return goog.array.filter((col), f, opt_obj);
  }
  var rv;
  var keys = goog.structs.getKeys(col);
  var values = goog.structs.getValues(col);
  var l = values.length;
  if (keys) {
    rv = {};
    for (var i = 0;i < l;i++) {
      if (f.call(opt_obj, values[i], keys[i], col)) {
        rv[keys[i]] = values[i];
      }
    }
  } else {
    rv = [];
    for (var i = 0;i < l;i++) {
      if (f.call(opt_obj, values[i], undefined, col)) {
        rv.push(values[i]);
      }
    }
  }
  return rv;
};
goog.structs.map = function(col, f, opt_obj) {
  if (typeof col.map == "function") {
    return col.map(f, opt_obj);
  }
  if (goog.isArrayLike(col) || goog.isString(col)) {
    return goog.array.map((col), f, opt_obj);
  }
  var rv;
  var keys = goog.structs.getKeys(col);
  var values = goog.structs.getValues(col);
  var l = values.length;
  if (keys) {
    rv = {};
    for (var i = 0;i < l;i++) {
      rv[keys[i]] = f.call(opt_obj, values[i], keys[i], col);
    }
  } else {
    rv = [];
    for (var i = 0;i < l;i++) {
      rv[i] = f.call(opt_obj, values[i], undefined, col);
    }
  }
  return rv;
};
goog.structs.some = function(col, f, opt_obj) {
  if (typeof col.some == "function") {
    return col.some(f, opt_obj);
  }
  if (goog.isArrayLike(col) || goog.isString(col)) {
    return goog.array.some((col), f, opt_obj);
  }
  var keys = goog.structs.getKeys(col);
  var values = goog.structs.getValues(col);
  var l = values.length;
  for (var i = 0;i < l;i++) {
    if (f.call(opt_obj, values[i], keys && keys[i], col)) {
      return true;
    }
  }
  return false;
};
goog.structs.every = function(col, f, opt_obj) {
  if (typeof col.every == "function") {
    return col.every(f, opt_obj);
  }
  if (goog.isArrayLike(col) || goog.isString(col)) {
    return goog.array.every((col), f, opt_obj);
  }
  var keys = goog.structs.getKeys(col);
  var values = goog.structs.getValues(col);
  var l = values.length;
  for (var i = 0;i < l;i++) {
    if (!f.call(opt_obj, values[i], keys && keys[i], col)) {
      return false;
    }
  }
  return true;
};
goog.provide("goog.functions");
goog.functions.constant = function(retValue) {
  return function() {
    return retValue;
  };
};
goog.functions.FALSE = goog.functions.constant(false);
goog.functions.TRUE = goog.functions.constant(true);
goog.functions.NULL = goog.functions.constant(null);
goog.functions.identity = function(opt_returnValue, var_args) {
  return opt_returnValue;
};
goog.functions.error = function(message) {
  return function() {
    throw Error(message);
  };
};
goog.functions.fail = function(err) {
  return function() {
    throw err;
  };
};
goog.functions.lock = function(f, opt_numArgs) {
  opt_numArgs = opt_numArgs || 0;
  return function() {
    return f.apply(this, Array.prototype.slice.call(arguments, 0, opt_numArgs));
  };
};
goog.functions.nth = function(n) {
  return function() {
    return arguments[n];
  };
};
goog.functions.withReturnValue = function(f, retValue) {
  return goog.functions.sequence(f, goog.functions.constant(retValue));
};
goog.functions.equalTo = function(value, opt_useLooseComparison) {
  return function(other) {
    return opt_useLooseComparison ? value == other : value === other;
  };
};
goog.functions.compose = function(fn, var_args) {
  var functions = arguments;
  var length = functions.length;
  return function() {
    var result;
    if (length) {
      result = functions[length - 1].apply(this, arguments);
    }
    for (var i = length - 2;i >= 0;i--) {
      result = functions[i].call(this, result);
    }
    return result;
  };
};
goog.functions.sequence = function(var_args) {
  var functions = arguments;
  var length = functions.length;
  return function() {
    var result;
    for (var i = 0;i < length;i++) {
      result = functions[i].apply(this, arguments);
    }
    return result;
  };
};
goog.functions.and = function(var_args) {
  var functions = arguments;
  var length = functions.length;
  return function() {
    for (var i = 0;i < length;i++) {
      if (!functions[i].apply(this, arguments)) {
        return false;
      }
    }
    return true;
  };
};
goog.functions.or = function(var_args) {
  var functions = arguments;
  var length = functions.length;
  return function() {
    for (var i = 0;i < length;i++) {
      if (functions[i].apply(this, arguments)) {
        return true;
      }
    }
    return false;
  };
};
goog.functions.not = function(f) {
  return function() {
    return !f.apply(this, arguments);
  };
};
goog.functions.create = function(constructor, var_args) {
  var temp = function() {
  };
  temp.prototype = constructor.prototype;
  var obj = new temp;
  constructor.apply(obj, Array.prototype.slice.call(arguments, 1));
  return obj;
};
goog.define("goog.functions.CACHE_RETURN_VALUE", true);
goog.functions.cacheReturnValue = function(fn) {
  var called = false;
  var value;
  return function() {
    if (!goog.functions.CACHE_RETURN_VALUE) {
      return fn();
    }
    if (!called) {
      value = fn();
      called = true;
    }
    return value;
  };
};
goog.functions.once = function(f) {
  var inner = f;
  return function() {
    if (inner) {
      var tmp = inner;
      inner = null;
      tmp();
    }
  };
};
goog.functions.debounce = function(f, interval, opt_scope) {
  if (opt_scope) {
    f = goog.bind(f, opt_scope);
  }
  var timeout = null;
  return (function(var_args) {
    goog.global.clearTimeout(timeout);
    var args = arguments;
    timeout = goog.global.setTimeout(function() {
      f.apply(null, args);
    }, interval);
  });
};
goog.functions.throttle = function(f, interval, opt_scope) {
  if (opt_scope) {
    f = goog.bind(f, opt_scope);
  }
  var timeout = null;
  var shouldFire = false;
  var args = [];
  var handleTimeout = function() {
    timeout = null;
    if (shouldFire) {
      shouldFire = false;
      fire();
    }
  };
  var fire = function() {
    timeout = goog.global.setTimeout(handleTimeout, interval);
    f.apply(null, args);
  };
  return (function(var_args) {
    args = arguments;
    if (!timeout) {
      fire();
    } else {
      shouldFire = true;
    }
  });
};
goog.provide("goog.iter");
goog.provide("goog.iter.Iterable");
goog.provide("goog.iter.Iterator");
goog.provide("goog.iter.StopIteration");
goog.require("goog.array");
goog.require("goog.asserts");
goog.require("goog.functions");
goog.require("goog.math");
goog.iter.Iterable;
goog.iter.StopIteration = "StopIteration" in goog.global ? goog.global["StopIteration"] : {message:"StopIteration", stack:""};
goog.iter.Iterator = function() {
};
goog.iter.Iterator.prototype.next = function() {
  throw goog.iter.StopIteration;
};
goog.iter.Iterator.prototype.__iterator__ = function(opt_keys) {
  return this;
};
goog.iter.toIterator = function(iterable) {
  if (iterable instanceof goog.iter.Iterator) {
    return iterable;
  }
  if (typeof iterable.__iterator__ == "function") {
    return iterable.__iterator__(false);
  }
  if (goog.isArrayLike(iterable)) {
    var i = 0;
    var newIter = new goog.iter.Iterator;
    newIter.next = function() {
      while (true) {
        if (i >= iterable.length) {
          throw goog.iter.StopIteration;
        }
        if (!(i in iterable)) {
          i++;
          continue;
        }
        return iterable[i++];
      }
    };
    return newIter;
  }
  throw Error("Not implemented");
};
goog.iter.forEach = function(iterable, f, opt_obj) {
  if (goog.isArrayLike(iterable)) {
    try {
      goog.array.forEach((iterable), f, opt_obj);
    } catch (ex) {
      if (ex !== goog.iter.StopIteration) {
        throw ex;
      }
    }
  } else {
    iterable = goog.iter.toIterator(iterable);
    try {
      while (true) {
        f.call(opt_obj, iterable.next(), undefined, iterable);
      }
    } catch (ex) {
      if (ex !== goog.iter.StopIteration) {
        throw ex;
      }
    }
  }
};
goog.iter.filter = function(iterable, f, opt_obj) {
  var iterator = goog.iter.toIterator(iterable);
  var newIter = new goog.iter.Iterator;
  newIter.next = function() {
    while (true) {
      var val = iterator.next();
      if (f.call(opt_obj, val, undefined, iterator)) {
        return val;
      }
    }
  };
  return newIter;
};
goog.iter.filterFalse = function(iterable, f, opt_obj) {
  return goog.iter.filter(iterable, goog.functions.not(f), opt_obj);
};
goog.iter.range = function(startOrStop, opt_stop, opt_step) {
  var start = 0;
  var stop = startOrStop;
  var step = opt_step || 1;
  if (arguments.length > 1) {
    start = startOrStop;
    stop = opt_stop;
  }
  if (step == 0) {
    throw Error("Range step argument must not be zero");
  }
  var newIter = new goog.iter.Iterator;
  newIter.next = function() {
    if (step > 0 && start >= stop || step < 0 && start <= stop) {
      throw goog.iter.StopIteration;
    }
    var rv = start;
    start += step;
    return rv;
  };
  return newIter;
};
goog.iter.join = function(iterable, deliminator) {
  return goog.iter.toArray(iterable).join(deliminator);
};
goog.iter.map = function(iterable, f, opt_obj) {
  var iterator = goog.iter.toIterator(iterable);
  var newIter = new goog.iter.Iterator;
  newIter.next = function() {
    var val = iterator.next();
    return f.call(opt_obj, val, undefined, iterator);
  };
  return newIter;
};
goog.iter.reduce = function(iterable, f, val, opt_obj) {
  var rval = val;
  goog.iter.forEach(iterable, function(val) {
    rval = f.call(opt_obj, rval, val);
  });
  return rval;
};
goog.iter.some = function(iterable, f, opt_obj) {
  iterable = goog.iter.toIterator(iterable);
  try {
    while (true) {
      if (f.call(opt_obj, iterable.next(), undefined, iterable)) {
        return true;
      }
    }
  } catch (ex) {
    if (ex !== goog.iter.StopIteration) {
      throw ex;
    }
  }
  return false;
};
goog.iter.every = function(iterable, f, opt_obj) {
  iterable = goog.iter.toIterator(iterable);
  try {
    while (true) {
      if (!f.call(opt_obj, iterable.next(), undefined, iterable)) {
        return false;
      }
    }
  } catch (ex) {
    if (ex !== goog.iter.StopIteration) {
      throw ex;
    }
  }
  return true;
};
goog.iter.chain = function(var_args) {
  return goog.iter.chainFromIterable(arguments);
};
goog.iter.chainFromIterable = function(iterable) {
  var iterator = goog.iter.toIterator(iterable);
  var iter = new goog.iter.Iterator;
  var current = null;
  iter.next = function() {
    while (true) {
      if (current == null) {
        var it = iterator.next();
        current = goog.iter.toIterator(it);
      }
      try {
        return current.next();
      } catch (ex) {
        if (ex !== goog.iter.StopIteration) {
          throw ex;
        }
        current = null;
      }
    }
  };
  return iter;
};
goog.iter.dropWhile = function(iterable, f, opt_obj) {
  var iterator = goog.iter.toIterator(iterable);
  var newIter = new goog.iter.Iterator;
  var dropping = true;
  newIter.next = function() {
    while (true) {
      var val = iterator.next();
      if (dropping && f.call(opt_obj, val, undefined, iterator)) {
        continue;
      } else {
        dropping = false;
      }
      return val;
    }
  };
  return newIter;
};
goog.iter.takeWhile = function(iterable, f, opt_obj) {
  var iterator = goog.iter.toIterator(iterable);
  var iter = new goog.iter.Iterator;
  iter.next = function() {
    var val = iterator.next();
    if (f.call(opt_obj, val, undefined, iterator)) {
      return val;
    }
    throw goog.iter.StopIteration;
  };
  return iter;
};
goog.iter.toArray = function(iterable) {
  if (goog.isArrayLike(iterable)) {
    return goog.array.toArray((iterable));
  }
  iterable = goog.iter.toIterator(iterable);
  var array = [];
  goog.iter.forEach(iterable, function(val) {
    array.push(val);
  });
  return array;
};
goog.iter.equals = function(iterable1, iterable2, opt_equalsFn) {
  var fillValue = {};
  var pairs = goog.iter.zipLongest(fillValue, iterable1, iterable2);
  var equalsFn = opt_equalsFn || goog.array.defaultCompareEquality;
  return goog.iter.every(pairs, function(pair) {
    return equalsFn(pair[0], pair[1]);
  });
};
goog.iter.nextOrValue = function(iterable, defaultValue) {
  try {
    return goog.iter.toIterator(iterable).next();
  } catch (e) {
    if (e != goog.iter.StopIteration) {
      throw e;
    }
    return defaultValue;
  }
};
goog.iter.product = function(var_args) {
  var someArrayEmpty = goog.array.some(arguments, function(arr) {
    return !arr.length;
  });
  if (someArrayEmpty || !arguments.length) {
    return new goog.iter.Iterator;
  }
  var iter = new goog.iter.Iterator;
  var arrays = arguments;
  var indicies = goog.array.repeat(0, arrays.length);
  iter.next = function() {
    if (indicies) {
      var retVal = goog.array.map(indicies, function(valueIndex, arrayIndex) {
        return arrays[arrayIndex][valueIndex];
      });
      for (var i = indicies.length - 1;i >= 0;i--) {
        goog.asserts.assert(indicies);
        if (indicies[i] < arrays[i].length - 1) {
          indicies[i]++;
          break;
        }
        if (i == 0) {
          indicies = null;
          break;
        }
        indicies[i] = 0;
      }
      return retVal;
    }
    throw goog.iter.StopIteration;
  };
  return iter;
};
goog.iter.cycle = function(iterable) {
  var baseIterator = goog.iter.toIterator(iterable);
  var cache = [];
  var cacheIndex = 0;
  var iter = new goog.iter.Iterator;
  var useCache = false;
  iter.next = function() {
    var returnElement = null;
    if (!useCache) {
      try {
        returnElement = baseIterator.next();
        cache.push(returnElement);
        return returnElement;
      } catch (e) {
        if (e != goog.iter.StopIteration || goog.array.isEmpty(cache)) {
          throw e;
        }
        useCache = true;
      }
    }
    returnElement = cache[cacheIndex];
    cacheIndex = (cacheIndex + 1) % cache.length;
    return returnElement;
  };
  return iter;
};
goog.iter.count = function(opt_start, opt_step) {
  var counter = opt_start || 0;
  var step = goog.isDef(opt_step) ? opt_step : 1;
  var iter = new goog.iter.Iterator;
  iter.next = function() {
    var returnValue = counter;
    counter += step;
    return returnValue;
  };
  return iter;
};
goog.iter.repeat = function(value) {
  var iter = new goog.iter.Iterator;
  iter.next = goog.functions.constant(value);
  return iter;
};
goog.iter.accumulate = function(iterable) {
  var iterator = goog.iter.toIterator(iterable);
  var total = 0;
  var iter = new goog.iter.Iterator;
  iter.next = function() {
    total += iterator.next();
    return total;
  };
  return iter;
};
goog.iter.zip = function(var_args) {
  var args = arguments;
  var iter = new goog.iter.Iterator;
  if (args.length > 0) {
    var iterators = goog.array.map(args, goog.iter.toIterator);
    iter.next = function() {
      var arr = goog.array.map(iterators, function(it) {
        return it.next();
      });
      return arr;
    };
  }
  return iter;
};
goog.iter.zipLongest = function(fillValue, var_args) {
  var args = goog.array.slice(arguments, 1);
  var iter = new goog.iter.Iterator;
  if (args.length > 0) {
    var iterators = goog.array.map(args, goog.iter.toIterator);
    iter.next = function() {
      var iteratorsHaveValues = false;
      var arr = goog.array.map(iterators, function(it) {
        var returnValue;
        try {
          returnValue = it.next();
          iteratorsHaveValues = true;
        } catch (ex) {
          if (ex !== goog.iter.StopIteration) {
            throw ex;
          }
          returnValue = fillValue;
        }
        return returnValue;
      });
      if (!iteratorsHaveValues) {
        throw goog.iter.StopIteration;
      }
      return arr;
    };
  }
  return iter;
};
goog.iter.compress = function(iterable, selectors) {
  var selectorIterator = goog.iter.toIterator(selectors);
  return goog.iter.filter(iterable, function() {
    return !!selectorIterator.next();
  });
};
goog.iter.GroupByIterator_ = function(iterable, opt_keyFunc) {
  this.iterator = goog.iter.toIterator(iterable);
  this.keyFunc = opt_keyFunc || goog.functions.identity;
  this.targetKey;
  this.currentKey;
  this.currentValue;
};
goog.inherits(goog.iter.GroupByIterator_, goog.iter.Iterator);
goog.iter.GroupByIterator_.prototype.next = function() {
  while (this.currentKey == this.targetKey) {
    this.currentValue = this.iterator.next();
    this.currentKey = this.keyFunc(this.currentValue);
  }
  this.targetKey = this.currentKey;
  return [this.currentKey, this.groupItems_(this.targetKey)];
};
goog.iter.GroupByIterator_.prototype.groupItems_ = function(targetKey) {
  var arr = [];
  while (this.currentKey == targetKey) {
    arr.push(this.currentValue);
    try {
      this.currentValue = this.iterator.next();
    } catch (ex) {
      if (ex !== goog.iter.StopIteration) {
        throw ex;
      }
      break;
    }
    this.currentKey = this.keyFunc(this.currentValue);
  }
  return arr;
};
goog.iter.groupBy = function(iterable, opt_keyFunc) {
  return new goog.iter.GroupByIterator_(iterable, opt_keyFunc);
};
goog.iter.starMap = function(iterable, f, opt_obj) {
  var iterator = goog.iter.toIterator(iterable);
  var iter = new goog.iter.Iterator;
  iter.next = function() {
    var args = goog.iter.toArray(iterator.next());
    return f.apply(opt_obj, goog.array.concat(args, undefined, iterator));
  };
  return iter;
};
goog.iter.tee = function(iterable, opt_num) {
  var iterator = goog.iter.toIterator(iterable);
  var num = goog.isNumber(opt_num) ? opt_num : 2;
  var buffers = goog.array.map(goog.array.range(num), function() {
    return [];
  });
  var addNextIteratorValueToBuffers = function() {
    var val = iterator.next();
    goog.array.forEach(buffers, function(buffer) {
      buffer.push(val);
    });
  };
  var createIterator = function(buffer) {
    var iter = new goog.iter.Iterator;
    iter.next = function() {
      if (goog.array.isEmpty(buffer)) {
        addNextIteratorValueToBuffers();
      }
      goog.asserts.assert(!goog.array.isEmpty(buffer));
      return buffer.shift();
    };
    return iter;
  };
  return goog.array.map(buffers, createIterator);
};
goog.iter.enumerate = function(iterable, opt_start) {
  return goog.iter.zip(goog.iter.count(opt_start), iterable);
};
goog.iter.limit = function(iterable, limitSize) {
  goog.asserts.assert(goog.math.isInt(limitSize) && limitSize >= 0);
  var iterator = goog.iter.toIterator(iterable);
  var iter = new goog.iter.Iterator;
  var remaining = limitSize;
  iter.next = function() {
    if (remaining-- > 0) {
      return iterator.next();
    }
    throw goog.iter.StopIteration;
  };
  return iter;
};
goog.iter.consume = function(iterable, count) {
  goog.asserts.assert(goog.math.isInt(count) && count >= 0);
  var iterator = goog.iter.toIterator(iterable);
  while (count-- > 0) {
    goog.iter.nextOrValue(iterator, null);
  }
  return iterator;
};
goog.iter.slice = function(iterable, start, opt_end) {
  goog.asserts.assert(goog.math.isInt(start) && start >= 0);
  var iterator = goog.iter.consume(iterable, start);
  if (goog.isNumber(opt_end)) {
    goog.asserts.assert(goog.math.isInt(opt_end) && opt_end >= start);
    iterator = goog.iter.limit(iterator, opt_end - start);
  }
  return iterator;
};
goog.iter.hasDuplicates_ = function(arr) {
  var deduped = [];
  goog.array.removeDuplicates(arr, deduped);
  return arr.length != deduped.length;
};
goog.iter.permutations = function(iterable, opt_length) {
  var elements = goog.iter.toArray(iterable);
  var length = goog.isNumber(opt_length) ? opt_length : elements.length;
  var sets = goog.array.repeat(elements, length);
  var product = goog.iter.product.apply(undefined, sets);
  return goog.iter.filter(product, function(arr) {
    return !goog.iter.hasDuplicates_(arr);
  });
};
goog.iter.combinations = function(iterable, length) {
  var elements = goog.iter.toArray(iterable);
  var indexes = goog.iter.range(elements.length);
  var indexIterator = goog.iter.permutations(indexes, length);
  var sortedIndexIterator = goog.iter.filter(indexIterator, function(arr) {
    return goog.array.isSorted(arr);
  });
  var iter = new goog.iter.Iterator;
  function getIndexFromElements(index) {
    return elements[index];
  }
  iter.next = function() {
    return goog.array.map(sortedIndexIterator.next(), getIndexFromElements);
  };
  return iter;
};
goog.iter.combinationsWithReplacement = function(iterable, length) {
  var elements = goog.iter.toArray(iterable);
  var indexes = goog.array.range(elements.length);
  var sets = goog.array.repeat(indexes, length);
  var indexIterator = goog.iter.product.apply(undefined, sets);
  var sortedIndexIterator = goog.iter.filter(indexIterator, function(arr) {
    return goog.array.isSorted(arr);
  });
  var iter = new goog.iter.Iterator;
  function getIndexFromElements(index) {
    return elements[index];
  }
  iter.next = function() {
    return goog.array.map((sortedIndexIterator.next()), getIndexFromElements);
  };
  return iter;
};
goog.provide("goog.structs.Map");
goog.require("goog.iter.Iterator");
goog.require("goog.iter.StopIteration");
goog.require("goog.object");
goog.structs.Map = function(opt_map, var_args) {
  this.map_ = {};
  this.keys_ = [];
  this.count_ = 0;
  this.version_ = 0;
  var argLength = arguments.length;
  if (argLength > 1) {
    if (argLength % 2) {
      throw Error("Uneven number of arguments");
    }
    for (var i = 0;i < argLength;i += 2) {
      this.set(arguments[i], arguments[i + 1]);
    }
  } else {
    if (opt_map) {
      this.addAll((opt_map));
    }
  }
};
goog.structs.Map.prototype.getCount = function() {
  return this.count_;
};
goog.structs.Map.prototype.getValues = function() {
  this.cleanupKeysArray_();
  var rv = [];
  for (var i = 0;i < this.keys_.length;i++) {
    var key = this.keys_[i];
    rv.push(this.map_[key]);
  }
  return rv;
};
goog.structs.Map.prototype.getKeys = function() {
  this.cleanupKeysArray_();
  return (this.keys_.concat());
};
goog.structs.Map.prototype.containsKey = function(key) {
  return goog.structs.Map.hasKey_(this.map_, key);
};
goog.structs.Map.prototype.containsValue = function(val) {
  for (var i = 0;i < this.keys_.length;i++) {
    var key = this.keys_[i];
    if (goog.structs.Map.hasKey_(this.map_, key) && this.map_[key] == val) {
      return true;
    }
  }
  return false;
};
goog.structs.Map.prototype.equals = function(otherMap, opt_equalityFn) {
  if (this === otherMap) {
    return true;
  }
  if (this.count_ != otherMap.getCount()) {
    return false;
  }
  var equalityFn = opt_equalityFn || goog.structs.Map.defaultEquals;
  this.cleanupKeysArray_();
  for (var key, i = 0;key = this.keys_[i];i++) {
    if (!equalityFn(this.get(key), otherMap.get(key))) {
      return false;
    }
  }
  return true;
};
goog.structs.Map.defaultEquals = function(a, b) {
  return a === b;
};
goog.structs.Map.prototype.isEmpty = function() {
  return this.count_ == 0;
};
goog.structs.Map.prototype.clear = function() {
  this.map_ = {};
  this.keys_.length = 0;
  this.count_ = 0;
  this.version_ = 0;
};
goog.structs.Map.prototype.remove = function(key) {
  if (goog.structs.Map.hasKey_(this.map_, key)) {
    delete this.map_[key];
    this.count_--;
    this.version_++;
    if (this.keys_.length > 2 * this.count_) {
      this.cleanupKeysArray_();
    }
    return true;
  }
  return false;
};
goog.structs.Map.prototype.cleanupKeysArray_ = function() {
  if (this.count_ != this.keys_.length) {
    var srcIndex = 0;
    var destIndex = 0;
    while (srcIndex < this.keys_.length) {
      var key = this.keys_[srcIndex];
      if (goog.structs.Map.hasKey_(this.map_, key)) {
        this.keys_[destIndex++] = key;
      }
      srcIndex++;
    }
    this.keys_.length = destIndex;
  }
  if (this.count_ != this.keys_.length) {
    var seen = {};
    var srcIndex = 0;
    var destIndex = 0;
    while (srcIndex < this.keys_.length) {
      var key = this.keys_[srcIndex];
      if (!goog.structs.Map.hasKey_(seen, key)) {
        this.keys_[destIndex++] = key;
        seen[key] = 1;
      }
      srcIndex++;
    }
    this.keys_.length = destIndex;
  }
};
goog.structs.Map.prototype.get = function(key, opt_val) {
  if (goog.structs.Map.hasKey_(this.map_, key)) {
    return this.map_[key];
  }
  return opt_val;
};
goog.structs.Map.prototype.set = function(key, value) {
  if (!goog.structs.Map.hasKey_(this.map_, key)) {
    this.count_++;
    this.keys_.push((key));
    this.version_++;
  }
  this.map_[key] = value;
};
goog.structs.Map.prototype.addAll = function(map) {
  var keys, values;
  if (map instanceof goog.structs.Map) {
    keys = map.getKeys();
    values = map.getValues();
  } else {
    keys = goog.object.getKeys(map);
    values = goog.object.getValues(map);
  }
  for (var i = 0;i < keys.length;i++) {
    this.set(keys[i], values[i]);
  }
};
goog.structs.Map.prototype.forEach = function(f, opt_obj) {
  var keys = this.getKeys();
  for (var i = 0;i < keys.length;i++) {
    var key = keys[i];
    var value = this.get(key);
    f.call(opt_obj, value, key, this);
  }
};
goog.structs.Map.prototype.clone = function() {
  return new goog.structs.Map(this);
};
goog.structs.Map.prototype.transpose = function() {
  var transposed = new goog.structs.Map;
  for (var i = 0;i < this.keys_.length;i++) {
    var key = this.keys_[i];
    var value = this.map_[key];
    transposed.set(value, key);
  }
  return transposed;
};
goog.structs.Map.prototype.toObject = function() {
  this.cleanupKeysArray_();
  var obj = {};
  for (var i = 0;i < this.keys_.length;i++) {
    var key = this.keys_[i];
    obj[key] = this.map_[key];
  }
  return obj;
};
goog.structs.Map.prototype.getKeyIterator = function() {
  return this.__iterator__(true);
};
goog.structs.Map.prototype.getValueIterator = function() {
  return this.__iterator__(false);
};
goog.structs.Map.prototype.__iterator__ = function(opt_keys) {
  this.cleanupKeysArray_();
  var i = 0;
  var version = this.version_;
  var selfObj = this;
  var newIter = new goog.iter.Iterator;
  newIter.next = function() {
    if (version != selfObj.version_) {
      throw Error("The map has changed since the iterator was created");
    }
    if (i >= selfObj.keys_.length) {
      throw goog.iter.StopIteration;
    }
    var key = selfObj.keys_[i++];
    return opt_keys ? key : selfObj.map_[key];
  };
  return newIter;
};
goog.structs.Map.hasKey_ = function(obj, key) {
  return Object.prototype.hasOwnProperty.call(obj, key);
};
goog.provide("goog.uri.utils");
goog.provide("goog.uri.utils.ComponentIndex");
goog.provide("goog.uri.utils.QueryArray");
goog.provide("goog.uri.utils.QueryValue");
goog.provide("goog.uri.utils.StandardQueryParam");
goog.require("goog.asserts");
goog.require("goog.string");
goog.uri.utils.CharCode_ = {AMPERSAND:38, EQUAL:61, HASH:35, QUESTION:63};
goog.uri.utils.buildFromEncodedParts = function(opt_scheme, opt_userInfo, opt_domain, opt_port, opt_path, opt_queryData, opt_fragment) {
  var out = "";
  if (opt_scheme) {
    out += opt_scheme + ":";
  }
  if (opt_domain) {
    out += "//";
    if (opt_userInfo) {
      out += opt_userInfo + "@";
    }
    out += opt_domain;
    if (opt_port) {
      out += ":" + opt_port;
    }
  }
  if (opt_path) {
    out += opt_path;
  }
  if (opt_queryData) {
    out += "?" + opt_queryData;
  }
  if (opt_fragment) {
    out += "#" + opt_fragment;
  }
  return out;
};
goog.uri.utils.splitRe_ = new RegExp("^" + "(?:" + "([^:/?#.]+)" + ":)?" + "(?://" + "(?:([^/?#]*)@)?" + "([^/#?]*?)" + "(?::([0-9]+))?" + "(?\x3d[/#?]|$)" + ")?" + "([^?#]+)?" + "(?:\\?([^#]*))?" + "(?:#(.*))?" + "$");
goog.uri.utils.ComponentIndex = {SCHEME:1, USER_INFO:2, DOMAIN:3, PORT:4, PATH:5, QUERY_DATA:6, FRAGMENT:7};
goog.uri.utils.split = function(uri) {
  return (uri.match(goog.uri.utils.splitRe_));
};
goog.uri.utils.decodeIfPossible_ = function(uri, opt_preserveReserved) {
  if (!uri) {
    return uri;
  }
  return opt_preserveReserved ? decodeURI(uri) : decodeURIComponent(uri);
};
goog.uri.utils.getComponentByIndex_ = function(componentIndex, uri) {
  return goog.uri.utils.split(uri)[componentIndex] || null;
};
goog.uri.utils.getScheme = function(uri) {
  return goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.SCHEME, uri);
};
goog.uri.utils.getEffectiveScheme = function(uri) {
  var scheme = goog.uri.utils.getScheme(uri);
  if (!scheme && goog.global.self && goog.global.self.location) {
    var protocol = goog.global.self.location.protocol;
    scheme = protocol.substr(0, protocol.length - 1);
  }
  return scheme ? scheme.toLowerCase() : "";
};
goog.uri.utils.getUserInfoEncoded = function(uri) {
  return goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.USER_INFO, uri);
};
goog.uri.utils.getUserInfo = function(uri) {
  return goog.uri.utils.decodeIfPossible_(goog.uri.utils.getUserInfoEncoded(uri));
};
goog.uri.utils.getDomainEncoded = function(uri) {
  return goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.DOMAIN, uri);
};
goog.uri.utils.getDomain = function(uri) {
  return goog.uri.utils.decodeIfPossible_(goog.uri.utils.getDomainEncoded(uri), true);
};
goog.uri.utils.getPort = function(uri) {
  return Number(goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.PORT, uri)) || null;
};
goog.uri.utils.getPathEncoded = function(uri) {
  return goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.PATH, uri);
};
goog.uri.utils.getPath = function(uri) {
  return goog.uri.utils.decodeIfPossible_(goog.uri.utils.getPathEncoded(uri), true);
};
goog.uri.utils.getQueryData = function(uri) {
  return goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.QUERY_DATA, uri);
};
goog.uri.utils.getFragmentEncoded = function(uri) {
  var hashIndex = uri.indexOf("#");
  return hashIndex < 0 ? null : uri.substr(hashIndex + 1);
};
goog.uri.utils.setFragmentEncoded = function(uri, fragment) {
  return goog.uri.utils.removeFragment(uri) + (fragment ? "#" + fragment : "");
};
goog.uri.utils.getFragment = function(uri) {
  return goog.uri.utils.decodeIfPossible_(goog.uri.utils.getFragmentEncoded(uri));
};
goog.uri.utils.getHost = function(uri) {
  var pieces = goog.uri.utils.split(uri);
  return goog.uri.utils.buildFromEncodedParts(pieces[goog.uri.utils.ComponentIndex.SCHEME], pieces[goog.uri.utils.ComponentIndex.USER_INFO], pieces[goog.uri.utils.ComponentIndex.DOMAIN], pieces[goog.uri.utils.ComponentIndex.PORT]);
};
goog.uri.utils.getPathAndAfter = function(uri) {
  var pieces = goog.uri.utils.split(uri);
  return goog.uri.utils.buildFromEncodedParts(null, null, null, null, pieces[goog.uri.utils.ComponentIndex.PATH], pieces[goog.uri.utils.ComponentIndex.QUERY_DATA], pieces[goog.uri.utils.ComponentIndex.FRAGMENT]);
};
goog.uri.utils.removeFragment = function(uri) {
  var hashIndex = uri.indexOf("#");
  return hashIndex < 0 ? uri : uri.substr(0, hashIndex);
};
goog.uri.utils.haveSameDomain = function(uri1, uri2) {
  var pieces1 = goog.uri.utils.split(uri1);
  var pieces2 = goog.uri.utils.split(uri2);
  return pieces1[goog.uri.utils.ComponentIndex.DOMAIN] == pieces2[goog.uri.utils.ComponentIndex.DOMAIN] && pieces1[goog.uri.utils.ComponentIndex.SCHEME] == pieces2[goog.uri.utils.ComponentIndex.SCHEME] && pieces1[goog.uri.utils.ComponentIndex.PORT] == pieces2[goog.uri.utils.ComponentIndex.PORT];
};
goog.uri.utils.assertNoFragmentsOrQueries_ = function(uri) {
  if (goog.DEBUG && (uri.indexOf("#") >= 0 || uri.indexOf("?") >= 0)) {
    throw Error("goog.uri.utils: Fragment or query identifiers are not " + "supported: [" + uri + "]");
  }
};
goog.uri.utils.QueryValue;
goog.uri.utils.QueryArray;
goog.uri.utils.parseQueryData = function(encodedQuery, callback) {
  if (!encodedQuery) {
    return;
  }
  var pairs = encodedQuery.split("\x26");
  for (var i = 0;i < pairs.length;i++) {
    var indexOfEquals = pairs[i].indexOf("\x3d");
    var name = null;
    var value = null;
    if (indexOfEquals >= 0) {
      name = pairs[i].substring(0, indexOfEquals);
      value = pairs[i].substring(indexOfEquals + 1);
    } else {
      name = pairs[i];
    }
    callback(name, value ? goog.string.urlDecode(value) : "");
  }
};
goog.uri.utils.appendQueryData_ = function(buffer) {
  if (buffer[1]) {
    var baseUri = (buffer[0]);
    var hashIndex = baseUri.indexOf("#");
    if (hashIndex >= 0) {
      buffer.push(baseUri.substr(hashIndex));
      buffer[0] = baseUri = baseUri.substr(0, hashIndex);
    }
    var questionIndex = baseUri.indexOf("?");
    if (questionIndex < 0) {
      buffer[1] = "?";
    } else {
      if (questionIndex == baseUri.length - 1) {
        buffer[1] = undefined;
      }
    }
  }
  return buffer.join("");
};
goog.uri.utils.appendKeyValuePairs_ = function(key, value, pairs) {
  if (goog.isArray(value)) {
    goog.asserts.assertArray(value);
    for (var j = 0;j < value.length;j++) {
      goog.uri.utils.appendKeyValuePairs_(key, String(value[j]), pairs);
    }
  } else {
    if (value != null) {
      pairs.push("\x26", key, value === "" ? "" : "\x3d", goog.string.urlEncode(value));
    }
  }
};
goog.uri.utils.buildQueryDataBuffer_ = function(buffer, keysAndValues, opt_startIndex) {
  goog.asserts.assert(Math.max(keysAndValues.length - (opt_startIndex || 0), 0) % 2 == 0, "goog.uri.utils: Key/value lists must be even in length.");
  for (var i = opt_startIndex || 0;i < keysAndValues.length;i += 2) {
    goog.uri.utils.appendKeyValuePairs_(keysAndValues[i], keysAndValues[i + 1], buffer);
  }
  return buffer;
};
goog.uri.utils.buildQueryData = function(keysAndValues, opt_startIndex) {
  var buffer = goog.uri.utils.buildQueryDataBuffer_([], keysAndValues, opt_startIndex);
  buffer[0] = "";
  return buffer.join("");
};
goog.uri.utils.buildQueryDataBufferFromMap_ = function(buffer, map) {
  for (var key in map) {
    goog.uri.utils.appendKeyValuePairs_(key, map[key], buffer);
  }
  return buffer;
};
goog.uri.utils.buildQueryDataFromMap = function(map) {
  var buffer = goog.uri.utils.buildQueryDataBufferFromMap_([], map);
  buffer[0] = "";
  return buffer.join("");
};
goog.uri.utils.appendParams = function(uri, var_args) {
  return goog.uri.utils.appendQueryData_(arguments.length == 2 ? goog.uri.utils.buildQueryDataBuffer_([uri], arguments[1], 0) : goog.uri.utils.buildQueryDataBuffer_([uri], arguments, 1));
};
goog.uri.utils.appendParamsFromMap = function(uri, map) {
  return goog.uri.utils.appendQueryData_(goog.uri.utils.buildQueryDataBufferFromMap_([uri], map));
};
goog.uri.utils.appendParam = function(uri, key, opt_value) {
  var paramArr = [uri, "\x26", key];
  if (goog.isDefAndNotNull(opt_value)) {
    paramArr.push("\x3d", goog.string.urlEncode(opt_value));
  }
  return goog.uri.utils.appendQueryData_(paramArr);
};
goog.uri.utils.findParam_ = function(uri, startIndex, keyEncoded, hashOrEndIndex) {
  var index = startIndex;
  var keyLength = keyEncoded.length;
  while ((index = uri.indexOf(keyEncoded, index)) >= 0 && index < hashOrEndIndex) {
    var precedingChar = uri.charCodeAt(index - 1);
    if (precedingChar == goog.uri.utils.CharCode_.AMPERSAND || precedingChar == goog.uri.utils.CharCode_.QUESTION) {
      var followingChar = uri.charCodeAt(index + keyLength);
      if (!followingChar || followingChar == goog.uri.utils.CharCode_.EQUAL || followingChar == goog.uri.utils.CharCode_.AMPERSAND || followingChar == goog.uri.utils.CharCode_.HASH) {
        return index;
      }
    }
    index += keyLength + 1;
  }
  return -1;
};
goog.uri.utils.hashOrEndRe_ = /#|$/;
goog.uri.utils.hasParam = function(uri, keyEncoded) {
  return goog.uri.utils.findParam_(uri, 0, keyEncoded, uri.search(goog.uri.utils.hashOrEndRe_)) >= 0;
};
goog.uri.utils.getParamValue = function(uri, keyEncoded) {
  var hashOrEndIndex = uri.search(goog.uri.utils.hashOrEndRe_);
  var foundIndex = goog.uri.utils.findParam_(uri, 0, keyEncoded, hashOrEndIndex);
  if (foundIndex < 0) {
    return null;
  } else {
    var endPosition = uri.indexOf("\x26", foundIndex);
    if (endPosition < 0 || endPosition > hashOrEndIndex) {
      endPosition = hashOrEndIndex;
    }
    foundIndex += keyEncoded.length + 1;
    return goog.string.urlDecode(uri.substr(foundIndex, endPosition - foundIndex));
  }
};
goog.uri.utils.getParamValues = function(uri, keyEncoded) {
  var hashOrEndIndex = uri.search(goog.uri.utils.hashOrEndRe_);
  var position = 0;
  var foundIndex;
  var result = [];
  while ((foundIndex = goog.uri.utils.findParam_(uri, position, keyEncoded, hashOrEndIndex)) >= 0) {
    position = uri.indexOf("\x26", foundIndex);
    if (position < 0 || position > hashOrEndIndex) {
      position = hashOrEndIndex;
    }
    foundIndex += keyEncoded.length + 1;
    result.push(goog.string.urlDecode(uri.substr(foundIndex, position - foundIndex)));
  }
  return result;
};
goog.uri.utils.trailingQueryPunctuationRe_ = /[?&]($|#)/;
goog.uri.utils.removeParam = function(uri, keyEncoded) {
  var hashOrEndIndex = uri.search(goog.uri.utils.hashOrEndRe_);
  var position = 0;
  var foundIndex;
  var buffer = [];
  while ((foundIndex = goog.uri.utils.findParam_(uri, position, keyEncoded, hashOrEndIndex)) >= 0) {
    buffer.push(uri.substring(position, foundIndex));
    position = Math.min(uri.indexOf("\x26", foundIndex) + 1 || hashOrEndIndex, hashOrEndIndex);
  }
  buffer.push(uri.substr(position));
  return buffer.join("").replace(goog.uri.utils.trailingQueryPunctuationRe_, "$1");
};
goog.uri.utils.setParam = function(uri, keyEncoded, value) {
  return goog.uri.utils.appendParam(goog.uri.utils.removeParam(uri, keyEncoded), keyEncoded, value);
};
goog.uri.utils.appendPath = function(baseUri, path) {
  goog.uri.utils.assertNoFragmentsOrQueries_(baseUri);
  if (goog.string.endsWith(baseUri, "/")) {
    baseUri = baseUri.substr(0, baseUri.length - 1);
  }
  if (goog.string.startsWith(path, "/")) {
    path = path.substr(1);
  }
  return goog.string.buildString(baseUri, "/", path);
};
goog.uri.utils.setPath = function(uri, path) {
  if (!goog.string.startsWith(path, "/")) {
    path = "/" + path;
  }
  var parts = goog.uri.utils.split(uri);
  return goog.uri.utils.buildFromEncodedParts(parts[goog.uri.utils.ComponentIndex.SCHEME], parts[goog.uri.utils.ComponentIndex.USER_INFO], parts[goog.uri.utils.ComponentIndex.DOMAIN], parts[goog.uri.utils.ComponentIndex.PORT], path, parts[goog.uri.utils.ComponentIndex.QUERY_DATA], parts[goog.uri.utils.ComponentIndex.FRAGMENT]);
};
goog.uri.utils.StandardQueryParam = {RANDOM:"zx"};
goog.uri.utils.makeUnique = function(uri) {
  return goog.uri.utils.setParam(uri, goog.uri.utils.StandardQueryParam.RANDOM, goog.string.getRandomString());
};
goog.provide("goog.Uri");
goog.provide("goog.Uri.QueryData");
goog.require("goog.array");
goog.require("goog.string");
goog.require("goog.structs");
goog.require("goog.structs.Map");
goog.require("goog.uri.utils");
goog.require("goog.uri.utils.ComponentIndex");
goog.require("goog.uri.utils.StandardQueryParam");
goog.Uri = function(opt_uri, opt_ignoreCase) {
  this.scheme_ = "";
  this.userInfo_ = "";
  this.domain_ = "";
  this.port_ = null;
  this.path_ = "";
  this.fragment_ = "";
  this.isReadOnly_ = false;
  this.ignoreCase_ = false;
  this.queryData_;
  var m;
  if (opt_uri instanceof goog.Uri) {
    this.ignoreCase_ = goog.isDef(opt_ignoreCase) ? opt_ignoreCase : opt_uri.getIgnoreCase();
    this.setScheme(opt_uri.getScheme());
    this.setUserInfo(opt_uri.getUserInfo());
    this.setDomain(opt_uri.getDomain());
    this.setPort(opt_uri.getPort());
    this.setPath(opt_uri.getPath());
    this.setQueryData(opt_uri.getQueryData().clone());
    this.setFragment(opt_uri.getFragment());
  } else {
    if (opt_uri && (m = goog.uri.utils.split(String(opt_uri)))) {
      this.ignoreCase_ = !!opt_ignoreCase;
      this.setScheme(m[goog.uri.utils.ComponentIndex.SCHEME] || "", true);
      this.setUserInfo(m[goog.uri.utils.ComponentIndex.USER_INFO] || "", true);
      this.setDomain(m[goog.uri.utils.ComponentIndex.DOMAIN] || "", true);
      this.setPort(m[goog.uri.utils.ComponentIndex.PORT]);
      this.setPath(m[goog.uri.utils.ComponentIndex.PATH] || "", true);
      this.setQueryData(m[goog.uri.utils.ComponentIndex.QUERY_DATA] || "", true);
      this.setFragment(m[goog.uri.utils.ComponentIndex.FRAGMENT] || "", true);
    } else {
      this.ignoreCase_ = !!opt_ignoreCase;
      this.queryData_ = new goog.Uri.QueryData(null, null, this.ignoreCase_);
    }
  }
};
goog.Uri.preserveParameterTypesCompatibilityFlag = false;
goog.Uri.RANDOM_PARAM = goog.uri.utils.StandardQueryParam.RANDOM;
goog.Uri.prototype.toString = function() {
  var out = [];
  var scheme = this.getScheme();
  if (scheme) {
    out.push(goog.Uri.encodeSpecialChars_(scheme, goog.Uri.reDisallowedInSchemeOrUserInfo_, true), ":");
  }
  var domain = this.getDomain();
  if (domain || scheme == "file") {
    out.push("//");
    var userInfo = this.getUserInfo();
    if (userInfo) {
      out.push(goog.Uri.encodeSpecialChars_(userInfo, goog.Uri.reDisallowedInSchemeOrUserInfo_, true), "@");
    }
    out.push(goog.Uri.removeDoubleEncoding_(goog.string.urlEncode(domain)));
    var port = this.getPort();
    if (port != null) {
      out.push(":", String(port));
    }
  }
  var path = this.getPath();
  if (path) {
    if (this.hasDomain() && path.charAt(0) != "/") {
      out.push("/");
    }
    out.push(goog.Uri.encodeSpecialChars_(path, path.charAt(0) == "/" ? goog.Uri.reDisallowedInAbsolutePath_ : goog.Uri.reDisallowedInRelativePath_, true));
  }
  var query = this.getEncodedQuery();
  if (query) {
    out.push("?", query);
  }
  var fragment = this.getFragment();
  if (fragment) {
    out.push("#", goog.Uri.encodeSpecialChars_(fragment, goog.Uri.reDisallowedInFragment_));
  }
  return out.join("");
};
goog.Uri.prototype.resolve = function(relativeUri) {
  var absoluteUri = this.clone();
  var overridden = relativeUri.hasScheme();
  if (overridden) {
    absoluteUri.setScheme(relativeUri.getScheme());
  } else {
    overridden = relativeUri.hasUserInfo();
  }
  if (overridden) {
    absoluteUri.setUserInfo(relativeUri.getUserInfo());
  } else {
    overridden = relativeUri.hasDomain();
  }
  if (overridden) {
    absoluteUri.setDomain(relativeUri.getDomain());
  } else {
    overridden = relativeUri.hasPort();
  }
  var path = relativeUri.getPath();
  if (overridden) {
    absoluteUri.setPort(relativeUri.getPort());
  } else {
    overridden = relativeUri.hasPath();
    if (overridden) {
      if (path.charAt(0) != "/") {
        if (this.hasDomain() && !this.hasPath()) {
          path = "/" + path;
        } else {
          var lastSlashIndex = absoluteUri.getPath().lastIndexOf("/");
          if (lastSlashIndex != -1) {
            path = absoluteUri.getPath().substr(0, lastSlashIndex + 1) + path;
          }
        }
      }
      path = goog.Uri.removeDotSegments(path);
    }
  }
  if (overridden) {
    absoluteUri.setPath(path);
  } else {
    overridden = relativeUri.hasQuery();
  }
  if (overridden) {
    absoluteUri.setQueryData(relativeUri.getDecodedQuery());
  } else {
    overridden = relativeUri.hasFragment();
  }
  if (overridden) {
    absoluteUri.setFragment(relativeUri.getFragment());
  }
  return absoluteUri;
};
goog.Uri.prototype.clone = function() {
  return new goog.Uri(this);
};
goog.Uri.prototype.getScheme = function() {
  return this.scheme_;
};
goog.Uri.prototype.setScheme = function(newScheme, opt_decode) {
  this.enforceReadOnly();
  this.scheme_ = opt_decode ? goog.Uri.decodeOrEmpty_(newScheme, true) : newScheme;
  if (this.scheme_) {
    this.scheme_ = this.scheme_.replace(/:$/, "");
  }
  return this;
};
goog.Uri.prototype.hasScheme = function() {
  return !!this.scheme_;
};
goog.Uri.prototype.getUserInfo = function() {
  return this.userInfo_;
};
goog.Uri.prototype.setUserInfo = function(newUserInfo, opt_decode) {
  this.enforceReadOnly();
  this.userInfo_ = opt_decode ? goog.Uri.decodeOrEmpty_(newUserInfo) : newUserInfo;
  return this;
};
goog.Uri.prototype.hasUserInfo = function() {
  return !!this.userInfo_;
};
goog.Uri.prototype.getDomain = function() {
  return this.domain_;
};
goog.Uri.prototype.setDomain = function(newDomain, opt_decode) {
  this.enforceReadOnly();
  this.domain_ = opt_decode ? goog.Uri.decodeOrEmpty_(newDomain, true) : newDomain;
  return this;
};
goog.Uri.prototype.hasDomain = function() {
  return !!this.domain_;
};
goog.Uri.prototype.getPort = function() {
  return this.port_;
};
goog.Uri.prototype.setPort = function(newPort) {
  this.enforceReadOnly();
  if (newPort) {
    newPort = Number(newPort);
    if (isNaN(newPort) || newPort < 0) {
      throw Error("Bad port number " + newPort);
    }
    this.port_ = newPort;
  } else {
    this.port_ = null;
  }
  return this;
};
goog.Uri.prototype.hasPort = function() {
  return this.port_ != null;
};
goog.Uri.prototype.getPath = function() {
  return this.path_;
};
goog.Uri.prototype.setPath = function(newPath, opt_decode) {
  this.enforceReadOnly();
  this.path_ = opt_decode ? goog.Uri.decodeOrEmpty_(newPath, true) : newPath;
  return this;
};
goog.Uri.prototype.hasPath = function() {
  return !!this.path_;
};
goog.Uri.prototype.hasQuery = function() {
  return this.queryData_.toString() !== "";
};
goog.Uri.prototype.setQueryData = function(queryData, opt_decode) {
  this.enforceReadOnly();
  if (queryData instanceof goog.Uri.QueryData) {
    this.queryData_ = queryData;
    this.queryData_.setIgnoreCase(this.ignoreCase_);
  } else {
    if (!opt_decode) {
      queryData = goog.Uri.encodeSpecialChars_(queryData, goog.Uri.reDisallowedInQuery_);
    }
    this.queryData_ = new goog.Uri.QueryData(queryData, null, this.ignoreCase_);
  }
  return this;
};
goog.Uri.prototype.setQuery = function(newQuery, opt_decode) {
  return this.setQueryData(newQuery, opt_decode);
};
goog.Uri.prototype.getEncodedQuery = function() {
  return this.queryData_.toString();
};
goog.Uri.prototype.getDecodedQuery = function() {
  return this.queryData_.toDecodedString();
};
goog.Uri.prototype.getQueryData = function() {
  return this.queryData_;
};
goog.Uri.prototype.getQuery = function() {
  return this.getEncodedQuery();
};
goog.Uri.prototype.setParameterValue = function(key, value) {
  this.enforceReadOnly();
  this.queryData_.set(key, value);
  return this;
};
goog.Uri.prototype.setParameterValues = function(key, values) {
  this.enforceReadOnly();
  if (!goog.isArray(values)) {
    values = [String(values)];
  }
  this.queryData_.setValues(key, values);
  return this;
};
goog.Uri.prototype.getParameterValues = function(name) {
  return this.queryData_.getValues(name);
};
goog.Uri.prototype.getParameterValue = function(paramName) {
  return (this.queryData_.get(paramName));
};
goog.Uri.prototype.getFragment = function() {
  return this.fragment_;
};
goog.Uri.prototype.setFragment = function(newFragment, opt_decode) {
  this.enforceReadOnly();
  this.fragment_ = opt_decode ? goog.Uri.decodeOrEmpty_(newFragment) : newFragment;
  return this;
};
goog.Uri.prototype.hasFragment = function() {
  return !!this.fragment_;
};
goog.Uri.prototype.hasSameDomainAs = function(uri2) {
  return (!this.hasDomain() && !uri2.hasDomain() || this.getDomain() == uri2.getDomain()) && (!this.hasPort() && !uri2.hasPort() || this.getPort() == uri2.getPort());
};
goog.Uri.prototype.makeUnique = function() {
  this.enforceReadOnly();
  this.setParameterValue(goog.Uri.RANDOM_PARAM, goog.string.getRandomString());
  return this;
};
goog.Uri.prototype.removeParameter = function(key) {
  this.enforceReadOnly();
  this.queryData_.remove(key);
  return this;
};
goog.Uri.prototype.setReadOnly = function(isReadOnly) {
  this.isReadOnly_ = isReadOnly;
  return this;
};
goog.Uri.prototype.isReadOnly = function() {
  return this.isReadOnly_;
};
goog.Uri.prototype.enforceReadOnly = function() {
  if (this.isReadOnly_) {
    throw Error("Tried to modify a read-only Uri");
  }
};
goog.Uri.prototype.setIgnoreCase = function(ignoreCase) {
  this.ignoreCase_ = ignoreCase;
  if (this.queryData_) {
    this.queryData_.setIgnoreCase(ignoreCase);
  }
  return this;
};
goog.Uri.prototype.getIgnoreCase = function() {
  return this.ignoreCase_;
};
goog.Uri.parse = function(uri, opt_ignoreCase) {
  return uri instanceof goog.Uri ? uri.clone() : new goog.Uri(uri, opt_ignoreCase);
};
goog.Uri.create = function(opt_scheme, opt_userInfo, opt_domain, opt_port, opt_path, opt_query, opt_fragment, opt_ignoreCase) {
  var uri = new goog.Uri(null, opt_ignoreCase);
  opt_scheme && uri.setScheme(opt_scheme);
  opt_userInfo && uri.setUserInfo(opt_userInfo);
  opt_domain && uri.setDomain(opt_domain);
  opt_port && uri.setPort(opt_port);
  opt_path && uri.setPath(opt_path);
  opt_query && uri.setQueryData(opt_query);
  opt_fragment && uri.setFragment(opt_fragment);
  return uri;
};
goog.Uri.resolve = function(base, rel) {
  if (!(base instanceof goog.Uri)) {
    base = goog.Uri.parse(base);
  }
  if (!(rel instanceof goog.Uri)) {
    rel = goog.Uri.parse(rel);
  }
  return base.resolve(rel);
};
goog.Uri.removeDotSegments = function(path) {
  if (path == ".." || path == ".") {
    return "";
  } else {
    if (!goog.string.contains(path, "./") && !goog.string.contains(path, "/.")) {
      return path;
    } else {
      var leadingSlash = goog.string.startsWith(path, "/");
      var segments = path.split("/");
      var out = [];
      for (var pos = 0;pos < segments.length;) {
        var segment = segments[pos++];
        if (segment == ".") {
          if (leadingSlash && pos == segments.length) {
            out.push("");
          }
        } else {
          if (segment == "..") {
            if (out.length > 1 || out.length == 1 && out[0] != "") {
              out.pop();
            }
            if (leadingSlash && pos == segments.length) {
              out.push("");
            }
          } else {
            out.push(segment);
            leadingSlash = true;
          }
        }
      }
      return out.join("/");
    }
  }
};
goog.Uri.decodeOrEmpty_ = function(val, opt_preserveReserved) {
  if (!val) {
    return "";
  }
  return opt_preserveReserved ? decodeURI(val.replace(/%25/g, "%2525")) : decodeURIComponent(val);
};
goog.Uri.encodeSpecialChars_ = function(unescapedPart, extra, opt_removeDoubleEncoding) {
  if (goog.isString(unescapedPart)) {
    var encoded = encodeURI(unescapedPart).replace(extra, goog.Uri.encodeChar_);
    if (opt_removeDoubleEncoding) {
      encoded = goog.Uri.removeDoubleEncoding_(encoded);
    }
    return encoded;
  }
  return null;
};
goog.Uri.encodeChar_ = function(ch) {
  var n = ch.charCodeAt(0);
  return "%" + (n >> 4 & 15).toString(16) + (n & 15).toString(16);
};
goog.Uri.removeDoubleEncoding_ = function(doubleEncodedString) {
  return doubleEncodedString.replace(/%25([0-9a-fA-F]{2})/g, "%$1");
};
goog.Uri.reDisallowedInSchemeOrUserInfo_ = /[#\/\?@]/g;
goog.Uri.reDisallowedInRelativePath_ = /[\#\?:]/g;
goog.Uri.reDisallowedInAbsolutePath_ = /[\#\?]/g;
goog.Uri.reDisallowedInQuery_ = /[\#\?@]/g;
goog.Uri.reDisallowedInFragment_ = /#/g;
goog.Uri.haveSameDomain = function(uri1String, uri2String) {
  var pieces1 = goog.uri.utils.split(uri1String);
  var pieces2 = goog.uri.utils.split(uri2String);
  return pieces1[goog.uri.utils.ComponentIndex.DOMAIN] == pieces2[goog.uri.utils.ComponentIndex.DOMAIN] && pieces1[goog.uri.utils.ComponentIndex.PORT] == pieces2[goog.uri.utils.ComponentIndex.PORT];
};
goog.Uri.QueryData = function(opt_query, opt_uri, opt_ignoreCase) {
  this.keyMap_ = null;
  this.count_ = null;
  this.encodedQuery_ = opt_query || null;
  this.ignoreCase_ = !!opt_ignoreCase;
};
goog.Uri.QueryData.prototype.ensureKeyMapInitialized_ = function() {
  if (!this.keyMap_) {
    this.keyMap_ = new goog.structs.Map;
    this.count_ = 0;
    if (this.encodedQuery_) {
      var self = this;
      goog.uri.utils.parseQueryData(this.encodedQuery_, function(name, value) {
        self.add(goog.string.urlDecode(name), value);
      });
    }
  }
};
goog.Uri.QueryData.createFromMap = function(map, opt_uri, opt_ignoreCase) {
  var keys = goog.structs.getKeys(map);
  if (typeof keys == "undefined") {
    throw Error("Keys are undefined");
  }
  var queryData = new goog.Uri.QueryData(null, null, opt_ignoreCase);
  var values = goog.structs.getValues(map);
  for (var i = 0;i < keys.length;i++) {
    var key = keys[i];
    var value = values[i];
    if (!goog.isArray(value)) {
      queryData.add(key, value);
    } else {
      queryData.setValues(key, value);
    }
  }
  return queryData;
};
goog.Uri.QueryData.createFromKeysValues = function(keys, values, opt_uri, opt_ignoreCase) {
  if (keys.length != values.length) {
    throw Error("Mismatched lengths for keys/values");
  }
  var queryData = new goog.Uri.QueryData(null, null, opt_ignoreCase);
  for (var i = 0;i < keys.length;i++) {
    queryData.add(keys[i], values[i]);
  }
  return queryData;
};
goog.Uri.QueryData.prototype.getCount = function() {
  this.ensureKeyMapInitialized_();
  return this.count_;
};
goog.Uri.QueryData.prototype.add = function(key, value) {
  this.ensureKeyMapInitialized_();
  this.invalidateCache_();
  key = this.getKeyName_(key);
  var values = this.keyMap_.get(key);
  if (!values) {
    this.keyMap_.set(key, values = []);
  }
  values.push(value);
  this.count_++;
  return this;
};
goog.Uri.QueryData.prototype.remove = function(key) {
  this.ensureKeyMapInitialized_();
  key = this.getKeyName_(key);
  if (this.keyMap_.containsKey(key)) {
    this.invalidateCache_();
    this.count_ -= this.keyMap_.get(key).length;
    return this.keyMap_.remove(key);
  }
  return false;
};
goog.Uri.QueryData.prototype.clear = function() {
  this.invalidateCache_();
  this.keyMap_ = null;
  this.count_ = 0;
};
goog.Uri.QueryData.prototype.isEmpty = function() {
  this.ensureKeyMapInitialized_();
  return this.count_ == 0;
};
goog.Uri.QueryData.prototype.containsKey = function(key) {
  this.ensureKeyMapInitialized_();
  key = this.getKeyName_(key);
  return this.keyMap_.containsKey(key);
};
goog.Uri.QueryData.prototype.containsValue = function(value) {
  var vals = this.getValues();
  return goog.array.contains(vals, value);
};
goog.Uri.QueryData.prototype.getKeys = function() {
  this.ensureKeyMapInitialized_();
  var vals = (this.keyMap_.getValues());
  var keys = this.keyMap_.getKeys();
  var rv = [];
  for (var i = 0;i < keys.length;i++) {
    var val = vals[i];
    for (var j = 0;j < val.length;j++) {
      rv.push(keys[i]);
    }
  }
  return rv;
};
goog.Uri.QueryData.prototype.getValues = function(opt_key) {
  this.ensureKeyMapInitialized_();
  var rv = [];
  if (goog.isString(opt_key)) {
    if (this.containsKey(opt_key)) {
      rv = goog.array.concat(rv, this.keyMap_.get(this.getKeyName_(opt_key)));
    }
  } else {
    var values = this.keyMap_.getValues();
    for (var i = 0;i < values.length;i++) {
      rv = goog.array.concat(rv, values[i]);
    }
  }
  return rv;
};
goog.Uri.QueryData.prototype.set = function(key, value) {
  this.ensureKeyMapInitialized_();
  this.invalidateCache_();
  key = this.getKeyName_(key);
  if (this.containsKey(key)) {
    this.count_ -= this.keyMap_.get(key).length;
  }
  this.keyMap_.set(key, [value]);
  this.count_++;
  return this;
};
goog.Uri.QueryData.prototype.get = function(key, opt_default) {
  var values = key ? this.getValues(key) : [];
  if (goog.Uri.preserveParameterTypesCompatibilityFlag) {
    return values.length > 0 ? values[0] : opt_default;
  } else {
    return values.length > 0 ? String(values[0]) : opt_default;
  }
};
goog.Uri.QueryData.prototype.setValues = function(key, values) {
  this.remove(key);
  if (values.length > 0) {
    this.invalidateCache_();
    this.keyMap_.set(this.getKeyName_(key), goog.array.clone(values));
    this.count_ += values.length;
  }
};
goog.Uri.QueryData.prototype.toString = function() {
  if (this.encodedQuery_) {
    return this.encodedQuery_;
  }
  if (!this.keyMap_) {
    return "";
  }
  var sb = [];
  var keys = this.keyMap_.getKeys();
  for (var i = 0;i < keys.length;i++) {
    var key = keys[i];
    var encodedKey = goog.string.urlEncode(key);
    var val = this.getValues(key);
    for (var j = 0;j < val.length;j++) {
      var param = encodedKey;
      if (val[j] !== "") {
        param += "\x3d" + goog.string.urlEncode(val[j]);
      }
      sb.push(param);
    }
  }
  return this.encodedQuery_ = sb.join("\x26");
};
goog.Uri.QueryData.prototype.toDecodedString = function() {
  return goog.Uri.decodeOrEmpty_(this.toString());
};
goog.Uri.QueryData.prototype.invalidateCache_ = function() {
  this.encodedQuery_ = null;
};
goog.Uri.QueryData.prototype.filterKeys = function(keys) {
  this.ensureKeyMapInitialized_();
  this.keyMap_.forEach(function(value, key) {
    if (!goog.array.contains(keys, key)) {
      this.remove(key);
    }
  }, this);
  return this;
};
goog.Uri.QueryData.prototype.clone = function() {
  var rv = new goog.Uri.QueryData;
  rv.encodedQuery_ = this.encodedQuery_;
  if (this.keyMap_) {
    rv.keyMap_ = this.keyMap_.clone();
    rv.count_ = this.count_;
  }
  return rv;
};
goog.Uri.QueryData.prototype.getKeyName_ = function(arg) {
  var keyName = String(arg);
  if (this.ignoreCase_) {
    keyName = keyName.toLowerCase();
  }
  return keyName;
};
goog.Uri.QueryData.prototype.setIgnoreCase = function(ignoreCase) {
  var resetKeys = ignoreCase && !this.ignoreCase_;
  if (resetKeys) {
    this.ensureKeyMapInitialized_();
    this.invalidateCache_();
    this.keyMap_.forEach(function(value, key) {
      var lowerCase = key.toLowerCase();
      if (key != lowerCase) {
        this.remove(key);
        this.setValues(lowerCase, value);
      }
    }, this);
  }
  this.ignoreCase_ = ignoreCase;
};
goog.Uri.QueryData.prototype.extend = function(var_args) {
  for (var i = 0;i < arguments.length;i++) {
    var data = arguments[i];
    goog.structs.forEach(data, function(value, key) {
      this.add(key, value);
    }, this);
  }
};
goog.provide("clojure.set");
goog.require("cljs.core");
clojure.set.bubble_max_key = function clojure$set$bubble_max_key(k, coll) {
  var max = cljs.core.apply.call(null, cljs.core.max_key, k, coll);
  return cljs.core.cons.call(null, max, cljs.core.remove.call(null, function(max) {
    return function(p1__11159_SHARP_) {
      return max === p1__11159_SHARP_;
    };
  }(max), coll));
};
clojure.set.union = function clojure$set$union(var_args) {
  var args11160 = [];
  var len__7198__auto___11166 = arguments.length;
  var i__7199__auto___11167 = 0;
  while (true) {
    if (i__7199__auto___11167 < len__7198__auto___11166) {
      args11160.push(arguments[i__7199__auto___11167]);
      var G__11168 = i__7199__auto___11167 + 1;
      i__7199__auto___11167 = G__11168;
      continue;
    } else {
    }
    break;
  }
  var G__11165 = args11160.length;
  switch(G__11165) {
    case 0:
      return clojure.set.union.cljs$core$IFn$_invoke$arity$0();
      break;
    case 1:
      return clojure.set.union.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return clojure.set.union.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args11160.slice(2), 0);
      return clojure.set.union.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
clojure.set.union.cljs$core$IFn$_invoke$arity$0 = function() {
  return cljs.core.PersistentHashSet.EMPTY;
};
clojure.set.union.cljs$core$IFn$_invoke$arity$1 = function(s1) {
  return s1;
};
clojure.set.union.cljs$core$IFn$_invoke$arity$2 = function(s1, s2) {
  if (cljs.core.count.call(null, s1) < cljs.core.count.call(null, s2)) {
    return cljs.core.reduce.call(null, cljs.core.conj, s2, s1);
  } else {
    return cljs.core.reduce.call(null, cljs.core.conj, s1, s2);
  }
};
clojure.set.union.cljs$core$IFn$_invoke$arity$variadic = function(s1, s2, sets) {
  var bubbled_sets = clojure.set.bubble_max_key.call(null, cljs.core.count, cljs.core.conj.call(null, sets, s2, s1));
  return cljs.core.reduce.call(null, cljs.core.into, cljs.core.first.call(null, bubbled_sets), cljs.core.rest.call(null, bubbled_sets));
};
clojure.set.union.cljs$lang$applyTo = function(seq11161) {
  var G__11162 = cljs.core.first.call(null, seq11161);
  var seq11161__$1 = cljs.core.next.call(null, seq11161);
  var G__11163 = cljs.core.first.call(null, seq11161__$1);
  var seq11161__$2 = cljs.core.next.call(null, seq11161__$1);
  return clojure.set.union.cljs$core$IFn$_invoke$arity$variadic(G__11162, G__11163, seq11161__$2);
};
clojure.set.union.cljs$lang$maxFixedArity = 2;
clojure.set.intersection = function clojure$set$intersection(var_args) {
  var args11171 = [];
  var len__7198__auto___11177 = arguments.length;
  var i__7199__auto___11178 = 0;
  while (true) {
    if (i__7199__auto___11178 < len__7198__auto___11177) {
      args11171.push(arguments[i__7199__auto___11178]);
      var G__11179 = i__7199__auto___11178 + 1;
      i__7199__auto___11178 = G__11179;
      continue;
    } else {
    }
    break;
  }
  var G__11176 = args11171.length;
  switch(G__11176) {
    case 1:
      return clojure.set.intersection.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return clojure.set.intersection.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args11171.slice(2), 0);
      return clojure.set.intersection.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
clojure.set.intersection.cljs$core$IFn$_invoke$arity$1 = function(s1) {
  return s1;
};
clojure.set.intersection.cljs$core$IFn$_invoke$arity$2 = function(s1, s2) {
  while (true) {
    if (cljs.core.count.call(null, s2) < cljs.core.count.call(null, s1)) {
      var G__11181 = s2;
      var G__11182 = s1;
      s1 = G__11181;
      s2 = G__11182;
      continue;
    } else {
      return cljs.core.reduce.call(null, function(s1, s2) {
        return function(result, item) {
          if (cljs.core.contains_QMARK_.call(null, s2, item)) {
            return result;
          } else {
            return cljs.core.disj.call(null, result, item);
          }
        };
      }(s1, s2), s1, s1);
    }
    break;
  }
};
clojure.set.intersection.cljs$core$IFn$_invoke$arity$variadic = function(s1, s2, sets) {
  var bubbled_sets = clojure.set.bubble_max_key.call(null, function(p1__11170_SHARP_) {
    return -cljs.core.count.call(null, p1__11170_SHARP_);
  }, cljs.core.conj.call(null, sets, s2, s1));
  return cljs.core.reduce.call(null, clojure.set.intersection, cljs.core.first.call(null, bubbled_sets), cljs.core.rest.call(null, bubbled_sets));
};
clojure.set.intersection.cljs$lang$applyTo = function(seq11172) {
  var G__11173 = cljs.core.first.call(null, seq11172);
  var seq11172__$1 = cljs.core.next.call(null, seq11172);
  var G__11174 = cljs.core.first.call(null, seq11172__$1);
  var seq11172__$2 = cljs.core.next.call(null, seq11172__$1);
  return clojure.set.intersection.cljs$core$IFn$_invoke$arity$variadic(G__11173, G__11174, seq11172__$2);
};
clojure.set.intersection.cljs$lang$maxFixedArity = 2;
clojure.set.difference = function clojure$set$difference(var_args) {
  var args11183 = [];
  var len__7198__auto___11189 = arguments.length;
  var i__7199__auto___11190 = 0;
  while (true) {
    if (i__7199__auto___11190 < len__7198__auto___11189) {
      args11183.push(arguments[i__7199__auto___11190]);
      var G__11191 = i__7199__auto___11190 + 1;
      i__7199__auto___11190 = G__11191;
      continue;
    } else {
    }
    break;
  }
  var G__11188 = args11183.length;
  switch(G__11188) {
    case 1:
      return clojure.set.difference.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return clojure.set.difference.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      var argseq__7217__auto__ = new cljs.core.IndexedSeq(args11183.slice(2), 0);
      return clojure.set.difference.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7217__auto__);
  }
};
clojure.set.difference.cljs$core$IFn$_invoke$arity$1 = function(s1) {
  return s1;
};
clojure.set.difference.cljs$core$IFn$_invoke$arity$2 = function(s1, s2) {
  if (cljs.core.count.call(null, s1) < cljs.core.count.call(null, s2)) {
    return cljs.core.reduce.call(null, function(result, item) {
      if (cljs.core.contains_QMARK_.call(null, s2, item)) {
        return cljs.core.disj.call(null, result, item);
      } else {
        return result;
      }
    }, s1, s1);
  } else {
    return cljs.core.reduce.call(null, cljs.core.disj, s1, s2);
  }
};
clojure.set.difference.cljs$core$IFn$_invoke$arity$variadic = function(s1, s2, sets) {
  return cljs.core.reduce.call(null, clojure.set.difference, s1, cljs.core.conj.call(null, sets, s2));
};
clojure.set.difference.cljs$lang$applyTo = function(seq11184) {
  var G__11185 = cljs.core.first.call(null, seq11184);
  var seq11184__$1 = cljs.core.next.call(null, seq11184);
  var G__11186 = cljs.core.first.call(null, seq11184__$1);
  var seq11184__$2 = cljs.core.next.call(null, seq11184__$1);
  return clojure.set.difference.cljs$core$IFn$_invoke$arity$variadic(G__11185, G__11186, seq11184__$2);
};
clojure.set.difference.cljs$lang$maxFixedArity = 2;
clojure.set.select = function clojure$set$select(pred, xset) {
  return cljs.core.reduce.call(null, function(s, k) {
    if (cljs.core.truth_(pred.call(null, k))) {
      return s;
    } else {
      return cljs.core.disj.call(null, s, k);
    }
  }, xset, xset);
};
clojure.set.project = function clojure$set$project(xrel, ks) {
  return cljs.core.set.call(null, cljs.core.map.call(null, function(p1__11193_SHARP_) {
    return cljs.core.select_keys.call(null, p1__11193_SHARP_, ks);
  }, xrel));
};
clojure.set.rename_keys = function clojure$set$rename_keys(map, kmap) {
  return cljs.core.reduce.call(null, function(m, p__11196) {
    var vec__11197 = p__11196;
    var old = cljs.core.nth.call(null, vec__11197, 0, null);
    var new$ = cljs.core.nth.call(null, vec__11197, 1, null);
    if (cljs.core.contains_QMARK_.call(null, map, old)) {
      return cljs.core.assoc.call(null, m, new$, cljs.core.get.call(null, map, old));
    } else {
      return m;
    }
  }, cljs.core.apply.call(null, cljs.core.dissoc, map, cljs.core.keys.call(null, kmap)), kmap);
};
clojure.set.rename = function clojure$set$rename(xrel, kmap) {
  return cljs.core.set.call(null, cljs.core.map.call(null, function(p1__11198_SHARP_) {
    return clojure.set.rename_keys.call(null, p1__11198_SHARP_, kmap);
  }, xrel));
};
clojure.set.index = function clojure$set$index(xrel, ks) {
  return cljs.core.reduce.call(null, function(m, x) {
    var ik = cljs.core.select_keys.call(null, x, ks);
    return cljs.core.assoc.call(null, m, ik, cljs.core.conj.call(null, cljs.core.get.call(null, m, ik, cljs.core.PersistentHashSet.EMPTY), x));
  }, cljs.core.PersistentArrayMap.EMPTY, xrel);
};
clojure.set.map_invert = function clojure$set$map_invert(m) {
  return cljs.core.reduce.call(null, function(m__$1, p__11201) {
    var vec__11202 = p__11201;
    var k = cljs.core.nth.call(null, vec__11202, 0, null);
    var v = cljs.core.nth.call(null, vec__11202, 1, null);
    return cljs.core.assoc.call(null, m__$1, v, k);
  }, cljs.core.PersistentArrayMap.EMPTY, m);
};
clojure.set.join = function clojure$set$join(var_args) {
  var args11207 = [];
  var len__7198__auto___11212 = arguments.length;
  var i__7199__auto___11213 = 0;
  while (true) {
    if (i__7199__auto___11213 < len__7198__auto___11212) {
      args11207.push(arguments[i__7199__auto___11213]);
      var G__11214 = i__7199__auto___11213 + 1;
      i__7199__auto___11213 = G__11214;
      continue;
    } else {
    }
    break;
  }
  var G__11209 = args11207.length;
  switch(G__11209) {
    case 2:
      return clojure.set.join.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return clojure.set.join.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args11207.length)].join(""));;
  }
};
clojure.set.join.cljs$core$IFn$_invoke$arity$2 = function(xrel, yrel) {
  if (cljs.core.seq.call(null, xrel) && cljs.core.seq.call(null, yrel)) {
    var ks = clojure.set.intersection.call(null, cljs.core.set.call(null, cljs.core.keys.call(null, cljs.core.first.call(null, xrel))), cljs.core.set.call(null, cljs.core.keys.call(null, cljs.core.first.call(null, yrel))));
    var vec__11210 = cljs.core.count.call(null, xrel) <= cljs.core.count.call(null, yrel) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [xrel, yrel], null) : new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [yrel, xrel], null);
    var r = cljs.core.nth.call(null, vec__11210, 0, null);
    var s = cljs.core.nth.call(null, vec__11210, 1, null);
    var idx = clojure.set.index.call(null, r, ks);
    return cljs.core.reduce.call(null, function(ks, vec__11210, r, s, idx) {
      return function(ret, x) {
        var found = idx.call(null, cljs.core.select_keys.call(null, x, ks));
        if (cljs.core.truth_(found)) {
          return cljs.core.reduce.call(null, function(found, ks, vec__11210, r, s, idx) {
            return function(p1__11203_SHARP_, p2__11204_SHARP_) {
              return cljs.core.conj.call(null, p1__11203_SHARP_, cljs.core.merge.call(null, p2__11204_SHARP_, x));
            };
          }(found, ks, vec__11210, r, s, idx), ret, found);
        } else {
          return ret;
        }
      };
    }(ks, vec__11210, r, s, idx), cljs.core.PersistentHashSet.EMPTY, s);
  } else {
    return cljs.core.PersistentHashSet.EMPTY;
  }
};
clojure.set.join.cljs$core$IFn$_invoke$arity$3 = function(xrel, yrel, km) {
  var vec__11211 = cljs.core.count.call(null, xrel) <= cljs.core.count.call(null, yrel) ? new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [xrel, yrel, clojure.set.map_invert.call(null, km)], null) : new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [yrel, xrel, km], null);
  var r = cljs.core.nth.call(null, vec__11211, 0, null);
  var s = cljs.core.nth.call(null, vec__11211, 1, null);
  var k = cljs.core.nth.call(null, vec__11211, 2, null);
  var idx = clojure.set.index.call(null, r, cljs.core.vals.call(null, k));
  return cljs.core.reduce.call(null, function(vec__11211, r, s, k, idx) {
    return function(ret, x) {
      var found = idx.call(null, clojure.set.rename_keys.call(null, cljs.core.select_keys.call(null, x, cljs.core.keys.call(null, k)), k));
      if (cljs.core.truth_(found)) {
        return cljs.core.reduce.call(null, function(found, vec__11211, r, s, k, idx) {
          return function(p1__11205_SHARP_, p2__11206_SHARP_) {
            return cljs.core.conj.call(null, p1__11205_SHARP_, cljs.core.merge.call(null, p2__11206_SHARP_, x));
          };
        }(found, vec__11211, r, s, k, idx), ret, found);
      } else {
        return ret;
      }
    };
  }(vec__11211, r, s, k, idx), cljs.core.PersistentHashSet.EMPTY, s);
};
clojure.set.join.cljs$lang$maxFixedArity = 3;
clojure.set.subset_QMARK_ = function clojure$set$subset_QMARK_(set1, set2) {
  return cljs.core.count.call(null, set1) <= cljs.core.count.call(null, set2) && cljs.core.every_QMARK_.call(null, function(p1__11216_SHARP_) {
    return cljs.core.contains_QMARK_.call(null, set2, p1__11216_SHARP_);
  }, set1);
};
clojure.set.superset_QMARK_ = function clojure$set$superset_QMARK_(set1, set2) {
  return cljs.core.count.call(null, set1) >= cljs.core.count.call(null, set2) && cljs.core.every_QMARK_.call(null, function(p1__11217_SHARP_) {
    return cljs.core.contains_QMARK_.call(null, set1, p1__11217_SHARP_);
  }, set2);
};
goog.provide("clojure.string");
goog.require("cljs.core");
goog.require("goog.string");
goog.require("goog.string.StringBuffer");
clojure.string.seq_reverse = function clojure$string$seq_reverse(coll) {
  return cljs.core.reduce.call(null, cljs.core.conj, cljs.core.List.EMPTY, coll);
};
clojure.string.re_surrogate_pair = new RegExp("([\\uD800-\\uDBFF])([\\uDC00-\\uDFFF])", "g");
clojure.string.reverse = function clojure$string$reverse(s) {
  return s.replace(clojure.string.re_surrogate_pair, "$2$1").split("").reverse().join("");
};
clojure.string.replace_all = function clojure$string$replace_all(s, re, replacement) {
  return s.replace(new RegExp(re.source, "g"), replacement);
};
clojure.string.replace_with = function clojure$string$replace_with(f) {
  return function() {
    var G__11288__delegate = function(args) {
      var matches = cljs.core.drop_last.call(null, 2, args);
      if (cljs.core._EQ_.call(null, cljs.core.count.call(null, matches), 1)) {
        return f.call(null, cljs.core.first.call(null, matches));
      } else {
        return f.call(null, cljs.core.vec.call(null, matches));
      }
    };
    var G__11288 = function(var_args) {
      var args = null;
      if (arguments.length > 0) {
        var G__11289__i = 0, G__11289__a = new Array(arguments.length - 0);
        while (G__11289__i < G__11289__a.length) {
          G__11289__a[G__11289__i] = arguments[G__11289__i + 0];
          ++G__11289__i;
        }
        args = new cljs.core.IndexedSeq(G__11289__a, 0);
      }
      return G__11288__delegate.call(this, args);
    };
    G__11288.cljs$lang$maxFixedArity = 0;
    G__11288.cljs$lang$applyTo = function(arglist__11290) {
      var args = cljs.core.seq(arglist__11290);
      return G__11288__delegate(args);
    };
    G__11288.cljs$core$IFn$_invoke$arity$variadic = G__11288__delegate;
    return G__11288;
  }();
};
clojure.string.replace = function clojure$string$replace(s, match, replacement) {
  if (typeof match === "string") {
    return s.replace(new RegExp(goog.string.regExpEscape(match), "g"), replacement);
  } else {
    if (match instanceof RegExp) {
      if (typeof replacement === "string") {
        return clojure.string.replace_all.call(null, s, match, replacement);
      } else {
        return clojure.string.replace_all.call(null, s, match, clojure.string.replace_with.call(null, replacement));
      }
    } else {
      throw [cljs.core.str("Invalid match arg: "), cljs.core.str(match)].join("");
    }
  }
};
clojure.string.replace_first = function clojure$string$replace_first(s, match, replacement) {
  return s.replace(match, replacement);
};
clojure.string.join = function clojure$string$join(var_args) {
  var args11291 = [];
  var len__7198__auto___11294 = arguments.length;
  var i__7199__auto___11295 = 0;
  while (true) {
    if (i__7199__auto___11295 < len__7198__auto___11294) {
      args11291.push(arguments[i__7199__auto___11295]);
      var G__11296 = i__7199__auto___11295 + 1;
      i__7199__auto___11295 = G__11296;
      continue;
    } else {
    }
    break;
  }
  var G__11293 = args11291.length;
  switch(G__11293) {
    case 1:
      return clojure.string.join.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return clojure.string.join.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args11291.length)].join(""));;
  }
};
clojure.string.join.cljs$core$IFn$_invoke$arity$1 = function(coll) {
  var sb = new goog.string.StringBuffer;
  var coll__$1 = cljs.core.seq.call(null, coll);
  while (true) {
    if (!(coll__$1 == null)) {
      var G__11298 = sb.append([cljs.core.str(cljs.core.first.call(null, coll__$1))].join(""));
      var G__11299 = cljs.core.next.call(null, coll__$1);
      sb = G__11298;
      coll__$1 = G__11299;
      continue;
    } else {
      return sb.toString();
    }
    break;
  }
};
clojure.string.join.cljs$core$IFn$_invoke$arity$2 = function(separator, coll) {
  var sb = new goog.string.StringBuffer;
  var coll__$1 = cljs.core.seq.call(null, coll);
  while (true) {
    if (!(coll__$1 == null)) {
      sb.append([cljs.core.str(cljs.core.first.call(null, coll__$1))].join(""));
      var coll__$2 = cljs.core.next.call(null, coll__$1);
      if (coll__$2 == null) {
      } else {
        sb.append(separator);
      }
      var G__11300 = sb;
      var G__11301 = coll__$2;
      sb = G__11300;
      coll__$1 = G__11301;
      continue;
    } else {
      return sb.toString();
    }
    break;
  }
};
clojure.string.join.cljs$lang$maxFixedArity = 2;
clojure.string.upper_case = function clojure$string$upper_case(s) {
  return s.toUpperCase();
};
clojure.string.lower_case = function clojure$string$lower_case(s) {
  return s.toLowerCase();
};
clojure.string.capitalize = function clojure$string$capitalize(s) {
  if (cljs.core.count.call(null, s) < 2) {
    return clojure.string.upper_case.call(null, s);
  } else {
    return [cljs.core.str(clojure.string.upper_case.call(null, cljs.core.subs.call(null, s, 0, 1))), cljs.core.str(clojure.string.lower_case.call(null, cljs.core.subs.call(null, s, 1)))].join("");
  }
};
clojure.string.pop_last_while_empty = function clojure$string$pop_last_while_empty(v) {
  var v__$1 = v;
  while (true) {
    if ("" === cljs.core.peek.call(null, v__$1)) {
      var G__11302 = cljs.core.pop.call(null, v__$1);
      v__$1 = G__11302;
      continue;
    } else {
      return v__$1;
    }
    break;
  }
};
clojure.string.discard_trailing_if_needed = function clojure$string$discard_trailing_if_needed(limit, v) {
  if (0 === limit) {
    return clojure.string.pop_last_while_empty.call(null, v);
  } else {
    return v;
  }
};
clojure.string.split_with_empty_regex = function clojure$string$split_with_empty_regex(s, limit) {
  if (limit <= 0 || limit >= 2 + cljs.core.count.call(null, s)) {
    return cljs.core.conj.call(null, cljs.core.vec.call(null, cljs.core.cons.call(null, "", cljs.core.map.call(null, cljs.core.str, cljs.core.seq.call(null, s)))), "");
  } else {
    var pred__11306 = cljs.core._EQ__EQ_;
    var expr__11307 = limit;
    if (cljs.core.truth_(pred__11306.call(null, 1, expr__11307))) {
      return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [s], null);
    } else {
      if (cljs.core.truth_(pred__11306.call(null, 2, expr__11307))) {
        return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, ["", s], null);
      } else {
        var c = limit - 2;
        return cljs.core.conj.call(null, cljs.core.vec.call(null, cljs.core.cons.call(null, "", cljs.core.subvec.call(null, cljs.core.vec.call(null, cljs.core.map.call(null, cljs.core.str, cljs.core.seq.call(null, s))), 0, c))), cljs.core.subs.call(null, s, c));
      }
    }
  }
};
clojure.string.split = function clojure$string$split(var_args) {
  var args11309 = [];
  var len__7198__auto___11312 = arguments.length;
  var i__7199__auto___11313 = 0;
  while (true) {
    if (i__7199__auto___11313 < len__7198__auto___11312) {
      args11309.push(arguments[i__7199__auto___11313]);
      var G__11314 = i__7199__auto___11313 + 1;
      i__7199__auto___11313 = G__11314;
      continue;
    } else {
    }
    break;
  }
  var G__11311 = args11309.length;
  switch(G__11311) {
    case 2:
      return clojure.string.split.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return clojure.string.split.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args11309.length)].join(""));;
  }
};
clojure.string.split.cljs$core$IFn$_invoke$arity$2 = function(s, re) {
  return clojure.string.split.call(null, s, re, 0);
};
clojure.string.split.cljs$core$IFn$_invoke$arity$3 = function(s, re, limit) {
  return clojure.string.discard_trailing_if_needed.call(null, limit, "/(?:)/" === [cljs.core.str(re)].join("") ? clojure.string.split_with_empty_regex.call(null, s, limit) : limit < 1 ? cljs.core.vec.call(null, [cljs.core.str(s)].join("").split(re)) : function() {
    var s__$1 = s;
    var limit__$1 = limit;
    var parts = cljs.core.PersistentVector.EMPTY;
    while (true) {
      if (1 === limit__$1) {
        return cljs.core.conj.call(null, parts, s__$1);
      } else {
        var m = cljs.core.re_find.call(null, re, s__$1);
        if (!(m == null)) {
          var index = s__$1.indexOf(m);
          var G__11316 = s__$1.substring(index + cljs.core.count.call(null, m));
          var G__11317 = limit__$1 - 1;
          var G__11318 = cljs.core.conj.call(null, parts, s__$1.substring(0, index));
          s__$1 = G__11316;
          limit__$1 = G__11317;
          parts = G__11318;
          continue;
        } else {
          return cljs.core.conj.call(null, parts, s__$1);
        }
      }
      break;
    }
  }());
};
clojure.string.split.cljs$lang$maxFixedArity = 3;
clojure.string.split_lines = function clojure$string$split_lines(s) {
  return clojure.string.split.call(null, s, /\n|\r\n/);
};
clojure.string.trim = function clojure$string$trim(s) {
  return goog.string.trim(s);
};
clojure.string.triml = function clojure$string$triml(s) {
  return goog.string.trimLeft(s);
};
clojure.string.trimr = function clojure$string$trimr(s) {
  return goog.string.trimRight(s);
};
clojure.string.trim_newline = function clojure$string$trim_newline(s) {
  var index = s.length;
  while (true) {
    if (index === 0) {
      return "";
    } else {
      var ch = cljs.core.get.call(null, s, index - 1);
      if ("\n" === ch || "\r" === ch) {
        var G__11319 = index - 1;
        index = G__11319;
        continue;
      } else {
        return s.substring(0, index);
      }
    }
    break;
  }
};
clojure.string.blank_QMARK_ = function clojure$string$blank_QMARK_(s) {
  return goog.string.isEmptySafe(s);
};
clojure.string.escape = function clojure$string$escape(s, cmap) {
  var buffer = new goog.string.StringBuffer;
  var length = s.length;
  var index = 0;
  while (true) {
    if (length === index) {
      return buffer.toString();
    } else {
      var ch = s.charAt(index);
      var replacement = cljs.core.get.call(null, cmap, ch);
      if (!(replacement == null)) {
        buffer.append([cljs.core.str(replacement)].join(""));
      } else {
        buffer.append(ch);
      }
      var G__11320 = index + 1;
      index = G__11320;
      continue;
    }
    break;
  }
};
clojure.string.index_of = function clojure$string$index_of(var_args) {
  var args11321 = [];
  var len__7198__auto___11324 = arguments.length;
  var i__7199__auto___11325 = 0;
  while (true) {
    if (i__7199__auto___11325 < len__7198__auto___11324) {
      args11321.push(arguments[i__7199__auto___11325]);
      var G__11326 = i__7199__auto___11325 + 1;
      i__7199__auto___11325 = G__11326;
      continue;
    } else {
    }
    break;
  }
  var G__11323 = args11321.length;
  switch(G__11323) {
    case 2:
      return clojure.string.index_of.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return clojure.string.index_of.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args11321.length)].join(""));;
  }
};
clojure.string.index_of.cljs$core$IFn$_invoke$arity$2 = function(s, value) {
  var result = s.indexOf(value);
  if (result < 0) {
    return null;
  } else {
    return result;
  }
};
clojure.string.index_of.cljs$core$IFn$_invoke$arity$3 = function(s, value, from_index) {
  var result = s.indexOf(value, from_index);
  if (result < 0) {
    return null;
  } else {
    return result;
  }
};
clojure.string.index_of.cljs$lang$maxFixedArity = 3;
clojure.string.last_index_of = function clojure$string$last_index_of(var_args) {
  var args11328 = [];
  var len__7198__auto___11331 = arguments.length;
  var i__7199__auto___11332 = 0;
  while (true) {
    if (i__7199__auto___11332 < len__7198__auto___11331) {
      args11328.push(arguments[i__7199__auto___11332]);
      var G__11333 = i__7199__auto___11332 + 1;
      i__7199__auto___11332 = G__11333;
      continue;
    } else {
    }
    break;
  }
  var G__11330 = args11328.length;
  switch(G__11330) {
    case 2:
      return clojure.string.last_index_of.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return clojure.string.last_index_of.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args11328.length)].join(""));;
  }
};
clojure.string.last_index_of.cljs$core$IFn$_invoke$arity$2 = function(s, value) {
  var result = s.lastIndexOf(value);
  if (result < 0) {
    return null;
  } else {
    return result;
  }
};
clojure.string.last_index_of.cljs$core$IFn$_invoke$arity$3 = function(s, value, from_index) {
  var result = s.lastIndexOf(value, from_index);
  if (result < 0) {
    return null;
  } else {
    return result;
  }
};
clojure.string.last_index_of.cljs$lang$maxFixedArity = 3;
clojure.string.starts_with_QMARK_ = function clojure$string$starts_with_QMARK_(s, substr) {
  return goog.string.startsWith(s, substr);
};
clojure.string.ends_with_QMARK_ = function clojure$string$ends_with_QMARK_(s, substr) {
  return goog.string.endsWith(s, substr);
};
clojure.string.includes_QMARK_ = function clojure$string$includes_QMARK_(s, substr) {
  return goog.string.contains(s, substr);
};
goog.provide("sablono.util");
goog.require("cljs.core");
goog.require("goog.Uri");
goog.require("clojure.set");
goog.require("clojure.string");
sablono.util._STAR_base_url_STAR_ = null;
sablono.util.ToString = function() {
};
sablono.util.to_str = function sablono$util$to_str(x) {
  if (!(x == null) && !(x.sablono$util$ToString$to_str$arity$1 == null)) {
    return x.sablono$util$ToString$to_str$arity$1(x);
  } else {
    var x__6795__auto__ = x == null ? null : x;
    var m__6796__auto__ = sablono.util.to_str[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, x);
    } else {
      var m__6796__auto____$1 = sablono.util.to_str["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, x);
      } else {
        throw cljs.core.missing_protocol.call(null, "ToString.to-str", x);
      }
    }
  }
};
sablono.util.ToURI = function() {
};
sablono.util.to_uri = function sablono$util$to_uri(x) {
  if (!(x == null) && !(x.sablono$util$ToURI$to_uri$arity$1 == null)) {
    return x.sablono$util$ToURI$to_uri$arity$1(x);
  } else {
    var x__6795__auto__ = x == null ? null : x;
    var m__6796__auto__ = sablono.util.to_uri[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, x);
    } else {
      var m__6796__auto____$1 = sablono.util.to_uri["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, x);
      } else {
        throw cljs.core.missing_protocol.call(null, "ToURI.to-uri", x);
      }
    }
  }
};
sablono.util.as_str = function sablono$util$as_str(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___11338 = arguments.length;
  var i__7199__auto___11339 = 0;
  while (true) {
    if (i__7199__auto___11339 < len__7198__auto___11338) {
      args__7205__auto__.push(arguments[i__7199__auto___11339]);
      var G__11340 = i__7199__auto___11339 + 1;
      i__7199__auto___11339 = G__11340;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return sablono.util.as_str.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
sablono.util.as_str.cljs$core$IFn$_invoke$arity$variadic = function(xs) {
  return cljs.core.apply.call(null, cljs.core.str, cljs.core.map.call(null, sablono.util.to_str, xs));
};
sablono.util.as_str.cljs$lang$maxFixedArity = 0;
sablono.util.as_str.cljs$lang$applyTo = function(seq11337) {
  return sablono.util.as_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq11337));
};
sablono.util.camel_case = function sablono$util$camel_case(k) {
  if (cljs.core.truth_(k)) {
    var vec__11342 = clojure.string.split.call(null, cljs.core.name.call(null, k), /-/);
    var first_word = cljs.core.nth.call(null, vec__11342, 0, null);
    var words = cljs.core.nthnext.call(null, vec__11342, 1);
    if (cljs.core.empty_QMARK_.call(null, words) || cljs.core._EQ_.call(null, "aria", first_word) || cljs.core._EQ_.call(null, "data", first_word)) {
      return k;
    } else {
      return cljs.core.keyword.call(null, clojure.string.join.call(null, cljs.core.conj.call(null, cljs.core.map.call(null, clojure.string.capitalize, words), first_word)));
    }
  } else {
    return null;
  }
};
sablono.util.camel_case_keys = function sablono$util$camel_case_keys(m) {
  if (cljs.core.map_QMARK_.call(null, m)) {
    var ks = cljs.core.keys.call(null, m);
    var kmap = cljs.core.zipmap.call(null, ks, cljs.core.map.call(null, sablono.util.camel_case, ks));
    var G__11344 = clojure.set.rename_keys.call(null, m, kmap);
    var G__11344__$1 = cljs.core.map_QMARK_.call(null, (new cljs.core.Keyword(null, "style", "style", -496642736)).cljs$core$IFn$_invoke$arity$1(m)) ? cljs.core.update_in.call(null, G__11344, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "style", "style", -496642736)], null), sablono$util$camel_case_keys) : G__11344;
    return G__11344__$1;
  } else {
    return m;
  }
};
sablono.util.html_to_dom_attrs = function sablono$util$html_to_dom_attrs(attrs) {
  return clojure.set.rename_keys.call(null, sablono.util.camel_case_keys.call(null, attrs), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "class", "class", -2030961996), new cljs.core.Keyword(null, "className", "className", -1983287057), new cljs.core.Keyword(null, "for", "for", -1323786319), new cljs.core.Keyword(null, "htmlFor", "htmlFor", -1050291720)], null));
};
sablono.util.compact_map = function sablono$util$compact_map(m) {
  return cljs.core.reduce.call(null, function(m__$1, k) {
    var v = cljs.core.get.call(null, m__$1, k);
    if (cljs.core.empty_QMARK_.call(null, v)) {
      return cljs.core.dissoc.call(null, m__$1, k);
    } else {
      return m__$1;
    }
  }, m, cljs.core.keys.call(null, m));
};
sablono.util.merge_with_class = function sablono$util$merge_with_class(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___11347 = arguments.length;
  var i__7199__auto___11348 = 0;
  while (true) {
    if (i__7199__auto___11348 < len__7198__auto___11347) {
      args__7205__auto__.push(arguments[i__7199__auto___11348]);
      var G__11349 = i__7199__auto___11348 + 1;
      i__7199__auto___11348 = G__11349;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return sablono.util.merge_with_class.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
sablono.util.merge_with_class.cljs$core$IFn$_invoke$arity$variadic = function(maps) {
  var classes = cljs.core.vec.call(null, cljs.core.remove.call(null, cljs.core.nil_QMARK_, cljs.core.mapcat.call(null, function(p1__11345_SHARP_) {
    if (cljs.core.list_QMARK_.call(null, p1__11345_SHARP_)) {
      return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [p1__11345_SHARP_], null);
    } else {
      if (cljs.core.sequential_QMARK_.call(null, p1__11345_SHARP_)) {
        return p1__11345_SHARP_;
      } else {
        return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [p1__11345_SHARP_], null);
      }
    }
  }, cljs.core.map.call(null, new cljs.core.Keyword(null, "class", "class", -2030961996), maps))));
  var maps__$1 = cljs.core.apply.call(null, cljs.core.merge, maps);
  if (cljs.core.empty_QMARK_.call(null, classes)) {
    return maps__$1;
  } else {
    return cljs.core.assoc.call(null, maps__$1, new cljs.core.Keyword(null, "class", "class", -2030961996), classes);
  }
};
sablono.util.merge_with_class.cljs$lang$maxFixedArity = 0;
sablono.util.merge_with_class.cljs$lang$applyTo = function(seq11346) {
  return sablono.util.merge_with_class.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq11346));
};
sablono.util.strip_css = function sablono$util$strip_css(s) {
  if (cljs.core.truth_(s)) {
    return clojure.string.replace.call(null, s, /^[.#]/, "");
  } else {
    return null;
  }
};
sablono.util.match_tag = function sablono$util$match_tag(s) {
  var matches = cljs.core.re_seq.call(null, /[#.]?[^#.]+/, cljs.core.name.call(null, s));
  var vec__11353 = cljs.core.empty_QMARK_.call(null, matches) ? function() {
    throw cljs.core.ex_info.call(null, [cljs.core.str("Can't match CSS tag: "), cljs.core.str(s)].join(""), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "tag", "tag", -1290361223), s], null));
  }() : cljs.core.truth_((new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, ["#", null, ".", null], null), null)).call(null, cljs.core.ffirst.call(null, matches))) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, ["div", matches], null) : new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.first.call(null, matches), cljs.core.rest.call(null, matches)], null);
  var tag_name = cljs.core.nth.call(null, vec__11353, 0, null);
  var names = cljs.core.nth.call(null, vec__11353, 1, null);
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag_name, cljs.core.first.call(null, cljs.core.map.call(null, sablono.util.strip_css, cljs.core.filter.call(null, function(matches, vec__11353, tag_name, names) {
    return function(p1__11350_SHARP_) {
      return cljs.core._EQ_.call(null, "#", cljs.core.first.call(null, p1__11350_SHARP_));
    };
  }(matches, vec__11353, tag_name, names), names))), cljs.core.vec.call(null, cljs.core.map.call(null, sablono.util.strip_css, cljs.core.filter.call(null, function(matches, vec__11353, tag_name, names) {
    return function(p1__11351_SHARP_) {
      return cljs.core._EQ_.call(null, ".", cljs.core.first.call(null, p1__11351_SHARP_));
    };
  }(matches, vec__11353, tag_name, names), names)))], null);
};
sablono.util.normalize_element = function sablono$util$normalize_element(p__11354) {
  var vec__11357 = p__11354;
  var tag = cljs.core.nth.call(null, vec__11357, 0, null);
  var content = cljs.core.nthnext.call(null, vec__11357, 1);
  if (!(tag instanceof cljs.core.Keyword || tag instanceof cljs.core.Symbol || typeof tag === "string")) {
    throw cljs.core.ex_info.call(null, [cljs.core.str(tag), cljs.core.str(" is not a valid element name.")].join(""), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "tag", "tag", -1290361223), tag, new cljs.core.Keyword(null, "content", "content", 15833224), content], null));
  } else {
  }
  var vec__11358 = sablono.util.match_tag.call(null, tag);
  var tag__$1 = cljs.core.nth.call(null, vec__11358, 0, null);
  var id = cljs.core.nth.call(null, vec__11358, 1, null);
  var class$ = cljs.core.nth.call(null, vec__11358, 2, null);
  var tag_attrs = sablono.util.compact_map.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "id", "id", -1388402092), id, new cljs.core.Keyword(null, "class", "class", -2030961996), class$], null));
  var map_attrs = cljs.core.first.call(null, content);
  if (cljs.core.map_QMARK_.call(null, map_attrs)) {
    return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag__$1, sablono.util.merge_with_class.call(null, tag_attrs, map_attrs), cljs.core.next.call(null, content)], null);
  } else {
    return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag__$1, tag_attrs, content], null);
  }
};
sablono.util.join_classes = function sablono$util$join_classes(classes) {
  return clojure.string.join.call(null, " ", cljs.core.flatten.call(null, classes));
};
sablono.util.wrapped_type_QMARK_ = function sablono$util$wrapped_type_QMARK_(type) {
  return cljs.core.contains_QMARK_.call(null, new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "textarea", "textarea", -650375824), null, new cljs.core.Keyword(null, "option", "option", 65132272), null, new cljs.core.Keyword(null, "input", "input", 556931961), null], null), null), cljs.core.keyword.call(null, type));
};
sablono.util.react_fn = function sablono$util$react_fn(type) {
  if (cljs.core.truth_(sablono.util.wrapped_type_QMARK_.call(null, type))) {
    return new cljs.core.Symbol("sablono.interpreter", "create-element", "sablono.interpreter/create-element", 748785555, null);
  } else {
    return new cljs.core.Symbol("js", "React.createElement", "js/React.createElement", 1766367641, null);
  }
};
sablono.util.attr_pattern = function sablono$util$attr_pattern(attr) {
  return cljs.core.re_pattern.call(null, [cljs.core.str("\\s+"), cljs.core.str(cljs.core.name.call(null, attr)), cljs.core.str("\\s*\x3d\\s*['\"][^\"']+['\"]")].join(""));
};
sablono.util.strip_attr = function sablono$util$strip_attr(s, attr) {
  if (cljs.core.truth_(s)) {
    return clojure.string.replace.call(null, s, sablono.util.attr_pattern.call(null, attr), "");
  } else {
    return null;
  }
};
sablono.util.strip_outer = function sablono$util$strip_outer(s) {
  if (cljs.core.truth_(s)) {
    return clojure.string.replace.call(null, clojure.string.replace.call(null, s, /^\s*<[^>]+>\s*/, ""), /\s*<\/[^>]+>\s*$/, "");
  } else {
    return null;
  }
};
cljs.core.Keyword.prototype.sablono$util$ToString$ = true;
cljs.core.Keyword.prototype.sablono$util$ToString$to_str$arity$1 = function(x) {
  var x__$1 = this;
  return cljs.core.name.call(null, x__$1);
};
goog.Uri.prototype.sablono$util$ToString$ = true;
goog.Uri.prototype.sablono$util$ToString$to_str$arity$1 = function(x) {
  var x__$1 = this;
  if (cljs.core.truth_(function() {
    var or__6140__auto__ = x__$1.hasDomain();
    if (cljs.core.truth_(or__6140__auto__)) {
      return or__6140__auto__;
    } else {
      return x__$1.getPath() == null || cljs.core.not.call(null, cljs.core.re_matches.call(null, /^\/.*/, x__$1.getPath()));
    }
  }())) {
    return [cljs.core.str(x__$1)].join("");
  } else {
    var base = [cljs.core.str(sablono.util._STAR_base_url_STAR_)].join("");
    if (cljs.core.truth_(cljs.core.re_matches.call(null, /.*\/$/, base))) {
      return [cljs.core.str(cljs.core.subs.call(null, base, 0, cljs.core.count.call(null, base) - 1)), cljs.core.str(x__$1)].join("");
    } else {
      return [cljs.core.str(base), cljs.core.str(x__$1)].join("");
    }
  }
};
sablono.util.ToString["null"] = true;
sablono.util.to_str["null"] = function(_) {
  return "";
};
sablono.util.ToString["number"] = true;
sablono.util.to_str["number"] = function(x) {
  return [cljs.core.str(x)].join("");
};
sablono.util.ToString["_"] = true;
sablono.util.to_str["_"] = function(x) {
  return [cljs.core.str(x)].join("");
};
goog.Uri.prototype.sablono$util$ToURI$ = true;
goog.Uri.prototype.sablono$util$ToURI$to_uri$arity$1 = function(x) {
  var x__$1 = this;
  return x__$1;
};
sablono.util.ToURI["_"] = true;
sablono.util.to_uri["_"] = function(x) {
  return new goog.Uri([cljs.core.str(x)].join(""));
};
goog.provide("sablono.interpreter");
goog.require("cljs.core");
goog.require("clojure.string");
goog.require("sablono.util");
goog.require("goog.object");
sablono.interpreter.IInterpreter = function() {
};
sablono.interpreter.interpret = function sablono$interpreter$interpret(this$) {
  if (!(this$ == null) && !(this$.sablono$interpreter$IInterpreter$interpret$arity$1 == null)) {
    return this$.sablono$interpreter$IInterpreter$interpret$arity$1(this$);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = sablono.interpreter.interpret[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$);
    } else {
      var m__6796__auto____$1 = sablono.interpreter.interpret["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$);
      } else {
        throw cljs.core.missing_protocol.call(null, "IInterpreter.interpret", this$);
      }
    }
  }
};
sablono.interpreter.wrap_form_element = function sablono$interpreter$wrap_form_element(ctor, display_name) {
  return React.createFactory(React.createClass({"getDisplayName":function() {
    return cljs.core.name.call(null, display_name);
  }, "getInitialState":function() {
    var this$ = this;
    return {"value":this$.props["value"]};
  }, "onChange":function(e) {
    var this$ = this;
    var handler = this$.props["onChange"];
    if (handler == null) {
      return null;
    } else {
      handler.call(null, e);
      return this$.setState({"value":e.target.value});
    }
  }, "componentWillReceiveProps":function(new_props) {
    var this$ = this;
    return this$.setState({"value":new_props["value"]});
  }, "render":function() {
    var this$ = this;
    var props = {};
    goog.object.extend(props, this$.props, {"value":this$.state["value"], "onChange":this$["onChange"], "children":this$.props["children"]});
    return ctor.call(null, props);
  }}));
};
sablono.interpreter.input = sablono.interpreter.wrap_form_element.call(null, React.DOM.input, "input");
sablono.interpreter.option = sablono.interpreter.wrap_form_element.call(null, React.DOM.option, "option");
sablono.interpreter.textarea = sablono.interpreter.wrap_form_element.call(null, React.DOM.textarea, "textarea");
sablono.interpreter.create_element = function sablono$interpreter$create_element(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___12612 = arguments.length;
  var i__7199__auto___12613 = 0;
  while (true) {
    if (i__7199__auto___12613 < len__7198__auto___12612) {
      args__7205__auto__.push(arguments[i__7199__auto___12613]);
      var G__12614 = i__7199__auto___12613 + 1;
      i__7199__auto___12613 = G__12614;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 2 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(2), 0) : null;
  return sablono.interpreter.create_element.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7206__auto__);
};
sablono.interpreter.create_element.cljs$core$IFn$_invoke$arity$variadic = function(type, props, children) {
  return (cljs.core.truth_(sablono.util.wrapped_type_QMARK_.call(null, type)) ? cljs.core.get.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "input", "input", 556931961), sablono.interpreter.input, new cljs.core.Keyword(null, "option", "option", 65132272), sablono.interpreter.option, new cljs.core.Keyword(null, "textarea", "textarea", -650375824), sablono.interpreter.textarea], null), cljs.core.keyword.call(null, type)) : cljs.core.partial.call(null, React.createElement, 
  cljs.core.name.call(null, type))).call(null, props, cljs.core.sequential_QMARK_.call(null, children) && cljs.core._EQ_.call(null, 1, cljs.core.count.call(null, children)) ? cljs.core.first.call(null, children) : children);
};
sablono.interpreter.create_element.cljs$lang$maxFixedArity = 2;
sablono.interpreter.create_element.cljs$lang$applyTo = function(seq12609) {
  var G__12610 = cljs.core.first.call(null, seq12609);
  var seq12609__$1 = cljs.core.next.call(null, seq12609);
  var G__12611 = cljs.core.first.call(null, seq12609__$1);
  var seq12609__$2 = cljs.core.next.call(null, seq12609__$1);
  return sablono.interpreter.create_element.cljs$core$IFn$_invoke$arity$variadic(G__12610, G__12611, seq12609__$2);
};
sablono.interpreter.attributes = function sablono$interpreter$attributes(attrs) {
  var attrs__$1 = cljs.core.clj__GT_js.call(null, sablono.util.html_to_dom_attrs.call(null, attrs));
  var class$ = attrs__$1.className;
  var class$__$1 = cljs.core.array_QMARK_.call(null, class$) ? clojure.string.join.call(null, " ", class$) : class$;
  if (clojure.string.blank_QMARK_.call(null, class$__$1)) {
    delete attrs__$1["className"];
  } else {
    attrs__$1.className = class$__$1;
  }
  return attrs__$1;
};
sablono.interpreter.element = function sablono$interpreter$element(element__$1) {
  var vec__12616 = sablono.util.normalize_element.call(null, element__$1);
  var type = cljs.core.nth.call(null, vec__12616, 0, null);
  var attrs = cljs.core.nth.call(null, vec__12616, 1, null);
  var content = cljs.core.nth.call(null, vec__12616, 2, null);
  var js_attrs = sablono.interpreter.attributes.call(null, attrs);
  if (cljs.core.sequential_QMARK_.call(null, content) && cljs.core._EQ_.call(null, 1, cljs.core.count.call(null, content))) {
    return sablono.interpreter.create_element.call(null, type, js_attrs, sablono.interpreter.interpret.call(null, cljs.core.first.call(null, content)));
  } else {
    if (cljs.core.truth_(content)) {
      return sablono.interpreter.create_element.call(null, type, js_attrs, sablono.interpreter.interpret.call(null, content));
    } else {
      return sablono.interpreter.create_element.call(null, type, js_attrs, null);
    }
  }
};
sablono.interpreter.interpret_seq = function sablono$interpreter$interpret_seq(s) {
  return cljs.core.into_array.call(null, cljs.core.map.call(null, sablono.interpreter.interpret, s));
};
cljs.core.Cons.prototype.sablono$interpreter$IInterpreter$ = true;
cljs.core.Cons.prototype.sablono$interpreter$IInterpreter$interpret$arity$1 = function(this$) {
  var this$__$1 = this;
  return sablono.interpreter.interpret_seq.call(null, this$__$1);
};
cljs.core.ChunkedSeq.prototype.sablono$interpreter$IInterpreter$ = true;
cljs.core.ChunkedSeq.prototype.sablono$interpreter$IInterpreter$interpret$arity$1 = function(this$) {
  var this$__$1 = this;
  return sablono.interpreter.interpret_seq.call(null, this$__$1);
};
cljs.core.LazySeq.prototype.sablono$interpreter$IInterpreter$ = true;
cljs.core.LazySeq.prototype.sablono$interpreter$IInterpreter$interpret$arity$1 = function(this$) {
  var this$__$1 = this;
  return sablono.interpreter.interpret_seq.call(null, this$__$1);
};
cljs.core.List.prototype.sablono$interpreter$IInterpreter$ = true;
cljs.core.List.prototype.sablono$interpreter$IInterpreter$interpret$arity$1 = function(this$) {
  var this$__$1 = this;
  return sablono.interpreter.interpret_seq.call(null, this$__$1);
};
cljs.core.IndexedSeq.prototype.sablono$interpreter$IInterpreter$ = true;
cljs.core.IndexedSeq.prototype.sablono$interpreter$IInterpreter$interpret$arity$1 = function(this$) {
  var this$__$1 = this;
  return sablono.interpreter.interpret_seq.call(null, this$__$1);
};
cljs.core.Subvec.prototype.sablono$interpreter$IInterpreter$ = true;
cljs.core.Subvec.prototype.sablono$interpreter$IInterpreter$interpret$arity$1 = function(this$) {
  var this$__$1 = this;
  return sablono.interpreter.element.call(null, this$__$1);
};
cljs.core.PersistentVector.prototype.sablono$interpreter$IInterpreter$ = true;
cljs.core.PersistentVector.prototype.sablono$interpreter$IInterpreter$interpret$arity$1 = function(this$) {
  var this$__$1 = this;
  return sablono.interpreter.element.call(null, this$__$1);
};
sablono.interpreter.IInterpreter["_"] = true;
sablono.interpreter.interpret["_"] = function(this$) {
  return this$;
};
sablono.interpreter.IInterpreter["null"] = true;
sablono.interpreter.interpret["null"] = function(this$) {
  return null;
};
goog.provide("clojure.walk");
goog.require("cljs.core");
clojure.walk.walk = function clojure$walk$walk(inner, outer, form) {
  if (cljs.core.list_QMARK_.call(null, form)) {
    return outer.call(null, cljs.core.apply.call(null, cljs.core.list, cljs.core.map.call(null, inner, form)));
  } else {
    if (cljs.core.seq_QMARK_.call(null, form)) {
      return outer.call(null, cljs.core.doall.call(null, cljs.core.map.call(null, inner, form)));
    } else {
      if (cljs.core.record_QMARK_.call(null, form)) {
        return outer.call(null, cljs.core.reduce.call(null, function(r, x) {
          return cljs.core.conj.call(null, r, inner.call(null, x));
        }, form, form));
      } else {
        if (cljs.core.coll_QMARK_.call(null, form)) {
          return outer.call(null, cljs.core.into.call(null, cljs.core.empty.call(null, form), cljs.core.map.call(null, inner, form)));
        } else {
          return outer.call(null, form);
        }
      }
    }
  }
};
clojure.walk.postwalk = function clojure$walk$postwalk(f, form) {
  return clojure.walk.walk.call(null, cljs.core.partial.call(null, clojure$walk$postwalk, f), f, form);
};
clojure.walk.prewalk = function clojure$walk$prewalk(f, form) {
  return clojure.walk.walk.call(null, cljs.core.partial.call(null, clojure$walk$prewalk, f), cljs.core.identity, f.call(null, form));
};
clojure.walk.keywordize_keys = function clojure$walk$keywordize_keys(m) {
  var f = function(p__12621) {
    var vec__12622 = p__12621;
    var k = cljs.core.nth.call(null, vec__12622, 0, null);
    var v = cljs.core.nth.call(null, vec__12622, 1, null);
    if (typeof k === "string") {
      return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.call(null, k), v], null);
    } else {
      return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [k, v], null);
    }
  };
  return clojure.walk.postwalk.call(null, function(f) {
    return function(x) {
      if (cljs.core.map_QMARK_.call(null, x)) {
        return cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, cljs.core.map.call(null, f, x));
      } else {
        return x;
      }
    };
  }(f), m);
};
clojure.walk.stringify_keys = function clojure$walk$stringify_keys(m) {
  var f = function(p__12625) {
    var vec__12626 = p__12625;
    var k = cljs.core.nth.call(null, vec__12626, 0, null);
    var v = cljs.core.nth.call(null, vec__12626, 1, null);
    if (k instanceof cljs.core.Keyword) {
      return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.name.call(null, k), v], null);
    } else {
      return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [k, v], null);
    }
  };
  return clojure.walk.postwalk.call(null, function(f) {
    return function(x) {
      if (cljs.core.map_QMARK_.call(null, x)) {
        return cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, cljs.core.map.call(null, f, x));
      } else {
        return x;
      }
    };
  }(f), m);
};
clojure.walk.prewalk_replace = function clojure$walk$prewalk_replace(smap, form) {
  return clojure.walk.prewalk.call(null, function(x) {
    if (cljs.core.contains_QMARK_.call(null, smap, x)) {
      return smap.call(null, x);
    } else {
      return x;
    }
  }, form);
};
clojure.walk.postwalk_replace = function clojure$walk$postwalk_replace(smap, form) {
  return clojure.walk.postwalk.call(null, function(x) {
    if (cljs.core.contains_QMARK_.call(null, smap, x)) {
      return smap.call(null, x);
    } else {
      return x;
    }
  }, form);
};
goog.provide("sablono.core");
goog.require("cljs.core");
goog.require("clojure.string");
goog.require("clojure.walk");
goog.require("sablono.util");
goog.require("sablono.interpreter");
goog.require("goog.dom");
sablono.core.wrap_attrs = function sablono$core$wrap_attrs(func) {
  return function() {
    var G__13251__delegate = function(args) {
      if (cljs.core.map_QMARK_.call(null, cljs.core.first.call(null, args))) {
        var vec__13250 = cljs.core.apply.call(null, func, cljs.core.rest.call(null, args));
        var tag = cljs.core.nth.call(null, vec__13250, 0, null);
        var body = cljs.core.nthnext.call(null, vec__13250, 1);
        if (cljs.core.map_QMARK_.call(null, cljs.core.first.call(null, body))) {
          return cljs.core.apply.call(null, cljs.core.vector, tag, cljs.core.merge.call(null, cljs.core.first.call(null, body), cljs.core.first.call(null, args)), cljs.core.rest.call(null, body));
        } else {
          return cljs.core.apply.call(null, cljs.core.vector, tag, cljs.core.first.call(null, args), body);
        }
      } else {
        return cljs.core.apply.call(null, func, args);
      }
    };
    var G__13251 = function(var_args) {
      var args = null;
      if (arguments.length > 0) {
        var G__13252__i = 0, G__13252__a = new Array(arguments.length - 0);
        while (G__13252__i < G__13252__a.length) {
          G__13252__a[G__13252__i] = arguments[G__13252__i + 0];
          ++G__13252__i;
        }
        args = new cljs.core.IndexedSeq(G__13252__a, 0);
      }
      return G__13251__delegate.call(this, args);
    };
    G__13251.cljs$lang$maxFixedArity = 0;
    G__13251.cljs$lang$applyTo = function(arglist__13253) {
      var args = cljs.core.seq(arglist__13253);
      return G__13251__delegate(args);
    };
    G__13251.cljs$core$IFn$_invoke$arity$variadic = G__13251__delegate;
    return G__13251;
  }();
};
sablono.core.update_arglists = function sablono$core$update_arglists(arglists) {
  var iter__6912__auto__ = function sablono$core$update_arglists_$_iter__13258(s__13259) {
    return new cljs.core.LazySeq(null, function() {
      var s__13259__$1 = s__13259;
      while (true) {
        var temp__4425__auto__ = cljs.core.seq.call(null, s__13259__$1);
        if (temp__4425__auto__) {
          var s__13259__$2 = temp__4425__auto__;
          if (cljs.core.chunked_seq_QMARK_.call(null, s__13259__$2)) {
            var c__6910__auto__ = cljs.core.chunk_first.call(null, s__13259__$2);
            var size__6911__auto__ = cljs.core.count.call(null, c__6910__auto__);
            var b__13261 = cljs.core.chunk_buffer.call(null, size__6911__auto__);
            if (function() {
              var i__13260 = 0;
              while (true) {
                if (i__13260 < size__6911__auto__) {
                  var args = cljs.core._nth.call(null, c__6910__auto__, i__13260);
                  cljs.core.chunk_append.call(null, b__13261, cljs.core.vec.call(null, cljs.core.cons.call(null, new cljs.core.Symbol(null, "attr-map?", "attr-map?", 116307443, null), args)));
                  var G__13262 = i__13260 + 1;
                  i__13260 = G__13262;
                  continue;
                } else {
                  return true;
                }
                break;
              }
            }()) {
              return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__13261), sablono$core$update_arglists_$_iter__13258.call(null, cljs.core.chunk_rest.call(null, s__13259__$2)));
            } else {
              return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__13261), null);
            }
          } else {
            var args = cljs.core.first.call(null, s__13259__$2);
            return cljs.core.cons.call(null, cljs.core.vec.call(null, cljs.core.cons.call(null, new cljs.core.Symbol(null, "attr-map?", "attr-map?", 116307443, null), args)), sablono$core$update_arglists_$_iter__13258.call(null, cljs.core.rest.call(null, s__13259__$2)));
          }
        } else {
          return null;
        }
        break;
      }
    }, null, null);
  };
  return iter__6912__auto__.call(null, arglists);
};
sablono.core.render = function sablono$core$render(element) {
  if (cljs.core.truth_(element)) {
    return React.renderToString(element);
  } else {
    return null;
  }
};
sablono.core.render_static = function sablono$core$render_static(element) {
  if (cljs.core.truth_(element)) {
    return React.renderToStaticMarkup(element);
  } else {
    return null;
  }
};
sablono.core.include_css = function sablono$core$include_css(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___13268 = arguments.length;
  var i__7199__auto___13269 = 0;
  while (true) {
    if (i__7199__auto___13269 < len__7198__auto___13268) {
      args__7205__auto__.push(arguments[i__7199__auto___13269]);
      var G__13270 = i__7199__auto___13269 + 1;
      i__7199__auto___13269 = G__13270;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return sablono.core.include_css.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
sablono.core.include_css.cljs$core$IFn$_invoke$arity$variadic = function(styles) {
  var iter__6912__auto__ = function sablono$core$iter__13264(s__13265) {
    return new cljs.core.LazySeq(null, function() {
      var s__13265__$1 = s__13265;
      while (true) {
        var temp__4425__auto__ = cljs.core.seq.call(null, s__13265__$1);
        if (temp__4425__auto__) {
          var s__13265__$2 = temp__4425__auto__;
          if (cljs.core.chunked_seq_QMARK_.call(null, s__13265__$2)) {
            var c__6910__auto__ = cljs.core.chunk_first.call(null, s__13265__$2);
            var size__6911__auto__ = cljs.core.count.call(null, c__6910__auto__);
            var b__13267 = cljs.core.chunk_buffer.call(null, size__6911__auto__);
            if (function() {
              var i__13266 = 0;
              while (true) {
                if (i__13266 < size__6911__auto__) {
                  var style = cljs.core._nth.call(null, c__6910__auto__, i__13266);
                  cljs.core.chunk_append.call(null, b__13267, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "link", "link", -1769163468), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "type", "type", 1174270348), "text/css", new cljs.core.Keyword(null, "href", "href", -793805698), sablono.util.as_str.call(null, style), new cljs.core.Keyword(null, "rel", "rel", 1378823488), "stylesheet"], null)], null));
                  var G__13271 = i__13266 + 1;
                  i__13266 = G__13271;
                  continue;
                } else {
                  return true;
                }
                break;
              }
            }()) {
              return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__13267), sablono$core$iter__13264.call(null, cljs.core.chunk_rest.call(null, s__13265__$2)));
            } else {
              return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__13267), null);
            }
          } else {
            var style = cljs.core.first.call(null, s__13265__$2);
            return cljs.core.cons.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "link", "link", -1769163468), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "type", "type", 1174270348), "text/css", new cljs.core.Keyword(null, "href", "href", -793805698), sablono.util.as_str.call(null, style), new cljs.core.Keyword(null, "rel", "rel", 1378823488), "stylesheet"], null)], null), sablono$core$iter__13264.call(null, 
            cljs.core.rest.call(null, s__13265__$2)));
          }
        } else {
          return null;
        }
        break;
      }
    }, null, null);
  };
  return iter__6912__auto__.call(null, styles);
};
sablono.core.include_css.cljs$lang$maxFixedArity = 0;
sablono.core.include_css.cljs$lang$applyTo = function(seq13263) {
  return sablono.core.include_css.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq13263));
};
sablono.core.include_js = function sablono$core$include_js(src) {
  return goog.dom.appendChild(goog.dom.getDocument().body, goog.dom.createDom("script", {"src":src}));
};
sablono.core.include_react = function sablono$core$include_react() {
  return sablono.core.include_js.call(null, "http://fb.me/react-0.12.2.js");
};
sablono.core.link_to13272 = function sablono$core$link_to13272(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___13275 = arguments.length;
  var i__7199__auto___13276 = 0;
  while (true) {
    if (i__7199__auto___13276 < len__7198__auto___13275) {
      args__7205__auto__.push(arguments[i__7199__auto___13276]);
      var G__13277 = i__7199__auto___13276 + 1;
      i__7199__auto___13276 = G__13277;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return sablono.core.link_to13272.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
sablono.core.link_to13272.cljs$core$IFn$_invoke$arity$variadic = function(url, content) {
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "a", "a", -2123407586), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "href", "href", -793805698), sablono.util.as_str.call(null, url)], null), content], null);
};
sablono.core.link_to13272.cljs$lang$maxFixedArity = 1;
sablono.core.link_to13272.cljs$lang$applyTo = function(seq13273) {
  var G__13274 = cljs.core.first.call(null, seq13273);
  var seq13273__$1 = cljs.core.next.call(null, seq13273);
  return sablono.core.link_to13272.cljs$core$IFn$_invoke$arity$variadic(G__13274, seq13273__$1);
};
sablono.core.link_to = sablono.core.wrap_attrs.call(null, sablono.core.link_to13272);
sablono.core.mail_to13278 = function sablono$core$mail_to13278(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___13283 = arguments.length;
  var i__7199__auto___13284 = 0;
  while (true) {
    if (i__7199__auto___13284 < len__7198__auto___13283) {
      args__7205__auto__.push(arguments[i__7199__auto___13284]);
      var G__13285 = i__7199__auto___13284 + 1;
      i__7199__auto___13284 = G__13285;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return sablono.core.mail_to13278.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
sablono.core.mail_to13278.cljs$core$IFn$_invoke$arity$variadic = function(e_mail, p__13281) {
  var vec__13282 = p__13281;
  var content = cljs.core.nth.call(null, vec__13282, 0, null);
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "a", "a", -2123407586), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "href", "href", -793805698), [cljs.core.str("mailto:"), cljs.core.str(e_mail)].join("")], null), function() {
    var or__6140__auto__ = content;
    if (cljs.core.truth_(or__6140__auto__)) {
      return or__6140__auto__;
    } else {
      return e_mail;
    }
  }()], null);
};
sablono.core.mail_to13278.cljs$lang$maxFixedArity = 1;
sablono.core.mail_to13278.cljs$lang$applyTo = function(seq13279) {
  var G__13280 = cljs.core.first.call(null, seq13279);
  var seq13279__$1 = cljs.core.next.call(null, seq13279);
  return sablono.core.mail_to13278.cljs$core$IFn$_invoke$arity$variadic(G__13280, seq13279__$1);
};
sablono.core.mail_to = sablono.core.wrap_attrs.call(null, sablono.core.mail_to13278);
sablono.core.unordered_list13286 = function sablono$core$unordered_list13286(coll) {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ul", "ul", -1349521403), function() {
    var iter__6912__auto__ = function sablono$core$unordered_list13286_$_iter__13291(s__13292) {
      return new cljs.core.LazySeq(null, function() {
        var s__13292__$1 = s__13292;
        while (true) {
          var temp__4425__auto__ = cljs.core.seq.call(null, s__13292__$1);
          if (temp__4425__auto__) {
            var s__13292__$2 = temp__4425__auto__;
            if (cljs.core.chunked_seq_QMARK_.call(null, s__13292__$2)) {
              var c__6910__auto__ = cljs.core.chunk_first.call(null, s__13292__$2);
              var size__6911__auto__ = cljs.core.count.call(null, c__6910__auto__);
              var b__13294 = cljs.core.chunk_buffer.call(null, size__6911__auto__);
              if (function() {
                var i__13293 = 0;
                while (true) {
                  if (i__13293 < size__6911__auto__) {
                    var x = cljs.core._nth.call(null, c__6910__auto__, i__13293);
                    cljs.core.chunk_append.call(null, b__13294, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 723558921), x], null));
                    var G__13295 = i__13293 + 1;
                    i__13293 = G__13295;
                    continue;
                  } else {
                    return true;
                  }
                  break;
                }
              }()) {
                return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__13294), sablono$core$unordered_list13286_$_iter__13291.call(null, cljs.core.chunk_rest.call(null, s__13292__$2)));
              } else {
                return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__13294), null);
              }
            } else {
              var x = cljs.core.first.call(null, s__13292__$2);
              return cljs.core.cons.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 723558921), x], null), sablono$core$unordered_list13286_$_iter__13291.call(null, cljs.core.rest.call(null, s__13292__$2)));
            }
          } else {
            return null;
          }
          break;
        }
      }, null, null);
    };
    return iter__6912__auto__.call(null, coll);
  }()], null);
};
sablono.core.unordered_list = sablono.core.wrap_attrs.call(null, sablono.core.unordered_list13286);
sablono.core.ordered_list13296 = function sablono$core$ordered_list13296(coll) {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ol", "ol", 932524051), function() {
    var iter__6912__auto__ = function sablono$core$ordered_list13296_$_iter__13301(s__13302) {
      return new cljs.core.LazySeq(null, function() {
        var s__13302__$1 = s__13302;
        while (true) {
          var temp__4425__auto__ = cljs.core.seq.call(null, s__13302__$1);
          if (temp__4425__auto__) {
            var s__13302__$2 = temp__4425__auto__;
            if (cljs.core.chunked_seq_QMARK_.call(null, s__13302__$2)) {
              var c__6910__auto__ = cljs.core.chunk_first.call(null, s__13302__$2);
              var size__6911__auto__ = cljs.core.count.call(null, c__6910__auto__);
              var b__13304 = cljs.core.chunk_buffer.call(null, size__6911__auto__);
              if (function() {
                var i__13303 = 0;
                while (true) {
                  if (i__13303 < size__6911__auto__) {
                    var x = cljs.core._nth.call(null, c__6910__auto__, i__13303);
                    cljs.core.chunk_append.call(null, b__13304, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 723558921), x], null));
                    var G__13305 = i__13303 + 1;
                    i__13303 = G__13305;
                    continue;
                  } else {
                    return true;
                  }
                  break;
                }
              }()) {
                return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__13304), sablono$core$ordered_list13296_$_iter__13301.call(null, cljs.core.chunk_rest.call(null, s__13302__$2)));
              } else {
                return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__13304), null);
              }
            } else {
              var x = cljs.core.first.call(null, s__13302__$2);
              return cljs.core.cons.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 723558921), x], null), sablono$core$ordered_list13296_$_iter__13301.call(null, cljs.core.rest.call(null, s__13302__$2)));
            }
          } else {
            return null;
          }
          break;
        }
      }, null, null);
    };
    return iter__6912__auto__.call(null, coll);
  }()], null);
};
sablono.core.ordered_list = sablono.core.wrap_attrs.call(null, sablono.core.ordered_list13296);
sablono.core.image13306 = function sablono$core$image13306(var_args) {
  var args13307 = [];
  var len__7198__auto___13310 = arguments.length;
  var i__7199__auto___13311 = 0;
  while (true) {
    if (i__7199__auto___13311 < len__7198__auto___13310) {
      args13307.push(arguments[i__7199__auto___13311]);
      var G__13312 = i__7199__auto___13311 + 1;
      i__7199__auto___13311 = G__13312;
      continue;
    } else {
    }
    break;
  }
  var G__13309 = args13307.length;
  switch(G__13309) {
    case 1:
      return sablono.core.image13306.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return sablono.core.image13306.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13307.length)].join(""));;
  }
};
sablono.core.image13306.cljs$core$IFn$_invoke$arity$1 = function(src) {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "img", "img", 1442687358), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "src", "src", -1651076051), sablono.util.as_str.call(null, src)], null)], null);
};
sablono.core.image13306.cljs$core$IFn$_invoke$arity$2 = function(src, alt) {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "img", "img", 1442687358), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "src", "src", -1651076051), sablono.util.as_str.call(null, src), new cljs.core.Keyword(null, "alt", "alt", -3214426), alt], null)], null);
};
sablono.core.image13306.cljs$lang$maxFixedArity = 2;
sablono.core.image = sablono.core.wrap_attrs.call(null, sablono.core.image13306);
sablono.core._STAR_group_STAR_ = cljs.core.PersistentVector.EMPTY;
sablono.core.make_name = function sablono$core$make_name(name) {
  return cljs.core.reduce.call(null, function(p1__13314_SHARP_, p2__13315_SHARP_) {
    return [cljs.core.str(p1__13314_SHARP_), cljs.core.str("["), cljs.core.str(p2__13315_SHARP_), cljs.core.str("]")].join("");
  }, cljs.core.conj.call(null, sablono.core._STAR_group_STAR_, sablono.util.as_str.call(null, name)));
};
sablono.core.make_id = function sablono$core$make_id(name) {
  return cljs.core.reduce.call(null, function(p1__13316_SHARP_, p2__13317_SHARP_) {
    return [cljs.core.str(p1__13316_SHARP_), cljs.core.str("-"), cljs.core.str(p2__13317_SHARP_)].join("");
  }, cljs.core.conj.call(null, sablono.core._STAR_group_STAR_, sablono.util.as_str.call(null, name)));
};
sablono.core.input_field_STAR_ = function sablono$core$input_field_STAR_(type, name, value) {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "input", "input", 556931961), new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "type", "type", 1174270348), type, new cljs.core.Keyword(null, "name", "name", 1843675177), sablono.core.make_name.call(null, name), new cljs.core.Keyword(null, "id", "id", -1388402092), sablono.core.make_id.call(null, name), new cljs.core.Keyword(null, "value", "value", 305978217), 
  value], null)], null);
};
sablono.core.color_field13318 = function sablono$core$color_field13318(var_args) {
  var args13319 = [];
  var len__7198__auto___13386 = arguments.length;
  var i__7199__auto___13387 = 0;
  while (true) {
    if (i__7199__auto___13387 < len__7198__auto___13386) {
      args13319.push(arguments[i__7199__auto___13387]);
      var G__13388 = i__7199__auto___13387 + 1;
      i__7199__auto___13387 = G__13388;
      continue;
    } else {
    }
    break;
  }
  var G__13321 = args13319.length;
  switch(G__13321) {
    case 1:
      return sablono.core.color_field13318.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return sablono.core.color_field13318.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13319.length)].join(""));;
  }
};
sablono.core.color_field13318.cljs$core$IFn$_invoke$arity$1 = function(name__13169__auto__) {
  return sablono.core.color_field13318.call(null, name__13169__auto__, null);
};
sablono.core.color_field13318.cljs$core$IFn$_invoke$arity$2 = function(name__13169__auto__, value__13170__auto__) {
  return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "color", "color", -1642760596, null))].join(""), name__13169__auto__, value__13170__auto__);
};
sablono.core.color_field13318.cljs$lang$maxFixedArity = 2;
sablono.core.color_field = sablono.core.wrap_attrs.call(null, sablono.core.color_field13318);
sablono.core.date_field13322 = function sablono$core$date_field13322(var_args) {
  var args13323 = [];
  var len__7198__auto___13390 = arguments.length;
  var i__7199__auto___13391 = 0;
  while (true) {
    if (i__7199__auto___13391 < len__7198__auto___13390) {
      args13323.push(arguments[i__7199__auto___13391]);
      var G__13392 = i__7199__auto___13391 + 1;
      i__7199__auto___13391 = G__13392;
      continue;
    } else {
    }
    break;
  }
  var G__13325 = args13323.length;
  switch(G__13325) {
    case 1:
      return sablono.core.date_field13322.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return sablono.core.date_field13322.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13323.length)].join(""));;
  }
};
sablono.core.date_field13322.cljs$core$IFn$_invoke$arity$1 = function(name__13169__auto__) {
  return sablono.core.date_field13322.call(null, name__13169__auto__, null);
};
sablono.core.date_field13322.cljs$core$IFn$_invoke$arity$2 = function(name__13169__auto__, value__13170__auto__) {
  return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "date", "date", 177097065, null))].join(""), name__13169__auto__, value__13170__auto__);
};
sablono.core.date_field13322.cljs$lang$maxFixedArity = 2;
sablono.core.date_field = sablono.core.wrap_attrs.call(null, sablono.core.date_field13322);
sablono.core.datetime_field13326 = function sablono$core$datetime_field13326(var_args) {
  var args13327 = [];
  var len__7198__auto___13394 = arguments.length;
  var i__7199__auto___13395 = 0;
  while (true) {
    if (i__7199__auto___13395 < len__7198__auto___13394) {
      args13327.push(arguments[i__7199__auto___13395]);
      var G__13396 = i__7199__auto___13395 + 1;
      i__7199__auto___13395 = G__13396;
      continue;
    } else {
    }
    break;
  }
  var G__13329 = args13327.length;
  switch(G__13329) {
    case 1:
      return sablono.core.datetime_field13326.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return sablono.core.datetime_field13326.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13327.length)].join(""));;
  }
};
sablono.core.datetime_field13326.cljs$core$IFn$_invoke$arity$1 = function(name__13169__auto__) {
  return sablono.core.datetime_field13326.call(null, name__13169__auto__, null);
};
sablono.core.datetime_field13326.cljs$core$IFn$_invoke$arity$2 = function(name__13169__auto__, value__13170__auto__) {
  return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "datetime", "datetime", 2135207229, null))].join(""), name__13169__auto__, value__13170__auto__);
};
sablono.core.datetime_field13326.cljs$lang$maxFixedArity = 2;
sablono.core.datetime_field = sablono.core.wrap_attrs.call(null, sablono.core.datetime_field13326);
sablono.core.datetime_local_field13330 = function sablono$core$datetime_local_field13330(var_args) {
  var args13331 = [];
  var len__7198__auto___13398 = arguments.length;
  var i__7199__auto___13399 = 0;
  while (true) {
    if (i__7199__auto___13399 < len__7198__auto___13398) {
      args13331.push(arguments[i__7199__auto___13399]);
      var G__13400 = i__7199__auto___13399 + 1;
      i__7199__auto___13399 = G__13400;
      continue;
    } else {
    }
    break;
  }
  var G__13333 = args13331.length;
  switch(G__13333) {
    case 1:
      return sablono.core.datetime_local_field13330.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return sablono.core.datetime_local_field13330.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13331.length)].join(""));;
  }
};
sablono.core.datetime_local_field13330.cljs$core$IFn$_invoke$arity$1 = function(name__13169__auto__) {
  return sablono.core.datetime_local_field13330.call(null, name__13169__auto__, null);
};
sablono.core.datetime_local_field13330.cljs$core$IFn$_invoke$arity$2 = function(name__13169__auto__, value__13170__auto__) {
  return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "datetime-local", "datetime-local", -507312697, null))].join(""), name__13169__auto__, value__13170__auto__);
};
sablono.core.datetime_local_field13330.cljs$lang$maxFixedArity = 2;
sablono.core.datetime_local_field = sablono.core.wrap_attrs.call(null, sablono.core.datetime_local_field13330);
sablono.core.email_field13334 = function sablono$core$email_field13334(var_args) {
  var args13335 = [];
  var len__7198__auto___13402 = arguments.length;
  var i__7199__auto___13403 = 0;
  while (true) {
    if (i__7199__auto___13403 < len__7198__auto___13402) {
      args13335.push(arguments[i__7199__auto___13403]);
      var G__13404 = i__7199__auto___13403 + 1;
      i__7199__auto___13403 = G__13404;
      continue;
    } else {
    }
    break;
  }
  var G__13337 = args13335.length;
  switch(G__13337) {
    case 1:
      return sablono.core.email_field13334.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return sablono.core.email_field13334.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13335.length)].join(""));;
  }
};
sablono.core.email_field13334.cljs$core$IFn$_invoke$arity$1 = function(name__13169__auto__) {
  return sablono.core.email_field13334.call(null, name__13169__auto__, null);
};
sablono.core.email_field13334.cljs$core$IFn$_invoke$arity$2 = function(name__13169__auto__, value__13170__auto__) {
  return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "email", "email", -1238619063, null))].join(""), name__13169__auto__, value__13170__auto__);
};
sablono.core.email_field13334.cljs$lang$maxFixedArity = 2;
sablono.core.email_field = sablono.core.wrap_attrs.call(null, sablono.core.email_field13334);
sablono.core.file_field13338 = function sablono$core$file_field13338(var_args) {
  var args13339 = [];
  var len__7198__auto___13406 = arguments.length;
  var i__7199__auto___13407 = 0;
  while (true) {
    if (i__7199__auto___13407 < len__7198__auto___13406) {
      args13339.push(arguments[i__7199__auto___13407]);
      var G__13408 = i__7199__auto___13407 + 1;
      i__7199__auto___13407 = G__13408;
      continue;
    } else {
    }
    break;
  }
  var G__13341 = args13339.length;
  switch(G__13341) {
    case 1:
      return sablono.core.file_field13338.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return sablono.core.file_field13338.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13339.length)].join(""));;
  }
};
sablono.core.file_field13338.cljs$core$IFn$_invoke$arity$1 = function(name__13169__auto__) {
  return sablono.core.file_field13338.call(null, name__13169__auto__, null);
};
sablono.core.file_field13338.cljs$core$IFn$_invoke$arity$2 = function(name__13169__auto__, value__13170__auto__) {
  return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "file", "file", 370885649, null))].join(""), name__13169__auto__, value__13170__auto__);
};
sablono.core.file_field13338.cljs$lang$maxFixedArity = 2;
sablono.core.file_field = sablono.core.wrap_attrs.call(null, sablono.core.file_field13338);
sablono.core.hidden_field13342 = function sablono$core$hidden_field13342(var_args) {
  var args13343 = [];
  var len__7198__auto___13410 = arguments.length;
  var i__7199__auto___13411 = 0;
  while (true) {
    if (i__7199__auto___13411 < len__7198__auto___13410) {
      args13343.push(arguments[i__7199__auto___13411]);
      var G__13412 = i__7199__auto___13411 + 1;
      i__7199__auto___13411 = G__13412;
      continue;
    } else {
    }
    break;
  }
  var G__13345 = args13343.length;
  switch(G__13345) {
    case 1:
      return sablono.core.hidden_field13342.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return sablono.core.hidden_field13342.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13343.length)].join(""));;
  }
};
sablono.core.hidden_field13342.cljs$core$IFn$_invoke$arity$1 = function(name__13169__auto__) {
  return sablono.core.hidden_field13342.call(null, name__13169__auto__, null);
};
sablono.core.hidden_field13342.cljs$core$IFn$_invoke$arity$2 = function(name__13169__auto__, value__13170__auto__) {
  return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "hidden", "hidden", 1328025435, null))].join(""), name__13169__auto__, value__13170__auto__);
};
sablono.core.hidden_field13342.cljs$lang$maxFixedArity = 2;
sablono.core.hidden_field = sablono.core.wrap_attrs.call(null, sablono.core.hidden_field13342);
sablono.core.month_field13346 = function sablono$core$month_field13346(var_args) {
  var args13347 = [];
  var len__7198__auto___13414 = arguments.length;
  var i__7199__auto___13415 = 0;
  while (true) {
    if (i__7199__auto___13415 < len__7198__auto___13414) {
      args13347.push(arguments[i__7199__auto___13415]);
      var G__13416 = i__7199__auto___13415 + 1;
      i__7199__auto___13415 = G__13416;
      continue;
    } else {
    }
    break;
  }
  var G__13349 = args13347.length;
  switch(G__13349) {
    case 1:
      return sablono.core.month_field13346.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return sablono.core.month_field13346.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13347.length)].join(""));;
  }
};
sablono.core.month_field13346.cljs$core$IFn$_invoke$arity$1 = function(name__13169__auto__) {
  return sablono.core.month_field13346.call(null, name__13169__auto__, null);
};
sablono.core.month_field13346.cljs$core$IFn$_invoke$arity$2 = function(name__13169__auto__, value__13170__auto__) {
  return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "month", "month", -319717006, null))].join(""), name__13169__auto__, value__13170__auto__);
};
sablono.core.month_field13346.cljs$lang$maxFixedArity = 2;
sablono.core.month_field = sablono.core.wrap_attrs.call(null, sablono.core.month_field13346);
sablono.core.number_field13350 = function sablono$core$number_field13350(var_args) {
  var args13351 = [];
  var len__7198__auto___13418 = arguments.length;
  var i__7199__auto___13419 = 0;
  while (true) {
    if (i__7199__auto___13419 < len__7198__auto___13418) {
      args13351.push(arguments[i__7199__auto___13419]);
      var G__13420 = i__7199__auto___13419 + 1;
      i__7199__auto___13419 = G__13420;
      continue;
    } else {
    }
    break;
  }
  var G__13353 = args13351.length;
  switch(G__13353) {
    case 1:
      return sablono.core.number_field13350.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return sablono.core.number_field13350.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13351.length)].join(""));;
  }
};
sablono.core.number_field13350.cljs$core$IFn$_invoke$arity$1 = function(name__13169__auto__) {
  return sablono.core.number_field13350.call(null, name__13169__auto__, null);
};
sablono.core.number_field13350.cljs$core$IFn$_invoke$arity$2 = function(name__13169__auto__, value__13170__auto__) {
  return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "number", "number", -1084057331, null))].join(""), name__13169__auto__, value__13170__auto__);
};
sablono.core.number_field13350.cljs$lang$maxFixedArity = 2;
sablono.core.number_field = sablono.core.wrap_attrs.call(null, sablono.core.number_field13350);
sablono.core.password_field13354 = function sablono$core$password_field13354(var_args) {
  var args13355 = [];
  var len__7198__auto___13422 = arguments.length;
  var i__7199__auto___13423 = 0;
  while (true) {
    if (i__7199__auto___13423 < len__7198__auto___13422) {
      args13355.push(arguments[i__7199__auto___13423]);
      var G__13424 = i__7199__auto___13423 + 1;
      i__7199__auto___13423 = G__13424;
      continue;
    } else {
    }
    break;
  }
  var G__13357 = args13355.length;
  switch(G__13357) {
    case 1:
      return sablono.core.password_field13354.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return sablono.core.password_field13354.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13355.length)].join(""));;
  }
};
sablono.core.password_field13354.cljs$core$IFn$_invoke$arity$1 = function(name__13169__auto__) {
  return sablono.core.password_field13354.call(null, name__13169__auto__, null);
};
sablono.core.password_field13354.cljs$core$IFn$_invoke$arity$2 = function(name__13169__auto__, value__13170__auto__) {
  return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "password", "password", 2057553998, null))].join(""), name__13169__auto__, value__13170__auto__);
};
sablono.core.password_field13354.cljs$lang$maxFixedArity = 2;
sablono.core.password_field = sablono.core.wrap_attrs.call(null, sablono.core.password_field13354);
sablono.core.range_field13358 = function sablono$core$range_field13358(var_args) {
  var args13359 = [];
  var len__7198__auto___13426 = arguments.length;
  var i__7199__auto___13427 = 0;
  while (true) {
    if (i__7199__auto___13427 < len__7198__auto___13426) {
      args13359.push(arguments[i__7199__auto___13427]);
      var G__13428 = i__7199__auto___13427 + 1;
      i__7199__auto___13427 = G__13428;
      continue;
    } else {
    }
    break;
  }
  var G__13361 = args13359.length;
  switch(G__13361) {
    case 1:
      return sablono.core.range_field13358.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return sablono.core.range_field13358.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13359.length)].join(""));;
  }
};
sablono.core.range_field13358.cljs$core$IFn$_invoke$arity$1 = function(name__13169__auto__) {
  return sablono.core.range_field13358.call(null, name__13169__auto__, null);
};
sablono.core.range_field13358.cljs$core$IFn$_invoke$arity$2 = function(name__13169__auto__, value__13170__auto__) {
  return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "range", "range", -1014743483, null))].join(""), name__13169__auto__, value__13170__auto__);
};
sablono.core.range_field13358.cljs$lang$maxFixedArity = 2;
sablono.core.range_field = sablono.core.wrap_attrs.call(null, sablono.core.range_field13358);
sablono.core.search_field13362 = function sablono$core$search_field13362(var_args) {
  var args13363 = [];
  var len__7198__auto___13430 = arguments.length;
  var i__7199__auto___13431 = 0;
  while (true) {
    if (i__7199__auto___13431 < len__7198__auto___13430) {
      args13363.push(arguments[i__7199__auto___13431]);
      var G__13432 = i__7199__auto___13431 + 1;
      i__7199__auto___13431 = G__13432;
      continue;
    } else {
    }
    break;
  }
  var G__13365 = args13363.length;
  switch(G__13365) {
    case 1:
      return sablono.core.search_field13362.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return sablono.core.search_field13362.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13363.length)].join(""));;
  }
};
sablono.core.search_field13362.cljs$core$IFn$_invoke$arity$1 = function(name__13169__auto__) {
  return sablono.core.search_field13362.call(null, name__13169__auto__, null);
};
sablono.core.search_field13362.cljs$core$IFn$_invoke$arity$2 = function(name__13169__auto__, value__13170__auto__) {
  return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "search", "search", -1089495947, null))].join(""), name__13169__auto__, value__13170__auto__);
};
sablono.core.search_field13362.cljs$lang$maxFixedArity = 2;
sablono.core.search_field = sablono.core.wrap_attrs.call(null, sablono.core.search_field13362);
sablono.core.tel_field13366 = function sablono$core$tel_field13366(var_args) {
  var args13367 = [];
  var len__7198__auto___13434 = arguments.length;
  var i__7199__auto___13435 = 0;
  while (true) {
    if (i__7199__auto___13435 < len__7198__auto___13434) {
      args13367.push(arguments[i__7199__auto___13435]);
      var G__13436 = i__7199__auto___13435 + 1;
      i__7199__auto___13435 = G__13436;
      continue;
    } else {
    }
    break;
  }
  var G__13369 = args13367.length;
  switch(G__13369) {
    case 1:
      return sablono.core.tel_field13366.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return sablono.core.tel_field13366.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13367.length)].join(""));;
  }
};
sablono.core.tel_field13366.cljs$core$IFn$_invoke$arity$1 = function(name__13169__auto__) {
  return sablono.core.tel_field13366.call(null, name__13169__auto__, null);
};
sablono.core.tel_field13366.cljs$core$IFn$_invoke$arity$2 = function(name__13169__auto__, value__13170__auto__) {
  return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "tel", "tel", 1864669686, null))].join(""), name__13169__auto__, value__13170__auto__);
};
sablono.core.tel_field13366.cljs$lang$maxFixedArity = 2;
sablono.core.tel_field = sablono.core.wrap_attrs.call(null, sablono.core.tel_field13366);
sablono.core.text_field13370 = function sablono$core$text_field13370(var_args) {
  var args13371 = [];
  var len__7198__auto___13438 = arguments.length;
  var i__7199__auto___13439 = 0;
  while (true) {
    if (i__7199__auto___13439 < len__7198__auto___13438) {
      args13371.push(arguments[i__7199__auto___13439]);
      var G__13440 = i__7199__auto___13439 + 1;
      i__7199__auto___13439 = G__13440;
      continue;
    } else {
    }
    break;
  }
  var G__13373 = args13371.length;
  switch(G__13373) {
    case 1:
      return sablono.core.text_field13370.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return sablono.core.text_field13370.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13371.length)].join(""));;
  }
};
sablono.core.text_field13370.cljs$core$IFn$_invoke$arity$1 = function(name__13169__auto__) {
  return sablono.core.text_field13370.call(null, name__13169__auto__, null);
};
sablono.core.text_field13370.cljs$core$IFn$_invoke$arity$2 = function(name__13169__auto__, value__13170__auto__) {
  return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "text", "text", -150030170, null))].join(""), name__13169__auto__, value__13170__auto__);
};
sablono.core.text_field13370.cljs$lang$maxFixedArity = 2;
sablono.core.text_field = sablono.core.wrap_attrs.call(null, sablono.core.text_field13370);
sablono.core.time_field13374 = function sablono$core$time_field13374(var_args) {
  var args13375 = [];
  var len__7198__auto___13442 = arguments.length;
  var i__7199__auto___13443 = 0;
  while (true) {
    if (i__7199__auto___13443 < len__7198__auto___13442) {
      args13375.push(arguments[i__7199__auto___13443]);
      var G__13444 = i__7199__auto___13443 + 1;
      i__7199__auto___13443 = G__13444;
      continue;
    } else {
    }
    break;
  }
  var G__13377 = args13375.length;
  switch(G__13377) {
    case 1:
      return sablono.core.time_field13374.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return sablono.core.time_field13374.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13375.length)].join(""));;
  }
};
sablono.core.time_field13374.cljs$core$IFn$_invoke$arity$1 = function(name__13169__auto__) {
  return sablono.core.time_field13374.call(null, name__13169__auto__, null);
};
sablono.core.time_field13374.cljs$core$IFn$_invoke$arity$2 = function(name__13169__auto__, value__13170__auto__) {
  return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "time", "time", -1268547887, null))].join(""), name__13169__auto__, value__13170__auto__);
};
sablono.core.time_field13374.cljs$lang$maxFixedArity = 2;
sablono.core.time_field = sablono.core.wrap_attrs.call(null, sablono.core.time_field13374);
sablono.core.url_field13378 = function sablono$core$url_field13378(var_args) {
  var args13379 = [];
  var len__7198__auto___13446 = arguments.length;
  var i__7199__auto___13447 = 0;
  while (true) {
    if (i__7199__auto___13447 < len__7198__auto___13446) {
      args13379.push(arguments[i__7199__auto___13447]);
      var G__13448 = i__7199__auto___13447 + 1;
      i__7199__auto___13447 = G__13448;
      continue;
    } else {
    }
    break;
  }
  var G__13381 = args13379.length;
  switch(G__13381) {
    case 1:
      return sablono.core.url_field13378.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return sablono.core.url_field13378.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13379.length)].join(""));;
  }
};
sablono.core.url_field13378.cljs$core$IFn$_invoke$arity$1 = function(name__13169__auto__) {
  return sablono.core.url_field13378.call(null, name__13169__auto__, null);
};
sablono.core.url_field13378.cljs$core$IFn$_invoke$arity$2 = function(name__13169__auto__, value__13170__auto__) {
  return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "url", "url", 1916828573, null))].join(""), name__13169__auto__, value__13170__auto__);
};
sablono.core.url_field13378.cljs$lang$maxFixedArity = 2;
sablono.core.url_field = sablono.core.wrap_attrs.call(null, sablono.core.url_field13378);
sablono.core.week_field13382 = function sablono$core$week_field13382(var_args) {
  var args13383 = [];
  var len__7198__auto___13450 = arguments.length;
  var i__7199__auto___13451 = 0;
  while (true) {
    if (i__7199__auto___13451 < len__7198__auto___13450) {
      args13383.push(arguments[i__7199__auto___13451]);
      var G__13452 = i__7199__auto___13451 + 1;
      i__7199__auto___13451 = G__13452;
      continue;
    } else {
    }
    break;
  }
  var G__13385 = args13383.length;
  switch(G__13385) {
    case 1:
      return sablono.core.week_field13382.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return sablono.core.week_field13382.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13383.length)].join(""));;
  }
};
sablono.core.week_field13382.cljs$core$IFn$_invoke$arity$1 = function(name__13169__auto__) {
  return sablono.core.week_field13382.call(null, name__13169__auto__, null);
};
sablono.core.week_field13382.cljs$core$IFn$_invoke$arity$2 = function(name__13169__auto__, value__13170__auto__) {
  return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "week", "week", 314058249, null))].join(""), name__13169__auto__, value__13170__auto__);
};
sablono.core.week_field13382.cljs$lang$maxFixedArity = 2;
sablono.core.week_field = sablono.core.wrap_attrs.call(null, sablono.core.week_field13382);
sablono.core.file_upload = sablono.core.file_field;
sablono.core.check_box13454 = function sablono$core$check_box13454(var_args) {
  var args13455 = [];
  var len__7198__auto___13458 = arguments.length;
  var i__7199__auto___13459 = 0;
  while (true) {
    if (i__7199__auto___13459 < len__7198__auto___13458) {
      args13455.push(arguments[i__7199__auto___13459]);
      var G__13460 = i__7199__auto___13459 + 1;
      i__7199__auto___13459 = G__13460;
      continue;
    } else {
    }
    break;
  }
  var G__13457 = args13455.length;
  switch(G__13457) {
    case 1:
      return sablono.core.check_box13454.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return sablono.core.check_box13454.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return sablono.core.check_box13454.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13455.length)].join(""));;
  }
};
sablono.core.check_box13454.cljs$core$IFn$_invoke$arity$1 = function(name) {
  return sablono.core.check_box13454.call(null, name, null);
};
sablono.core.check_box13454.cljs$core$IFn$_invoke$arity$2 = function(name, checked_QMARK_) {
  return sablono.core.check_box13454.call(null, name, checked_QMARK_, "true");
};
sablono.core.check_box13454.cljs$core$IFn$_invoke$arity$3 = function(name, checked_QMARK_, value) {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "input", "input", 556931961), new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "type", "type", 1174270348), "checkbox", new cljs.core.Keyword(null, "name", "name", 1843675177), sablono.core.make_name.call(null, name), new cljs.core.Keyword(null, "id", "id", -1388402092), sablono.core.make_id.call(null, name), new cljs.core.Keyword(null, "value", "value", 305978217), 
  value, new cljs.core.Keyword(null, "checked", "checked", -50955819), checked_QMARK_], null)], null);
};
sablono.core.check_box13454.cljs$lang$maxFixedArity = 3;
sablono.core.check_box = sablono.core.wrap_attrs.call(null, sablono.core.check_box13454);
sablono.core.radio_button13462 = function sablono$core$radio_button13462(var_args) {
  var args13463 = [];
  var len__7198__auto___13466 = arguments.length;
  var i__7199__auto___13467 = 0;
  while (true) {
    if (i__7199__auto___13467 < len__7198__auto___13466) {
      args13463.push(arguments[i__7199__auto___13467]);
      var G__13468 = i__7199__auto___13467 + 1;
      i__7199__auto___13467 = G__13468;
      continue;
    } else {
    }
    break;
  }
  var G__13465 = args13463.length;
  switch(G__13465) {
    case 1:
      return sablono.core.radio_button13462.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return sablono.core.radio_button13462.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return sablono.core.radio_button13462.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13463.length)].join(""));;
  }
};
sablono.core.radio_button13462.cljs$core$IFn$_invoke$arity$1 = function(group) {
  return sablono.core.radio_button13462.call(null, group, null);
};
sablono.core.radio_button13462.cljs$core$IFn$_invoke$arity$2 = function(group, checked_QMARK_) {
  return sablono.core.radio_button13462.call(null, group, checked_QMARK_, "true");
};
sablono.core.radio_button13462.cljs$core$IFn$_invoke$arity$3 = function(group, checked_QMARK_, value) {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "input", "input", 556931961), new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "type", "type", 1174270348), "radio", new cljs.core.Keyword(null, "name", "name", 1843675177), sablono.core.make_name.call(null, group), new cljs.core.Keyword(null, "id", "id", -1388402092), sablono.core.make_id.call(null, [cljs.core.str(sablono.util.as_str.call(null, group)), cljs.core.str("-"), 
  cljs.core.str(sablono.util.as_str.call(null, value))].join("")), new cljs.core.Keyword(null, "value", "value", 305978217), value, new cljs.core.Keyword(null, "checked", "checked", -50955819), checked_QMARK_], null)], null);
};
sablono.core.radio_button13462.cljs$lang$maxFixedArity = 3;
sablono.core.radio_button = sablono.core.wrap_attrs.call(null, sablono.core.radio_button13462);
sablono.core.select_options13470 = function sablono$core$select_options13470(var_args) {
  var args13471 = [];
  var len__7198__auto___13482 = arguments.length;
  var i__7199__auto___13483 = 0;
  while (true) {
    if (i__7199__auto___13483 < len__7198__auto___13482) {
      args13471.push(arguments[i__7199__auto___13483]);
      var G__13484 = i__7199__auto___13483 + 1;
      i__7199__auto___13483 = G__13484;
      continue;
    } else {
    }
    break;
  }
  var G__13473 = args13471.length;
  switch(G__13473) {
    case 1:
      return sablono.core.select_options13470.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return sablono.core.select_options13470.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13471.length)].join(""));;
  }
};
sablono.core.select_options13470.cljs$core$IFn$_invoke$arity$1 = function(coll) {
  return sablono.core.select_options13470.call(null, coll, null);
};
sablono.core.select_options13470.cljs$core$IFn$_invoke$arity$2 = function(coll, selected) {
  var iter__6912__auto__ = function sablono$core$iter__13474(s__13475) {
    return new cljs.core.LazySeq(null, function() {
      var s__13475__$1 = s__13475;
      while (true) {
        var temp__4425__auto__ = cljs.core.seq.call(null, s__13475__$1);
        if (temp__4425__auto__) {
          var s__13475__$2 = temp__4425__auto__;
          if (cljs.core.chunked_seq_QMARK_.call(null, s__13475__$2)) {
            var c__6910__auto__ = cljs.core.chunk_first.call(null, s__13475__$2);
            var size__6911__auto__ = cljs.core.count.call(null, c__6910__auto__);
            var b__13477 = cljs.core.chunk_buffer.call(null, size__6911__auto__);
            if (function() {
              var i__13476 = 0;
              while (true) {
                if (i__13476 < size__6911__auto__) {
                  var x = cljs.core._nth.call(null, c__6910__auto__, i__13476);
                  cljs.core.chunk_append.call(null, b__13477, cljs.core.sequential_QMARK_.call(null, x) ? function() {
                    var vec__13480 = x;
                    var text = cljs.core.nth.call(null, vec__13480, 0, null);
                    var val = cljs.core.nth.call(null, vec__13480, 1, null);
                    var disabled_QMARK_ = cljs.core.nth.call(null, vec__13480, 2, null);
                    var disabled_QMARK___$1 = cljs.core.boolean$.call(null, disabled_QMARK_);
                    if (cljs.core.sequential_QMARK_.call(null, val)) {
                      return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "optgroup", "optgroup", 1738282218), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "label", "label", 1718410804), text], null), sablono.core.select_options13470.call(null, val, selected)], null);
                    } else {
                      return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "option", "option", 65132272), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "value", "value", 305978217), val, new cljs.core.Keyword(null, "selected", "selected", 574897764), cljs.core._EQ_.call(null, val, selected), new cljs.core.Keyword(null, "disabled", "disabled", -1529784218), disabled_QMARK___$1], null), text], null);
                    }
                  }() : new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "option", "option", 65132272), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "selected", "selected", 574897764), cljs.core._EQ_.call(null, x, selected)], null), x], null));
                  var G__13486 = i__13476 + 1;
                  i__13476 = G__13486;
                  continue;
                } else {
                  return true;
                }
                break;
              }
            }()) {
              return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__13477), sablono$core$iter__13474.call(null, cljs.core.chunk_rest.call(null, s__13475__$2)));
            } else {
              return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__13477), null);
            }
          } else {
            var x = cljs.core.first.call(null, s__13475__$2);
            return cljs.core.cons.call(null, cljs.core.sequential_QMARK_.call(null, x) ? function() {
              var vec__13481 = x;
              var text = cljs.core.nth.call(null, vec__13481, 0, null);
              var val = cljs.core.nth.call(null, vec__13481, 1, null);
              var disabled_QMARK_ = cljs.core.nth.call(null, vec__13481, 2, null);
              var disabled_QMARK___$1 = cljs.core.boolean$.call(null, disabled_QMARK_);
              if (cljs.core.sequential_QMARK_.call(null, val)) {
                return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "optgroup", "optgroup", 1738282218), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "label", "label", 1718410804), text], null), sablono.core.select_options13470.call(null, val, selected)], null);
              } else {
                return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "option", "option", 65132272), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "value", "value", 305978217), val, new cljs.core.Keyword(null, "selected", "selected", 574897764), cljs.core._EQ_.call(null, val, selected), new cljs.core.Keyword(null, "disabled", "disabled", -1529784218), disabled_QMARK___$1], null), text], null);
              }
            }() : new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "option", "option", 65132272), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "selected", "selected", 574897764), cljs.core._EQ_.call(null, x, selected)], null), x], null), sablono$core$iter__13474.call(null, cljs.core.rest.call(null, s__13475__$2)));
          }
        } else {
          return null;
        }
        break;
      }
    }, null, null);
  };
  return iter__6912__auto__.call(null, coll);
};
sablono.core.select_options13470.cljs$lang$maxFixedArity = 2;
sablono.core.select_options = sablono.core.wrap_attrs.call(null, sablono.core.select_options13470);
sablono.core.drop_down13487 = function sablono$core$drop_down13487(var_args) {
  var args13488 = [];
  var len__7198__auto___13491 = arguments.length;
  var i__7199__auto___13492 = 0;
  while (true) {
    if (i__7199__auto___13492 < len__7198__auto___13491) {
      args13488.push(arguments[i__7199__auto___13492]);
      var G__13493 = i__7199__auto___13492 + 1;
      i__7199__auto___13492 = G__13493;
      continue;
    } else {
    }
    break;
  }
  var G__13490 = args13488.length;
  switch(G__13490) {
    case 2:
      return sablono.core.drop_down13487.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return sablono.core.drop_down13487.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13488.length)].join(""));;
  }
};
sablono.core.drop_down13487.cljs$core$IFn$_invoke$arity$2 = function(name, options) {
  return sablono.core.drop_down13487.call(null, name, options, null);
};
sablono.core.drop_down13487.cljs$core$IFn$_invoke$arity$3 = function(name, options, selected) {
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "select", "select", 1147833503), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "name", "name", 1843675177), sablono.core.make_name.call(null, name), new cljs.core.Keyword(null, "id", "id", -1388402092), sablono.core.make_id.call(null, name)], null), sablono.core.select_options.call(null, options, selected)], null);
};
sablono.core.drop_down13487.cljs$lang$maxFixedArity = 3;
sablono.core.drop_down = sablono.core.wrap_attrs.call(null, sablono.core.drop_down13487);
sablono.core.text_area13495 = function sablono$core$text_area13495(var_args) {
  var args13496 = [];
  var len__7198__auto___13499 = arguments.length;
  var i__7199__auto___13500 = 0;
  while (true) {
    if (i__7199__auto___13500 < len__7198__auto___13499) {
      args13496.push(arguments[i__7199__auto___13500]);
      var G__13501 = i__7199__auto___13500 + 1;
      i__7199__auto___13500 = G__13501;
      continue;
    } else {
    }
    break;
  }
  var G__13498 = args13496.length;
  switch(G__13498) {
    case 1:
      return sablono.core.text_area13495.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return sablono.core.text_area13495.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13496.length)].join(""));;
  }
};
sablono.core.text_area13495.cljs$core$IFn$_invoke$arity$1 = function(name) {
  return sablono.core.text_area13495.call(null, name, null);
};
sablono.core.text_area13495.cljs$core$IFn$_invoke$arity$2 = function(name, value) {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "textarea", "textarea", -650375824), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "name", "name", 1843675177), sablono.core.make_name.call(null, name), new cljs.core.Keyword(null, "id", "id", -1388402092), sablono.core.make_id.call(null, name), new cljs.core.Keyword(null, "value", "value", 305978217), value], null)], null);
};
sablono.core.text_area13495.cljs$lang$maxFixedArity = 2;
sablono.core.text_area = sablono.core.wrap_attrs.call(null, sablono.core.text_area13495);
sablono.core.label13503 = function sablono$core$label13503(name, text) {
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "label", "label", 1718410804), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "htmlFor", "htmlFor", -1050291720), sablono.core.make_id.call(null, name)], null), text], null);
};
sablono.core.label = sablono.core.wrap_attrs.call(null, sablono.core.label13503);
sablono.core.submit_button13504 = function sablono$core$submit_button13504(text) {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "input", "input", 556931961), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "type", "type", 1174270348), "submit", new cljs.core.Keyword(null, "value", "value", 305978217), text], null)], null);
};
sablono.core.submit_button = sablono.core.wrap_attrs.call(null, sablono.core.submit_button13504);
sablono.core.reset_button13505 = function sablono$core$reset_button13505(text) {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "input", "input", 556931961), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "type", "type", 1174270348), "reset", new cljs.core.Keyword(null, "value", "value", 305978217), text], null)], null);
};
sablono.core.reset_button = sablono.core.wrap_attrs.call(null, sablono.core.reset_button13505);
sablono.core.form_to13506 = function sablono$core$form_to13506(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___13511 = arguments.length;
  var i__7199__auto___13512 = 0;
  while (true) {
    if (i__7199__auto___13512 < len__7198__auto___13511) {
      args__7205__auto__.push(arguments[i__7199__auto___13512]);
      var G__13513 = i__7199__auto___13512 + 1;
      i__7199__auto___13512 = G__13513;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return sablono.core.form_to13506.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
sablono.core.form_to13506.cljs$core$IFn$_invoke$arity$variadic = function(p__13509, body) {
  var vec__13510 = p__13509;
  var method = cljs.core.nth.call(null, vec__13510, 0, null);
  var action = cljs.core.nth.call(null, vec__13510, 1, null);
  var method_str = clojure.string.upper_case.call(null, cljs.core.name.call(null, method));
  var action_uri = sablono.util.to_uri.call(null, action);
  return cljs.core.vec.call(null, cljs.core.concat.call(null, cljs.core.contains_QMARK_.call(null, new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "get", "get", 1683182755), null, new cljs.core.Keyword(null, "post", "post", 269697687), null], null), null), method) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "form", "form", -1624062471), new cljs.core.PersistentArrayMap(null, 
  2, [new cljs.core.Keyword(null, "method", "method", 55703592), method_str, new cljs.core.Keyword(null, "action", "action", -811238024), action_uri], null)], null) : new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "form", "form", -1624062471), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "method", "method", 55703592), "POST", new cljs.core.Keyword(null, "action", "action", -811238024), action_uri], null), sablono.core.hidden_field.call(null, 
  "_method", method_str)], null), body));
};
sablono.core.form_to13506.cljs$lang$maxFixedArity = 1;
sablono.core.form_to13506.cljs$lang$applyTo = function(seq13507) {
  var G__13508 = cljs.core.first.call(null, seq13507);
  var seq13507__$1 = cljs.core.next.call(null, seq13507);
  return sablono.core.form_to13506.cljs$core$IFn$_invoke$arity$variadic(G__13508, seq13507__$1);
};
sablono.core.form_to = sablono.core.wrap_attrs.call(null, sablono.core.form_to13506);
goog.provide("kioo.util");
goog.require("cljs.core");
goog.require("clojure.string");
kioo.util._STAR_component_STAR_ = null;
kioo.util.WrapComponent = React.createFactory(React.createClass({"componentDidUpdate":function(prev_props, prev_state) {
  var this$ = this;
  var temp__4425__auto__ = function() {
    var or__6140__auto__ = this$.props["didUpdate"];
    if (cljs.core.truth_(or__6140__auto__)) {
      return or__6140__auto__;
    } else {
      var or__6140__auto____$1 = this$.props["onUpdate"];
      if (cljs.core.truth_(or__6140__auto____$1)) {
        return or__6140__auto____$1;
      } else {
        return this$.props["onRender"];
      }
    }
  }();
  if (cljs.core.truth_(temp__4425__auto__)) {
    var f = temp__4425__auto__;
    var _STAR_component_STAR_13516 = kioo.util._STAR_component_STAR_;
    kioo.util._STAR_component_STAR_ = this$;
    try {
      return f.call(null, this$, prev_props, prev_state);
    } finally {
      kioo.util._STAR_component_STAR_ = _STAR_component_STAR_13516;
    }
  } else {
    return null;
  }
}, "componentWillUnmount":function() {
  var this$ = this;
  var temp__4425__auto__ = function() {
    var or__6140__auto__ = this$.props["willUnmount"];
    if (cljs.core.truth_(or__6140__auto__)) {
      return or__6140__auto__;
    } else {
      return this$.props["onUnmount"];
    }
  }();
  if (cljs.core.truth_(temp__4425__auto__)) {
    var f = temp__4425__auto__;
    var _STAR_component_STAR_13517 = kioo.util._STAR_component_STAR_;
    kioo.util._STAR_component_STAR_ = this$;
    try {
      return f.call(null, this$);
    } finally {
      kioo.util._STAR_component_STAR_ = _STAR_component_STAR_13517;
    }
  } else {
    return null;
  }
}, "componentWillReceiveProps":function(next_props) {
  var this$ = this;
  var temp__4425__auto__ = function() {
    var or__6140__auto__ = this$.props["willReceiveProps"];
    if (cljs.core.truth_(or__6140__auto__)) {
      return or__6140__auto__;
    } else {
      return this$.props["onWillReceiveProps"];
    }
  }();
  if (cljs.core.truth_(temp__4425__auto__)) {
    var f = temp__4425__auto__;
    var _STAR_component_STAR_13518 = kioo.util._STAR_component_STAR_;
    kioo.util._STAR_component_STAR_ = this$;
    try {
      return f.call(null, this$, next_props);
    } finally {
      kioo.util._STAR_component_STAR_ = _STAR_component_STAR_13518;
    }
  } else {
    return null;
  }
}, "shouldComponentUpdate":function(next_props, next_state) {
  var this$ = this;
  var temp__4423__auto__ = this$.props["shouldUpdate"];
  if (cljs.core.truth_(temp__4423__auto__)) {
    var f = temp__4423__auto__;
    var _STAR_component_STAR_13519 = kioo.util._STAR_component_STAR_;
    kioo.util._STAR_component_STAR_ = this$;
    try {
      return f.call(null, this$, next_props, next_state);
    } finally {
      kioo.util._STAR_component_STAR_ = _STAR_component_STAR_13519;
    }
  } else {
    return cljs.core.not_EQ_.call(null, this$.props["node"], next_props["node"]);
  }
}, "render":function() {
  var this$ = this;
  var dom_fn = this$.props["dom-fn"];
  var node = this$.props["node"];
  return dom_fn.call(null, node);
}, "componentWillUpdate":function(next_props, next_state) {
  var this$ = this;
  var temp__4425__auto__ = function() {
    var or__6140__auto__ = this$.props["willUpdate"];
    if (cljs.core.truth_(or__6140__auto__)) {
      return or__6140__auto__;
    } else {
      return this$.props["onWillUpdate"];
    }
  }();
  if (cljs.core.truth_(temp__4425__auto__)) {
    var f = temp__4425__auto__;
    var _STAR_component_STAR_13520 = kioo.util._STAR_component_STAR_;
    kioo.util._STAR_component_STAR_ = this$;
    try {
      return f.call(null, this$, next_props, next_state);
    } finally {
      kioo.util._STAR_component_STAR_ = _STAR_component_STAR_13520;
    }
  } else {
    return null;
  }
}, "getInitialState":function() {
  var this$ = this;
  var temp__4425__auto__ = this$.props["initState"];
  if (cljs.core.truth_(temp__4425__auto__)) {
    var f = temp__4425__auto__;
    var _STAR_component_STAR_13521 = kioo.util._STAR_component_STAR_;
    kioo.util._STAR_component_STAR_ = this$;
    try {
      return f.call(null, this$);
    } finally {
      kioo.util._STAR_component_STAR_ = _STAR_component_STAR_13521;
    }
  } else {
    return null;
  }
}, "componentDidMount":function() {
  var this$ = this;
  var temp__4425__auto__ = function() {
    var or__6140__auto__ = this$.props["didMount"];
    if (cljs.core.truth_(or__6140__auto__)) {
      return or__6140__auto__;
    } else {
      var or__6140__auto____$1 = this$.props["onMount"];
      if (cljs.core.truth_(or__6140__auto____$1)) {
        return or__6140__auto____$1;
      } else {
        return this$.props["onRender"];
      }
    }
  }();
  if (cljs.core.truth_(temp__4425__auto__)) {
    var f = temp__4425__auto__;
    var _STAR_component_STAR_13522 = kioo.util._STAR_component_STAR_;
    kioo.util._STAR_component_STAR_ = this$;
    try {
      return f.call(null, this$);
    } finally {
      kioo.util._STAR_component_STAR_ = _STAR_component_STAR_13522;
    }
  } else {
    return null;
  }
}, "componentWillMount":function() {
  var this$ = this;
  var temp__4425__auto__ = function() {
    var or__6140__auto__ = this$.props["willMount"];
    if (cljs.core.truth_(or__6140__auto__)) {
      return or__6140__auto__;
    } else {
      return this$.props["onWillMount"];
    }
  }();
  if (cljs.core.truth_(temp__4425__auto__)) {
    var f = temp__4425__auto__;
    var _STAR_component_STAR_13523 = kioo.util._STAR_component_STAR_;
    kioo.util._STAR_component_STAR_ = this$;
    try {
      return f.call(null, this$);
    } finally {
      kioo.util._STAR_component_STAR_ = _STAR_component_STAR_13523;
    }
  } else {
    return null;
  }
}}));
kioo.util.dont_camel_case = new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, ["aria", null, "data", null], null), null);
kioo.util.camel_case = function kioo$util$camel_case(dashed) {
  if (typeof dashed === "string") {
    return dashed;
  } else {
    var name_str = cljs.core.name.call(null, dashed);
    var vec__13525 = clojure.string.split.call(null, name_str, /-/);
    var start = cljs.core.nth.call(null, vec__13525, 0, null);
    var parts = cljs.core.nthnext.call(null, vec__13525, 1);
    if (cljs.core.truth_(kioo.util.dont_camel_case.call(null, start))) {
      return name_str;
    } else {
      return cljs.core.apply.call(null, cljs.core.str, start, cljs.core.map.call(null, clojure.string.capitalize, parts));
    }
  }
};
kioo.util.attribute_map = cljs.core.assoc.call(null, cljs.core.reduce.call(null, function(p1__13526_SHARP_, p2__13527_SHARP_) {
  return cljs.core.assoc.call(null, p1__13526_SHARP_, cljs.core.keyword.call(null, cljs.core.name.call(null, p2__13527_SHARP_).toLowerCase()), p2__13527_SHARP_);
}, cljs.core.PersistentArrayMap.EMPTY, cljs.core.PersistentVector.fromArray([new cljs.core.Keyword(null, "accessKey", "accessKey", -2031675627), new cljs.core.Keyword(null, "allowFullScreen", "allowFullScreen", 475491825), new cljs.core.Keyword(null, "allowTransparency", "allowTransparency", -1615396717), new cljs.core.Keyword(null, "autoComplete", "autoComplete", -219243415), new cljs.core.Keyword(null, "autoFocus", "autoFocus", -552622425), new cljs.core.Keyword(null, "autoPlay", "autoPlay", -561263241), 
new cljs.core.Keyword(null, "cellPadding", "cellPadding", 1918354169), new cljs.core.Keyword(null, "cellSpacing", "cellSpacing", -1305647157), new cljs.core.Keyword(null, "charSet", "charSet", 2001955676), new cljs.core.Keyword(null, "colSpan", "colSpan", 872137394), new cljs.core.Keyword(null, "contentEditable", "contentEditable", -823191689), new cljs.core.Keyword(null, "contextMenu", "contextMenu", -566126918), new cljs.core.Keyword(null, "dateTime", "dateTime", -2108171151), new cljs.core.Keyword(null, 
"encType", "encType", 1733182873), new cljs.core.Keyword(null, "formEncType", "formEncType", 1464810152), new cljs.core.Keyword(null, "formNoValidate", "formNoValidate", -1882076229), new cljs.core.Keyword(null, "frameBorder", "frameBorder", -1546202685), new cljs.core.Keyword(null, "httpEquiv", "httpEquiv", 789868321), new cljs.core.Keyword(null, "itemProp", "itemProp", -772543418), new cljs.core.Keyword(null, "itemScope", "itemScope", -1104711718), new cljs.core.Keyword(null, "itemType", "itemType", 
-65449001), new cljs.core.Keyword(null, "maxLength", "maxLength", -1633020073), new cljs.core.Keyword(null, "noValidate", "noValidate", 1502261891), new cljs.core.Keyword(null, "radioGroup", "radioGroup", 759101257), new cljs.core.Keyword(null, "readOnly", "readOnly", -1749118317), new cljs.core.Keyword(null, "rowSpan", "rowSpan", 826884002), new cljs.core.Keyword(null, "scrollLeft", "scrollLeft", 1174126810), new cljs.core.Keyword(null, "scrollTop", "scrollTop", -1143661921), new cljs.core.Keyword(null, 
"spellCheck", "spellCheck", 331078550), new cljs.core.Keyword(null, "srcDoc", "srcDoc", 1635765309), new cljs.core.Keyword(null, "tabIndex", "tabIndex", -169286716), new cljs.core.Keyword(null, "gradientTransform", "gradientTransform", -364684930), new cljs.core.Keyword(null, "gradientUnits", "gradientUnits", -198536416), new cljs.core.Keyword(null, "spreadMethod", "spreadMethod", 223383336), new cljs.core.Keyword(null, "stopColor", "stopColor", 265518586), new cljs.core.Keyword(null, "stopOpacity", 
"stopOpacity", -480120864), new cljs.core.Keyword(null, "strokeLinecap", "strokeLinecap", -1974748357), new cljs.core.Keyword(null, "strokeWidth", "strokeWidth", -2130848332), new cljs.core.Keyword(null, "textAnchor", "textAnchor", -917689429), new cljs.core.Keyword(null, "viewBox", "viewBox", -469489477)], true)), new cljs.core.Keyword(null, "accept-charset", "accept-charset", -1667839372), new cljs.core.Keyword(null, "acceptCharset", "acceptCharset", 560792243), new cljs.core.Keyword(null, "class", 
"class", -2030961996), new cljs.core.Keyword(null, "className", "className", -1983287057), new cljs.core.Keyword(null, "for", "for", -1323786319), new cljs.core.Keyword(null, "htmlFor", "htmlFor", -1050291720));
kioo.util.transform_keys = function kioo$util$transform_keys(attrs) {
  return cljs.core.reduce.call(null, function(m, p__13530) {
    var vec__13531 = p__13530;
    var k = cljs.core.nth.call(null, vec__13531, 0, null);
    var v = cljs.core.nth.call(null, vec__13531, 1, null);
    return cljs.core.assoc.call(null, m, function() {
      var or__6140__auto__ = kioo.util.attribute_map.call(null, k);
      if (cljs.core.truth_(or__6140__auto__)) {
        return or__6140__auto__;
      } else {
        return k;
      }
    }(), v);
  }, cljs.core.PersistentArrayMap.EMPTY, attrs);
};
kioo.util.convert_attrs = function kioo$util$convert_attrs(attrs) {
  var style = cljs.core.truth_((new cljs.core.Keyword(null, "style", "style", -496642736)).cljs$core$IFn$_invoke$arity$1(attrs)) ? function() {
    var vals = cljs.core.re_seq.call(null, /\s*([^:;]*)[:][\s]*([^;]+)/, (new cljs.core.Keyword(null, "style", "style", -496642736)).cljs$core$IFn$_invoke$arity$1(attrs));
    return cljs.core.reduce.call(null, function(vals) {
      return function(m, p__13534) {
        var vec__13535 = p__13534;
        var _ = cljs.core.nth.call(null, vec__13535, 0, null);
        var k = cljs.core.nth.call(null, vec__13535, 1, null);
        var v = cljs.core.nth.call(null, vec__13535, 2, null);
        return cljs.core.assoc.call(null, m, k, v.trim());
      };
    }(vals), cljs.core.PersistentArrayMap.EMPTY, vals);
  }() : null;
  var class_name = (new cljs.core.Keyword(null, "class", "class", -2030961996)).cljs$core$IFn$_invoke$arity$1(attrs);
  return cljs.core.assoc.call(null, kioo.util.transform_keys.call(null, attrs), new cljs.core.Keyword(null, "style", "style", -496642736), style);
};
kioo.util.flatten_nodes = function kioo$util$flatten_nodes(nodes) {
  return cljs.core.reduce.call(null, function(p1__13537_SHARP_, p2__13536_SHARP_) {
    if (cljs.core.seq_QMARK_.call(null, p2__13536_SHARP_)) {
      return cljs.core.concat.call(null, p2__13536_SHARP_, p1__13537_SHARP_);
    } else {
      return cljs.core.conj.call(null, p1__13537_SHARP_, p2__13536_SHARP_);
    }
  }, cljs.core.List.EMPTY, cljs.core.reverse.call(null, nodes));
};
kioo.util.attr_pattern = function kioo$util$attr_pattern(attr) {
  return cljs.core.re_pattern.call(null, [cljs.core.str("\\s+"), cljs.core.str(cljs.core.name.call(null, attr)), cljs.core.str("\\s*\x3d\\s*['\"][^\"']+['\"]")].join(""));
};
kioo.util.strip_attr = function kioo$util$strip_attr(s, attr) {
  if (cljs.core.truth_(s)) {
    return clojure.string.replace.call(null, s, kioo.util.attr_pattern.call(null, attr), "");
  } else {
    return null;
  }
};
goog.provide("kioo.common");
goog.require("cljs.core");
goog.require("kioo.util");
goog.require("clojure.string");
kioo.common.content = function kioo$common$content(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___13541 = arguments.length;
  var i__7199__auto___13542 = 0;
  while (true) {
    if (i__7199__auto___13542 < len__7198__auto___13541) {
      args__7205__auto__.push(arguments[i__7199__auto___13542]);
      var G__13543 = i__7199__auto___13542 + 1;
      i__7199__auto___13542 = G__13543;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return kioo.common.content.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
kioo.common.content.cljs$core$IFn$_invoke$arity$variadic = function(body) {
  return function(node) {
    return cljs.core.assoc.call(null, node, new cljs.core.Keyword(null, "content", "content", 15833224), body);
  };
};
kioo.common.content.cljs$lang$maxFixedArity = 0;
kioo.common.content.cljs$lang$applyTo = function(seq13540) {
  return kioo.common.content.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq13540));
};
kioo.common.append = function kioo$common$append(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___13545 = arguments.length;
  var i__7199__auto___13546 = 0;
  while (true) {
    if (i__7199__auto___13546 < len__7198__auto___13545) {
      args__7205__auto__.push(arguments[i__7199__auto___13546]);
      var G__13547 = i__7199__auto___13546 + 1;
      i__7199__auto___13546 = G__13547;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return kioo.common.append.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
kioo.common.append.cljs$core$IFn$_invoke$arity$variadic = function(body) {
  return function(node) {
    return cljs.core.assoc.call(null, node, new cljs.core.Keyword(null, "content", "content", 15833224), cljs.core.concat.call(null, (new cljs.core.Keyword(null, "content", "content", 15833224)).cljs$core$IFn$_invoke$arity$1(node), body));
  };
};
kioo.common.append.cljs$lang$maxFixedArity = 0;
kioo.common.append.cljs$lang$applyTo = function(seq13544) {
  return kioo.common.append.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq13544));
};
kioo.common.prepend = function kioo$common$prepend(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___13549 = arguments.length;
  var i__7199__auto___13550 = 0;
  while (true) {
    if (i__7199__auto___13550 < len__7198__auto___13549) {
      args__7205__auto__.push(arguments[i__7199__auto___13550]);
      var G__13551 = i__7199__auto___13550 + 1;
      i__7199__auto___13550 = G__13551;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return kioo.common.prepend.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
kioo.common.prepend.cljs$core$IFn$_invoke$arity$variadic = function(body) {
  return function(node) {
    return cljs.core.assoc.call(null, node, new cljs.core.Keyword(null, "content", "content", 15833224), cljs.core.concat.call(null, body, (new cljs.core.Keyword(null, "content", "content", 15833224)).cljs$core$IFn$_invoke$arity$1(node)));
  };
};
kioo.common.prepend.cljs$lang$maxFixedArity = 0;
kioo.common.prepend.cljs$lang$applyTo = function(seq13548) {
  return kioo.common.prepend.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq13548));
};
kioo.common.substitute = function kioo$common$substitute(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___13553 = arguments.length;
  var i__7199__auto___13554 = 0;
  while (true) {
    if (i__7199__auto___13554 < len__7198__auto___13553) {
      args__7205__auto__.push(arguments[i__7199__auto___13554]);
      var G__13555 = i__7199__auto___13554 + 1;
      i__7199__auto___13554 = G__13555;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return kioo.common.substitute.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
kioo.common.substitute.cljs$core$IFn$_invoke$arity$variadic = function(body) {
  return function(node) {
    return body;
  };
};
kioo.common.substitute.cljs$lang$maxFixedArity = 0;
kioo.common.substitute.cljs$lang$applyTo = function(seq13552) {
  return kioo.common.substitute.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq13552));
};
kioo.common.set_attr = function kioo$common$set_attr(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___13559 = arguments.length;
  var i__7199__auto___13560 = 0;
  while (true) {
    if (i__7199__auto___13560 < len__7198__auto___13559) {
      args__7205__auto__.push(arguments[i__7199__auto___13560]);
      var G__13561 = i__7199__auto___13560 + 1;
      i__7199__auto___13560 = G__13561;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return kioo.common.set_attr.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
kioo.common.set_attr.cljs$core$IFn$_invoke$arity$variadic = function(body) {
  var els = cljs.core.partition.call(null, 2, body);
  return function(els) {
    return function(node) {
      return cljs.core.assoc.call(null, node, new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), cljs.core.reduce.call(null, function(els) {
        return function(n, p__13557) {
          var vec__13558 = p__13557;
          var k = cljs.core.nth.call(null, vec__13558, 0, null);
          var v = cljs.core.nth.call(null, vec__13558, 1, null);
          return cljs.core.assoc.call(null, n, k, v);
        };
      }(els), (new cljs.core.Keyword(null, "attrs", "attrs", -2090668713)).cljs$core$IFn$_invoke$arity$1(node), els));
    };
  }(els);
};
kioo.common.set_attr.cljs$lang$maxFixedArity = 0;
kioo.common.set_attr.cljs$lang$applyTo = function(seq13556) {
  return kioo.common.set_attr.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq13556));
};
kioo.common.remove_attr = function kioo$common$remove_attr(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___13563 = arguments.length;
  var i__7199__auto___13564 = 0;
  while (true) {
    if (i__7199__auto___13564 < len__7198__auto___13563) {
      args__7205__auto__.push(arguments[i__7199__auto___13564]);
      var G__13565 = i__7199__auto___13564 + 1;
      i__7199__auto___13564 = G__13565;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return kioo.common.remove_attr.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
kioo.common.remove_attr.cljs$core$IFn$_invoke$arity$variadic = function(body) {
  return function(node) {
    return cljs.core.assoc.call(null, node, new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), cljs.core.reduce.call(null, function(n, k) {
      return cljs.core.dissoc.call(null, n, k);
    }, (new cljs.core.Keyword(null, "attrs", "attrs", -2090668713)).cljs$core$IFn$_invoke$arity$1(node), body));
  };
};
kioo.common.remove_attr.cljs$lang$maxFixedArity = 0;
kioo.common.remove_attr.cljs$lang$applyTo = function(seq13562) {
  return kioo.common.remove_attr.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq13562));
};
kioo.common.do__GT_ = function kioo$common$do__GT_(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___13569 = arguments.length;
  var i__7199__auto___13570 = 0;
  while (true) {
    if (i__7199__auto___13570 < len__7198__auto___13569) {
      args__7205__auto__.push(arguments[i__7199__auto___13570]);
      var G__13571 = i__7199__auto___13570 + 1;
      i__7199__auto___13570 = G__13571;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return kioo.common.do__GT_.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
kioo.common.do__GT_.cljs$core$IFn$_invoke$arity$variadic = function(body) {
  return function(node) {
    return cljs.core.reduce.call(null, function(p1__13567_SHARP_, p2__13566_SHARP_) {
      return p2__13566_SHARP_.call(null, p1__13567_SHARP_);
    }, node, body);
  };
};
kioo.common.do__GT_.cljs$lang$maxFixedArity = 0;
kioo.common.do__GT_.cljs$lang$applyTo = function(seq13568) {
  return kioo.common.do__GT_.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq13568));
};
kioo.common.set_style = function kioo$common$set_style(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___13576 = arguments.length;
  var i__7199__auto___13577 = 0;
  while (true) {
    if (i__7199__auto___13577 < len__7198__auto___13576) {
      args__7205__auto__.push(arguments[i__7199__auto___13577]);
      var G__13578 = i__7199__auto___13577 + 1;
      i__7199__auto___13577 = G__13578;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return kioo.common.set_style.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
kioo.common.set_style.cljs$core$IFn$_invoke$arity$variadic = function(body) {
  var els = cljs.core.partition.call(null, 2, body);
  var mp = cljs.core.reduce.call(null, function(els) {
    return function(m, p__13574) {
      var vec__13575 = p__13574;
      var k = cljs.core.nth.call(null, vec__13575, 0, null);
      var v = cljs.core.nth.call(null, vec__13575, 1, null);
      return cljs.core.assoc.call(null, m, k, v);
    };
  }(els), cljs.core.PersistentArrayMap.EMPTY, els);
  return function(els, mp) {
    return function(node) {
      return cljs.core.update_in.call(null, node, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), new cljs.core.Keyword(null, "style", "style", -496642736)], null), function(els, mp) {
        return function(p1__13572_SHARP_) {
          return cljs.core.merge.call(null, p1__13572_SHARP_, mp);
        };
      }(els, mp));
    };
  }(els, mp);
};
kioo.common.set_style.cljs$lang$maxFixedArity = 0;
kioo.common.set_style.cljs$lang$applyTo = function(seq13573) {
  return kioo.common.set_style.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq13573));
};
kioo.common.remove_style = function kioo$common$remove_style(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___13582 = arguments.length;
  var i__7199__auto___13583 = 0;
  while (true) {
    if (i__7199__auto___13583 < len__7198__auto___13582) {
      args__7205__auto__.push(arguments[i__7199__auto___13583]);
      var G__13584 = i__7199__auto___13583 + 1;
      i__7199__auto___13583 = G__13584;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return kioo.common.remove_style.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
kioo.common.remove_style.cljs$core$IFn$_invoke$arity$variadic = function(body) {
  return function(node) {
    var style = cljs.core.reduce.call(null, function(p1__13579_SHARP_, p2__13580_SHARP_) {
      return cljs.core.dissoc.call(null, p1__13579_SHARP_, cljs.core.name.call(null, p2__13580_SHARP_), p2__13580_SHARP_);
    }, cljs.core.get_in.call(null, node, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), new cljs.core.Keyword(null, "style", "style", -496642736)], null)), body);
    return cljs.core.assoc_in.call(null, node, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), new cljs.core.Keyword(null, "style", "style", -496642736)], null), style);
  };
};
kioo.common.remove_style.cljs$lang$maxFixedArity = 0;
kioo.common.remove_style.cljs$lang$applyTo = function(seq13581) {
  return kioo.common.remove_style.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq13581));
};
kioo.common.get_class_regex = function kioo$common$get_class_regex(cls) {
  return new RegExp([cljs.core.str("(\\s|^)"), cljs.core.str(cls), cljs.core.str("(\\s|$)")].join(""));
};
kioo.common.has_class_QMARK_ = function kioo$common$has_class_QMARK_(cur_cls, cls) {
  var and__6128__auto__ = cur_cls;
  if (cljs.core.truth_(and__6128__auto__)) {
    return cljs.core.re_find.call(null, kioo.common.get_class_regex.call(null, cls), cur_cls);
  } else {
    return and__6128__auto__;
  }
};
kioo.common.set_class = function kioo$common$set_class(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___13588 = arguments.length;
  var i__7199__auto___13589 = 0;
  while (true) {
    if (i__7199__auto___13589 < len__7198__auto___13588) {
      args__7205__auto__.push(arguments[i__7199__auto___13589]);
      var G__13590 = i__7199__auto___13589 + 1;
      i__7199__auto___13589 = G__13590;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return kioo.common.set_class.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
kioo.common.set_class.cljs$core$IFn$_invoke$arity$variadic = function(values) {
  return function(node) {
    var new_class = cljs.core.reduce.call(null, function(p1__13585_SHARP_, p2__13586_SHARP_) {
      if (cljs.core.truth_(kioo.common.has_class_QMARK_.call(null, p1__13585_SHARP_, p2__13586_SHARP_))) {
        return p1__13585_SHARP_;
      } else {
        return [cljs.core.str(p1__13585_SHARP_), cljs.core.str(" "), cljs.core.str(p2__13586_SHARP_)].join("");
      }
    }, "", values);
    return cljs.core.assoc_in.call(null, node, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), new cljs.core.Keyword(null, "className", "className", -1983287057)], null), new_class);
  };
};
kioo.common.set_class.cljs$lang$maxFixedArity = 0;
kioo.common.set_class.cljs$lang$applyTo = function(seq13587) {
  return kioo.common.set_class.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq13587));
};
kioo.common.add_class = function kioo$common$add_class(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___13594 = arguments.length;
  var i__7199__auto___13595 = 0;
  while (true) {
    if (i__7199__auto___13595 < len__7198__auto___13594) {
      args__7205__auto__.push(arguments[i__7199__auto___13595]);
      var G__13596 = i__7199__auto___13595 + 1;
      i__7199__auto___13595 = G__13596;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return kioo.common.add_class.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
kioo.common.add_class.cljs$core$IFn$_invoke$arity$variadic = function(values) {
  return function(node) {
    var new_class = cljs.core.reduce.call(null, function(p1__13591_SHARP_, p2__13592_SHARP_) {
      if (cljs.core.truth_(kioo.common.has_class_QMARK_.call(null, p1__13591_SHARP_, p2__13592_SHARP_))) {
        return p1__13591_SHARP_;
      } else {
        return [cljs.core.str(p1__13591_SHARP_), cljs.core.str(" "), cljs.core.str(p2__13592_SHARP_)].join("");
      }
    }, cljs.core.get_in.call(null, node, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), new cljs.core.Keyword(null, "className", "className", -1983287057)], null)), values);
    return cljs.core.assoc_in.call(null, node, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), new cljs.core.Keyword(null, "className", "className", -1983287057)], null), new_class);
  };
};
kioo.common.add_class.cljs$lang$maxFixedArity = 0;
kioo.common.add_class.cljs$lang$applyTo = function(seq13593) {
  return kioo.common.add_class.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq13593));
};
kioo.common.remove_class = function kioo$common$remove_class(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___13600 = arguments.length;
  var i__7199__auto___13601 = 0;
  while (true) {
    if (i__7199__auto___13601 < len__7198__auto___13600) {
      args__7205__auto__.push(arguments[i__7199__auto___13601]);
      var G__13602 = i__7199__auto___13601 + 1;
      i__7199__auto___13601 = G__13602;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return kioo.common.remove_class.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
kioo.common.remove_class.cljs$core$IFn$_invoke$arity$variadic = function(values) {
  return function(node) {
    var new_class = cljs.core.reduce.call(null, function(p1__13597_SHARP_, p2__13598_SHARP_) {
      if (cljs.core.truth_(kioo.common.has_class_QMARK_.call(null, p1__13597_SHARP_, p2__13598_SHARP_))) {
        return clojure.string.replace.call(null, p1__13597_SHARP_, kioo.common.get_class_regex.call(null, p2__13598_SHARP_), " ");
      } else {
        return p1__13597_SHARP_;
      }
    }, cljs.core.get_in.call(null, node, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), new cljs.core.Keyword(null, "className", "className", -1983287057)], null)), values);
    return cljs.core.assoc_in.call(null, node, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), new cljs.core.Keyword(null, "className", "className", -1983287057)], null), new_class);
  };
};
kioo.common.remove_class.cljs$lang$maxFixedArity = 0;
kioo.common.remove_class.cljs$lang$applyTo = function(seq13599) {
  return kioo.common.remove_class.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq13599));
};
kioo.common.unwrap = function kioo$common$unwrap(node) {
  return (new cljs.core.Keyword(null, "content", "content", 15833224)).cljs$core$IFn$_invoke$arity$1(node);
};
goog.provide("clojure.zip");
goog.require("cljs.core");
clojure.zip.zipper = function clojure$zip$zipper(branch_QMARK_, children, make_node, root) {
  return cljs.core.with_meta(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [root, null], null), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword("zip", "branch?", "zip/branch?", -998880862), branch_QMARK_, new cljs.core.Keyword("zip", "children", "zip/children", -940194589), children, new cljs.core.Keyword("zip", "make-node", "zip/make-node", 1103800591), make_node], null));
};
clojure.zip.seq_zip = function clojure$zip$seq_zip(root) {
  return clojure.zip.zipper.call(null, cljs.core.seq_QMARK_, cljs.core.identity, function(node, children) {
    return cljs.core.with_meta.call(null, children, cljs.core.meta.call(null, node));
  }, root);
};
clojure.zip.vector_zip = function clojure$zip$vector_zip(root) {
  return clojure.zip.zipper.call(null, cljs.core.vector_QMARK_, cljs.core.seq, function(node, children) {
    return cljs.core.with_meta.call(null, cljs.core.vec.call(null, children), cljs.core.meta.call(null, node));
  }, root);
};
clojure.zip.xml_zip = function clojure$zip$xml_zip(root) {
  return clojure.zip.zipper.call(null, cljs.core.complement.call(null, cljs.core.string_QMARK_), cljs.core.comp.call(null, cljs.core.seq, new cljs.core.Keyword(null, "content", "content", 15833224)), function(node, children) {
    return cljs.core.assoc.call(null, node, new cljs.core.Keyword(null, "content", "content", 15833224), function() {
      var and__6128__auto__ = children;
      if (cljs.core.truth_(and__6128__auto__)) {
        return cljs.core.apply.call(null, cljs.core.vector, children);
      } else {
        return and__6128__auto__;
      }
    }());
  }, root);
};
clojure.zip.node = function clojure$zip$node(loc) {
  return loc.call(null, 0);
};
clojure.zip.branch_QMARK_ = function clojure$zip$branch_QMARK_(loc) {
  return (new cljs.core.Keyword("zip", "branch?", "zip/branch?", -998880862)).cljs$core$IFn$_invoke$arity$1(cljs.core.meta.call(null, loc)).call(null, clojure.zip.node.call(null, loc));
};
clojure.zip.children = function clojure$zip$children(loc) {
  if (cljs.core.truth_(clojure.zip.branch_QMARK_.call(null, loc))) {
    return (new cljs.core.Keyword("zip", "children", "zip/children", -940194589)).cljs$core$IFn$_invoke$arity$1(cljs.core.meta.call(null, loc)).call(null, clojure.zip.node.call(null, loc));
  } else {
    throw "called children on a leaf node";
  }
};
clojure.zip.make_node = function clojure$zip$make_node(loc, node, children) {
  return (new cljs.core.Keyword("zip", "make-node", "zip/make-node", 1103800591)).cljs$core$IFn$_invoke$arity$1(cljs.core.meta.call(null, loc)).call(null, node, children);
};
clojure.zip.path = function clojure$zip$path(loc) {
  return (new cljs.core.Keyword(null, "pnodes", "pnodes", 1739080565)).cljs$core$IFn$_invoke$arity$1(loc.call(null, 1));
};
clojure.zip.lefts = function clojure$zip$lefts(loc) {
  return cljs.core.seq.call(null, (new cljs.core.Keyword(null, "l", "l", 1395893423)).cljs$core$IFn$_invoke$arity$1(loc.call(null, 1)));
};
clojure.zip.rights = function clojure$zip$rights(loc) {
  return (new cljs.core.Keyword(null, "r", "r", -471384190)).cljs$core$IFn$_invoke$arity$1(loc.call(null, 1));
};
clojure.zip.down = function clojure$zip$down(loc) {
  if (cljs.core.truth_(clojure.zip.branch_QMARK_.call(null, loc))) {
    var vec__11222 = loc;
    var node = cljs.core.nth.call(null, vec__11222, 0, null);
    var path = cljs.core.nth.call(null, vec__11222, 1, null);
    var vec__11223 = clojure.zip.children.call(null, loc);
    var c = cljs.core.nth.call(null, vec__11223, 0, null);
    var cnext = cljs.core.nthnext.call(null, vec__11223, 1);
    var cs = vec__11223;
    if (cljs.core.truth_(cs)) {
      return cljs.core.with_meta.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [c, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "l", "l", 1395893423), cljs.core.PersistentVector.EMPTY, new cljs.core.Keyword(null, "pnodes", "pnodes", 1739080565), cljs.core.truth_(path) ? cljs.core.conj.call(null, (new cljs.core.Keyword(null, "pnodes", "pnodes", 1739080565)).cljs$core$IFn$_invoke$arity$1(path), node) : new cljs.core.PersistentVector(null, 
      1, 5, cljs.core.PersistentVector.EMPTY_NODE, [node], null), new cljs.core.Keyword(null, "ppath", "ppath", -1758182784), path, new cljs.core.Keyword(null, "r", "r", -471384190), cnext], null)], null), cljs.core.meta.call(null, loc));
    } else {
      return null;
    }
  } else {
    return null;
  }
};
clojure.zip.up = function clojure$zip$up(loc) {
  var vec__11227 = loc;
  var node = cljs.core.nth.call(null, vec__11227, 0, null);
  var map__11228 = cljs.core.nth.call(null, vec__11227, 1, null);
  var map__11228__$1 = (!(map__11228 == null) ? map__11228.cljs$lang$protocol_mask$partition0$ & 64 || map__11228.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.call(null, cljs.core.hash_map, map__11228) : map__11228;
  var path = map__11228__$1;
  var l = cljs.core.get.call(null, map__11228__$1, new cljs.core.Keyword(null, "l", "l", 1395893423));
  var ppath = cljs.core.get.call(null, map__11228__$1, new cljs.core.Keyword(null, "ppath", "ppath", -1758182784));
  var pnodes = cljs.core.get.call(null, map__11228__$1, new cljs.core.Keyword(null, "pnodes", "pnodes", 1739080565));
  var r = cljs.core.get.call(null, map__11228__$1, new cljs.core.Keyword(null, "r", "r", -471384190));
  var changed_QMARK_ = cljs.core.get.call(null, map__11228__$1, new cljs.core.Keyword(null, "changed?", "changed?", -437828330));
  if (cljs.core.truth_(pnodes)) {
    var pnode = cljs.core.peek.call(null, pnodes);
    return cljs.core.with_meta.call(null, cljs.core.truth_(changed_QMARK_) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [clojure.zip.make_node.call(null, loc, pnode, cljs.core.concat.call(null, l, cljs.core.cons.call(null, node, r))), function() {
      var and__6128__auto__ = ppath;
      if (cljs.core.truth_(and__6128__auto__)) {
        return cljs.core.assoc.call(null, ppath, new cljs.core.Keyword(null, "changed?", "changed?", -437828330), true);
      } else {
        return and__6128__auto__;
      }
    }()], null) : new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [pnode, ppath], null), cljs.core.meta.call(null, loc));
  } else {
    return null;
  }
};
clojure.zip.root = function clojure$zip$root(loc) {
  while (true) {
    if (cljs.core._EQ_.call(null, new cljs.core.Keyword(null, "end", "end", -268185958), loc.call(null, 1))) {
      return clojure.zip.node.call(null, loc);
    } else {
      var p = clojure.zip.up.call(null, loc);
      if (cljs.core.truth_(p)) {
        var G__11230 = p;
        loc = G__11230;
        continue;
      } else {
        return clojure.zip.node.call(null, loc);
      }
    }
    break;
  }
};
clojure.zip.right = function clojure$zip$right(loc) {
  var vec__11235 = loc;
  var node = cljs.core.nth.call(null, vec__11235, 0, null);
  var map__11236 = cljs.core.nth.call(null, vec__11235, 1, null);
  var map__11236__$1 = (!(map__11236 == null) ? map__11236.cljs$lang$protocol_mask$partition0$ & 64 || map__11236.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.call(null, cljs.core.hash_map, map__11236) : map__11236;
  var path = map__11236__$1;
  var l = cljs.core.get.call(null, map__11236__$1, new cljs.core.Keyword(null, "l", "l", 1395893423));
  var vec__11237 = cljs.core.get.call(null, map__11236__$1, new cljs.core.Keyword(null, "r", "r", -471384190));
  var r = cljs.core.nth.call(null, vec__11237, 0, null);
  var rnext = cljs.core.nthnext.call(null, vec__11237, 1);
  var rs = vec__11237;
  if (cljs.core.truth_(function() {
    var and__6128__auto__ = path;
    if (cljs.core.truth_(and__6128__auto__)) {
      return rs;
    } else {
      return and__6128__auto__;
    }
  }())) {
    return cljs.core.with_meta.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [r, cljs.core.assoc.call(null, path, new cljs.core.Keyword(null, "l", "l", 1395893423), cljs.core.conj.call(null, l, node), new cljs.core.Keyword(null, "r", "r", -471384190), rnext)], null), cljs.core.meta.call(null, loc));
  } else {
    return null;
  }
};
clojure.zip.rightmost = function clojure$zip$rightmost(loc) {
  var vec__11242 = loc;
  var node = cljs.core.nth.call(null, vec__11242, 0, null);
  var map__11243 = cljs.core.nth.call(null, vec__11242, 1, null);
  var map__11243__$1 = (!(map__11243 == null) ? map__11243.cljs$lang$protocol_mask$partition0$ & 64 || map__11243.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.call(null, cljs.core.hash_map, map__11243) : map__11243;
  var path = map__11243__$1;
  var l = cljs.core.get.call(null, map__11243__$1, new cljs.core.Keyword(null, "l", "l", 1395893423));
  var r = cljs.core.get.call(null, map__11243__$1, new cljs.core.Keyword(null, "r", "r", -471384190));
  if (cljs.core.truth_(function() {
    var and__6128__auto__ = path;
    if (cljs.core.truth_(and__6128__auto__)) {
      return r;
    } else {
      return and__6128__auto__;
    }
  }())) {
    return cljs.core.with_meta.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.last.call(null, r), cljs.core.assoc.call(null, path, new cljs.core.Keyword(null, "l", "l", 1395893423), cljs.core.apply.call(null, cljs.core.conj, l, node, cljs.core.butlast.call(null, r)), new cljs.core.Keyword(null, "r", "r", -471384190), null)], null), cljs.core.meta.call(null, loc));
  } else {
    return loc;
  }
};
clojure.zip.left = function clojure$zip$left(loc) {
  var vec__11248 = loc;
  var node = cljs.core.nth.call(null, vec__11248, 0, null);
  var map__11249 = cljs.core.nth.call(null, vec__11248, 1, null);
  var map__11249__$1 = (!(map__11249 == null) ? map__11249.cljs$lang$protocol_mask$partition0$ & 64 || map__11249.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.call(null, cljs.core.hash_map, map__11249) : map__11249;
  var path = map__11249__$1;
  var l = cljs.core.get.call(null, map__11249__$1, new cljs.core.Keyword(null, "l", "l", 1395893423));
  var r = cljs.core.get.call(null, map__11249__$1, new cljs.core.Keyword(null, "r", "r", -471384190));
  if (cljs.core.truth_(function() {
    var and__6128__auto__ = path;
    if (cljs.core.truth_(and__6128__auto__)) {
      return cljs.core.seq.call(null, l);
    } else {
      return and__6128__auto__;
    }
  }())) {
    return cljs.core.with_meta.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.peek.call(null, l), cljs.core.assoc.call(null, path, new cljs.core.Keyword(null, "l", "l", 1395893423), cljs.core.pop.call(null, l), new cljs.core.Keyword(null, "r", "r", -471384190), cljs.core.cons.call(null, node, r))], null), cljs.core.meta.call(null, loc));
  } else {
    return null;
  }
};
clojure.zip.leftmost = function clojure$zip$leftmost(loc) {
  var vec__11254 = loc;
  var node = cljs.core.nth.call(null, vec__11254, 0, null);
  var map__11255 = cljs.core.nth.call(null, vec__11254, 1, null);
  var map__11255__$1 = (!(map__11255 == null) ? map__11255.cljs$lang$protocol_mask$partition0$ & 64 || map__11255.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.call(null, cljs.core.hash_map, map__11255) : map__11255;
  var path = map__11255__$1;
  var l = cljs.core.get.call(null, map__11255__$1, new cljs.core.Keyword(null, "l", "l", 1395893423));
  var r = cljs.core.get.call(null, map__11255__$1, new cljs.core.Keyword(null, "r", "r", -471384190));
  if (cljs.core.truth_(function() {
    var and__6128__auto__ = path;
    if (cljs.core.truth_(and__6128__auto__)) {
      return cljs.core.seq.call(null, l);
    } else {
      return and__6128__auto__;
    }
  }())) {
    return cljs.core.with_meta.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.first.call(null, l), cljs.core.assoc.call(null, path, new cljs.core.Keyword(null, "l", "l", 1395893423), cljs.core.PersistentVector.EMPTY, new cljs.core.Keyword(null, "r", "r", -471384190), cljs.core.concat.call(null, cljs.core.rest.call(null, l), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [node], null), r))], null), cljs.core.meta.call(null, 
    loc));
  } else {
    return loc;
  }
};
clojure.zip.insert_left = function clojure$zip$insert_left(loc, item) {
  var vec__11260 = loc;
  var node = cljs.core.nth.call(null, vec__11260, 0, null);
  var map__11261 = cljs.core.nth.call(null, vec__11260, 1, null);
  var map__11261__$1 = (!(map__11261 == null) ? map__11261.cljs$lang$protocol_mask$partition0$ & 64 || map__11261.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.call(null, cljs.core.hash_map, map__11261) : map__11261;
  var path = map__11261__$1;
  var l = cljs.core.get.call(null, map__11261__$1, new cljs.core.Keyword(null, "l", "l", 1395893423));
  if (path == null) {
    throw "Insert at top";
  } else {
    return cljs.core.with_meta.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [node, cljs.core.assoc.call(null, path, new cljs.core.Keyword(null, "l", "l", 1395893423), cljs.core.conj.call(null, l, item), new cljs.core.Keyword(null, "changed?", "changed?", -437828330), true)], null), cljs.core.meta.call(null, loc));
  }
};
clojure.zip.insert_right = function clojure$zip$insert_right(loc, item) {
  var vec__11266 = loc;
  var node = cljs.core.nth.call(null, vec__11266, 0, null);
  var map__11267 = cljs.core.nth.call(null, vec__11266, 1, null);
  var map__11267__$1 = (!(map__11267 == null) ? map__11267.cljs$lang$protocol_mask$partition0$ & 64 || map__11267.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.call(null, cljs.core.hash_map, map__11267) : map__11267;
  var path = map__11267__$1;
  var r = cljs.core.get.call(null, map__11267__$1, new cljs.core.Keyword(null, "r", "r", -471384190));
  if (path == null) {
    throw "Insert at top";
  } else {
    return cljs.core.with_meta.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [node, cljs.core.assoc.call(null, path, new cljs.core.Keyword(null, "r", "r", -471384190), cljs.core.cons.call(null, item, r), new cljs.core.Keyword(null, "changed?", "changed?", -437828330), true)], null), cljs.core.meta.call(null, loc));
  }
};
clojure.zip.replace = function clojure$zip$replace(loc, node) {
  var vec__11270 = loc;
  var _ = cljs.core.nth.call(null, vec__11270, 0, null);
  var path = cljs.core.nth.call(null, vec__11270, 1, null);
  return cljs.core.with_meta.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [node, cljs.core.assoc.call(null, path, new cljs.core.Keyword(null, "changed?", "changed?", -437828330), true)], null), cljs.core.meta.call(null, loc));
};
clojure.zip.edit = function clojure$zip$edit(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___11274 = arguments.length;
  var i__7199__auto___11275 = 0;
  while (true) {
    if (i__7199__auto___11275 < len__7198__auto___11274) {
      args__7205__auto__.push(arguments[i__7199__auto___11275]);
      var G__11276 = i__7199__auto___11275 + 1;
      i__7199__auto___11275 = G__11276;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 2 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(2), 0) : null;
  return clojure.zip.edit.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__7206__auto__);
};
clojure.zip.edit.cljs$core$IFn$_invoke$arity$variadic = function(loc, f, args) {
  return clojure.zip.replace.call(null, loc, cljs.core.apply.call(null, f, clojure.zip.node.call(null, loc), args));
};
clojure.zip.edit.cljs$lang$maxFixedArity = 2;
clojure.zip.edit.cljs$lang$applyTo = function(seq11271) {
  var G__11272 = cljs.core.first.call(null, seq11271);
  var seq11271__$1 = cljs.core.next.call(null, seq11271);
  var G__11273 = cljs.core.first.call(null, seq11271__$1);
  var seq11271__$2 = cljs.core.next.call(null, seq11271__$1);
  return clojure.zip.edit.cljs$core$IFn$_invoke$arity$variadic(G__11272, G__11273, seq11271__$2);
};
clojure.zip.insert_child = function clojure$zip$insert_child(loc, item) {
  return clojure.zip.replace.call(null, loc, clojure.zip.make_node.call(null, loc, clojure.zip.node.call(null, loc), cljs.core.cons.call(null, item, clojure.zip.children.call(null, loc))));
};
clojure.zip.append_child = function clojure$zip$append_child(loc, item) {
  return clojure.zip.replace.call(null, loc, clojure.zip.make_node.call(null, loc, clojure.zip.node.call(null, loc), cljs.core.concat.call(null, clojure.zip.children.call(null, loc), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [item], null))));
};
clojure.zip.next = function clojure$zip$next(loc) {
  if (cljs.core._EQ_.call(null, new cljs.core.Keyword(null, "end", "end", -268185958), loc.call(null, 1))) {
    return loc;
  } else {
    var or__6140__auto__ = function() {
      var and__6128__auto__ = clojure.zip.branch_QMARK_.call(null, loc);
      if (cljs.core.truth_(and__6128__auto__)) {
        return clojure.zip.down.call(null, loc);
      } else {
        return and__6128__auto__;
      }
    }();
    if (cljs.core.truth_(or__6140__auto__)) {
      return or__6140__auto__;
    } else {
      var or__6140__auto____$1 = clojure.zip.right.call(null, loc);
      if (cljs.core.truth_(or__6140__auto____$1)) {
        return or__6140__auto____$1;
      } else {
        var p = loc;
        while (true) {
          if (cljs.core.truth_(clojure.zip.up.call(null, p))) {
            var or__6140__auto____$2 = clojure.zip.right.call(null, clojure.zip.up.call(null, p));
            if (cljs.core.truth_(or__6140__auto____$2)) {
              return or__6140__auto____$2;
            } else {
              var G__11277 = clojure.zip.up.call(null, p);
              p = G__11277;
              continue;
            }
          } else {
            return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [clojure.zip.node.call(null, p), new cljs.core.Keyword(null, "end", "end", -268185958)], null);
          }
          break;
        }
      }
    }
  }
};
clojure.zip.prev = function clojure$zip$prev(loc) {
  var temp__4423__auto__ = clojure.zip.left.call(null, loc);
  if (cljs.core.truth_(temp__4423__auto__)) {
    var lloc = temp__4423__auto__;
    var loc__$1 = lloc;
    while (true) {
      var temp__4423__auto____$1 = function() {
        var and__6128__auto__ = clojure.zip.branch_QMARK_.call(null, loc__$1);
        if (cljs.core.truth_(and__6128__auto__)) {
          return clojure.zip.down.call(null, loc__$1);
        } else {
          return and__6128__auto__;
        }
      }();
      if (cljs.core.truth_(temp__4423__auto____$1)) {
        var child = temp__4423__auto____$1;
        var G__11278 = clojure.zip.rightmost.call(null, child);
        loc__$1 = G__11278;
        continue;
      } else {
        return loc__$1;
      }
      break;
    }
  } else {
    return clojure.zip.up.call(null, loc);
  }
};
clojure.zip.end_QMARK_ = function clojure$zip$end_QMARK_(loc) {
  return cljs.core._EQ_.call(null, new cljs.core.Keyword(null, "end", "end", -268185958), loc.call(null, 1));
};
clojure.zip.remove = function clojure$zip$remove(loc) {
  var vec__11282 = loc;
  var node = cljs.core.nth.call(null, vec__11282, 0, null);
  var map__11283 = cljs.core.nth.call(null, vec__11282, 1, null);
  var map__11283__$1 = (!(map__11283 == null) ? map__11283.cljs$lang$protocol_mask$partition0$ & 64 || map__11283.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.call(null, cljs.core.hash_map, map__11283) : map__11283;
  var path = map__11283__$1;
  var l = cljs.core.get.call(null, map__11283__$1, new cljs.core.Keyword(null, "l", "l", 1395893423));
  var ppath = cljs.core.get.call(null, map__11283__$1, new cljs.core.Keyword(null, "ppath", "ppath", -1758182784));
  var pnodes = cljs.core.get.call(null, map__11283__$1, new cljs.core.Keyword(null, "pnodes", "pnodes", 1739080565));
  var rs = cljs.core.get.call(null, map__11283__$1, new cljs.core.Keyword(null, "r", "r", -471384190));
  if (path == null) {
    throw "Remove at top";
  } else {
    if (cljs.core.count.call(null, l) > 0) {
      var loc__$1 = cljs.core.with_meta.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.peek.call(null, l), cljs.core.assoc.call(null, path, new cljs.core.Keyword(null, "l", "l", 1395893423), cljs.core.pop.call(null, l), new cljs.core.Keyword(null, "changed?", "changed?", -437828330), true)], null), cljs.core.meta.call(null, loc));
      while (true) {
        var temp__4423__auto__ = function() {
          var and__6128__auto__ = clojure.zip.branch_QMARK_.call(null, loc__$1);
          if (cljs.core.truth_(and__6128__auto__)) {
            return clojure.zip.down.call(null, loc__$1);
          } else {
            return and__6128__auto__;
          }
        }();
        if (cljs.core.truth_(temp__4423__auto__)) {
          var child = temp__4423__auto__;
          var G__11285 = clojure.zip.rightmost.call(null, child);
          loc__$1 = G__11285;
          continue;
        } else {
          return loc__$1;
        }
        break;
      }
    } else {
      return cljs.core.with_meta.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [clojure.zip.make_node.call(null, loc, cljs.core.peek.call(null, pnodes), rs), function() {
        var and__6128__auto__ = ppath;
        if (cljs.core.truth_(and__6128__auto__)) {
          return cljs.core.assoc.call(null, ppath, new cljs.core.Keyword(null, "changed?", "changed?", -437828330), true);
        } else {
          return and__6128__auto__;
        }
      }()], null), cljs.core.meta.call(null, loc));
    }
  }
};
goog.provide("hickory.utils");
goog.require("cljs.core");
goog.require("clojure.string");
goog.require("goog.string");
hickory.utils.void_element = new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 16, [new cljs.core.Keyword(null, "hr", "hr", 1377740067), null, new cljs.core.Keyword(null, "meta", "meta", 1499536964), null, new cljs.core.Keyword(null, "wbr", "wbr", 228661800), null, new cljs.core.Keyword(null, "command", "command", -894540724), null, new cljs.core.Keyword(null, "source", "source", -433931539), null, new cljs.core.Keyword(null, "param", "param", 2013631823), null, new cljs.core.Keyword(null, 
"link", "link", -1769163468), null, new cljs.core.Keyword(null, "col", "col", -1959363084), null, new cljs.core.Keyword(null, "area", "area", 472007256), null, new cljs.core.Keyword(null, "br", "br", 934104792), null, new cljs.core.Keyword(null, "input", "input", 556931961), null, new cljs.core.Keyword(null, "base", "base", 185279322), null, new cljs.core.Keyword(null, "embed", "embed", -1354913349), null, new cljs.core.Keyword(null, "keygen", "keygen", -571693253), null, new cljs.core.Keyword(null, 
"img", "img", 1442687358), null, new cljs.core.Keyword(null, "track", "track", 195787487), null], null), null);
hickory.utils.unescapable_content = new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "script", "script", -1304443801), null, new cljs.core.Keyword(null, "style", "style", -496642736), null], null), null);
hickory.utils.html_escape = function hickory$utils$html_escape(s) {
  return goog.string.htmlEscape(s);
};
hickory.utils.starts_with = function hickory$utils$starts_with(s, prefix) {
  return goog.string.startsWith(s, prefix);
};
hickory.utils.lower_case_keyword = function hickory$utils$lower_case_keyword(s) {
  return cljs.core.keyword.call(null, clojure.string.lower_case.call(null, s));
};
hickory.utils.render_doctype = function hickory$utils$render_doctype(name, publicid, systemid) {
  return [cljs.core.str("\x3c!DOCTYPE "), cljs.core.str(name), cljs.core.str(cljs.core.truth_(cljs.core.not_empty.call(null, publicid)) ? [cljs.core.str(' PUBLIC "'), cljs.core.str(publicid), cljs.core.str('"')].join("") : null), cljs.core.str(cljs.core.truth_(cljs.core.not_empty.call(null, systemid)) ? [cljs.core.str(' "'), cljs.core.str(systemid), cljs.core.str('"')].join("") : null), cljs.core.str("\x3e")].join("");
};
goog.provide("hickory.core");
goog.require("cljs.core");
goog.require("hickory.utils");
goog.require("clojure.zip");
goog.require("goog.string");
hickory.core.HiccupRepresentable = function() {
};
hickory.core.as_hiccup = function hickory$core$as_hiccup(this$) {
  if (!(this$ == null) && !(this$.hickory$core$HiccupRepresentable$as_hiccup$arity$1 == null)) {
    return this$.hickory$core$HiccupRepresentable$as_hiccup$arity$1(this$);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = hickory.core.as_hiccup[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$);
    } else {
      var m__6796__auto____$1 = hickory.core.as_hiccup["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$);
      } else {
        throw cljs.core.missing_protocol.call(null, "HiccupRepresentable.as-hiccup", this$);
      }
    }
  }
};
hickory.core.HickoryRepresentable = function() {
};
hickory.core.as_hickory = function hickory$core$as_hickory(this$) {
  if (!(this$ == null) && !(this$.hickory$core$HickoryRepresentable$as_hickory$arity$1 == null)) {
    return this$.hickory$core$HickoryRepresentable$as_hickory$arity$1(this$);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = hickory.core.as_hickory[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$);
    } else {
      var m__6796__auto____$1 = hickory.core.as_hickory["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$);
      } else {
        throw cljs.core.missing_protocol.call(null, "HickoryRepresentable.as-hickory", this$);
      }
    }
  }
};
hickory.core.node_type = function hickory$core$node_type(type) {
  return Node[[cljs.core.str(type), cljs.core.str("_NODE")].join("")];
};
hickory.core.Attribute = hickory.core.node_type.call(null, "ATTRIBUTE");
hickory.core.Comment = hickory.core.node_type.call(null, "COMMENT");
hickory.core.Document = hickory.core.node_type.call(null, "DOCUMENT");
hickory.core.DocumentType = hickory.core.node_type.call(null, "DOCUMENT_TYPE");
hickory.core.Element = hickory.core.node_type.call(null, "ELEMENT");
hickory.core.Text = hickory.core.node_type.call(null, "TEXT");
hickory.core.extend_type_with_seqable = function hickory$core$extend_type_with_seqable(t) {
  t.prototype.cljs$core$ISeqable$ = true;
  return t.prototype.cljs$core$ISeqable$_seq$arity$1 = function(array) {
    var array__$1 = this;
    return cljs.core.array_seq.call(null, array__$1);
  };
};
hickory.core.extend_type_with_seqable.call(null, NodeList);
if (typeof NamedNodeMap !== "undefined") {
  hickory.core.extend_type_with_seqable.call(null, NamedNodeMap);
} else {
}
if (typeof MozNamedAttrMap !== "undefined") {
  hickory.core.extend_type_with_seqable.call(null, MozNamedAttrMap);
} else {
}
hickory.core.format_doctype = function hickory$core$format_doctype(dt) {
  var name = dt["name"];
  var publicId = dt["publicId"];
  var systemId = dt["systemId"];
  if (!cljs.core.empty_QMARK_.call(null, publicId)) {
    return goog.string.format('\x3c!DOCTYPE %s PUBLIC "%s" "%s"\x3e', name, publicId, systemId);
  } else {
    return [cljs.core.str("\x3c!DOCTYPE "), cljs.core.str(name), cljs.core.str("\x3e")].join("");
  }
};
hickory.core.HiccupRepresentable["object"] = true;
hickory.core.as_hiccup["object"] = function(this$) {
  var pred__13608 = cljs.core._EQ_;
  var expr__13609 = this$["nodeType"];
  if (cljs.core.truth_(pred__13608.call(null, hickory.core.Attribute, expr__13609))) {
    return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [hickory.utils.lower_case_keyword.call(null, this$["name"]), this$["value"]], null);
  } else {
    if (cljs.core.truth_(pred__13608.call(null, hickory.core.Comment, expr__13609))) {
      return [cljs.core.str("\x3c!--"), cljs.core.str(this$["data"]), cljs.core.str("--\x3e")].join("");
    } else {
      if (cljs.core.truth_(pred__13608.call(null, hickory.core.Document, expr__13609))) {
        return cljs.core.map.call(null, hickory.core.as_hiccup, this$["childNodes"]);
      } else {
        if (cljs.core.truth_(pred__13608.call(null, hickory.core.DocumentType, expr__13609))) {
          return hickory.core.format_doctype.call(null, this$);
        } else {
          if (cljs.core.truth_(pred__13608.call(null, hickory.core.Element, expr__13609))) {
            var tag = hickory.utils.lower_case_keyword.call(null, this$["tagName"]);
            return cljs.core.into.call(null, cljs.core.PersistentVector.EMPTY, cljs.core.concat.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag, cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, cljs.core.map.call(null, hickory.core.as_hiccup, this$["attributes"]))], null), cljs.core.truth_(hickory.utils.unescapable_content.call(null, tag)) ? cljs.core.map.call(null, function(tag, pred__13608, expr__13609) {
              return function(p1__13607_SHARP_) {
                return p1__13607_SHARP_["wholeText"];
              };
            }(tag, pred__13608, expr__13609), this$["childNodes"]) : cljs.core.map.call(null, hickory.core.as_hiccup, this$["childNodes"])));
          } else {
            if (cljs.core.truth_(pred__13608.call(null, hickory.core.Text, expr__13609))) {
              return hickory.utils.html_escape.call(null, this$["wholeText"]);
            } else {
              throw new Error([cljs.core.str("No matching clause: "), cljs.core.str(expr__13609)].join(""));
            }
          }
        }
      }
    }
  }
};
hickory.core.HickoryRepresentable["object"] = true;
hickory.core.as_hickory["object"] = function(this$) {
  var pred__13611 = cljs.core._EQ_;
  var expr__13612 = this$["nodeType"];
  if (cljs.core.truth_(pred__13611.call(null, hickory.core.Attribute, expr__13612))) {
    return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [hickory.utils.lower_case_keyword.call(null, this$["name"]), this$["value"]], null);
  } else {
    if (cljs.core.truth_(pred__13611.call(null, hickory.core.Comment, expr__13612))) {
      return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "type", "type", 1174270348), new cljs.core.Keyword(null, "comment", "comment", 532206069), new cljs.core.Keyword(null, "content", "content", 15833224), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [this$["data"]], null)], null);
    } else {
      if (cljs.core.truth_(pred__13611.call(null, hickory.core.Document, expr__13612))) {
        return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "type", "type", 1174270348), new cljs.core.Keyword(null, "document", "document", -1329188687), new cljs.core.Keyword(null, "content", "content", 15833224), cljs.core.not_empty.call(null, cljs.core.into.call(null, cljs.core.PersistentVector.EMPTY, cljs.core.map.call(null, hickory.core.as_hickory, this$["childNodes"])))], null);
      } else {
        if (cljs.core.truth_(pred__13611.call(null, hickory.core.DocumentType, expr__13612))) {
          return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "type", "type", 1174270348), new cljs.core.Keyword(null, "document-type", "document-type", -1309437776), new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "name", "name", 1843675177), this$["name"], new cljs.core.Keyword(null, "publicid", "publicid", 1557995850), this$["publicId"], new cljs.core.Keyword(null, "systemid", "systemid", 
          -2052878192), this$["systemId"]], null)], null);
        } else {
          if (cljs.core.truth_(pred__13611.call(null, hickory.core.Element, expr__13612))) {
            return new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "type", "type", 1174270348), new cljs.core.Keyword(null, "element", "element", 1974019749), new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), cljs.core.not_empty.call(null, cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, cljs.core.map.call(null, hickory.core.as_hickory, this$["attributes"]))), new cljs.core.Keyword(null, "tag", "tag", -1290361223), hickory.utils.lower_case_keyword.call(null, 
            this$["tagName"]), new cljs.core.Keyword(null, "content", "content", 15833224), cljs.core.not_empty.call(null, cljs.core.into.call(null, cljs.core.PersistentVector.EMPTY, cljs.core.map.call(null, hickory.core.as_hickory, this$["childNodes"])))], null);
          } else {
            if (cljs.core.truth_(pred__13611.call(null, hickory.core.Text, expr__13612))) {
              return this$["wholeText"];
            } else {
              throw new Error([cljs.core.str("No matching clause: "), cljs.core.str(expr__13612)].join(""));
            }
          }
        }
      }
    }
  }
};
hickory.core.extract_doctype = function hickory$core$extract_doctype(s) {
  var temp__4425__auto__ = cljs.core.second.call(null, function() {
    var or__6140__auto__ = cljs.core.re_find.call(null, /<!DOCTYPE ([^>]*)>/, s);
    if (cljs.core.truth_(or__6140__auto__)) {
      return or__6140__auto__;
    } else {
      return cljs.core.re_find.call(null, /<!doctype ([^>]*)>/, s);
    }
  }());
  if (cljs.core.truth_(temp__4425__auto__)) {
    var doctype = temp__4425__auto__;
    return cljs.core.re_find.call(null, /([^\s]*)(\s+PUBLIC\s+[\"]?([^\"]*)[\"]?\s+[\"]?([^\"]*)[\"]?)?/, doctype);
  } else {
    return null;
  }
};
hickory.core.remove_el = function hickory$core$remove_el(el) {
  return el["parentNode"].removeChild(el);
};
hickory.core.parse_dom_with_domparser = function hickory$core$parse_dom_with_domparser(s) {
  if (typeof DOMParser !== "undefined") {
    return (new DOMParser).parseFromString(s, "text/html");
  } else {
    return null;
  }
};
hickory.core.parse_dom_with_write = function hickory$core$parse_dom_with_write(s) {
  var doc = document.implementation.createHTMLDocument("");
  var doctype_el = doc["doctype"];
  if (cljs.core.truth_(hickory.core.extract_doctype.call(null, s))) {
  } else {
    hickory.core.remove_el.call(null, doctype_el);
  }
  var temp__4425__auto___13614 = cljs.core.first.call(null, doc["head"]["childNodes"]);
  if (cljs.core.truth_(temp__4425__auto___13614)) {
    var title_el_13615 = temp__4425__auto___13614;
    if (cljs.core.empty_QMARK_.call(null, title_el_13615["text"])) {
      hickory.core.remove_el.call(null, title_el_13615);
    } else {
    }
  } else {
  }
  doc.write(s);
  return doc;
};
hickory.core.parse = function hickory$core$parse(s) {
  var or__6140__auto__ = hickory.core.parse_dom_with_domparser.call(null, s);
  if (cljs.core.truth_(or__6140__auto__)) {
    return or__6140__auto__;
  } else {
    return hickory.core.parse_dom_with_write.call(null, s);
  }
};
hickory.core.parse_fragment = function hickory$core$parse_fragment(s) {
  return hickory.core.parse.call(null, s)["body"]["childNodes"];
};
goog.provide("kioo.core");
goog.require("cljs.core");
goog.require("kioo.util");
goog.require("hickory.core");
goog.require("sablono.core");
goog.require("kioo.common");
kioo.core.value_component = function kioo$core$value_component(renderer) {
  var react_component = React.createClass({"shouldComponentUpdate":function(next_props, _) {
    var this$ = this;
    return cljs.core.not_EQ_.call(null, this$.props["value"], next_props["value"]);
  }, "render":function() {
    var this$ = this;
    var _STAR_component_STAR_13619 = kioo.util._STAR_component_STAR_;
    kioo.util._STAR_component_STAR_ = this$;
    try {
      return cljs.core.apply.call(null, renderer, this$.props["value"], this$.props["statics"]);
    } finally {
      kioo.util._STAR_component_STAR_ = _STAR_component_STAR_13619;
    }
  }});
  var factory = React.createFactory(react_component);
  return function(react_component, factory) {
    return function() {
      var G__13620__delegate = function(value, static_args) {
        return factory.call(null, {"value":value, "statics":static_args});
      };
      var G__13620 = function(value, var_args) {
        var static_args = null;
        if (arguments.length > 1) {
          var G__13621__i = 0, G__13621__a = new Array(arguments.length - 1);
          while (G__13621__i < G__13621__a.length) {
            G__13621__a[G__13621__i] = arguments[G__13621__i + 1];
            ++G__13621__i;
          }
          static_args = new cljs.core.IndexedSeq(G__13621__a, 0);
        }
        return G__13620__delegate.call(this, value, static_args);
      };
      G__13620.cljs$lang$maxFixedArity = 1;
      G__13620.cljs$lang$applyTo = function(arglist__13622) {
        var value = cljs.core.first(arglist__13622);
        var static_args = cljs.core.rest(arglist__13622);
        return G__13620__delegate(value, static_args);
      };
      G__13620.cljs$core$IFn$_invoke$arity$variadic = G__13620__delegate;
      return G__13620;
    }();
  }(react_component, factory);
};
kioo.core.make_dom = function kioo$core$make_dom(node) {
  if (cljs.core.map_QMARK_.call(null, node)) {
    return cljs.core.apply.call(null, (new cljs.core.Keyword(null, "sym", "sym", -1444860305)).cljs$core$IFn$_invoke$arity$1(node), cljs.core.clj__GT_js.call(null, (new cljs.core.Keyword(null, "attrs", "attrs", -2090668713)).cljs$core$IFn$_invoke$arity$1(node)), kioo.util.flatten_nodes.call(null, (new cljs.core.Keyword(null, "content", "content", 15833224)).cljs$core$IFn$_invoke$arity$1(node)));
  } else {
    return node;
  }
};
kioo.core.to_list = function kioo$core$to_list(vals) {
  if (cljs.core.seq_QMARK_.call(null, vals)) {
    return vals;
  } else {
    return cljs.core._conj.call(null, cljs.core.List.EMPTY, vals);
  }
};
kioo.core.handle_wrapper = function kioo$core$handle_wrapper(dom_fn) {
  return function() {
    var kioo$core$handle_wrapper_$_hw__delegate = function(node, body) {
      var rnode = cljs.core.seq_QMARK_.call(null, node) ? cljs.core.apply.call(null, kioo$core$handle_wrapper_$_hw, node) : cljs.core.map_QMARK_.call(null, node) && !cljs.core.empty_QMARK_.call(null, (new cljs.core.Keyword(null, "events", "events", 1792552201)).cljs$core$IFn$_invoke$arity$1(node)) ? function() {
        var revents = (new cljs.core.Keyword(null, "events", "events", 1792552201)).cljs$core$IFn$_invoke$arity$1(node);
        var props = function() {
          var G__13626 = cljs.core.clj__GT_js.call(null, revents);
          G__13626["dom-fn"] = dom_fn;
          G__13626["node"] = node;
          return G__13626;
        }();
        return kioo.util.WrapComponent.call(null, props);
      }() : dom_fn.call(null, node);
      if (cljs.core.empty_QMARK_.call(null, body)) {
        return rnode;
      } else {
        return cljs.core.cons.call(null, rnode, kioo.core.to_list.call(null, cljs.core.apply.call(null, kioo$core$handle_wrapper_$_hw, body)));
      }
    };
    var kioo$core$handle_wrapper_$_hw = function(node, var_args) {
      var body = null;
      if (arguments.length > 1) {
        var G__13627__i = 0, G__13627__a = new Array(arguments.length - 1);
        while (G__13627__i < G__13627__a.length) {
          G__13627__a[G__13627__i] = arguments[G__13627__i + 1];
          ++G__13627__i;
        }
        body = new cljs.core.IndexedSeq(G__13627__a, 0);
      }
      return kioo$core$handle_wrapper_$_hw__delegate.call(this, node, body);
    };
    kioo$core$handle_wrapper_$_hw.cljs$lang$maxFixedArity = 1;
    kioo$core$handle_wrapper_$_hw.cljs$lang$applyTo = function(arglist__13628) {
      var node = cljs.core.first(arglist__13628);
      var body = cljs.core.rest(arglist__13628);
      return kioo$core$handle_wrapper_$_hw__delegate(node, body);
    };
    kioo$core$handle_wrapper_$_hw.cljs$core$IFn$_invoke$arity$variadic = kioo$core$handle_wrapper_$_hw__delegate;
    return kioo$core$handle_wrapper_$_hw;
  }();
};
kioo.core.content = kioo.common.content;
kioo.core.append = kioo.common.append;
kioo.core.prepend = kioo.common.prepend;
kioo.core.after = function kioo$core$after(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___13630 = arguments.length;
  var i__7199__auto___13631 = 0;
  while (true) {
    if (i__7199__auto___13631 < len__7198__auto___13630) {
      args__7205__auto__.push(arguments[i__7199__auto___13631]);
      var G__13632 = i__7199__auto___13631 + 1;
      i__7199__auto___13631 = G__13632;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return kioo.core.after.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
kioo.core.after.cljs$core$IFn$_invoke$arity$variadic = function(body) {
  return function(node) {
    if (cljs.core.seq_QMARK_.call(null, node)) {
      return cljs.core.concat.call(null, node, body);
    } else {
      return cljs.core.cons.call(null, kioo.core.make_dom.call(null, node), body);
    }
  };
};
kioo.core.after.cljs$lang$maxFixedArity = 0;
kioo.core.after.cljs$lang$applyTo = function(seq13629) {
  return kioo.core.after.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq13629));
};
kioo.core.before = function kioo$core$before(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___13634 = arguments.length;
  var i__7199__auto___13635 = 0;
  while (true) {
    if (i__7199__auto___13635 < len__7198__auto___13634) {
      args__7205__auto__.push(arguments[i__7199__auto___13635]);
      var G__13636 = i__7199__auto___13635 + 1;
      i__7199__auto___13635 = G__13636;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return kioo.core.before.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
kioo.core.before.cljs$core$IFn$_invoke$arity$variadic = function(body) {
  return function(node) {
    if (cljs.core.seq_QMARK_.call(null, node)) {
      return cljs.core.concat.call(null, body, node);
    } else {
      return cljs.core.concat.call(null, body, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [kioo.core.make_dom.call(null, node)], null));
    }
  };
};
kioo.core.before.cljs$lang$maxFixedArity = 0;
kioo.core.before.cljs$lang$applyTo = function(seq13633) {
  return kioo.core.before.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq13633));
};
kioo.core.substitute = kioo.common.substitute;
kioo.core.set_attr = kioo.common.set_attr;
kioo.core.remove_attr = kioo.common.remove_attr;
kioo.core.do__GT_ = kioo.common.do__GT_;
kioo.core.set_style = kioo.common.set_style;
kioo.core.remove_style = kioo.common.remove_style;
kioo.core.set_class = kioo.common.set_class;
kioo.core.add_class = kioo.common.add_class;
kioo.core.remove_class = kioo.common.remove_class;
kioo.core.wrap = function kioo$core$wrap(tag, attrs) {
  return function(node) {
    return new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "tag", "tag", -1290361223), tag, new cljs.core.Keyword(null, "sym", "sym", -1444860305), React.DOM[cljs.core.name.call(null, tag)], new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), kioo.util.convert_attrs.call(null, attrs), new cljs.core.Keyword(null, "content", "content", 15833224), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [kioo.core.make_dom.call(null, node)], null)], 
    null);
  };
};
kioo.core.unwrap = kioo.common.unwrap;
kioo.core.html = function kioo$core$html(content) {
  return sablono.interpreter.interpret.call(null, content);
};
kioo.core.html_content = function kioo$core$html_content(content) {
  return function(node) {
    var children = cljs.core.map.call(null, function(p1__13637_SHARP_) {
      return sablono.interpreter.interpret.call(null, hickory.core.as_hiccup.call(null, p1__13637_SHARP_));
    }, hickory.core.parse_fragment.call(null, content));
    return cljs.core.assoc.call(null, node, new cljs.core.Keyword(null, "content", "content", 15833224), children);
  };
};
kioo.core.listen_react_events = new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 6, ["onRender", null, "onUpdate", null, "onWillMount", null, "onMount", null, "onWillUpdate", null, "onWillReceiveProps", null], null), null);
kioo.core.listen = function kioo$core$listen(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___13646 = arguments.length;
  var i__7199__auto___13647 = 0;
  while (true) {
    if (i__7199__auto___13647 < len__7198__auto___13646) {
      args__7205__auto__.push(arguments[i__7199__auto___13647]);
      var G__13648 = i__7199__auto___13647 + 1;
      i__7199__auto___13647 = G__13648;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return kioo.core.listen.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
kioo.core.listen.cljs$core$IFn$_invoke$arity$variadic = function(events_PLUS_fns) {
  var pairs = cljs.core.map.call(null, function(p__13640) {
    var vec__13641 = p__13640;
    var k = cljs.core.nth.call(null, vec__13641, 0, null);
    var v = cljs.core.nth.call(null, vec__13641, 1, null);
    return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [kioo.util.camel_case.call(null, k), v], null);
  }, cljs.core.partition.call(null, 2, events_PLUS_fns));
  var vec__13639 = cljs.core.reduce.call(null, function(pairs) {
    return function(p__13642, p__13643) {
      var vec__13644 = p__13642;
      var r = cljs.core.nth.call(null, vec__13644, 0, null);
      var s = cljs.core.nth.call(null, vec__13644, 1, null);
      var vec__13645 = p__13643;
      var k = cljs.core.nth.call(null, vec__13645, 0, null);
      var v = cljs.core.nth.call(null, vec__13645, 1, null);
      if (cljs.core.truth_(kioo.core.listen_react_events.call(null, k))) {
        return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.assoc.call(null, r, k, v), s], null);
      } else {
        return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [r, cljs.core.assoc.call(null, s, k, v)], null);
      }
    };
  }(pairs), cljs.core.PersistentVector.EMPTY, pairs);
  var rev = cljs.core.nth.call(null, vec__13639, 0, null);
  var sev = cljs.core.nth.call(null, vec__13639, 1, null);
  return function(pairs, vec__13639, rev, sev) {
    return function(node) {
      return cljs.core.assoc.call(null, node, new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), cljs.core.merge.call(null, (new cljs.core.Keyword(null, "attrs", "attrs", -2090668713)).cljs$core$IFn$_invoke$arity$1(node), sev), new cljs.core.Keyword(null, "events", "events", 1792552201), cljs.core.merge.call(null, (new cljs.core.Keyword(null, "events", "events", 1792552201)).cljs$core$IFn$_invoke$arity$1(node), rev));
    };
  }(pairs, vec__13639, rev, sev);
};
kioo.core.listen.cljs$lang$maxFixedArity = 0;
kioo.core.listen.cljs$lang$applyTo = function(seq13638) {
  return kioo.core.listen.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq13638));
};
kioo.core.lifecycle_events = new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 9, ["willMount", null, "willUpdate", null, "willReceiveProps", null, "initState", null, "willUnmount", null, "defaultProps", null, "shouldUpdate", null, "didMount", null, "didUpdate", null], null), null);
kioo.core.lifecycle = function kioo$core$lifecycle(events_fns) {
  return function(node) {
    return cljs.core.assoc.call(null, node, new cljs.core.Keyword(null, "events", "events", 1792552201), cljs.core.merge.call(null, (new cljs.core.Keyword(null, "events", "events", 1792552201)).cljs$core$IFn$_invoke$arity$1(node), cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, function() {
      var iter__6912__auto__ = function kioo$core$lifecycle_$_iter__13657(s__13658) {
        return new cljs.core.LazySeq(null, function() {
          var s__13658__$1 = s__13658;
          while (true) {
            var temp__4425__auto__ = cljs.core.seq.call(null, s__13658__$1);
            if (temp__4425__auto__) {
              var s__13658__$2 = temp__4425__auto__;
              if (cljs.core.chunked_seq_QMARK_.call(null, s__13658__$2)) {
                var c__6910__auto__ = cljs.core.chunk_first.call(null, s__13658__$2);
                var size__6911__auto__ = cljs.core.count.call(null, c__6910__auto__);
                var b__13660 = cljs.core.chunk_buffer.call(null, size__6911__auto__);
                if (function() {
                  var i__13659 = 0;
                  while (true) {
                    if (i__13659 < size__6911__auto__) {
                      var vec__13663 = cljs.core._nth.call(null, c__6910__auto__, i__13659);
                      var k = cljs.core.nth.call(null, vec__13663, 0, null);
                      var v = cljs.core.nth.call(null, vec__13663, 1, null);
                      cljs.core.chunk_append.call(null, b__13660, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [kioo.util.camel_case.call(null, k), v], null));
                      var G__13665 = i__13659 + 1;
                      i__13659 = G__13665;
                      continue;
                    } else {
                      return true;
                    }
                    break;
                  }
                }()) {
                  return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__13660), kioo$core$lifecycle_$_iter__13657.call(null, cljs.core.chunk_rest.call(null, s__13658__$2)));
                } else {
                  return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__13660), null);
                }
              } else {
                var vec__13664 = cljs.core.first.call(null, s__13658__$2);
                var k = cljs.core.nth.call(null, vec__13664, 0, null);
                var v = cljs.core.nth.call(null, vec__13664, 1, null);
                return cljs.core.cons.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [kioo.util.camel_case.call(null, k), v], null), kioo$core$lifecycle_$_iter__13657.call(null, cljs.core.rest.call(null, s__13658__$2)));
              }
            } else {
              return null;
            }
            break;
          }
        }, null, null);
      };
      return iter__6912__auto__.call(null, events_fns);
    }())));
  };
};
kioo.core.render = function kioo$core$render(component, node) {
  return React.render(component, node);
};
goog.provide("kioo.om");
goog.require("cljs.core");
goog.require("om.dom");
goog.require("kioo.core");
goog.require("kioo.util");
kioo.om.make_dom = function kioo$om$make_dom(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___13670 = arguments.length;
  var i__7199__auto___13671 = 0;
  while (true) {
    if (i__7199__auto___13671 < len__7198__auto___13670) {
      args__7205__auto__.push(arguments[i__7199__auto___13671]);
      var G__13672 = i__7199__auto___13671 + 1;
      i__7199__auto___13671 = G__13672;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 1 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(1), 0) : null;
  return kioo.om.make_dom.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__7206__auto__);
};
kioo.om.make_dom.cljs$core$IFn$_invoke$arity$variadic = function(node, body) {
  if (cljs.core.map_QMARK_.call(null, node)) {
    return cljs.core.apply.call(null, (new cljs.core.Keyword(null, "sym", "sym", -1444860305)).cljs$core$IFn$_invoke$arity$1(node), cljs.core.clj__GT_js.call(null, (new cljs.core.Keyword(null, "attrs", "attrs", -2090668713)).cljs$core$IFn$_invoke$arity$1(node)), kioo.util.flatten_nodes.call(null, (new cljs.core.Keyword(null, "content", "content", 15833224)).cljs$core$IFn$_invoke$arity$1(node)));
  } else {
    return node;
  }
};
kioo.om.make_dom.cljs$lang$maxFixedArity = 1;
kioo.om.make_dom.cljs$lang$applyTo = function(seq13668) {
  var G__13669 = cljs.core.first.call(null, seq13668);
  var seq13668__$1 = cljs.core.next.call(null, seq13668);
  return kioo.om.make_dom.cljs$core$IFn$_invoke$arity$variadic(G__13669, seq13668__$1);
};
kioo.om.content = kioo.core.content;
kioo.om.append = kioo.core.append;
kioo.om.prepend = kioo.core.prepend;
kioo.om.after = function kioo$om$after(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___13674 = arguments.length;
  var i__7199__auto___13675 = 0;
  while (true) {
    if (i__7199__auto___13675 < len__7198__auto___13674) {
      args__7205__auto__.push(arguments[i__7199__auto___13675]);
      var G__13676 = i__7199__auto___13675 + 1;
      i__7199__auto___13675 = G__13676;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return kioo.om.after.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
kioo.om.after.cljs$core$IFn$_invoke$arity$variadic = function(body) {
  return function(node) {
    if (cljs.core.seq_QMARK_.call(null, node)) {
      return cljs.core.concat.call(null, node, body);
    } else {
      return cljs.core.cons.call(null, kioo.om.make_dom.call(null, node), body);
    }
  };
};
kioo.om.after.cljs$lang$maxFixedArity = 0;
kioo.om.after.cljs$lang$applyTo = function(seq13673) {
  return kioo.om.after.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq13673));
};
kioo.om.before = function kioo$om$before(var_args) {
  var args__7205__auto__ = [];
  var len__7198__auto___13678 = arguments.length;
  var i__7199__auto___13679 = 0;
  while (true) {
    if (i__7199__auto___13679 < len__7198__auto___13678) {
      args__7205__auto__.push(arguments[i__7199__auto___13679]);
      var G__13680 = i__7199__auto___13679 + 1;
      i__7199__auto___13679 = G__13680;
      continue;
    } else {
    }
    break;
  }
  var argseq__7206__auto__ = 0 < args__7205__auto__.length ? new cljs.core.IndexedSeq(args__7205__auto__.slice(0), 0) : null;
  return kioo.om.before.cljs$core$IFn$_invoke$arity$variadic(argseq__7206__auto__);
};
kioo.om.before.cljs$core$IFn$_invoke$arity$variadic = function(body) {
  return function(node) {
    if (cljs.core.seq_QMARK_.call(null, node)) {
      return cljs.core.concat.call(null, body, node);
    } else {
      return cljs.core.concat.call(null, body, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [kioo.om.make_dom.call(null, node)], null));
    }
  };
};
kioo.om.before.cljs$lang$maxFixedArity = 0;
kioo.om.before.cljs$lang$applyTo = function(seq13677) {
  return kioo.om.before.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq13677));
};
kioo.om.substitute = kioo.core.substitute;
kioo.om.set_attr = kioo.core.set_attr;
kioo.om.remove_attr = kioo.core.remove_attr;
kioo.om.do__GT_ = kioo.core.do__GT_;
kioo.om.set_style = kioo.core.set_style;
kioo.om.remove_style = kioo.core.remove_style;
kioo.om.set_class = kioo.core.set_class;
kioo.om.add_class = kioo.core.add_class;
kioo.om.remove_class = kioo.core.remove_class;
kioo.om.wrap = function kioo$om$wrap(tag, attrs) {
  return function(node) {
    return new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "tag", "tag", -1290361223), tag, new cljs.core.Keyword(null, "sym", "sym", -1444860305), React.DOM[cljs.core.name.call(null, tag)], new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), kioo.util.convert_attrs.call(null, attrs), new cljs.core.Keyword(null, "content", "content", 15833224), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [kioo.om.make_dom.call(null, node)], null)], 
    null);
  };
};
kioo.om.unwrap = kioo.core.unwrap;
kioo.om.html = kioo.core.html;
kioo.om.html_content = kioo.core.html_content;
kioo.om.listen = kioo.core.listen;
kioo.om.lifecycle = kioo.core.lifecycle;
goog.provide("goog.userAgent.product");
goog.require("goog.labs.userAgent.browser");
goog.require("goog.labs.userAgent.platform");
goog.require("goog.userAgent");
goog.define("goog.userAgent.product.ASSUME_FIREFOX", false);
goog.define("goog.userAgent.product.ASSUME_IPHONE", false);
goog.define("goog.userAgent.product.ASSUME_IPAD", false);
goog.define("goog.userAgent.product.ASSUME_ANDROID", false);
goog.define("goog.userAgent.product.ASSUME_CHROME", false);
goog.define("goog.userAgent.product.ASSUME_SAFARI", false);
goog.userAgent.product.PRODUCT_KNOWN_ = goog.userAgent.ASSUME_IE || goog.userAgent.ASSUME_EDGE || goog.userAgent.ASSUME_OPERA || goog.userAgent.product.ASSUME_FIREFOX || goog.userAgent.product.ASSUME_IPHONE || goog.userAgent.product.ASSUME_IPAD || goog.userAgent.product.ASSUME_ANDROID || goog.userAgent.product.ASSUME_CHROME || goog.userAgent.product.ASSUME_SAFARI;
goog.userAgent.product.OPERA = goog.userAgent.OPERA;
goog.userAgent.product.IE = goog.userAgent.IE;
goog.userAgent.product.EDGE = goog.userAgent.EDGE;
goog.userAgent.product.FIREFOX = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_FIREFOX : goog.labs.userAgent.browser.isFirefox();
goog.userAgent.product.isIphoneOrIpod_ = function() {
  return goog.labs.userAgent.platform.isIphone() || goog.labs.userAgent.platform.isIpod();
};
goog.userAgent.product.IPHONE = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_IPHONE : goog.userAgent.product.isIphoneOrIpod_();
goog.userAgent.product.IPAD = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_IPAD : goog.labs.userAgent.platform.isIpad();
goog.userAgent.product.ANDROID = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_ANDROID : goog.labs.userAgent.browser.isAndroidBrowser();
goog.userAgent.product.CHROME = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_CHROME : goog.labs.userAgent.browser.isChrome();
goog.userAgent.product.isSafariDesktop_ = function() {
  return goog.labs.userAgent.browser.isSafari() && !goog.labs.userAgent.platform.isIos();
};
goog.userAgent.product.SAFARI = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_SAFARI : goog.userAgent.product.isSafariDesktop_();
goog.provide("goog.dom.dataset");
goog.require("goog.string");
goog.require("goog.userAgent.product");
goog.dom.dataset.ALLOWED_ = !goog.userAgent.product.IE;
goog.dom.dataset.PREFIX_ = "data-";
goog.dom.dataset.set = function(element, key, value) {
  if (goog.dom.dataset.ALLOWED_ && element.dataset) {
    element.dataset[key] = value;
  } else {
    element.setAttribute(goog.dom.dataset.PREFIX_ + goog.string.toSelectorCase(key), value);
  }
};
goog.dom.dataset.get = function(element, key) {
  if (goog.dom.dataset.ALLOWED_ && element.dataset) {
    if (!(key in element.dataset)) {
      return null;
    }
    return element.dataset[key];
  } else {
    return element.getAttribute(goog.dom.dataset.PREFIX_ + goog.string.toSelectorCase(key));
  }
};
goog.dom.dataset.remove = function(element, key) {
  if (goog.dom.dataset.ALLOWED_ && element.dataset) {
    delete element.dataset[key];
  } else {
    element.removeAttribute(goog.dom.dataset.PREFIX_ + goog.string.toSelectorCase(key));
  }
};
goog.dom.dataset.has = function(element, key) {
  if (goog.dom.dataset.ALLOWED_ && element.dataset) {
    return key in element.dataset;
  } else {
    if (element.hasAttribute) {
      return element.hasAttribute(goog.dom.dataset.PREFIX_ + goog.string.toSelectorCase(key));
    } else {
      return !!element.getAttribute(goog.dom.dataset.PREFIX_ + goog.string.toSelectorCase(key));
    }
  }
};
goog.dom.dataset.getAll = function(element) {
  if (goog.dom.dataset.ALLOWED_ && element.dataset) {
    return element.dataset;
  } else {
    var dataset = {};
    var attributes = element.attributes;
    for (var i = 0;i < attributes.length;++i) {
      var attribute = attributes[i];
      if (goog.string.startsWith(attribute.name, goog.dom.dataset.PREFIX_)) {
        var key = goog.string.toCamelCase(attribute.name.substr(5));
        dataset[key] = attribute.value;
      }
    }
    return dataset;
  }
};
goog.provide("goog.ui.IdGenerator");
goog.ui.IdGenerator = function() {
};
goog.addSingletonGetter(goog.ui.IdGenerator);
goog.ui.IdGenerator.prototype.nextId_ = 0;
goog.ui.IdGenerator.prototype.getNextUniqueId = function() {
  return ":" + (this.nextId_++).toString(36);
};
goog.provide("om.core");
goog.require("cljs.core");
goog.require("goog.dom");
goog.require("om.dom");
goog.require("goog.dom.dataset");
goog.require("goog.object");
goog.require("goog.ui.IdGenerator");
om.core._STAR_parent_STAR_ = null;
om.core._STAR_instrument_STAR_ = null;
om.core._STAR_descriptor_STAR_ = null;
om.core._STAR_state_STAR_ = null;
om.core._STAR_root_key_STAR_ = null;
om.core.IDisplayName = function() {
};
om.core.display_name = function om$core$display_name(this$) {
  if (!(this$ == null) && !(this$.om$core$IDisplayName$display_name$arity$1 == null)) {
    return this$.om$core$IDisplayName$display_name$arity$1(this$);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core.display_name[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$);
    } else {
      var m__6796__auto____$1 = om.core.display_name["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$);
      } else {
        throw cljs.core.missing_protocol.call(null, "IDisplayName.display-name", this$);
      }
    }
  }
};
om.core.IInitState = function() {
};
om.core.init_state = function om$core$init_state(this$) {
  if (!(this$ == null) && !(this$.om$core$IInitState$init_state$arity$1 == null)) {
    return this$.om$core$IInitState$init_state$arity$1(this$);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core.init_state[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$);
    } else {
      var m__6796__auto____$1 = om.core.init_state["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$);
      } else {
        throw cljs.core.missing_protocol.call(null, "IInitState.init-state", this$);
      }
    }
  }
};
om.core.IShouldUpdate = function() {
};
om.core.should_update = function om$core$should_update(this$, next_props, next_state) {
  if (!(this$ == null) && !(this$.om$core$IShouldUpdate$should_update$arity$3 == null)) {
    return this$.om$core$IShouldUpdate$should_update$arity$3(this$, next_props, next_state);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core.should_update[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$, next_props, next_state);
    } else {
      var m__6796__auto____$1 = om.core.should_update["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$, next_props, next_state);
      } else {
        throw cljs.core.missing_protocol.call(null, "IShouldUpdate.should-update", this$);
      }
    }
  }
};
om.core.IWillMount = function() {
};
om.core.will_mount = function om$core$will_mount(this$) {
  if (!(this$ == null) && !(this$.om$core$IWillMount$will_mount$arity$1 == null)) {
    return this$.om$core$IWillMount$will_mount$arity$1(this$);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core.will_mount[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$);
    } else {
      var m__6796__auto____$1 = om.core.will_mount["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$);
      } else {
        throw cljs.core.missing_protocol.call(null, "IWillMount.will-mount", this$);
      }
    }
  }
};
om.core.IDidMount = function() {
};
om.core.did_mount = function om$core$did_mount(this$) {
  if (!(this$ == null) && !(this$.om$core$IDidMount$did_mount$arity$1 == null)) {
    return this$.om$core$IDidMount$did_mount$arity$1(this$);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core.did_mount[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$);
    } else {
      var m__6796__auto____$1 = om.core.did_mount["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$);
      } else {
        throw cljs.core.missing_protocol.call(null, "IDidMount.did-mount", this$);
      }
    }
  }
};
om.core.IWillUnmount = function() {
};
om.core.will_unmount = function om$core$will_unmount(this$) {
  if (!(this$ == null) && !(this$.om$core$IWillUnmount$will_unmount$arity$1 == null)) {
    return this$.om$core$IWillUnmount$will_unmount$arity$1(this$);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core.will_unmount[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$);
    } else {
      var m__6796__auto____$1 = om.core.will_unmount["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$);
      } else {
        throw cljs.core.missing_protocol.call(null, "IWillUnmount.will-unmount", this$);
      }
    }
  }
};
om.core.IWillUpdate = function() {
};
om.core.will_update = function om$core$will_update(this$, next_props, next_state) {
  if (!(this$ == null) && !(this$.om$core$IWillUpdate$will_update$arity$3 == null)) {
    return this$.om$core$IWillUpdate$will_update$arity$3(this$, next_props, next_state);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core.will_update[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$, next_props, next_state);
    } else {
      var m__6796__auto____$1 = om.core.will_update["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$, next_props, next_state);
      } else {
        throw cljs.core.missing_protocol.call(null, "IWillUpdate.will-update", this$);
      }
    }
  }
};
om.core.IDidUpdate = function() {
};
om.core.did_update = function om$core$did_update(this$, prev_props, prev_state) {
  if (!(this$ == null) && !(this$.om$core$IDidUpdate$did_update$arity$3 == null)) {
    return this$.om$core$IDidUpdate$did_update$arity$3(this$, prev_props, prev_state);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core.did_update[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$, prev_props, prev_state);
    } else {
      var m__6796__auto____$1 = om.core.did_update["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$, prev_props, prev_state);
      } else {
        throw cljs.core.missing_protocol.call(null, "IDidUpdate.did-update", this$);
      }
    }
  }
};
om.core.IWillReceiveProps = function() {
};
om.core.will_receive_props = function om$core$will_receive_props(this$, next_props) {
  if (!(this$ == null) && !(this$.om$core$IWillReceiveProps$will_receive_props$arity$2 == null)) {
    return this$.om$core$IWillReceiveProps$will_receive_props$arity$2(this$, next_props);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core.will_receive_props[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$, next_props);
    } else {
      var m__6796__auto____$1 = om.core.will_receive_props["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$, next_props);
      } else {
        throw cljs.core.missing_protocol.call(null, "IWillReceiveProps.will-receive-props", this$);
      }
    }
  }
};
om.core.IRender = function() {
};
om.core.render = function om$core$render(this$) {
  if (!(this$ == null) && !(this$.om$core$IRender$render$arity$1 == null)) {
    return this$.om$core$IRender$render$arity$1(this$);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core.render[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$);
    } else {
      var m__6796__auto____$1 = om.core.render["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$);
      } else {
        throw cljs.core.missing_protocol.call(null, "IRender.render", this$);
      }
    }
  }
};
om.core.IRenderProps = function() {
};
om.core.render_props = function om$core$render_props(this$, props, state) {
  if (!(this$ == null) && !(this$.om$core$IRenderProps$render_props$arity$3 == null)) {
    return this$.om$core$IRenderProps$render_props$arity$3(this$, props, state);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core.render_props[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$, props, state);
    } else {
      var m__6796__auto____$1 = om.core.render_props["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$, props, state);
      } else {
        throw cljs.core.missing_protocol.call(null, "IRenderProps.render-props", this$);
      }
    }
  }
};
om.core.IRenderState = function() {
};
om.core.render_state = function om$core$render_state(this$, state) {
  if (!(this$ == null) && !(this$.om$core$IRenderState$render_state$arity$2 == null)) {
    return this$.om$core$IRenderState$render_state$arity$2(this$, state);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core.render_state[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$, state);
    } else {
      var m__6796__auto____$1 = om.core.render_state["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$, state);
      } else {
        throw cljs.core.missing_protocol.call(null, "IRenderState.render-state", this$);
      }
    }
  }
};
om.core.ICheckState = function() {
};
om.core.IOmSwap = function() {
};
om.core._om_swap_BANG_ = function om$core$_om_swap_BANG_(this$, cursor, korks, f, tag) {
  if (!(this$ == null) && !(this$.om$core$IOmSwap$_om_swap_BANG_$arity$5 == null)) {
    return this$.om$core$IOmSwap$_om_swap_BANG_$arity$5(this$, cursor, korks, f, tag);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core._om_swap_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$, cursor, korks, f, tag);
    } else {
      var m__6796__auto____$1 = om.core._om_swap_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$, cursor, korks, f, tag);
      } else {
        throw cljs.core.missing_protocol.call(null, "IOmSwap.-om-swap!", this$);
      }
    }
  }
};
om.core.IGetState = function() {
};
om.core._get_state = function om$core$_get_state(var_args) {
  var args13699 = [];
  var len__7198__auto___13702 = arguments.length;
  var i__7199__auto___13703 = 0;
  while (true) {
    if (i__7199__auto___13703 < len__7198__auto___13702) {
      args13699.push(arguments[i__7199__auto___13703]);
      var G__13704 = i__7199__auto___13703 + 1;
      i__7199__auto___13703 = G__13704;
      continue;
    } else {
    }
    break;
  }
  var G__13701 = args13699.length;
  switch(G__13701) {
    case 1:
      return om.core._get_state.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return om.core._get_state.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13699.length)].join(""));;
  }
};
om.core._get_state.cljs$core$IFn$_invoke$arity$1 = function(this$) {
  if (!(this$ == null) && !(this$.om$core$IGetState$_get_state$arity$1 == null)) {
    return this$.om$core$IGetState$_get_state$arity$1(this$);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core._get_state[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$);
    } else {
      var m__6796__auto____$1 = om.core._get_state["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$);
      } else {
        throw cljs.core.missing_protocol.call(null, "IGetState.-get-state", this$);
      }
    }
  }
};
om.core._get_state.cljs$core$IFn$_invoke$arity$2 = function(this$, ks) {
  if (!(this$ == null) && !(this$.om$core$IGetState$_get_state$arity$2 == null)) {
    return this$.om$core$IGetState$_get_state$arity$2(this$, ks);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core._get_state[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$, ks);
    } else {
      var m__6796__auto____$1 = om.core._get_state["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$, ks);
      } else {
        throw cljs.core.missing_protocol.call(null, "IGetState.-get-state", this$);
      }
    }
  }
};
om.core._get_state.cljs$lang$maxFixedArity = 2;
om.core.IGetRenderState = function() {
};
om.core._get_render_state = function om$core$_get_render_state(var_args) {
  var args13706 = [];
  var len__7198__auto___13709 = arguments.length;
  var i__7199__auto___13710 = 0;
  while (true) {
    if (i__7199__auto___13710 < len__7198__auto___13709) {
      args13706.push(arguments[i__7199__auto___13710]);
      var G__13711 = i__7199__auto___13710 + 1;
      i__7199__auto___13710 = G__13711;
      continue;
    } else {
    }
    break;
  }
  var G__13708 = args13706.length;
  switch(G__13708) {
    case 1:
      return om.core._get_render_state.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return om.core._get_render_state.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13706.length)].join(""));;
  }
};
om.core._get_render_state.cljs$core$IFn$_invoke$arity$1 = function(this$) {
  if (!(this$ == null) && !(this$.om$core$IGetRenderState$_get_render_state$arity$1 == null)) {
    return this$.om$core$IGetRenderState$_get_render_state$arity$1(this$);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core._get_render_state[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$);
    } else {
      var m__6796__auto____$1 = om.core._get_render_state["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$);
      } else {
        throw cljs.core.missing_protocol.call(null, "IGetRenderState.-get-render-state", this$);
      }
    }
  }
};
om.core._get_render_state.cljs$core$IFn$_invoke$arity$2 = function(this$, ks) {
  if (!(this$ == null) && !(this$.om$core$IGetRenderState$_get_render_state$arity$2 == null)) {
    return this$.om$core$IGetRenderState$_get_render_state$arity$2(this$, ks);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core._get_render_state[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$, ks);
    } else {
      var m__6796__auto____$1 = om.core._get_render_state["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$, ks);
      } else {
        throw cljs.core.missing_protocol.call(null, "IGetRenderState.-get-render-state", this$);
      }
    }
  }
};
om.core._get_render_state.cljs$lang$maxFixedArity = 2;
om.core.ISetState = function() {
};
om.core._set_state_BANG_ = function om$core$_set_state_BANG_(var_args) {
  var args13713 = [];
  var len__7198__auto___13716 = arguments.length;
  var i__7199__auto___13717 = 0;
  while (true) {
    if (i__7199__auto___13717 < len__7198__auto___13716) {
      args13713.push(arguments[i__7199__auto___13717]);
      var G__13718 = i__7199__auto___13717 + 1;
      i__7199__auto___13717 = G__13718;
      continue;
    } else {
    }
    break;
  }
  var G__13715 = args13713.length;
  switch(G__13715) {
    case 3:
      return om.core._set_state_BANG_.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 4:
      return om.core._set_state_BANG_.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13713.length)].join(""));;
  }
};
om.core._set_state_BANG_.cljs$core$IFn$_invoke$arity$3 = function(this$, val, render) {
  if (!(this$ == null) && !(this$.om$core$ISetState$_set_state_BANG_$arity$3 == null)) {
    return this$.om$core$ISetState$_set_state_BANG_$arity$3(this$, val, render);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core._set_state_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$, val, render);
    } else {
      var m__6796__auto____$1 = om.core._set_state_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$, val, render);
      } else {
        throw cljs.core.missing_protocol.call(null, "ISetState.-set-state!", this$);
      }
    }
  }
};
om.core._set_state_BANG_.cljs$core$IFn$_invoke$arity$4 = function(this$, ks, val, render) {
  if (!(this$ == null) && !(this$.om$core$ISetState$_set_state_BANG_$arity$4 == null)) {
    return this$.om$core$ISetState$_set_state_BANG_$arity$4(this$, ks, val, render);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core._set_state_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$, ks, val, render);
    } else {
      var m__6796__auto____$1 = om.core._set_state_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$, ks, val, render);
      } else {
        throw cljs.core.missing_protocol.call(null, "ISetState.-set-state!", this$);
      }
    }
  }
};
om.core._set_state_BANG_.cljs$lang$maxFixedArity = 4;
om.core.IRenderQueue = function() {
};
om.core._get_queue = function om$core$_get_queue(this$) {
  if (!(this$ == null) && !(this$.om$core$IRenderQueue$_get_queue$arity$1 == null)) {
    return this$.om$core$IRenderQueue$_get_queue$arity$1(this$);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core._get_queue[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$);
    } else {
      var m__6796__auto____$1 = om.core._get_queue["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$);
      } else {
        throw cljs.core.missing_protocol.call(null, "IRenderQueue.-get-queue", this$);
      }
    }
  }
};
om.core._queue_render_BANG_ = function om$core$_queue_render_BANG_(this$, c) {
  if (!(this$ == null) && !(this$.om$core$IRenderQueue$_queue_render_BANG_$arity$2 == null)) {
    return this$.om$core$IRenderQueue$_queue_render_BANG_$arity$2(this$, c);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core._queue_render_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$, c);
    } else {
      var m__6796__auto____$1 = om.core._queue_render_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$, c);
      } else {
        throw cljs.core.missing_protocol.call(null, "IRenderQueue.-queue-render!", this$);
      }
    }
  }
};
om.core._empty_queue_BANG_ = function om$core$_empty_queue_BANG_(this$) {
  if (!(this$ == null) && !(this$.om$core$IRenderQueue$_empty_queue_BANG_$arity$1 == null)) {
    return this$.om$core$IRenderQueue$_empty_queue_BANG_$arity$1(this$);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core._empty_queue_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$);
    } else {
      var m__6796__auto____$1 = om.core._empty_queue_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$);
      } else {
        throw cljs.core.missing_protocol.call(null, "IRenderQueue.-empty-queue!", this$);
      }
    }
  }
};
om.core.IValue = function() {
};
om.core._value = function om$core$_value(x) {
  if (!(x == null) && !(x.om$core$IValue$_value$arity$1 == null)) {
    return x.om$core$IValue$_value$arity$1(x);
  } else {
    var x__6795__auto__ = x == null ? null : x;
    var m__6796__auto__ = om.core._value[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, x);
    } else {
      var m__6796__auto____$1 = om.core._value["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, x);
      } else {
        throw cljs.core.missing_protocol.call(null, "IValue.-value", x);
      }
    }
  }
};
om.core.IValue["_"] = true;
om.core._value["_"] = function(x) {
  return x;
};
om.core.ICursor = function() {
};
om.core._path = function om$core$_path(cursor) {
  if (!(cursor == null) && !(cursor.om$core$ICursor$_path$arity$1 == null)) {
    return cursor.om$core$ICursor$_path$arity$1(cursor);
  } else {
    var x__6795__auto__ = cursor == null ? null : cursor;
    var m__6796__auto__ = om.core._path[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, cursor);
    } else {
      var m__6796__auto____$1 = om.core._path["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, cursor);
      } else {
        throw cljs.core.missing_protocol.call(null, "ICursor.-path", cursor);
      }
    }
  }
};
om.core._state = function om$core$_state(cursor) {
  if (!(cursor == null) && !(cursor.om$core$ICursor$_state$arity$1 == null)) {
    return cursor.om$core$ICursor$_state$arity$1(cursor);
  } else {
    var x__6795__auto__ = cursor == null ? null : cursor;
    var m__6796__auto__ = om.core._state[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, cursor);
    } else {
      var m__6796__auto____$1 = om.core._state["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, cursor);
      } else {
        throw cljs.core.missing_protocol.call(null, "ICursor.-state", cursor);
      }
    }
  }
};
om.core.IToCursor = function() {
};
om.core._to_cursor = function om$core$_to_cursor(var_args) {
  var args13720 = [];
  var len__7198__auto___13723 = arguments.length;
  var i__7199__auto___13724 = 0;
  while (true) {
    if (i__7199__auto___13724 < len__7198__auto___13723) {
      args13720.push(arguments[i__7199__auto___13724]);
      var G__13725 = i__7199__auto___13724 + 1;
      i__7199__auto___13724 = G__13725;
      continue;
    } else {
    }
    break;
  }
  var G__13722 = args13720.length;
  switch(G__13722) {
    case 2:
      return om.core._to_cursor.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return om.core._to_cursor.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13720.length)].join(""));;
  }
};
om.core._to_cursor.cljs$core$IFn$_invoke$arity$2 = function(value, state) {
  if (!(value == null) && !(value.om$core$IToCursor$_to_cursor$arity$2 == null)) {
    return value.om$core$IToCursor$_to_cursor$arity$2(value, state);
  } else {
    var x__6795__auto__ = value == null ? null : value;
    var m__6796__auto__ = om.core._to_cursor[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, value, state);
    } else {
      var m__6796__auto____$1 = om.core._to_cursor["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, value, state);
      } else {
        throw cljs.core.missing_protocol.call(null, "IToCursor.-to-cursor", value);
      }
    }
  }
};
om.core._to_cursor.cljs$core$IFn$_invoke$arity$3 = function(value, state, path) {
  if (!(value == null) && !(value.om$core$IToCursor$_to_cursor$arity$3 == null)) {
    return value.om$core$IToCursor$_to_cursor$arity$3(value, state, path);
  } else {
    var x__6795__auto__ = value == null ? null : value;
    var m__6796__auto__ = om.core._to_cursor[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, value, state, path);
    } else {
      var m__6796__auto____$1 = om.core._to_cursor["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, value, state, path);
      } else {
        throw cljs.core.missing_protocol.call(null, "IToCursor.-to-cursor", value);
      }
    }
  }
};
om.core._to_cursor.cljs$lang$maxFixedArity = 3;
om.core.ICursorDerive = function() {
};
om.core._derive = function om$core$_derive(cursor, derived, state, path) {
  if (!(cursor == null) && !(cursor.om$core$ICursorDerive$_derive$arity$4 == null)) {
    return cursor.om$core$ICursorDerive$_derive$arity$4(cursor, derived, state, path);
  } else {
    var x__6795__auto__ = cursor == null ? null : cursor;
    var m__6796__auto__ = om.core._derive[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, cursor, derived, state, path);
    } else {
      var m__6796__auto____$1 = om.core._derive["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, cursor, derived, state, path);
      } else {
        throw cljs.core.missing_protocol.call(null, "ICursorDerive.-derive", cursor);
      }
    }
  }
};
om.core.ICursorDerive["_"] = true;
om.core._derive["_"] = function(this$, derived, state, path) {
  return om.core.to_cursor.call(null, derived, state, path);
};
om.core.path = function om$core$path(cursor) {
  return om.core._path.call(null, cursor);
};
om.core.value = function om$core$value(cursor) {
  return om.core._value.call(null, cursor);
};
om.core.state = function om$core$state(cursor) {
  return om.core._state.call(null, cursor);
};
om.core.ITransact = function() {
};
om.core._transact_BANG_ = function om$core$_transact_BANG_(cursor, korks, f, tag) {
  if (!(cursor == null) && !(cursor.om$core$ITransact$_transact_BANG_$arity$4 == null)) {
    return cursor.om$core$ITransact$_transact_BANG_$arity$4(cursor, korks, f, tag);
  } else {
    var x__6795__auto__ = cursor == null ? null : cursor;
    var m__6796__auto__ = om.core._transact_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, cursor, korks, f, tag);
    } else {
      var m__6796__auto____$1 = om.core._transact_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, cursor, korks, f, tag);
      } else {
        throw cljs.core.missing_protocol.call(null, "ITransact.-transact!", cursor);
      }
    }
  }
};
om.core.INotify = function() {
};
om.core._listen_BANG_ = function om$core$_listen_BANG_(x, key, tx_listen) {
  if (!(x == null) && !(x.om$core$INotify$_listen_BANG_$arity$3 == null)) {
    return x.om$core$INotify$_listen_BANG_$arity$3(x, key, tx_listen);
  } else {
    var x__6795__auto__ = x == null ? null : x;
    var m__6796__auto__ = om.core._listen_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, x, key, tx_listen);
    } else {
      var m__6796__auto____$1 = om.core._listen_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, x, key, tx_listen);
      } else {
        throw cljs.core.missing_protocol.call(null, "INotify.-listen!", x);
      }
    }
  }
};
om.core._unlisten_BANG_ = function om$core$_unlisten_BANG_(x, key) {
  if (!(x == null) && !(x.om$core$INotify$_unlisten_BANG_$arity$2 == null)) {
    return x.om$core$INotify$_unlisten_BANG_$arity$2(x, key);
  } else {
    var x__6795__auto__ = x == null ? null : x;
    var m__6796__auto__ = om.core._unlisten_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, x, key);
    } else {
      var m__6796__auto____$1 = om.core._unlisten_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, x, key);
      } else {
        throw cljs.core.missing_protocol.call(null, "INotify.-unlisten!", x);
      }
    }
  }
};
om.core._notify_BANG_ = function om$core$_notify_BANG_(x, tx_data, root_cursor) {
  if (!(x == null) && !(x.om$core$INotify$_notify_BANG_$arity$3 == null)) {
    return x.om$core$INotify$_notify_BANG_$arity$3(x, tx_data, root_cursor);
  } else {
    var x__6795__auto__ = x == null ? null : x;
    var m__6796__auto__ = om.core._notify_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, x, tx_data, root_cursor);
    } else {
      var m__6796__auto____$1 = om.core._notify_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, x, tx_data, root_cursor);
      } else {
        throw cljs.core.missing_protocol.call(null, "INotify.-notify!", x);
      }
    }
  }
};
om.core.IRootProperties = function() {
};
om.core._set_property_BANG_ = function om$core$_set_property_BANG_(this$, id, p, val) {
  if (!(this$ == null) && !(this$.om$core$IRootProperties$_set_property_BANG_$arity$4 == null)) {
    return this$.om$core$IRootProperties$_set_property_BANG_$arity$4(this$, id, p, val);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core._set_property_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$, id, p, val);
    } else {
      var m__6796__auto____$1 = om.core._set_property_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$, id, p, val);
      } else {
        throw cljs.core.missing_protocol.call(null, "IRootProperties.-set-property!", this$);
      }
    }
  }
};
om.core._remove_property_BANG_ = function om$core$_remove_property_BANG_(this$, id, p) {
  if (!(this$ == null) && !(this$.om$core$IRootProperties$_remove_property_BANG_$arity$3 == null)) {
    return this$.om$core$IRootProperties$_remove_property_BANG_$arity$3(this$, id, p);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core._remove_property_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$, id, p);
    } else {
      var m__6796__auto____$1 = om.core._remove_property_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$, id, p);
      } else {
        throw cljs.core.missing_protocol.call(null, "IRootProperties.-remove-property!", this$);
      }
    }
  }
};
om.core._remove_properties_BANG_ = function om$core$_remove_properties_BANG_(this$, id) {
  if (!(this$ == null) && !(this$.om$core$IRootProperties$_remove_properties_BANG_$arity$2 == null)) {
    return this$.om$core$IRootProperties$_remove_properties_BANG_$arity$2(this$, id);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core._remove_properties_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$, id);
    } else {
      var m__6796__auto____$1 = om.core._remove_properties_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$, id);
      } else {
        throw cljs.core.missing_protocol.call(null, "IRootProperties.-remove-properties!", this$);
      }
    }
  }
};
om.core._get_property = function om$core$_get_property(this$, id, p) {
  if (!(this$ == null) && !(this$.om$core$IRootProperties$_get_property$arity$3 == null)) {
    return this$.om$core$IRootProperties$_get_property$arity$3(this$, id, p);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core._get_property[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$, id, p);
    } else {
      var m__6796__auto____$1 = om.core._get_property["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$, id, p);
      } else {
        throw cljs.core.missing_protocol.call(null, "IRootProperties.-get-property", this$);
      }
    }
  }
};
om.core.IRootKey = function() {
};
om.core._root_key = function om$core$_root_key(cursor) {
  if (!(cursor == null) && !(cursor.om$core$IRootKey$_root_key$arity$1 == null)) {
    return cursor.om$core$IRootKey$_root_key$arity$1(cursor);
  } else {
    var x__6795__auto__ = cursor == null ? null : cursor;
    var m__6796__auto__ = om.core._root_key[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, cursor);
    } else {
      var m__6796__auto____$1 = om.core._root_key["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, cursor);
      } else {
        throw cljs.core.missing_protocol.call(null, "IRootKey.-root-key", cursor);
      }
    }
  }
};
om.core.IAdapt = function() {
};
om.core._adapt = function om$core$_adapt(this$, other) {
  if (!(this$ == null) && !(this$.om$core$IAdapt$_adapt$arity$2 == null)) {
    return this$.om$core$IAdapt$_adapt$arity$2(this$, other);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core._adapt[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$, other);
    } else {
      var m__6796__auto____$1 = om.core._adapt["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$, other);
      } else {
        throw cljs.core.missing_protocol.call(null, "IAdapt.-adapt", this$);
      }
    }
  }
};
om.core.IAdapt["_"] = true;
om.core._adapt["_"] = function(_, other) {
  return other;
};
om.core.adapt = function om$core$adapt(x, other) {
  return om.core._adapt.call(null, x, other);
};
om.core.IOmRef = function() {
};
om.core._add_dep_BANG_ = function om$core$_add_dep_BANG_(this$, c) {
  if (!(this$ == null) && !(this$.om$core$IOmRef$_add_dep_BANG_$arity$2 == null)) {
    return this$.om$core$IOmRef$_add_dep_BANG_$arity$2(this$, c);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core._add_dep_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$, c);
    } else {
      var m__6796__auto____$1 = om.core._add_dep_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$, c);
      } else {
        throw cljs.core.missing_protocol.call(null, "IOmRef.-add-dep!", this$);
      }
    }
  }
};
om.core._remove_dep_BANG_ = function om$core$_remove_dep_BANG_(this$, c) {
  if (!(this$ == null) && !(this$.om$core$IOmRef$_remove_dep_BANG_$arity$2 == null)) {
    return this$.om$core$IOmRef$_remove_dep_BANG_$arity$2(this$, c);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core._remove_dep_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$, c);
    } else {
      var m__6796__auto____$1 = om.core._remove_dep_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$, c);
      } else {
        throw cljs.core.missing_protocol.call(null, "IOmRef.-remove-dep!", this$);
      }
    }
  }
};
om.core._refresh_deps_BANG_ = function om$core$_refresh_deps_BANG_(this$) {
  if (!(this$ == null) && !(this$.om$core$IOmRef$_refresh_deps_BANG_$arity$1 == null)) {
    return this$.om$core$IOmRef$_refresh_deps_BANG_$arity$1(this$);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core._refresh_deps_BANG_[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$);
    } else {
      var m__6796__auto____$1 = om.core._refresh_deps_BANG_["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$);
      } else {
        throw cljs.core.missing_protocol.call(null, "IOmRef.-refresh-deps!", this$);
      }
    }
  }
};
om.core._get_deps = function om$core$_get_deps(this$) {
  if (!(this$ == null) && !(this$.om$core$IOmRef$_get_deps$arity$1 == null)) {
    return this$.om$core$IOmRef$_get_deps$arity$1(this$);
  } else {
    var x__6795__auto__ = this$ == null ? null : this$;
    var m__6796__auto__ = om.core._get_deps[goog.typeOf(x__6795__auto__)];
    if (!(m__6796__auto__ == null)) {
      return m__6796__auto__.call(null, this$);
    } else {
      var m__6796__auto____$1 = om.core._get_deps["_"];
      if (!(m__6796__auto____$1 == null)) {
        return m__6796__auto____$1.call(null, this$);
      } else {
        throw cljs.core.missing_protocol.call(null, "IOmRef.-get-deps", this$);
      }
    }
  }
};
om.core.transact_STAR_ = function om$core$transact_STAR_(state, cursor, korks, f, tag) {
  var old_state = cljs.core.deref.call(null, state);
  var path = cljs.core.into.call(null, om.core.path.call(null, cursor), korks);
  var ret = (!(state == null) ? false || state.om$core$IOmSwap$ ? true : !state.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IOmSwap, state) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IOmSwap, state)) ? om.core._om_swap_BANG_.call(null, state, cursor, korks, f, tag) : cljs.core.empty_QMARK_.call(null, path) ? cljs.core.swap_BANG_.call(null, state, f) : cljs.core.swap_BANG_.call(null, state, cljs.core.update_in, path, f);
  if (cljs.core._EQ_.call(null, ret, new cljs.core.Keyword("om.core", "defer", "om.core/defer", -1038866178))) {
    return null;
  } else {
    var tx_data = new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "path", "path", -188191168), path, new cljs.core.Keyword(null, "old-value", "old-value", 862546795), cljs.core.get_in.call(null, old_state, path), new cljs.core.Keyword(null, "new-value", "new-value", 1087038368), cljs.core.get_in.call(null, cljs.core.deref.call(null, state), path), new cljs.core.Keyword(null, "old-state", "old-state", 1039580704), old_state, new cljs.core.Keyword(null, "new-state", "new-state", 
    -490349212), cljs.core.deref.call(null, state)], null);
    if (!(tag == null)) {
      return om.core.notify_STAR_.call(null, cursor, cljs.core.assoc.call(null, tx_data, new cljs.core.Keyword(null, "tag", "tag", -1290361223), tag));
    } else {
      return om.core.notify_STAR_.call(null, cursor, tx_data);
    }
  }
};
om.core.cursor_QMARK_ = function om$core$cursor_QMARK_(x) {
  if (!(x == null)) {
    if (false || x.om$core$ICursor$) {
      return true;
    } else {
      if (!x.cljs$lang$protocol_mask$partition$) {
        return cljs.core.native_satisfies_QMARK_.call(null, om.core.ICursor, x);
      } else {
        return false;
      }
    }
  } else {
    return cljs.core.native_satisfies_QMARK_.call(null, om.core.ICursor, x);
  }
};
om.core.component_QMARK_ = function om$core$component_QMARK_(x) {
  return x["isOmComponent"];
};
om.core.children = function om$core$children(node) {
  var c = node.props.children;
  if (cljs.core.ifn_QMARK_.call(null, c)) {
    return node.props.children = c.call(null, node);
  } else {
    return c;
  }
};
om.core.get_props = function om$core$get_props(var_args) {
  var args13731 = [];
  var len__7198__auto___13735 = arguments.length;
  var i__7199__auto___13736 = 0;
  while (true) {
    if (i__7199__auto___13736 < len__7198__auto___13735) {
      args13731.push(arguments[i__7199__auto___13736]);
      var G__13737 = i__7199__auto___13736 + 1;
      i__7199__auto___13736 = G__13737;
      continue;
    } else {
    }
    break;
  }
  var G__13733 = args13731.length;
  switch(G__13733) {
    case 1:
      return om.core.get_props.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return om.core.get_props.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13731.length)].join(""));;
  }
};
om.core.get_props.cljs$core$IFn$_invoke$arity$1 = function(x) {
  if (cljs.core.truth_(om.core.component_QMARK_.call(null, x))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "component?", "component?", 2048315517, null), new cljs.core.Symbol(null, "x", "x", -555367584, null))))].join(""));
  }
  return x.props["__om_cursor"];
};
om.core.get_props.cljs$core$IFn$_invoke$arity$2 = function(x, korks) {
  if (cljs.core.truth_(om.core.component_QMARK_.call(null, x))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "component?", "component?", 2048315517, null), new cljs.core.Symbol(null, "x", "x", -555367584, null))))].join(""));
  }
  var korks__$1 = cljs.core.sequential_QMARK_.call(null, korks) ? korks : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [korks], null);
  var G__13734 = x.props["__om_cursor"];
  var G__13734__$1 = cljs.core.seq.call(null, korks__$1) ? cljs.core.get_in.call(null, G__13734, korks__$1) : G__13734;
  return G__13734__$1;
};
om.core.get_props.cljs$lang$maxFixedArity = 2;
om.core.get_state = function om$core$get_state(var_args) {
  var args13739 = [];
  var len__7198__auto___13742 = arguments.length;
  var i__7199__auto___13743 = 0;
  while (true) {
    if (i__7199__auto___13743 < len__7198__auto___13742) {
      args13739.push(arguments[i__7199__auto___13743]);
      var G__13744 = i__7199__auto___13743 + 1;
      i__7199__auto___13743 = G__13744;
      continue;
    } else {
    }
    break;
  }
  var G__13741 = args13739.length;
  switch(G__13741) {
    case 1:
      return om.core.get_state.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return om.core.get_state.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13739.length)].join(""));;
  }
};
om.core.get_state.cljs$core$IFn$_invoke$arity$1 = function(owner) {
  if (cljs.core.truth_(om.core.component_QMARK_.call(null, owner))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "component?", "component?", 2048315517, null), new cljs.core.Symbol(null, "owner", "owner", 1247919588, null))))].join(""));
  }
  return om.core._get_state.call(null, owner);
};
om.core.get_state.cljs$core$IFn$_invoke$arity$2 = function(owner, korks) {
  if (cljs.core.truth_(om.core.component_QMARK_.call(null, owner))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "component?", "component?", 2048315517, null), new cljs.core.Symbol(null, "owner", "owner", 1247919588, null))))].join(""));
  }
  var ks = cljs.core.sequential_QMARK_.call(null, korks) ? korks : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [korks], null);
  return om.core._get_state.call(null, owner, ks);
};
om.core.get_state.cljs$lang$maxFixedArity = 2;
om.core.get_shared = function om$core$get_shared(var_args) {
  var args13746 = [];
  var len__7198__auto___13749 = arguments.length;
  var i__7199__auto___13750 = 0;
  while (true) {
    if (i__7199__auto___13750 < len__7198__auto___13749) {
      args13746.push(arguments[i__7199__auto___13750]);
      var G__13751 = i__7199__auto___13750 + 1;
      i__7199__auto___13750 = G__13751;
      continue;
    } else {
    }
    break;
  }
  var G__13748 = args13746.length;
  switch(G__13748) {
    case 1:
      return om.core.get_shared.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return om.core.get_shared.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13746.length)].join(""));;
  }
};
om.core.get_shared.cljs$core$IFn$_invoke$arity$1 = function(owner) {
  if (owner == null) {
    return null;
  } else {
    return owner.props["__om_shared"];
  }
};
om.core.get_shared.cljs$core$IFn$_invoke$arity$2 = function(owner, korks) {
  if (!cljs.core.sequential_QMARK_.call(null, korks)) {
    return cljs.core.get.call(null, om.core.get_shared.call(null, owner), korks);
  } else {
    if (cljs.core.empty_QMARK_.call(null, korks)) {
      return om.core.get_shared.call(null, owner);
    } else {
      return cljs.core.get_in.call(null, om.core.get_shared.call(null, owner), korks);
    }
  }
};
om.core.get_shared.cljs$lang$maxFixedArity = 2;
om.core.merge_pending_state = function om$core$merge_pending_state(owner) {
  var state = owner.state;
  var temp__4425__auto__ = state["__om_pending_state"];
  if (cljs.core.truth_(temp__4425__auto__)) {
    var pending_state = temp__4425__auto__;
    var G__13754 = state;
    G__13754["__om_prev_state"] = state["__om_state"];
    G__13754["__om_state"] = pending_state;
    G__13754["__om_pending_state"] = null;
    return G__13754;
  } else {
    return null;
  }
};
om.core.merge_props_state = function om$core$merge_props_state(var_args) {
  var args13755 = [];
  var len__7198__auto___13758 = arguments.length;
  var i__7199__auto___13759 = 0;
  while (true) {
    if (i__7199__auto___13759 < len__7198__auto___13758) {
      args13755.push(arguments[i__7199__auto___13759]);
      var G__13760 = i__7199__auto___13759 + 1;
      i__7199__auto___13759 = G__13760;
      continue;
    } else {
    }
    break;
  }
  var G__13757 = args13755.length;
  switch(G__13757) {
    case 1:
      return om.core.merge_props_state.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return om.core.merge_props_state.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13755.length)].join(""));;
  }
};
om.core.merge_props_state.cljs$core$IFn$_invoke$arity$1 = function(owner) {
  return om.core.merge_props_state.call(null, owner, null);
};
om.core.merge_props_state.cljs$core$IFn$_invoke$arity$2 = function(owner, props) {
  var props__$1 = function() {
    var or__6140__auto__ = props;
    if (cljs.core.truth_(or__6140__auto__)) {
      return or__6140__auto__;
    } else {
      return owner.props;
    }
  }();
  var temp__4425__auto__ = props__$1["__om_state"];
  if (cljs.core.truth_(temp__4425__auto__)) {
    var props_state = temp__4425__auto__;
    var state = owner.state;
    state["__om_pending_state"] = cljs.core.merge.call(null, function() {
      var or__6140__auto__ = state["__om_pending_state"];
      if (cljs.core.truth_(or__6140__auto__)) {
        return or__6140__auto__;
      } else {
        return state["__om_state"];
      }
    }(), props_state);
    return props__$1["__om_state"] = null;
  } else {
    return null;
  }
};
om.core.merge_props_state.cljs$lang$maxFixedArity = 2;
om.core.ref_changed_QMARK_ = function om$core$ref_changed_QMARK_(ref) {
  var val = om.core.value.call(null, ref);
  var val_SINGLEQUOTE_ = cljs.core.get_in.call(null, cljs.core.deref.call(null, om.core.state.call(null, ref)), om.core.path.call(null, ref), new cljs.core.Keyword("om.core", "not-found", "om.core/not-found", 1869894275));
  return cljs.core.not_EQ_.call(null, val, val_SINGLEQUOTE_);
};
om.core.update_refs = function om$core$update_refs(c) {
  var cstate = c.state;
  var refs = cstate["__om_refs"];
  if (cljs.core.count.call(null, refs) === 0) {
    return null;
  } else {
    return cstate["__om_refs"] = cljs.core.into.call(null, cljs.core.PersistentHashSet.EMPTY, cljs.core.filter.call(null, cljs.core.nil_QMARK_, cljs.core.map.call(null, function(cstate, refs) {
      return function(ref) {
        var ref_val = om.core.value.call(null, ref);
        var ref_state = om.core.state.call(null, ref);
        var ref_path = om.core.path.call(null, ref);
        var ref_val_SINGLEQUOTE_ = cljs.core.get_in.call(null, cljs.core.deref.call(null, ref_state), ref_path, new cljs.core.Keyword("om.core", "not-found", "om.core/not-found", 1869894275));
        if (cljs.core.not_EQ_.call(null, ref_val, new cljs.core.Keyword("om.core", "not-found", "om.core/not-found", 1869894275))) {
          if (cljs.core.not_EQ_.call(null, ref_val, ref_val_SINGLEQUOTE_)) {
            return om.core.adapt.call(null, ref, om.core.to_cursor.call(null, ref_val_SINGLEQUOTE_, ref_state, ref_path));
          } else {
            return ref;
          }
        } else {
          return null;
        }
      };
    }(cstate, refs), refs)));
  }
};
om.core.pure_methods = cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null, "componentDidUpdate", "componentDidUpdate", -1983477981), new cljs.core.Keyword(null, "isOmComponent", "isOmComponent", -2070015162), new cljs.core.Keyword(null, "componentWillUnmount", "componentWillUnmount", 1573788814), new cljs.core.Keyword(null, "componentWillReceiveProps", "componentWillReceiveProps", 559988974), new cljs.core.Keyword(null, "shouldComponentUpdate", "shouldComponentUpdate", 1795750960), 
new cljs.core.Keyword(null, "render", "render", -1408033454), new cljs.core.Keyword(null, "componentWillUpdate", "componentWillUpdate", 657390932), new cljs.core.Keyword(null, "getInitialState", "getInitialState", 1541760916), new cljs.core.Keyword(null, "componentDidMount", "componentDidMount", 955710936), new cljs.core.Keyword(null, "getDisplayName", "getDisplayName", 1324429466), new cljs.core.Keyword(null, "componentWillMount", "componentWillMount", -285327619)], [function(prev_props, prev_state) {
  var this$ = this;
  var c = om.core.children.call(null, this$);
  if (!(c == null) ? false || c.om$core$IDidUpdate$ ? true : !c.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IDidUpdate, c) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IDidUpdate, c)) {
    var state_13784 = this$.state;
    om.core.did_update.call(null, c, om.core.get_props.call(null, {"props":prev_props, "isOmComponent":true}), function() {
      var or__6140__auto__ = state_13784["__om_prev_state"];
      if (cljs.core.truth_(or__6140__auto__)) {
        return or__6140__auto__;
      } else {
        return state_13784["__om_state"];
      }
    }());
  } else {
  }
  return this$.state["__om_prev_state"] = null;
}, true, function() {
  var this$ = this;
  var c = om.core.children.call(null, this$);
  var cursor = this$.props["__om_cursor"];
  if (!(c == null) ? false || c.om$core$IWillUnmount$ ? true : !c.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IWillUnmount, c) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IWillUnmount, c)) {
    om.core.will_unmount.call(null, c);
  } else {
  }
  var temp__4425__auto__ = cljs.core.seq.call(null, this$.state["__om_refs"]);
  if (temp__4425__auto__) {
    var refs = temp__4425__auto__;
    var seq__13765 = cljs.core.seq.call(null, refs);
    var chunk__13766 = null;
    var count__13767 = 0;
    var i__13768 = 0;
    while (true) {
      if (i__13768 < count__13767) {
        var ref = cljs.core._nth.call(null, chunk__13766, i__13768);
        om.core.unobserve.call(null, this$, ref);
        var G__13785 = seq__13765;
        var G__13786 = chunk__13766;
        var G__13787 = count__13767;
        var G__13788 = i__13768 + 1;
        seq__13765 = G__13785;
        chunk__13766 = G__13786;
        count__13767 = G__13787;
        i__13768 = G__13788;
        continue;
      } else {
        var temp__4425__auto____$1 = cljs.core.seq.call(null, seq__13765);
        if (temp__4425__auto____$1) {
          var seq__13765__$1 = temp__4425__auto____$1;
          if (cljs.core.chunked_seq_QMARK_.call(null, seq__13765__$1)) {
            var c__6943__auto__ = cljs.core.chunk_first.call(null, seq__13765__$1);
            var G__13789 = cljs.core.chunk_rest.call(null, seq__13765__$1);
            var G__13790 = c__6943__auto__;
            var G__13791 = cljs.core.count.call(null, c__6943__auto__);
            var G__13792 = 0;
            seq__13765 = G__13789;
            chunk__13766 = G__13790;
            count__13767 = G__13791;
            i__13768 = G__13792;
            continue;
          } else {
            var ref = cljs.core.first.call(null, seq__13765__$1);
            om.core.unobserve.call(null, this$, ref);
            var G__13793 = cljs.core.next.call(null, seq__13765__$1);
            var G__13794 = null;
            var G__13795 = 0;
            var G__13796 = 0;
            seq__13765 = G__13793;
            chunk__13766 = G__13794;
            count__13767 = G__13795;
            i__13768 = G__13796;
            continue;
          }
        } else {
          return null;
        }
      }
      break;
    }
  } else {
    return null;
  }
}, function(next_props) {
  var this$ = this;
  var c = om.core.children.call(null, this$);
  if (!(c == null) ? false || c.om$core$IWillReceiveProps$ ? true : !c.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IWillReceiveProps, c) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IWillReceiveProps, c)) {
    return om.core.will_receive_props.call(null, c, om.core.get_props.call(null, {"props":next_props, "isOmComponent":true}));
  } else {
    return null;
  }
}, function(next_props, next_state) {
  var this$ = this;
  var props = this$.props;
  var state = this$.state;
  var c = om.core.children.call(null, this$);
  om.core.merge_props_state.call(null, this$, next_props);
  if (!(c == null) ? false || c.om$core$IShouldUpdate$ ? true : !c.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IShouldUpdate, c) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IShouldUpdate, c)) {
    return om.core.should_update.call(null, c, om.core.get_props.call(null, {"props":next_props, "isOmComponent":true}), om.core._get_state.call(null, this$));
  } else {
    var cursor = props["__om_cursor"];
    var next_cursor = next_props["__om_cursor"];
    if (cljs.core.not_EQ_.call(null, om.core._value.call(null, cursor), om.core._value.call(null, next_cursor))) {
      return true;
    } else {
      if (cljs.core.truth_(function() {
        var and__6128__auto__ = om.core.cursor_QMARK_.call(null, cursor);
        if (cljs.core.truth_(and__6128__auto__)) {
          var and__6128__auto____$1 = om.core.cursor_QMARK_.call(null, next_cursor);
          if (cljs.core.truth_(and__6128__auto____$1)) {
            return cljs.core.not_EQ_.call(null, om.core._path.call(null, cursor), om.core._path.call(null, next_cursor));
          } else {
            return and__6128__auto____$1;
          }
        } else {
          return and__6128__auto__;
        }
      }())) {
        return true;
      } else {
        if (cljs.core.not_EQ_.call(null, om.core._get_state.call(null, this$), om.core._get_render_state.call(null, this$))) {
          return true;
        } else {
          if (cljs.core.truth_(function() {
            var and__6128__auto__ = !(cljs.core.count.call(null, state["__om_refs"]) === 0);
            if (and__6128__auto__) {
              return cljs.core.some.call(null, function(and__6128__auto__, cursor, next_cursor, props, state, c, this$) {
                return function(p1__13762_SHARP_) {
                  return om.core.ref_changed_QMARK_.call(null, p1__13762_SHARP_);
                };
              }(and__6128__auto__, cursor, next_cursor, props, state, c, this$), state["__om_refs"]);
            } else {
              return and__6128__auto__;
            }
          }())) {
            return true;
          } else {
            if (!(props["__om_index"] === next_props["__om_index"])) {
              return true;
            } else {
              return false;
            }
          }
        }
      }
    }
  }
}, function() {
  var this$ = this;
  var c = om.core.children.call(null, this$);
  var props = this$.props;
  var _STAR_parent_STAR_13771 = om.core._STAR_parent_STAR_;
  var _STAR_state_STAR_13772 = om.core._STAR_state_STAR_;
  var _STAR_instrument_STAR_13773 = om.core._STAR_instrument_STAR_;
  var _STAR_descriptor_STAR_13774 = om.core._STAR_descriptor_STAR_;
  var _STAR_root_key_STAR_13775 = om.core._STAR_root_key_STAR_;
  om.core._STAR_parent_STAR_ = this$;
  om.core._STAR_state_STAR_ = props["__om_app_state"];
  om.core._STAR_instrument_STAR_ = props["__om_instrument"];
  om.core._STAR_descriptor_STAR_ = props["__om_descriptor"];
  om.core._STAR_root_key_STAR_ = props["__om_root_key"];
  try {
    if (!(c == null) ? false || c.om$core$IRender$ ? true : !c.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IRender, c) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IRender, c)) {
      return om.core.render.call(null, c);
    } else {
      if (!(c == null) ? false || c.om$core$IRenderProps$ ? true : !c.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IRenderProps, c) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IRenderProps, c)) {
        return om.core.render_props.call(null, c, props["__om_cursor"], om.core.get_state.call(null, this$));
      } else {
        if (!(c == null) ? false || c.om$core$IRenderState$ ? true : !c.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IRenderState, c) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IRenderState, c)) {
          return om.core.render_state.call(null, c, om.core.get_state.call(null, this$));
        } else {
          return c;
        }
      }
    }
  } finally {
    om.core._STAR_root_key_STAR_ = _STAR_root_key_STAR_13775;
    om.core._STAR_descriptor_STAR_ = _STAR_descriptor_STAR_13774;
    om.core._STAR_instrument_STAR_ = _STAR_instrument_STAR_13773;
    om.core._STAR_state_STAR_ = _STAR_state_STAR_13772;
    om.core._STAR_parent_STAR_ = _STAR_parent_STAR_13771;
  }
}, function(next_props, next_state) {
  var this$ = this;
  var c_13797 = om.core.children.call(null, this$);
  if (!(c_13797 == null) ? false || c_13797.om$core$IWillUpdate$ ? true : !c_13797.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IWillUpdate, c_13797) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IWillUpdate, c_13797)) {
    var state_13798 = this$.state;
    om.core.will_update.call(null, c_13797, om.core.get_props.call(null, {"props":next_props, "isOmComponent":true}), om.core._get_state.call(null, this$));
  } else {
  }
  om.core.merge_pending_state.call(null, this$);
  return om.core.update_refs.call(null, this$);
}, function() {
  var this$ = this;
  var c = om.core.children.call(null, this$);
  var props = this$.props;
  var istate = function() {
    var or__6140__auto__ = props["__om_init_state"];
    if (cljs.core.truth_(or__6140__auto__)) {
      return or__6140__auto__;
    } else {
      return cljs.core.PersistentArrayMap.EMPTY;
    }
  }();
  var id = (new cljs.core.Keyword("om.core", "id", "om.core/id", 299074693)).cljs$core$IFn$_invoke$arity$1(istate);
  var ret = {"__om_id":function() {
    var or__6140__auto__ = id;
    if (cljs.core.truth_(or__6140__auto__)) {
      return or__6140__auto__;
    } else {
      return goog.ui.IdGenerator.getInstance().getNextUniqueId();
    }
  }(), "__om_state":cljs.core.merge.call(null, (!(c == null) ? false || c.om$core$IInitState$ ? true : !c.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IInitState, c) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IInitState, c)) ? om.core.init_state.call(null, c) : null, cljs.core.dissoc.call(null, istate, new cljs.core.Keyword("om.core", "id", "om.core/id", 299074693)))};
  props["__om_init_state"] = null;
  return ret;
}, function() {
  var this$ = this;
  var c = om.core.children.call(null, this$);
  var cursor = this$.props["__om_cursor"];
  if (!(c == null) ? false || c.om$core$IDidMount$ ? true : !c.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IDidMount, c) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IDidMount, c)) {
    return om.core.did_mount.call(null, c);
  } else {
    return null;
  }
}, function() {
  var this$ = this;
  var c = om.core.children.call(null, this$);
  if (!(c == null) ? false || c.om$core$IDisplayName$ ? true : !c.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IDisplayName, c) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IDisplayName, c)) {
    return om.core.display_name.call(null, c);
  } else {
    return null;
  }
}, function() {
  var this$ = this;
  om.core.merge_props_state.call(null, this$);
  var c_13799 = om.core.children.call(null, this$);
  if (!(c_13799 == null) ? false || c_13799.om$core$IWillMount$ ? true : !c_13799.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IWillMount, c_13799) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IWillMount, c_13799)) {
    om.core.will_mount.call(null, c_13799);
  } else {
  }
  return om.core.merge_pending_state.call(null, this$);
}]);
om.core.specify_state_methods_BANG_ = function om$core$specify_state_methods_BANG_(obj) {
  var x13801 = obj;
  x13801.om$core$ISetState$ = true;
  x13801.om$core$ISetState$_set_state_BANG_$arity$3 = function(x13801) {
    return function(this$, val, render) {
      var this$__$1 = this;
      var props = this$__$1.props;
      var app_state = props["__om_app_state"];
      this$__$1.state["__om_pending_state"] = val;
      if (cljs.core.truth_(function() {
        var and__6128__auto__ = !(app_state == null);
        if (and__6128__auto__) {
          return render;
        } else {
          return and__6128__auto__;
        }
      }())) {
        return om.core._queue_render_BANG_.call(null, app_state, this$__$1);
      } else {
        return null;
      }
    };
  }(x13801);
  x13801.om$core$ISetState$_set_state_BANG_$arity$4 = function(x13801) {
    return function(this$, ks, val, render) {
      var this$__$1 = this;
      var props = this$__$1.props;
      var state = this$__$1.state;
      var pstate = om.core._get_state.call(null, this$__$1);
      var app_state = props["__om_app_state"];
      state["__om_pending_state"] = cljs.core.assoc_in.call(null, pstate, ks, val);
      if (cljs.core.truth_(function() {
        var and__6128__auto__ = !(app_state == null);
        if (and__6128__auto__) {
          return render;
        } else {
          return and__6128__auto__;
        }
      }())) {
        return om.core._queue_render_BANG_.call(null, app_state, this$__$1);
      } else {
        return null;
      }
    };
  }(x13801);
  x13801.om$core$IGetRenderState$ = true;
  x13801.om$core$IGetRenderState$_get_render_state$arity$1 = function(x13801) {
    return function(this$) {
      var this$__$1 = this;
      return this$__$1.state["__om_state"];
    };
  }(x13801);
  x13801.om$core$IGetRenderState$_get_render_state$arity$2 = function(x13801) {
    return function(this$, ks) {
      var this$__$1 = this;
      return cljs.core.get_in.call(null, om.core._get_render_state.call(null, this$__$1), ks);
    };
  }(x13801);
  x13801.om$core$IGetState$ = true;
  x13801.om$core$IGetState$_get_state$arity$1 = function(x13801) {
    return function(this$) {
      var this$__$1 = this;
      var state = this$__$1.state;
      var or__6140__auto__ = state["__om_pending_state"];
      if (cljs.core.truth_(or__6140__auto__)) {
        return or__6140__auto__;
      } else {
        return state["__om_state"];
      }
    };
  }(x13801);
  x13801.om$core$IGetState$_get_state$arity$2 = function(x13801) {
    return function(this$, ks) {
      var this$__$1 = this;
      return cljs.core.get_in.call(null, om.core._get_state.call(null, this$__$1), ks);
    };
  }(x13801);
  return x13801;
};
om.core.pure_descriptor = om.core.specify_state_methods_BANG_.call(null, cljs.core.clj__GT_js.call(null, om.core.pure_methods));
om.core.react_id = function om$core$react_id(x) {
  var id = goog.dom.dataset.get(om.core.get_node.call(null, x), "reactid");
  if (cljs.core.truth_(id)) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, new cljs.core.Symbol(null, "id", "id", 252129435, null)))].join(""));
  }
  return id;
};
om.core.get_gstate = function om$core$get_gstate(owner) {
  return owner.props["__om_app_state"];
};
om.core.no_local_merge_pending_state = function om$core$no_local_merge_pending_state(owner) {
  var gstate = om.core.get_gstate.call(null, owner);
  var spath = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "state-map", "state-map", -1313872128), om.core.react_id.call(null, owner)], null);
  var states = cljs.core.get_in.call(null, cljs.core.deref.call(null, gstate), spath);
  if (cljs.core.truth_((new cljs.core.Keyword(null, "pending-state", "pending-state", 1525896973)).cljs$core$IFn$_invoke$arity$1(states))) {
    return cljs.core.swap_BANG_.call(null, gstate, cljs.core.update_in, spath, function(gstate, spath, states) {
      return function(states__$1) {
        return cljs.core.dissoc.call(null, cljs.core.assoc.call(null, cljs.core.assoc.call(null, states__$1, new cljs.core.Keyword(null, "previous-state", "previous-state", 1888227923), (new cljs.core.Keyword(null, "render-state", "render-state", 2053902270)).cljs$core$IFn$_invoke$arity$1(states__$1)), new cljs.core.Keyword(null, "render-state", "render-state", 2053902270), cljs.core.merge.call(null, (new cljs.core.Keyword(null, "render-state", "render-state", 2053902270)).cljs$core$IFn$_invoke$arity$1(states__$1), 
        (new cljs.core.Keyword(null, "pending-state", "pending-state", 1525896973)).cljs$core$IFn$_invoke$arity$1(states__$1))), new cljs.core.Keyword(null, "pending-state", "pending-state", 1525896973));
      };
    }(gstate, spath, states));
  } else {
    return null;
  }
};
om.core.no_local_state_methods = cljs.core.assoc.call(null, om.core.pure_methods, new cljs.core.Keyword(null, "getInitialState", "getInitialState", 1541760916), function() {
  var this$ = this;
  var c = om.core.children.call(null, this$);
  var props = this$.props;
  var istate = function() {
    var or__6140__auto__ = props["__om_init_state"];
    if (cljs.core.truth_(or__6140__auto__)) {
      return or__6140__auto__;
    } else {
      return cljs.core.PersistentArrayMap.EMPTY;
    }
  }();
  var om_id = function() {
    var or__6140__auto__ = (new cljs.core.Keyword("om.core", "id", "om.core/id", 299074693)).cljs$core$IFn$_invoke$arity$1(istate);
    if (cljs.core.truth_(or__6140__auto__)) {
      return or__6140__auto__;
    } else {
      return goog.ui.IdGenerator.getInstance().getNextUniqueId();
    }
  }();
  var state = cljs.core.merge.call(null, cljs.core.dissoc.call(null, istate, new cljs.core.Keyword("om.core", "id", "om.core/id", 299074693)), (!(c == null) ? false || c.om$core$IInitState$ ? true : !c.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IInitState, c) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IInitState, c)) ? om.core.init_state.call(null, c) : null);
  props["__om_init_state"] = null;
  return {"__om_id":om_id};
}, new cljs.core.Keyword(null, "componentDidMount", "componentDidMount", 955710936), function() {
  var this$ = this;
  var c = om.core.children.call(null, this$);
  var cursor = this$.props["__om_cursor"];
  var spath = new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "state-map", "state-map", -1313872128), om.core.react_id.call(null, this$), new cljs.core.Keyword(null, "render-state", "render-state", 2053902270)], null);
  cljs.core.swap_BANG_.call(null, om.core.get_gstate.call(null, this$), cljs.core.assoc_in, spath, om.core.state);
  if (!(c == null) ? false || c.om$core$IDidMount$ ? true : !c.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IDidMount, c) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IDidMount, c)) {
    return om.core.did_mount.call(null, c);
  } else {
    return null;
  }
}, new cljs.core.Keyword(null, "componentWillMount", "componentWillMount", -285327619), function() {
  var this$ = this;
  om.core.merge_props_state.call(null, this$);
  var c_13812 = om.core.children.call(null, this$);
  if (!(c_13812 == null) ? false || c_13812.om$core$IWillMount$ ? true : !c_13812.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IWillMount, c_13812) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IWillMount, c_13812)) {
    om.core.will_mount.call(null, c_13812);
  } else {
  }
  if (cljs.core.truth_(om.core.mounted_QMARK_.call(null, this$))) {
    return om.core.no_local_merge_pending_state.call(null, this$);
  } else {
    return null;
  }
}, new cljs.core.Keyword(null, "componentWillUnmount", "componentWillUnmount", 1573788814), function() {
  var this$ = this;
  var c = om.core.children.call(null, this$);
  if (!(c == null) ? false || c.om$core$IWillUnmount$ ? true : !c.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IWillUnmount, c) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IWillUnmount, c)) {
    om.core.will_unmount.call(null, c);
  } else {
  }
  cljs.core.swap_BANG_.call(null, om.core.get_gstate.call(null, this$), cljs.core.update_in, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "state-map", "state-map", -1313872128)], null), cljs.core.dissoc, om.core.react_id.call(null, this$));
  var temp__4425__auto__ = cljs.core.seq.call(null, this$.state["__om_refs"]);
  if (temp__4425__auto__) {
    var refs = temp__4425__auto__;
    var seq__13806 = cljs.core.seq.call(null, refs);
    var chunk__13807 = null;
    var count__13808 = 0;
    var i__13809 = 0;
    while (true) {
      if (i__13809 < count__13808) {
        var ref = cljs.core._nth.call(null, chunk__13807, i__13809);
        om.core.unobserve.call(null, this$, ref);
        var G__13813 = seq__13806;
        var G__13814 = chunk__13807;
        var G__13815 = count__13808;
        var G__13816 = i__13809 + 1;
        seq__13806 = G__13813;
        chunk__13807 = G__13814;
        count__13808 = G__13815;
        i__13809 = G__13816;
        continue;
      } else {
        var temp__4425__auto____$1 = cljs.core.seq.call(null, seq__13806);
        if (temp__4425__auto____$1) {
          var seq__13806__$1 = temp__4425__auto____$1;
          if (cljs.core.chunked_seq_QMARK_.call(null, seq__13806__$1)) {
            var c__6943__auto__ = cljs.core.chunk_first.call(null, seq__13806__$1);
            var G__13817 = cljs.core.chunk_rest.call(null, seq__13806__$1);
            var G__13818 = c__6943__auto__;
            var G__13819 = cljs.core.count.call(null, c__6943__auto__);
            var G__13820 = 0;
            seq__13806 = G__13817;
            chunk__13807 = G__13818;
            count__13808 = G__13819;
            i__13809 = G__13820;
            continue;
          } else {
            var ref = cljs.core.first.call(null, seq__13806__$1);
            om.core.unobserve.call(null, this$, ref);
            var G__13821 = cljs.core.next.call(null, seq__13806__$1);
            var G__13822 = null;
            var G__13823 = 0;
            var G__13824 = 0;
            seq__13806 = G__13821;
            chunk__13807 = G__13822;
            count__13808 = G__13823;
            i__13809 = G__13824;
            continue;
          }
        } else {
          return null;
        }
      }
      break;
    }
  } else {
    return null;
  }
}, new cljs.core.Keyword(null, "componentWillUpdate", "componentWillUpdate", 657390932), function(next_props, next_state) {
  var this$ = this;
  var props_13825 = this$.props;
  var c_13826 = om.core.children.call(null, this$);
  if (!(c_13826 == null) ? false || c_13826.om$core$IWillUpdate$ ? true : !c_13826.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IWillUpdate, c_13826) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IWillUpdate, c_13826)) {
    var state_13827 = this$.state;
    om.core.will_update.call(null, c_13826, om.core.get_props.call(null, {"props":next_props, "isOmComponent":true}), om.core._get_state.call(null, this$));
  } else {
  }
  om.core.no_local_merge_pending_state.call(null, this$);
  return om.core.update_refs.call(null, this$);
}, new cljs.core.Keyword(null, "componentDidUpdate", "componentDidUpdate", -1983477981), function(prev_props, prev_state) {
  var this$ = this;
  var c = om.core.children.call(null, this$);
  var gstate = om.core.get_gstate.call(null, this$);
  var states = cljs.core.get_in.call(null, cljs.core.deref.call(null, gstate), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "state-map", "state-map", -1313872128), om.core.react_id.call(null, this$)], null));
  var spath = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "state-map", "state-map", -1313872128), om.core.react_id.call(null, this$)], null);
  if (!(c == null) ? false || c.om$core$IDidUpdate$ ? true : !c.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IDidUpdate, c) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IDidUpdate, c)) {
    var state_13828 = this$.state;
    om.core.did_update.call(null, c, om.core.get_props.call(null, {"props":prev_props, "isOmComponent":true}), function() {
      var or__6140__auto__ = (new cljs.core.Keyword(null, "previous-state", "previous-state", 1888227923)).cljs$core$IFn$_invoke$arity$1(states);
      if (cljs.core.truth_(or__6140__auto__)) {
        return or__6140__auto__;
      } else {
        return (new cljs.core.Keyword(null, "render-state", "render-state", 2053902270)).cljs$core$IFn$_invoke$arity$1(states);
      }
    }());
  } else {
  }
  if (cljs.core.truth_((new cljs.core.Keyword(null, "previous-state", "previous-state", 1888227923)).cljs$core$IFn$_invoke$arity$1(states))) {
    return cljs.core.swap_BANG_.call(null, gstate, cljs.core.update_in, spath, cljs.core.dissoc, new cljs.core.Keyword(null, "previous-state", "previous-state", 1888227923));
  } else {
    return null;
  }
});
om.core.no_local_descriptor = function om$core$no_local_descriptor(methods$) {
  var x13830 = cljs.core.clj__GT_js.call(null, methods$);
  x13830.om$core$ISetState$ = true;
  x13830.om$core$ISetState$_set_state_BANG_$arity$3 = function(x13830) {
    return function(this$, val, render) {
      var this$__$1 = this;
      var gstate = om.core.get_gstate.call(null, this$__$1);
      var spath = new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "state-map", "state-map", -1313872128), om.core.react_id.call(null, this$__$1), new cljs.core.Keyword(null, "pending-state", "pending-state", 1525896973)], null);
      cljs.core.swap_BANG_.call(null, om.core.get_gstate.call(null, this$__$1), cljs.core.assoc_in, spath, val);
      if (cljs.core.truth_(function() {
        var and__6128__auto__ = !(gstate == null);
        if (and__6128__auto__) {
          return render;
        } else {
          return and__6128__auto__;
        }
      }())) {
        return om.core._queue_render_BANG_.call(null, gstate, this$__$1);
      } else {
        return null;
      }
    };
  }(x13830);
  x13830.om$core$ISetState$_set_state_BANG_$arity$4 = function(x13830) {
    return function(this$, ks, val, render) {
      var this$__$1 = this;
      return om.core._set_state_BANG_.call(null, this$__$1, cljs.core.assoc_in.call(null, om.core._get_state.call(null, this$__$1), ks, val), render);
    };
  }(x13830);
  x13830.om$core$IGetRenderState$ = true;
  x13830.om$core$IGetRenderState$_get_render_state$arity$1 = function(x13830) {
    return function(this$) {
      var this$__$1 = this;
      var spath = new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "state-map", "state-map", -1313872128), om.core.react_id.call(null, this$__$1), new cljs.core.Keyword(null, "render-state", "render-state", 2053902270)], null);
      return cljs.core.get_in.call(null, cljs.core.deref.call(null, om.core.get_gstate.call(null, this$__$1)), spath);
    };
  }(x13830);
  x13830.om$core$IGetRenderState$_get_render_state$arity$2 = function(x13830) {
    return function(this$, ks) {
      var this$__$1 = this;
      return cljs.core.get_in.call(null, om.core._get_render_state.call(null, this$__$1), ks);
    };
  }(x13830);
  x13830.om$core$IGetState$ = true;
  x13830.om$core$IGetState$_get_state$arity$1 = function(x13830) {
    return function(this$) {
      var this$__$1 = this;
      if (cljs.core.truth_(om.core.mounted_QMARK_.call(null, this$__$1))) {
        var spath = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "state-map", "state-map", -1313872128), om.core.react_id.call(null, this$__$1)], null);
        var states = cljs.core.get_in.call(null, cljs.core.deref.call(null, om.core.get_gstate.call(null, this$__$1)), spath);
        var or__6140__auto__ = (new cljs.core.Keyword(null, "pending-state", "pending-state", 1525896973)).cljs$core$IFn$_invoke$arity$1(states);
        if (cljs.core.truth_(or__6140__auto__)) {
          return or__6140__auto__;
        } else {
          return (new cljs.core.Keyword(null, "render-state", "render-state", 2053902270)).cljs$core$IFn$_invoke$arity$1(states);
        }
      } else {
        return this$__$1.props["__om_init_state"];
      }
    };
  }(x13830);
  x13830.om$core$IGetState$_get_state$arity$2 = function(x13830) {
    return function(this$, ks) {
      var this$__$1 = this;
      return cljs.core.get_in.call(null, om.core._get_state.call(null, this$__$1), ks);
    };
  }(x13830);
  return x13830;
};
om.core.valid_QMARK_ = function om$core$valid_QMARK_(x) {
  if (!(x == null) ? false || x.om$core$ICursor$ ? true : !x.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.ICursor, x) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.ICursor, x)) {
    return !cljs.core.keyword_identical_QMARK_.call(null, cljs.core.deref.call(null, x), new cljs.core.Keyword("om.core", "invalid", "om.core/invalid", 1948827993));
  } else {
    return true;
  }
};
om.core.MapCursor = function(value, state, path) {
  this.value = value;
  this.state = state;
  this.path = path;
  this.cljs$lang$protocol_mask$partition0$ = 2163640079;
  this.cljs$lang$protocol_mask$partition1$ = 8192;
};
om.core.MapCursor.prototype.cljs$core$ILookup$_lookup$arity$2 = function(this$, k) {
  var self__ = this;
  var this$__$1 = this;
  return cljs.core._lookup.call(null, this$__$1, k, null);
};
om.core.MapCursor.prototype.cljs$core$ILookup$_lookup$arity$3 = function(this$, k, not_found) {
  var self__ = this;
  var this$__$1 = this;
  var v = cljs.core._lookup.call(null, self__.value, k, new cljs.core.Keyword("om.core", "not-found", "om.core/not-found", 1869894275));
  if (!cljs.core._EQ_.call(null, v, new cljs.core.Keyword("om.core", "not-found", "om.core/not-found", 1869894275))) {
    return om.core._derive.call(null, this$__$1, v, self__.state, cljs.core.conj.call(null, self__.path, k));
  } else {
    return not_found;
  }
};
om.core.MapCursor.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(_, f, init) {
  var self__ = this;
  var ___$1 = this;
  return cljs.core._kv_reduce.call(null, self__.value, f, init);
};
om.core.MapCursor.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(_, writer, opts) {
  var self__ = this;
  var ___$1 = this;
  return cljs.core._pr_writer.call(null, self__.value, writer, opts);
};
om.core.MapCursor.prototype.om$core$ICursor$ = true;
om.core.MapCursor.prototype.om$core$ICursor$_path$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return self__.path;
};
om.core.MapCursor.prototype.om$core$ICursor$_state$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return self__.state;
};
om.core.MapCursor.prototype.cljs$core$IMeta$_meta$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return cljs.core.meta.call(null, self__.value);
};
om.core.MapCursor.prototype.cljs$core$ICloneable$_clone$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return new om.core.MapCursor(self__.value, self__.state, self__.path);
};
om.core.MapCursor.prototype.cljs$core$ICounted$_count$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return cljs.core._count.call(null, self__.value);
};
om.core.MapCursor.prototype.cljs$core$IHash$_hash$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return cljs.core.hash.call(null, self__.value);
};
om.core.MapCursor.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(_, other) {
  var self__ = this;
  var ___$1 = this;
  if (cljs.core.truth_(om.core.cursor_QMARK_.call(null, other))) {
    return cljs.core._EQ_.call(null, self__.value, om.core._value.call(null, other));
  } else {
    return cljs.core._EQ_.call(null, self__.value, other);
  }
};
om.core.MapCursor.prototype.om$core$IValue$ = true;
om.core.MapCursor.prototype.om$core$IValue$_value$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return self__.value;
};
om.core.MapCursor.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return new om.core.MapCursor(cljs.core.empty.call(null, self__.value), self__.state, self__.path);
};
om.core.MapCursor.prototype.cljs$core$IMap$_dissoc$arity$2 = function(_, k) {
  var self__ = this;
  var ___$1 = this;
  return new om.core.MapCursor(cljs.core._dissoc.call(null, self__.value, k), self__.state, self__.path);
};
om.core.MapCursor.prototype.om$core$ITransact$ = true;
om.core.MapCursor.prototype.om$core$ITransact$_transact_BANG_$arity$4 = function(this$, korks, f, tag) {
  var self__ = this;
  var this$__$1 = this;
  return om.core.transact_STAR_.call(null, self__.state, this$__$1, korks, f, tag);
};
om.core.MapCursor.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = function(_, k) {
  var self__ = this;
  var ___$1 = this;
  return cljs.core._contains_key_QMARK_.call(null, self__.value, k);
};
om.core.MapCursor.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(_, k, v) {
  var self__ = this;
  var ___$1 = this;
  return new om.core.MapCursor(cljs.core._assoc.call(null, self__.value, k, v), self__.state, self__.path);
};
om.core.MapCursor.prototype.cljs$core$ISeqable$_seq$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  if (cljs.core.count.call(null, self__.value) > 0) {
    return cljs.core.map.call(null, function(this$__$1) {
      return function(p__13834) {
        var vec__13835 = p__13834;
        var k = cljs.core.nth.call(null, vec__13835, 0, null);
        var v = cljs.core.nth.call(null, vec__13835, 1, null);
        return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [k, om.core._derive.call(null, this$__$1, v, self__.state, cljs.core.conj.call(null, self__.path, k))], null);
      };
    }(this$__$1), self__.value);
  } else {
    return null;
  }
};
om.core.MapCursor.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(_, new_meta) {
  var self__ = this;
  var ___$1 = this;
  return new om.core.MapCursor(cljs.core.with_meta.call(null, self__.value, new_meta), self__.state, self__.path);
};
om.core.MapCursor.prototype.cljs$core$ICollection$_conj$arity$2 = function(_, o) {
  var self__ = this;
  var ___$1 = this;
  return new om.core.MapCursor(cljs.core._conj.call(null, self__.value, o), self__.state, self__.path);
};
om.core.MapCursor.prototype.call = function() {
  var G__13836 = null;
  var G__13836__2 = function(self__, k) {
    var self__ = this;
    var self____$1 = this;
    var this$ = self____$1;
    return cljs.core._lookup.call(null, this$, k);
  };
  var G__13836__3 = function(self__, k, not_found) {
    var self__ = this;
    var self____$1 = this;
    var this$ = self____$1;
    return cljs.core._lookup.call(null, this$, k, not_found);
  };
  G__13836 = function(self__, k, not_found) {
    switch(arguments.length) {
      case 2:
        return G__13836__2.call(this, self__, k);
      case 3:
        return G__13836__3.call(this, self__, k, not_found);
    }
    throw new Error("Invalid arity: " + arguments.length);
  };
  G__13836.cljs$core$IFn$_invoke$arity$2 = G__13836__2;
  G__13836.cljs$core$IFn$_invoke$arity$3 = G__13836__3;
  return G__13836;
}();
om.core.MapCursor.prototype.apply = function(self__, args13833) {
  var self__ = this;
  var self____$1 = this;
  return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone.call(null, args13833)));
};
om.core.MapCursor.prototype.cljs$core$IFn$_invoke$arity$1 = function(k) {
  var self__ = this;
  var this$ = this;
  return cljs.core._lookup.call(null, this$, k);
};
om.core.MapCursor.prototype.cljs$core$IFn$_invoke$arity$2 = function(k, not_found) {
  var self__ = this;
  var this$ = this;
  return cljs.core._lookup.call(null, this$, k, not_found);
};
om.core.MapCursor.prototype.cljs$core$IDeref$_deref$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  return cljs.core.get_in.call(null, cljs.core.deref.call(null, self__.state), self__.path, new cljs.core.Keyword("om.core", "invalid", "om.core/invalid", 1948827993));
};
om.core.MapCursor.getBasis = function() {
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "value", "value", 1946509744, null), new cljs.core.Symbol(null, "state", "state", -348086572, null), new cljs.core.Symbol(null, "path", "path", 1452340359, null)], null);
};
om.core.MapCursor.cljs$lang$type = true;
om.core.MapCursor.cljs$lang$ctorStr = "om.core/MapCursor";
om.core.MapCursor.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write.call(null, writer__6739__auto__, "om.core/MapCursor");
};
om.core.__GT_MapCursor = function om$core$__GT_MapCursor(value, state, path) {
  return new om.core.MapCursor(value, state, path);
};
om.core.IndexedCursor = function(value, state, path) {
  this.value = value;
  this.state = state;
  this.path = path;
  this.cljs$lang$protocol_mask$partition0$ = 2180424479;
  this.cljs$lang$protocol_mask$partition1$ = 8192;
};
om.core.IndexedCursor.prototype.cljs$core$ILookup$_lookup$arity$2 = function(this$, n) {
  var self__ = this;
  var this$__$1 = this;
  return cljs.core._nth.call(null, this$__$1, n, null);
};
om.core.IndexedCursor.prototype.cljs$core$ILookup$_lookup$arity$3 = function(this$, n, not_found) {
  var self__ = this;
  var this$__$1 = this;
  return cljs.core._nth.call(null, this$__$1, n, not_found);
};
om.core.IndexedCursor.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(_, f, init) {
  var self__ = this;
  var ___$1 = this;
  return cljs.core._kv_reduce.call(null, self__.value, f, init);
};
om.core.IndexedCursor.prototype.cljs$core$IIndexed$_nth$arity$2 = function(this$, n) {
  var self__ = this;
  var this$__$1 = this;
  return om.core._derive.call(null, this$__$1, cljs.core._nth.call(null, self__.value, n), self__.state, cljs.core.conj.call(null, self__.path, n));
};
om.core.IndexedCursor.prototype.cljs$core$IIndexed$_nth$arity$3 = function(this$, n, not_found) {
  var self__ = this;
  var this$__$1 = this;
  if (n < cljs.core._count.call(null, self__.value)) {
    return om.core._derive.call(null, this$__$1, cljs.core._nth.call(null, self__.value, n, not_found), self__.state, cljs.core.conj.call(null, self__.path, n));
  } else {
    return not_found;
  }
};
om.core.IndexedCursor.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(_, writer, opts) {
  var self__ = this;
  var ___$1 = this;
  return cljs.core._pr_writer.call(null, self__.value, writer, opts);
};
om.core.IndexedCursor.prototype.om$core$ICursor$ = true;
om.core.IndexedCursor.prototype.om$core$ICursor$_path$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return self__.path;
};
om.core.IndexedCursor.prototype.om$core$ICursor$_state$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return self__.state;
};
om.core.IndexedCursor.prototype.cljs$core$IMeta$_meta$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return cljs.core.meta.call(null, self__.value);
};
om.core.IndexedCursor.prototype.cljs$core$ICloneable$_clone$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return new om.core.IndexedCursor(self__.value, self__.state, self__.path);
};
om.core.IndexedCursor.prototype.cljs$core$ICounted$_count$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return cljs.core._count.call(null, self__.value);
};
om.core.IndexedCursor.prototype.cljs$core$IStack$_peek$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  return om.core._derive.call(null, this$__$1, cljs.core._peek.call(null, self__.value), self__.state, self__.path);
};
om.core.IndexedCursor.prototype.cljs$core$IStack$_pop$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  return om.core._derive.call(null, this$__$1, cljs.core._pop.call(null, self__.value), self__.state, self__.path);
};
om.core.IndexedCursor.prototype.cljs$core$IHash$_hash$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return cljs.core.hash.call(null, self__.value);
};
om.core.IndexedCursor.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(_, other) {
  var self__ = this;
  var ___$1 = this;
  if (cljs.core.truth_(om.core.cursor_QMARK_.call(null, other))) {
    return cljs.core._EQ_.call(null, self__.value, om.core._value.call(null, other));
  } else {
    return cljs.core._EQ_.call(null, self__.value, other);
  }
};
om.core.IndexedCursor.prototype.om$core$IValue$ = true;
om.core.IndexedCursor.prototype.om$core$IValue$_value$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return self__.value;
};
om.core.IndexedCursor.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(_) {
  var self__ = this;
  var ___$1 = this;
  return new om.core.IndexedCursor(cljs.core.empty.call(null, self__.value), self__.state, self__.path);
};
om.core.IndexedCursor.prototype.om$core$ITransact$ = true;
om.core.IndexedCursor.prototype.om$core$ITransact$_transact_BANG_$arity$4 = function(this$, korks, f, tag) {
  var self__ = this;
  var this$__$1 = this;
  return om.core.transact_STAR_.call(null, self__.state, this$__$1, korks, f, tag);
};
om.core.IndexedCursor.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = function(_, k) {
  var self__ = this;
  var ___$1 = this;
  return cljs.core._contains_key_QMARK_.call(null, self__.value, k);
};
om.core.IndexedCursor.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(this$, n, v) {
  var self__ = this;
  var this$__$1 = this;
  return om.core._derive.call(null, this$__$1, cljs.core._assoc_n.call(null, self__.value, n, v), self__.state, self__.path);
};
om.core.IndexedCursor.prototype.cljs$core$ISeqable$_seq$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  if (cljs.core.count.call(null, self__.value) > 0) {
    return cljs.core.map.call(null, function(this$__$1) {
      return function(v, i) {
        return om.core._derive.call(null, this$__$1, v, self__.state, cljs.core.conj.call(null, self__.path, i));
      };
    }(this$__$1), self__.value, cljs.core.range.call(null));
  } else {
    return null;
  }
};
om.core.IndexedCursor.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(_, new_meta) {
  var self__ = this;
  var ___$1 = this;
  return new om.core.IndexedCursor(cljs.core.with_meta.call(null, self__.value, new_meta), self__.state, self__.path);
};
om.core.IndexedCursor.prototype.cljs$core$ICollection$_conj$arity$2 = function(_, o) {
  var self__ = this;
  var ___$1 = this;
  return new om.core.IndexedCursor(cljs.core._conj.call(null, self__.value, o), self__.state, self__.path);
};
om.core.IndexedCursor.prototype.call = function() {
  var G__13838 = null;
  var G__13838__2 = function(self__, k) {
    var self__ = this;
    var self____$1 = this;
    var this$ = self____$1;
    return cljs.core._lookup.call(null, this$, k);
  };
  var G__13838__3 = function(self__, k, not_found) {
    var self__ = this;
    var self____$1 = this;
    var this$ = self____$1;
    return cljs.core._lookup.call(null, this$, k, not_found);
  };
  G__13838 = function(self__, k, not_found) {
    switch(arguments.length) {
      case 2:
        return G__13838__2.call(this, self__, k);
      case 3:
        return G__13838__3.call(this, self__, k, not_found);
    }
    throw new Error("Invalid arity: " + arguments.length);
  };
  G__13838.cljs$core$IFn$_invoke$arity$2 = G__13838__2;
  G__13838.cljs$core$IFn$_invoke$arity$3 = G__13838__3;
  return G__13838;
}();
om.core.IndexedCursor.prototype.apply = function(self__, args13837) {
  var self__ = this;
  var self____$1 = this;
  return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone.call(null, args13837)));
};
om.core.IndexedCursor.prototype.cljs$core$IFn$_invoke$arity$1 = function(k) {
  var self__ = this;
  var this$ = this;
  return cljs.core._lookup.call(null, this$, k);
};
om.core.IndexedCursor.prototype.cljs$core$IFn$_invoke$arity$2 = function(k, not_found) {
  var self__ = this;
  var this$ = this;
  return cljs.core._lookup.call(null, this$, k, not_found);
};
om.core.IndexedCursor.prototype.cljs$core$IDeref$_deref$arity$1 = function(this$) {
  var self__ = this;
  var this$__$1 = this;
  return cljs.core.get_in.call(null, cljs.core.deref.call(null, self__.state), self__.path, new cljs.core.Keyword("om.core", "invalid", "om.core/invalid", 1948827993));
};
om.core.IndexedCursor.getBasis = function() {
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "value", "value", 1946509744, null), new cljs.core.Symbol(null, "state", "state", -348086572, null), new cljs.core.Symbol(null, "path", "path", 1452340359, null)], null);
};
om.core.IndexedCursor.cljs$lang$type = true;
om.core.IndexedCursor.cljs$lang$ctorStr = "om.core/IndexedCursor";
om.core.IndexedCursor.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
  return cljs.core._write.call(null, writer__6739__auto__, "om.core/IndexedCursor");
};
om.core.__GT_IndexedCursor = function om$core$__GT_IndexedCursor(value, state, path) {
  return new om.core.IndexedCursor(value, state, path);
};
om.core.to_cursor_STAR_ = function om$core$to_cursor_STAR_(val, state, path) {
  var x13840 = cljs.core.clone.call(null, val);
  x13840.cljs$core$IDeref$ = true;
  x13840.cljs$core$IDeref$_deref$arity$1 = function(x13840) {
    return function(this$) {
      var this$__$1 = this;
      return cljs.core.get_in.call(null, cljs.core.deref.call(null, state), path, new cljs.core.Keyword("om.core", "invalid", "om.core/invalid", 1948827993));
    };
  }(x13840);
  x13840.om$core$ICursor$ = true;
  x13840.om$core$ICursor$_path$arity$1 = function(x13840) {
    return function(_) {
      var ___$1 = this;
      return path;
    };
  }(x13840);
  x13840.om$core$ICursor$_state$arity$1 = function(x13840) {
    return function(_) {
      var ___$1 = this;
      return state;
    };
  }(x13840);
  x13840.om$core$ITransact$ = true;
  x13840.om$core$ITransact$_transact_BANG_$arity$4 = function(x13840) {
    return function(this$, korks, f, tag) {
      var this$__$1 = this;
      return om.core.transact_STAR_.call(null, state, this$__$1, korks, f, tag);
    };
  }(x13840);
  x13840.cljs$core$IEquiv$ = true;
  x13840.cljs$core$IEquiv$_equiv$arity$2 = function(x13840) {
    return function(_, other) {
      var ___$1 = this;
      if (cljs.core.truth_(om.core.cursor_QMARK_.call(null, other))) {
        return cljs.core._EQ_.call(null, val, om.core._value.call(null, other));
      } else {
        return cljs.core._EQ_.call(null, val, other);
      }
    };
  }(x13840);
  return x13840;
};
om.core.to_cursor = function om$core$to_cursor(var_args) {
  var args13841 = [];
  var len__7198__auto___13846 = arguments.length;
  var i__7199__auto___13847 = 0;
  while (true) {
    if (i__7199__auto___13847 < len__7198__auto___13846) {
      args13841.push(arguments[i__7199__auto___13847]);
      var G__13848 = i__7199__auto___13847 + 1;
      i__7199__auto___13847 = G__13848;
      continue;
    } else {
    }
    break;
  }
  var G__13843 = args13841.length;
  switch(G__13843) {
    case 1:
      return om.core.to_cursor.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return om.core.to_cursor.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return om.core.to_cursor.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13841.length)].join(""));;
  }
};
om.core.to_cursor.cljs$core$IFn$_invoke$arity$1 = function(val) {
  return om.core.to_cursor.call(null, val, null, cljs.core.PersistentVector.EMPTY);
};
om.core.to_cursor.cljs$core$IFn$_invoke$arity$2 = function(val, state) {
  return om.core.to_cursor.call(null, val, state, cljs.core.PersistentVector.EMPTY);
};
om.core.to_cursor.cljs$core$IFn$_invoke$arity$3 = function(val, state, path) {
  if (cljs.core.truth_(om.core.cursor_QMARK_.call(null, val))) {
    return val;
  } else {
    if (!(val == null) ? false || val.om$core$IToCursor$ ? true : !val.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IToCursor, val) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IToCursor, val)) {
      return om.core._to_cursor.call(null, val, state, path);
    } else {
      if (cljs.core.indexed_QMARK_.call(null, val)) {
        return new om.core.IndexedCursor(val, state, path);
      } else {
        if (cljs.core.map_QMARK_.call(null, val)) {
          return new om.core.MapCursor(val, state, path);
        } else {
          if (!(val == null) ? val.cljs$lang$protocol_mask$partition1$ & 8192 || val.cljs$core$ICloneable$ ? true : !val.cljs$lang$protocol_mask$partition1$ ? cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ICloneable, val) : false : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ICloneable, val)) {
            return om.core.to_cursor_STAR_.call(null, val, state, path);
          } else {
            return val;
          }
        }
      }
    }
  }
};
om.core.to_cursor.cljs$lang$maxFixedArity = 3;
om.core.notify_STAR_ = function om$core$notify_STAR_(cursor, tx_data) {
  var state = om.core._state.call(null, cursor);
  return om.core._notify_BANG_.call(null, state, tx_data, om.core.to_cursor.call(null, cljs.core.deref.call(null, state), state));
};
om.core.root_cursor = function om$core$root_cursor(atom) {
  if (!(atom == null) ? atom.cljs$lang$protocol_mask$partition0$ & 32768 || atom.cljs$core$IDeref$ ? true : !atom.cljs$lang$protocol_mask$partition0$ ? cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IDeref, atom) : false : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IDeref, atom)) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "satisfies?", "satisfies?", -433227199, null), new cljs.core.Symbol(null, "IDeref", "IDeref", 1738423197, null), new cljs.core.Symbol(null, "atom", "atom", 1243487874, null))))].join(""));
  }
  return om.core.to_cursor.call(null, cljs.core.deref.call(null, atom), atom, cljs.core.PersistentVector.EMPTY);
};
om.core._refs = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
om.core.ref_sub_cursor = function om$core$ref_sub_cursor(x, parent) {
  var x13853 = cljs.core.clone.call(null, x);
  x13853.cljs$core$ICloneable$ = true;
  x13853.cljs$core$ICloneable$_clone$arity$1 = function(x13853) {
    return function(this$) {
      var this$__$1 = this;
      return om$core$ref_sub_cursor.call(null, cljs.core.clone.call(null, x), parent);
    };
  }(x13853);
  x13853.om$core$IAdapt$ = true;
  x13853.om$core$IAdapt$_adapt$arity$2 = function(x13853) {
    return function(this$, other) {
      var this$__$1 = this;
      return om$core$ref_sub_cursor.call(null, om.core.adapt.call(null, x, other), parent);
    };
  }(x13853);
  x13853.om$core$ICursorDerive$ = true;
  x13853.om$core$ICursorDerive$_derive$arity$4 = function(x13853) {
    return function(this$, derived, state, path) {
      var this$__$1 = this;
      var cursor_SINGLEQUOTE_ = om.core.to_cursor.call(null, derived, state, path);
      if (cljs.core.truth_(om.core.cursor_QMARK_.call(null, cursor_SINGLEQUOTE_))) {
        return om.core.adapt.call(null, this$__$1, cursor_SINGLEQUOTE_);
      } else {
        return cursor_SINGLEQUOTE_;
      }
    };
  }(x13853);
  x13853.om$core$ITransact$ = true;
  x13853.om$core$ITransact$_transact_BANG_$arity$4 = function(x13853) {
    return function(cursor, korks, f, tag) {
      var cursor__$1 = this;
      om.core.commit_BANG_.call(null, cursor__$1, korks, f);
      return om.core._refresh_deps_BANG_.call(null, parent);
    };
  }(x13853);
  return x13853;
};
om.core.ref_cursor_QMARK_ = function om$core$ref_cursor_QMARK_(x) {
  if (!(x == null)) {
    if (false || x.om$core$IOmRef$) {
      return true;
    } else {
      if (!x.cljs$lang$protocol_mask$partition$) {
        return cljs.core.native_satisfies_QMARK_.call(null, om.core.IOmRef, x);
      } else {
        return false;
      }
    }
  } else {
    return cljs.core.native_satisfies_QMARK_.call(null, om.core.IOmRef, x);
  }
};
om.core.ref_cursor = function om$core$ref_cursor(cursor) {
  if (cljs.core.truth_(om.core.cursor_QMARK_.call(null, cursor))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "cursor?", "cursor?", -648342688, null), new cljs.core.Symbol(null, "cursor", "cursor", -1642498285, null))))].join(""));
  }
  if (cljs.core.truth_(om.core.ref_cursor_QMARK_.call(null, cursor))) {
    return cursor;
  } else {
    var path = om.core.path.call(null, cursor);
    var storage = cljs.core.get.call(null, cljs.core.swap_BANG_.call(null, om.core._refs, cljs.core.update_in, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [path], null), cljs.core.fnil.call(null, cljs.core.identity, cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY))), path);
    var x13861 = cljs.core.clone.call(null, cursor);
    x13861.om$core$ICursorDerive$ = true;
    x13861.om$core$ICursorDerive$_derive$arity$4 = function(x13861, path, storage) {
      return function(this$, derived, state, path__$1) {
        var this$__$1 = this;
        var cursor_SINGLEQUOTE_ = om.core.to_cursor.call(null, derived, state, path__$1);
        if (cljs.core.truth_(om.core.cursor_QMARK_.call(null, cursor_SINGLEQUOTE_))) {
          return om.core.ref_sub_cursor.call(null, cursor_SINGLEQUOTE_, this$__$1);
        } else {
          return cursor_SINGLEQUOTE_;
        }
      };
    }(x13861, path, storage);
    x13861.om$core$IOmRef$ = true;
    x13861.om$core$IOmRef$_add_dep_BANG_$arity$2 = function(x13861, path, storage) {
      return function(_, c) {
        var ___$1 = this;
        return cljs.core.swap_BANG_.call(null, storage, cljs.core.assoc, om.core.id.call(null, c), c);
      };
    }(x13861, path, storage);
    x13861.om$core$IOmRef$_remove_dep_BANG_$arity$2 = function(x13861, path, storage) {
      return function(_, c) {
        var ___$1 = this;
        var m = cljs.core.swap_BANG_.call(null, storage, cljs.core.dissoc, om.core.id.call(null, c));
        if (cljs.core.count.call(null, m) === 0) {
          return cljs.core.swap_BANG_.call(null, om.core._refs, cljs.core.dissoc, path);
        } else {
          return null;
        }
      };
    }(x13861, path, storage);
    x13861.om$core$IOmRef$_refresh_deps_BANG_$arity$1 = function(x13861, path, storage) {
      return function(_) {
        var ___$1 = this;
        var seq__13862 = cljs.core.seq.call(null, cljs.core.vals.call(null, cljs.core.deref.call(null, storage)));
        var chunk__13863 = null;
        var count__13864 = 0;
        var i__13865 = 0;
        while (true) {
          if (i__13865 < count__13864) {
            var c = cljs.core._nth.call(null, chunk__13863, i__13865);
            om.core._queue_render_BANG_.call(null, om.core.state.call(null, cursor), c);
            var G__13866 = seq__13862;
            var G__13867 = chunk__13863;
            var G__13868 = count__13864;
            var G__13869 = i__13865 + 1;
            seq__13862 = G__13866;
            chunk__13863 = G__13867;
            count__13864 = G__13868;
            i__13865 = G__13869;
            continue;
          } else {
            var temp__4425__auto__ = cljs.core.seq.call(null, seq__13862);
            if (temp__4425__auto__) {
              var seq__13862__$1 = temp__4425__auto__;
              if (cljs.core.chunked_seq_QMARK_.call(null, seq__13862__$1)) {
                var c__6943__auto__ = cljs.core.chunk_first.call(null, seq__13862__$1);
                var G__13870 = cljs.core.chunk_rest.call(null, seq__13862__$1);
                var G__13871 = c__6943__auto__;
                var G__13872 = cljs.core.count.call(null, c__6943__auto__);
                var G__13873 = 0;
                seq__13862 = G__13870;
                chunk__13863 = G__13871;
                count__13864 = G__13872;
                i__13865 = G__13873;
                continue;
              } else {
                var c = cljs.core.first.call(null, seq__13862__$1);
                om.core._queue_render_BANG_.call(null, om.core.state.call(null, cursor), c);
                var G__13874 = cljs.core.next.call(null, seq__13862__$1);
                var G__13875 = null;
                var G__13876 = 0;
                var G__13877 = 0;
                seq__13862 = G__13874;
                chunk__13863 = G__13875;
                count__13864 = G__13876;
                i__13865 = G__13877;
                continue;
              }
            } else {
              return null;
            }
          }
          break;
        }
      };
    }(x13861, path, storage);
    x13861.om$core$IOmRef$_get_deps$arity$1 = function(x13861, path, storage) {
      return function(_) {
        var ___$1 = this;
        return cljs.core.deref.call(null, storage);
      };
    }(x13861, path, storage);
    x13861.om$core$ITransact$ = true;
    x13861.om$core$ITransact$_transact_BANG_$arity$4 = function(x13861, path, storage) {
      return function(cursor__$1, korks, f, tag) {
        var cursor__$2 = this;
        om.core.commit_BANG_.call(null, cursor__$2, korks, f);
        return om.core._refresh_deps_BANG_.call(null, cursor__$2);
      };
    }(x13861, path, storage);
    return x13861;
  }
};
om.core.add_ref_to_component_BANG_ = function om$core$add_ref_to_component_BANG_(c, ref) {
  var state = c.state;
  var refs = function() {
    var or__6140__auto__ = state["__om_refs"];
    if (cljs.core.truth_(or__6140__auto__)) {
      return or__6140__auto__;
    } else {
      return cljs.core.PersistentHashSet.EMPTY;
    }
  }();
  if (cljs.core.contains_QMARK_.call(null, refs, ref)) {
    return null;
  } else {
    return state["__om_refs"] = cljs.core.conj.call(null, refs, ref);
  }
};
om.core.remove_ref_from_component_BANG_ = function om$core$remove_ref_from_component_BANG_(c, ref) {
  var state = c.state;
  var refs = state["__om_refs"];
  if (cljs.core.contains_QMARK_.call(null, refs, ref)) {
    return state["__om_refs"] = cljs.core.disj.call(null, refs, ref);
  } else {
    return null;
  }
};
om.core.observe = function om$core$observe(c, ref) {
  if (cljs.core.truth_(om.core.component_QMARK_.call(null, c))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "component?", "component?", 2048315517, null), new cljs.core.Symbol(null, "c", "c", -122660552, null))))].join(""));
  }
  if (cljs.core.truth_(om.core.cursor_QMARK_.call(null, ref))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "cursor?", "cursor?", -648342688, null), new cljs.core.Symbol(null, "ref", "ref", -1364538802, null))))].join(""));
  }
  if (cljs.core.truth_(om.core.ref_cursor_QMARK_.call(null, ref))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "ref-cursor?", "ref-cursor?", 1026875459, null), new cljs.core.Symbol(null, "ref", "ref", -1364538802, null))))].join(""));
  }
  om.core.add_ref_to_component_BANG_.call(null, c, ref);
  om.core._add_dep_BANG_.call(null, ref, c);
  return ref;
};
om.core.unobserve = function om$core$unobserve(c, ref) {
  om.core.remove_ref_from_component_BANG_.call(null, c, ref);
  om.core._remove_dep_BANG_.call(null, ref, c);
  return ref;
};
om.core.refresh_queued = false;
om.core.refresh_set = cljs.core.atom.call(null, cljs.core.PersistentHashSet.EMPTY);
om.core.get_renderT = function om$core$get_renderT(state) {
  var or__6140__auto__ = state.om$render$T;
  if (cljs.core.truth_(or__6140__auto__)) {
    return or__6140__auto__;
  } else {
    return 0;
  }
};
om.core.render_all = function om$core$render_all(var_args) {
  var args13878 = [];
  var len__7198__auto___13885 = arguments.length;
  var i__7199__auto___13886 = 0;
  while (true) {
    if (i__7199__auto___13886 < len__7198__auto___13885) {
      args13878.push(arguments[i__7199__auto___13886]);
      var G__13887 = i__7199__auto___13886 + 1;
      i__7199__auto___13886 = G__13887;
      continue;
    } else {
    }
    break;
  }
  var G__13880 = args13878.length;
  switch(G__13880) {
    case 0:
      return om.core.render_all.cljs$core$IFn$_invoke$arity$0();
      break;
    case 1:
      return om.core.render_all.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13878.length)].join(""));;
  }
};
om.core.render_all.cljs$core$IFn$_invoke$arity$0 = function() {
  return om.core.render_all.call(null, null);
};
om.core.render_all.cljs$core$IFn$_invoke$arity$1 = function(state) {
  om.core.refresh_queued = false;
  var seq__13881_13889 = cljs.core.seq.call(null, cljs.core.deref.call(null, om.core.refresh_set));
  var chunk__13882_13890 = null;
  var count__13883_13891 = 0;
  var i__13884_13892 = 0;
  while (true) {
    if (i__13884_13892 < count__13883_13891) {
      var f_13893 = cljs.core._nth.call(null, chunk__13882_13890, i__13884_13892);
      f_13893.call(null);
      var G__13894 = seq__13881_13889;
      var G__13895 = chunk__13882_13890;
      var G__13896 = count__13883_13891;
      var G__13897 = i__13884_13892 + 1;
      seq__13881_13889 = G__13894;
      chunk__13882_13890 = G__13895;
      count__13883_13891 = G__13896;
      i__13884_13892 = G__13897;
      continue;
    } else {
      var temp__4425__auto___13898 = cljs.core.seq.call(null, seq__13881_13889);
      if (temp__4425__auto___13898) {
        var seq__13881_13899__$1 = temp__4425__auto___13898;
        if (cljs.core.chunked_seq_QMARK_.call(null, seq__13881_13899__$1)) {
          var c__6943__auto___13900 = cljs.core.chunk_first.call(null, seq__13881_13899__$1);
          var G__13901 = cljs.core.chunk_rest.call(null, seq__13881_13899__$1);
          var G__13902 = c__6943__auto___13900;
          var G__13903 = cljs.core.count.call(null, c__6943__auto___13900);
          var G__13904 = 0;
          seq__13881_13889 = G__13901;
          chunk__13882_13890 = G__13902;
          count__13883_13891 = G__13903;
          i__13884_13892 = G__13904;
          continue;
        } else {
          var f_13905 = cljs.core.first.call(null, seq__13881_13899__$1);
          f_13905.call(null);
          var G__13906 = cljs.core.next.call(null, seq__13881_13899__$1);
          var G__13907 = null;
          var G__13908 = 0;
          var G__13909 = 0;
          seq__13881_13889 = G__13906;
          chunk__13882_13890 = G__13907;
          count__13883_13891 = G__13908;
          i__13884_13892 = G__13909;
          continue;
        }
      } else {
      }
    }
    break;
  }
  if (state == null) {
    return null;
  } else {
    return state.om$render$T = om.core.get_renderT.call(null, state) + 1;
  }
};
om.core.render_all.cljs$lang$maxFixedArity = 1;
om.core.roots = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
om.core.valid_component_QMARK_ = function om$core$valid_component_QMARK_(x, f) {
  if (function() {
    var or__6140__auto__ = !(x == null) ? false || x.om$core$IRender$ ? true : !x.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IRender, x) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IRender, x);
    if (or__6140__auto__) {
      return or__6140__auto__;
    } else {
      var or__6140__auto____$1 = !(x == null) ? false || x.om$core$IRenderProps$ ? true : !x.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IRenderProps, x) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IRenderProps, x);
      if (or__6140__auto____$1) {
        return or__6140__auto____$1;
      } else {
        if (!(x == null)) {
          if (false || x.om$core$IRenderState$) {
            return true;
          } else {
            if (!x.cljs$lang$protocol_mask$partition$) {
              return cljs.core.native_satisfies_QMARK_.call(null, om.core.IRenderState, x);
            } else {
              return false;
            }
          }
        } else {
          return cljs.core.native_satisfies_QMARK_.call(null, om.core.IRenderState, x);
        }
      }
    }
  }()) {
    return null;
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str([cljs.core.str("Invalid Om component fn, "), cljs.core.str(f.name), cljs.core.str(" does not return valid instance")].join("")), cljs.core.str("\n"), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "or", "or", 1876275696, null), cljs.core.list(new cljs.core.Symbol(null, "satisfies?", "satisfies?", -433227199, null), new cljs.core.Symbol(null, "IRender", "IRender", 590822196, null), new cljs.core.Symbol(null, 
    "x", "x", -555367584, null)), cljs.core.list(new cljs.core.Symbol(null, "satisfies?", "satisfies?", -433227199, null), new cljs.core.Symbol(null, "IRenderProps", "IRenderProps", 2115139472, null), new cljs.core.Symbol(null, "x", "x", -555367584, null)), cljs.core.list(new cljs.core.Symbol(null, "satisfies?", "satisfies?", -433227199, null), new cljs.core.Symbol(null, "IRenderState", "IRenderState", -897673898, null), new cljs.core.Symbol(null, "x", "x", -555367584, null)))))].join(""));
  }
};
om.core.valid_opts_QMARK_ = function om$core$valid_opts_QMARK_(m) {
  return cljs.core.every_QMARK_.call(null, new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 11, [new cljs.core.Keyword(null, "descriptor", "descriptor", 76122018), null, new cljs.core.Keyword(null, "fn", "fn", -1175266204), null, new cljs.core.Keyword(null, "instrument", "instrument", -960698844), null, new cljs.core.Keyword(null, "react-key", "react-key", 1337881348), null, new cljs.core.Keyword(null, "key", "key", -1516042587), null, new cljs.core.Keyword(null, "init-state", 
  "init-state", 1450863212), null, new cljs.core.Keyword(null, "state", "state", -1988618099), null, new cljs.core.Keyword(null, "key-fn", "key-fn", -636154479), null, new cljs.core.Keyword(null, "opts", "opts", 155075701), null, new cljs.core.Keyword("om.core", "index", "om.core/index", -1724175434), null, new cljs.core.Keyword(null, "shared", "shared", -384145993), null], null), null), cljs.core.keys.call(null, m));
};
om.core.id = function om$core$id(owner) {
  return owner.state["__om_id"];
};
om.core.get_descriptor = function om$core$get_descriptor(var_args) {
  var args13920 = [];
  var len__7198__auto___13923 = arguments.length;
  var i__7199__auto___13924 = 0;
  while (true) {
    if (i__7199__auto___13924 < len__7198__auto___13923) {
      args13920.push(arguments[i__7199__auto___13924]);
      var G__13925 = i__7199__auto___13924 + 1;
      i__7199__auto___13924 = G__13925;
      continue;
    } else {
    }
    break;
  }
  var G__13922 = args13920.length;
  switch(G__13922) {
    case 1:
      return om.core.get_descriptor.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return om.core.get_descriptor.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13920.length)].join(""));;
  }
};
om.core.get_descriptor.cljs$core$IFn$_invoke$arity$1 = function(f) {
  return om.core.get_descriptor.call(null, f, null);
};
om.core.get_descriptor.cljs$core$IFn$_invoke$arity$2 = function(f, descriptor) {
  var rdesc_13927 = function() {
    var or__6140__auto__ = descriptor;
    if (cljs.core.truth_(or__6140__auto__)) {
      return or__6140__auto__;
    } else {
      var or__6140__auto____$1 = om.core._STAR_descriptor_STAR_;
      if (cljs.core.truth_(or__6140__auto____$1)) {
        return or__6140__auto____$1;
      } else {
        return om.core.pure_descriptor;
      }
    }
  }();
  if (goog.object.get(f, "om$descriptor") == null || !(rdesc_13927 === goog.object.get(f, "om$tag"))) {
    var factory_13928 = React.createFactory(React.createClass(rdesc_13927));
    goog.object.set(f, "om$descriptor", factory_13928);
    goog.object.set(f, "om$tag", rdesc_13927);
  } else {
  }
  return goog.object.get(f, "om$descriptor");
};
om.core.get_descriptor.cljs$lang$maxFixedArity = 2;
om.core.getf = function om$core$getf(var_args) {
  var args13929 = [];
  var len__7198__auto___13932 = arguments.length;
  var i__7199__auto___13933 = 0;
  while (true) {
    if (i__7199__auto___13933 < len__7198__auto___13932) {
      args13929.push(arguments[i__7199__auto___13933]);
      var G__13934 = i__7199__auto___13933 + 1;
      i__7199__auto___13933 = G__13934;
      continue;
    } else {
    }
    break;
  }
  var G__13931 = args13929.length;
  switch(G__13931) {
    case 2:
      return om.core.getf.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return om.core.getf.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13929.length)].join(""));;
  }
};
om.core.getf.cljs$core$IFn$_invoke$arity$2 = function(f, cursor) {
  if (f instanceof cljs.core.MultiFn) {
    var dv = f.dispatch_fn.call(null, cursor, null);
    return cljs.core.get_method.call(null, f, dv);
  } else {
    return f;
  }
};
om.core.getf.cljs$core$IFn$_invoke$arity$3 = function(f, cursor, opts) {
  if (f instanceof cljs.core.MultiFn) {
    var dv = f.dispatch_fn.call(null, cursor, null, opts);
    return cljs.core.get_method.call(null, f, dv);
  } else {
    return f;
  }
};
om.core.getf.cljs$lang$maxFixedArity = 3;
om.core.build_STAR_ = function om$core$build_STAR_(var_args) {
  var args13936 = [];
  var len__7198__auto___13941 = arguments.length;
  var i__7199__auto___13942 = 0;
  while (true) {
    if (i__7199__auto___13942 < len__7198__auto___13941) {
      args13936.push(arguments[i__7199__auto___13942]);
      var G__13943 = i__7199__auto___13942 + 1;
      i__7199__auto___13942 = G__13943;
      continue;
    } else {
    }
    break;
  }
  var G__13938 = args13936.length;
  switch(G__13938) {
    case 2:
      return om.core.build_STAR_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return om.core.build_STAR_.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13936.length)].join(""));;
  }
};
om.core.build_STAR_.cljs$core$IFn$_invoke$arity$2 = function(f, cursor) {
  return om.core.build_STAR_.call(null, f, cursor, null);
};
om.core.build_STAR_.cljs$core$IFn$_invoke$arity$3 = function(f, cursor, m) {
  if (cljs.core.ifn_QMARK_.call(null, f)) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "ifn?", "ifn?", -2106461064, null), new cljs.core.Symbol(null, "f", "f", 43394975, null))))].join(""));
  }
  if (m == null || cljs.core.map_QMARK_.call(null, m)) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "or", "or", 1876275696, null), cljs.core.list(new cljs.core.Symbol(null, "nil?", "nil?", 1612038930, null), new cljs.core.Symbol(null, "m", "m", -1021758608, null)), cljs.core.list(new cljs.core.Symbol(null, "map?", "map?", -1780568534, null), new cljs.core.Symbol(null, "m", "m", -1021758608, null)))))].join(""));
  }
  if (cljs.core.truth_(om.core.valid_opts_QMARK_.call(null, m))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.apply.call(null, cljs.core.str, "build options contains invalid keys, only :key, :key-fn :react-key, ", ":fn, :init-state, :state, and :opts allowed, given ", cljs.core.interpose.call(null, ", ", cljs.core.keys.call(null, m)))), cljs.core.str("\n"), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "valid-opts?", "valid-opts?", 1000038576, null), new cljs.core.Symbol(null, "m", "m", -1021758608, 
    null))))].join(""));
  }
  if (m == null) {
    var shared = om.core.get_shared.call(null, om.core._STAR_parent_STAR_);
    var ctor = om.core.get_descriptor.call(null, om.core.getf.call(null, f, cursor));
    return ctor.call(null, {"__om_cursor":cursor, "__om_shared":shared, "__om_root_key":om.core._STAR_root_key_STAR_, "__om_app_state":om.core._STAR_state_STAR_, "__om_descriptor":om.core._STAR_descriptor_STAR_, "__om_instrument":om.core._STAR_instrument_STAR_, "children":function(shared, ctor) {
      return function(this$) {
        var ret = f.call(null, cursor, this$);
        om.core.valid_component_QMARK_.call(null, ret, f);
        return ret;
      };
    }(shared, ctor)});
  } else {
    var map__13939 = m;
    var map__13939__$1 = (!(map__13939 == null) ? map__13939.cljs$lang$protocol_mask$partition0$ & 64 || map__13939.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.call(null, cljs.core.hash_map, map__13939) : map__13939;
    var key = cljs.core.get.call(null, map__13939__$1, new cljs.core.Keyword(null, "key", "key", -1516042587));
    var key_fn = cljs.core.get.call(null, map__13939__$1, new cljs.core.Keyword(null, "key-fn", "key-fn", -636154479));
    var state = cljs.core.get.call(null, map__13939__$1, new cljs.core.Keyword(null, "state", "state", -1988618099));
    var init_state = cljs.core.get.call(null, map__13939__$1, new cljs.core.Keyword(null, "init-state", "init-state", 1450863212));
    var opts = cljs.core.get.call(null, map__13939__$1, new cljs.core.Keyword(null, "opts", "opts", 155075701));
    var dataf = cljs.core.get.call(null, m, new cljs.core.Keyword(null, "fn", "fn", -1175266204));
    var cursor_SINGLEQUOTE_ = !(dataf == null) ? function() {
      var temp__4423__auto__ = (new cljs.core.Keyword("om.core", "index", "om.core/index", -1724175434)).cljs$core$IFn$_invoke$arity$1(m);
      if (cljs.core.truth_(temp__4423__auto__)) {
        var i = temp__4423__auto__;
        return dataf.call(null, cursor, i);
      } else {
        return dataf.call(null, cursor);
      }
    }() : cursor;
    var rkey = !(key == null) ? cljs.core.get.call(null, cursor_SINGLEQUOTE_, key) : !(key_fn == null) ? key_fn.call(null, cursor_SINGLEQUOTE_) : cljs.core.get.call(null, m, new cljs.core.Keyword(null, "react-key", "react-key", 1337881348));
    var shared = function() {
      var or__6140__auto__ = (new cljs.core.Keyword(null, "shared", "shared", -384145993)).cljs$core$IFn$_invoke$arity$1(m);
      if (cljs.core.truth_(or__6140__auto__)) {
        return or__6140__auto__;
      } else {
        return om.core.get_shared.call(null, om.core._STAR_parent_STAR_);
      }
    }();
    var ctor = om.core.get_descriptor.call(null, om.core.getf.call(null, f, cursor_SINGLEQUOTE_, opts), (new cljs.core.Keyword(null, "descriptor", "descriptor", 76122018)).cljs$core$IFn$_invoke$arity$1(m));
    return ctor.call(null, {"__om_state":state, "__om_instrument":om.core._STAR_instrument_STAR_, "children":opts == null ? function(map__13939, map__13939__$1, key, key_fn, state, init_state, opts, dataf, cursor_SINGLEQUOTE_, rkey, shared, ctor) {
      return function(this$) {
        var ret = f.call(null, cursor_SINGLEQUOTE_, this$);
        om.core.valid_component_QMARK_.call(null, ret, f);
        return ret;
      };
    }(map__13939, map__13939__$1, key, key_fn, state, init_state, opts, dataf, cursor_SINGLEQUOTE_, rkey, shared, ctor) : function(map__13939, map__13939__$1, key, key_fn, state, init_state, opts, dataf, cursor_SINGLEQUOTE_, rkey, shared, ctor) {
      return function(this$) {
        var ret = f.call(null, cursor_SINGLEQUOTE_, this$, opts);
        om.core.valid_component_QMARK_.call(null, ret, f);
        return ret;
      };
    }(map__13939, map__13939__$1, key, key_fn, state, init_state, opts, dataf, cursor_SINGLEQUOTE_, rkey, shared, ctor), "__om_init_state":init_state, "key":function() {
      var or__6140__auto__ = rkey;
      if (cljs.core.truth_(or__6140__auto__)) {
        return or__6140__auto__;
      } else {
        return undefined;
      }
    }(), "__om_app_state":om.core._STAR_state_STAR_, "__om_cursor":cursor_SINGLEQUOTE_, "__om_index":(new cljs.core.Keyword("om.core", "index", "om.core/index", -1724175434)).cljs$core$IFn$_invoke$arity$1(m), "__om_shared":shared, "__om_descriptor":om.core._STAR_descriptor_STAR_, "__om_root_key":om.core._STAR_root_key_STAR_});
  }
};
om.core.build_STAR_.cljs$lang$maxFixedArity = 3;
om.core.build = function om$core$build(var_args) {
  var args13945 = [];
  var len__7198__auto___13948 = arguments.length;
  var i__7199__auto___13949 = 0;
  while (true) {
    if (i__7199__auto___13949 < len__7198__auto___13948) {
      args13945.push(arguments[i__7199__auto___13949]);
      var G__13950 = i__7199__auto___13949 + 1;
      i__7199__auto___13949 = G__13950;
      continue;
    } else {
    }
    break;
  }
  var G__13947 = args13945.length;
  switch(G__13947) {
    case 2:
      return om.core.build.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return om.core.build.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13945.length)].join(""));;
  }
};
om.core.build.cljs$core$IFn$_invoke$arity$2 = function(f, x) {
  return om.core.build.call(null, f, x, null);
};
om.core.build.cljs$core$IFn$_invoke$arity$3 = function(f, x, m) {
  if (cljs.core.ifn_QMARK_.call(null, f)) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "ifn?", "ifn?", -2106461064, null), new cljs.core.Symbol(null, "f", "f", 43394975, null))))].join(""));
  }
  if (m == null || cljs.core.map_QMARK_.call(null, m)) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "or", "or", 1876275696, null), cljs.core.list(new cljs.core.Symbol(null, "nil?", "nil?", 1612038930, null), new cljs.core.Symbol(null, "m", "m", -1021758608, null)), cljs.core.list(new cljs.core.Symbol(null, "map?", "map?", -1780568534, null), new cljs.core.Symbol(null, "m", "m", -1021758608, null)))))].join(""));
  }
  if (!(om.core._STAR_instrument_STAR_ == null)) {
    var ret = om.core._STAR_instrument_STAR_.call(null, f, x, m);
    if (cljs.core._EQ_.call(null, ret, new cljs.core.Keyword("om.core", "pass", "om.core/pass", -1453289268))) {
      return om.core.build_STAR_.call(null, f, x, m);
    } else {
      return ret;
    }
  } else {
    return om.core.build_STAR_.call(null, f, x, m);
  }
};
om.core.build.cljs$lang$maxFixedArity = 3;
om.core.build_all = function om$core$build_all(var_args) {
  var args13952 = [];
  var len__7198__auto___13955 = arguments.length;
  var i__7199__auto___13956 = 0;
  while (true) {
    if (i__7199__auto___13956 < len__7198__auto___13955) {
      args13952.push(arguments[i__7199__auto___13956]);
      var G__13957 = i__7199__auto___13956 + 1;
      i__7199__auto___13956 = G__13957;
      continue;
    } else {
    }
    break;
  }
  var G__13954 = args13952.length;
  switch(G__13954) {
    case 2:
      return om.core.build_all.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return om.core.build_all.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args13952.length)].join(""));;
  }
};
om.core.build_all.cljs$core$IFn$_invoke$arity$2 = function(f, xs) {
  return om.core.build_all.call(null, f, xs, null);
};
om.core.build_all.cljs$core$IFn$_invoke$arity$3 = function(f, xs, m) {
  if (cljs.core.ifn_QMARK_.call(null, f)) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "ifn?", "ifn?", -2106461064, null), new cljs.core.Symbol(null, "f", "f", 43394975, null))))].join(""));
  }
  if (m == null || cljs.core.map_QMARK_.call(null, m)) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "or", "or", 1876275696, null), cljs.core.list(new cljs.core.Symbol(null, "nil?", "nil?", 1612038930, null), new cljs.core.Symbol(null, "m", "m", -1021758608, null)), cljs.core.list(new cljs.core.Symbol(null, "map?", "map?", -1780568534, null), new cljs.core.Symbol(null, "m", "m", -1021758608, null)))))].join(""));
  }
  return cljs.core.map.call(null, function(x, i) {
    return om.core.build.call(null, f, x, cljs.core.assoc.call(null, m, new cljs.core.Keyword("om.core", "index", "om.core/index", -1724175434), i));
  }, xs, cljs.core.range.call(null));
};
om.core.build_all.cljs$lang$maxFixedArity = 3;
om.core.setup = function om$core$setup(state, key, tx_listen) {
  if (!(state == null) ? false || state.om$core$INotify$ ? true : !state.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.INotify, state) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.INotify, state)) {
  } else {
    var properties_13975 = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
    var listeners_13976 = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
    var render_queue_13977 = cljs.core.atom.call(null, cljs.core.PersistentHashSet.EMPTY);
    var x13968_13978 = state;
    x13968_13978.om$core$IRootProperties$ = true;
    x13968_13978.om$core$IRootProperties$_set_property_BANG_$arity$4 = function(x13968_13978, properties_13975, listeners_13976, render_queue_13977) {
      return function(_, id, k, v) {
        var ___$1 = this;
        return cljs.core.swap_BANG_.call(null, properties_13975, cljs.core.assoc_in, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [id, k], null), v);
      };
    }(x13968_13978, properties_13975, listeners_13976, render_queue_13977);
    x13968_13978.om$core$IRootProperties$_remove_property_BANG_$arity$3 = function(x13968_13978, properties_13975, listeners_13976, render_queue_13977) {
      return function(_, id, k) {
        var ___$1 = this;
        return cljs.core.swap_BANG_.call(null, properties_13975, cljs.core.dissoc, id, k);
      };
    }(x13968_13978, properties_13975, listeners_13976, render_queue_13977);
    x13968_13978.om$core$IRootProperties$_remove_properties_BANG_$arity$2 = function(x13968_13978, properties_13975, listeners_13976, render_queue_13977) {
      return function(_, id) {
        var ___$1 = this;
        return cljs.core.swap_BANG_.call(null, properties_13975, cljs.core.dissoc, id);
      };
    }(x13968_13978, properties_13975, listeners_13976, render_queue_13977);
    x13968_13978.om$core$IRootProperties$_get_property$arity$3 = function(x13968_13978, properties_13975, listeners_13976, render_queue_13977) {
      return function(_, id, k) {
        var ___$1 = this;
        return cljs.core.get_in.call(null, cljs.core.deref.call(null, properties_13975), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [id, k], null));
      };
    }(x13968_13978, properties_13975, listeners_13976, render_queue_13977);
    x13968_13978.om$core$INotify$ = true;
    x13968_13978.om$core$INotify$_listen_BANG_$arity$3 = function(x13968_13978, properties_13975, listeners_13976, render_queue_13977) {
      return function(this$, key__$1, tx_listen__$1) {
        var this$__$1 = this;
        if (tx_listen__$1 == null) {
        } else {
          cljs.core.swap_BANG_.call(null, listeners_13976, cljs.core.assoc, key__$1, tx_listen__$1);
        }
        return this$__$1;
      };
    }(x13968_13978, properties_13975, listeners_13976, render_queue_13977);
    x13968_13978.om$core$INotify$_unlisten_BANG_$arity$2 = function(x13968_13978, properties_13975, listeners_13976, render_queue_13977) {
      return function(this$, key__$1) {
        var this$__$1 = this;
        cljs.core.swap_BANG_.call(null, listeners_13976, cljs.core.dissoc, key__$1);
        return this$__$1;
      };
    }(x13968_13978, properties_13975, listeners_13976, render_queue_13977);
    x13968_13978.om$core$INotify$_notify_BANG_$arity$3 = function(x13968_13978, properties_13975, listeners_13976, render_queue_13977) {
      return function(this$, tx_data, root_cursor) {
        var this$__$1 = this;
        var seq__13969_13979 = cljs.core.seq.call(null, cljs.core.deref.call(null, listeners_13976));
        var chunk__13970_13980 = null;
        var count__13971_13981 = 0;
        var i__13972_13982 = 0;
        while (true) {
          if (i__13972_13982 < count__13971_13981) {
            var vec__13973_13983 = cljs.core._nth.call(null, chunk__13970_13980, i__13972_13982);
            var __13984 = cljs.core.nth.call(null, vec__13973_13983, 0, null);
            var f_13985 = cljs.core.nth.call(null, vec__13973_13983, 1, null);
            f_13985.call(null, tx_data, root_cursor);
            var G__13986 = seq__13969_13979;
            var G__13987 = chunk__13970_13980;
            var G__13988 = count__13971_13981;
            var G__13989 = i__13972_13982 + 1;
            seq__13969_13979 = G__13986;
            chunk__13970_13980 = G__13987;
            count__13971_13981 = G__13988;
            i__13972_13982 = G__13989;
            continue;
          } else {
            var temp__4425__auto___13990 = cljs.core.seq.call(null, seq__13969_13979);
            if (temp__4425__auto___13990) {
              var seq__13969_13991__$1 = temp__4425__auto___13990;
              if (cljs.core.chunked_seq_QMARK_.call(null, seq__13969_13991__$1)) {
                var c__6943__auto___13992 = cljs.core.chunk_first.call(null, seq__13969_13991__$1);
                var G__13993 = cljs.core.chunk_rest.call(null, seq__13969_13991__$1);
                var G__13994 = c__6943__auto___13992;
                var G__13995 = cljs.core.count.call(null, c__6943__auto___13992);
                var G__13996 = 0;
                seq__13969_13979 = G__13993;
                chunk__13970_13980 = G__13994;
                count__13971_13981 = G__13995;
                i__13972_13982 = G__13996;
                continue;
              } else {
                var vec__13974_13997 = cljs.core.first.call(null, seq__13969_13991__$1);
                var __13998 = cljs.core.nth.call(null, vec__13974_13997, 0, null);
                var f_13999 = cljs.core.nth.call(null, vec__13974_13997, 1, null);
                f_13999.call(null, tx_data, root_cursor);
                var G__14000 = cljs.core.next.call(null, seq__13969_13991__$1);
                var G__14001 = null;
                var G__14002 = 0;
                var G__14003 = 0;
                seq__13969_13979 = G__14000;
                chunk__13970_13980 = G__14001;
                count__13971_13981 = G__14002;
                i__13972_13982 = G__14003;
                continue;
              }
            } else {
            }
          }
          break;
        }
        return this$__$1;
      };
    }(x13968_13978, properties_13975, listeners_13976, render_queue_13977);
    x13968_13978.om$core$IRenderQueue$ = true;
    x13968_13978.om$core$IRenderQueue$_get_queue$arity$1 = function(x13968_13978, properties_13975, listeners_13976, render_queue_13977) {
      return function(this$) {
        var this$__$1 = this;
        return cljs.core.deref.call(null, render_queue_13977);
      };
    }(x13968_13978, properties_13975, listeners_13976, render_queue_13977);
    x13968_13978.om$core$IRenderQueue$_queue_render_BANG_$arity$2 = function(x13968_13978, properties_13975, listeners_13976, render_queue_13977) {
      return function(this$, c) {
        var this$__$1 = this;
        if (cljs.core.contains_QMARK_.call(null, cljs.core.deref.call(null, render_queue_13977), c)) {
          return null;
        } else {
          cljs.core.swap_BANG_.call(null, render_queue_13977, cljs.core.conj, c);
          return cljs.core.swap_BANG_.call(null, this$__$1, cljs.core.identity);
        }
      };
    }(x13968_13978, properties_13975, listeners_13976, render_queue_13977);
    x13968_13978.om$core$IRenderQueue$_empty_queue_BANG_$arity$1 = function(x13968_13978, properties_13975, listeners_13976, render_queue_13977) {
      return function(this$) {
        var this$__$1 = this;
        return cljs.core.swap_BANG_.call(null, render_queue_13977, cljs.core.empty);
      };
    }(x13968_13978, properties_13975, listeners_13976, render_queue_13977);
  }
  return om.core._listen_BANG_.call(null, state, key, tx_listen);
};
om.core.tear_down = function om$core$tear_down(state, key) {
  return om.core._unlisten_BANG_.call(null, state, key);
};
om.core.tag_root_key = function om$core$tag_root_key(cursor, root_key) {
  if (cljs.core.truth_(om.core.cursor_QMARK_.call(null, cursor))) {
    var x14005 = cljs.core.clone.call(null, cursor);
    x14005.cljs$core$ICloneable$ = true;
    x14005.cljs$core$ICloneable$_clone$arity$1 = function(x14005) {
      return function(this$) {
        var this$__$1 = this;
        return om$core$tag_root_key.call(null, cljs.core.clone.call(null, cursor), root_key);
      };
    }(x14005);
    x14005.om$core$IAdapt$ = true;
    x14005.om$core$IAdapt$_adapt$arity$2 = function(x14005) {
      return function(this$, other) {
        var this$__$1 = this;
        return om$core$tag_root_key.call(null, om.core.adapt.call(null, cursor, other), root_key);
      };
    }(x14005);
    x14005.om$core$IRootKey$ = true;
    x14005.om$core$IRootKey$_root_key$arity$1 = function(x14005) {
      return function(this$) {
        var this$__$1 = this;
        return root_key;
      };
    }(x14005);
    return x14005;
  } else {
    return cursor;
  }
};
om.core.root = function om$core$root(f, value, p__14006) {
  var map__14070 = p__14006;
  var map__14070__$1 = (!(map__14070 == null) ? map__14070.cljs$lang$protocol_mask$partition0$ & 64 || map__14070.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.call(null, cljs.core.hash_map, map__14070) : map__14070;
  var options = map__14070__$1;
  var target = cljs.core.get.call(null, map__14070__$1, new cljs.core.Keyword(null, "target", "target", 253001721));
  var tx_listen = cljs.core.get.call(null, map__14070__$1, new cljs.core.Keyword(null, "tx-listen", "tx-listen", 119130367));
  var path = cljs.core.get.call(null, map__14070__$1, new cljs.core.Keyword(null, "path", "path", -188191168));
  var instrument = cljs.core.get.call(null, map__14070__$1, new cljs.core.Keyword(null, "instrument", "instrument", -960698844));
  var descriptor = cljs.core.get.call(null, map__14070__$1, new cljs.core.Keyword(null, "descriptor", "descriptor", 76122018));
  var adapt = cljs.core.get.call(null, map__14070__$1, new cljs.core.Keyword(null, "adapt", "adapt", -1817022327));
  var raf = cljs.core.get.call(null, map__14070__$1, new cljs.core.Keyword(null, "raf", "raf", -1295410152));
  if (cljs.core.ifn_QMARK_.call(null, f)) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str("First argument must be a function"), cljs.core.str("\n"), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "ifn?", "ifn?", -2106461064, null), new cljs.core.Symbol(null, "f", "f", 43394975, null))))].join(""));
  }
  if (!(target == null)) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str("No target specified to om.core/root"), cljs.core.str("\n"), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "not", "not", 1044554643, null), cljs.core.list(new cljs.core.Symbol(null, "nil?", "nil?", 1612038930, null), new cljs.core.Symbol(null, "target", "target", 1893533248, null)))))].join(""));
  }
  var roots_SINGLEQUOTE__14133 = cljs.core.deref.call(null, om.core.roots);
  if (cljs.core.contains_QMARK_.call(null, roots_SINGLEQUOTE__14133, target)) {
    cljs.core.get.call(null, roots_SINGLEQUOTE__14133, target).call(null);
  } else {
  }
  var watch_key = cljs.core.gensym.call(null);
  var state = (!(value == null) ? value.cljs$lang$protocol_mask$partition1$ & 16384 || value.cljs$core$IAtom$ ? true : !value.cljs$lang$protocol_mask$partition1$ ? cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IAtom, value) : false : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IAtom, value)) ? value : cljs.core.atom.call(null, value);
  var state__$1 = om.core.setup.call(null, state, watch_key, tx_listen);
  var adapt__$1 = function() {
    var or__6140__auto__ = adapt;
    if (cljs.core.truth_(or__6140__auto__)) {
      return or__6140__auto__;
    } else {
      return cljs.core.identity;
    }
  }();
  var m = cljs.core.dissoc.call(null, options, new cljs.core.Keyword(null, "target", "target", 253001721), new cljs.core.Keyword(null, "tx-listen", "tx-listen", 119130367), new cljs.core.Keyword(null, "path", "path", -188191168), new cljs.core.Keyword(null, "adapt", "adapt", -1817022327), new cljs.core.Keyword(null, "raf", "raf", -1295410152));
  var ret = cljs.core.atom.call(null, null);
  var rootf = function(watch_key, state, state__$1, adapt__$1, m, ret, map__14070, map__14070__$1, options, target, tx_listen, path, instrument, descriptor, adapt, raf) {
    return function om$core$root_$_rootf() {
      cljs.core.swap_BANG_.call(null, om.core.refresh_set, cljs.core.disj, om$core$root_$_rootf);
      var value__$1 = cljs.core.deref.call(null, state__$1);
      var cursor = adapt__$1.call(null, om.core.tag_root_key.call(null, path == null ? om.core.to_cursor.call(null, value__$1, state__$1, cljs.core.PersistentVector.EMPTY) : om.core.to_cursor.call(null, cljs.core.get_in.call(null, value__$1, path), state__$1, path), watch_key));
      if (cljs.core.truth_(om.core._get_property.call(null, state__$1, watch_key, new cljs.core.Keyword(null, "skip-render-root", "skip-render-root", -5219643)))) {
      } else {
        om.core._set_property_BANG_.call(null, state__$1, watch_key, new cljs.core.Keyword(null, "skip-render-root", "skip-render-root", -5219643), true);
        var c_14134 = om.dom.render.call(null, function() {
          var _STAR_descriptor_STAR_14103 = om.core._STAR_descriptor_STAR_;
          var _STAR_instrument_STAR_14104 = om.core._STAR_instrument_STAR_;
          var _STAR_state_STAR_14105 = om.core._STAR_state_STAR_;
          var _STAR_root_key_STAR_14106 = om.core._STAR_root_key_STAR_;
          om.core._STAR_descriptor_STAR_ = descriptor;
          om.core._STAR_instrument_STAR_ = instrument;
          om.core._STAR_state_STAR_ = state__$1;
          om.core._STAR_root_key_STAR_ = watch_key;
          try {
            return om.core.build.call(null, f, cursor, m);
          } finally {
            om.core._STAR_root_key_STAR_ = _STAR_root_key_STAR_14106;
            om.core._STAR_state_STAR_ = _STAR_state_STAR_14105;
            om.core._STAR_instrument_STAR_ = _STAR_instrument_STAR_14104;
            om.core._STAR_descriptor_STAR_ = _STAR_descriptor_STAR_14103;
          }
        }(), target);
        if (cljs.core.deref.call(null, ret) == null) {
          cljs.core.reset_BANG_.call(null, ret, c_14134);
        } else {
        }
      }
      var queue_14135 = om.core._get_queue.call(null, state__$1);
      om.core._empty_queue_BANG_.call(null, state__$1);
      if (cljs.core.empty_QMARK_.call(null, queue_14135)) {
      } else {
        var seq__14107_14136 = cljs.core.seq.call(null, queue_14135);
        var chunk__14108_14137 = null;
        var count__14109_14138 = 0;
        var i__14110_14139 = 0;
        while (true) {
          if (i__14110_14139 < count__14109_14138) {
            var c_14140 = cljs.core._nth.call(null, chunk__14108_14137, i__14110_14139);
            if (cljs.core.truth_(c_14140.isMounted())) {
              var temp__4425__auto___14141 = c_14140.state["__om_next_cursor"];
              if (cljs.core.truth_(temp__4425__auto___14141)) {
                var next_props_14142 = temp__4425__auto___14141;
                c_14140.props["__om_cursor"] = next_props_14142;
                c_14140.state["__om_next_cursor"] = null;
              } else {
              }
              if (cljs.core.truth_(function() {
                var or__6140__auto__ = !function() {
                  var G__14112 = om.core.children.call(null, c_14140);
                  if (!(G__14112 == null)) {
                    if (false || G__14112.om$core$ICheckState$) {
                      return true;
                    } else {
                      if (!G__14112.cljs$lang$protocol_mask$partition$) {
                        return cljs.core.native_satisfies_QMARK_.call(null, om.core.ICheckState, G__14112);
                      } else {
                        return false;
                      }
                    }
                  } else {
                    return cljs.core.native_satisfies_QMARK_.call(null, om.core.ICheckState, G__14112);
                  }
                }();
                if (or__6140__auto__) {
                  return or__6140__auto__;
                } else {
                  return c_14140.shouldComponentUpdate(c_14140.props, c_14140.state);
                }
              }())) {
                c_14140.forceUpdate();
              } else {
              }
            } else {
            }
            var G__14143 = seq__14107_14136;
            var G__14144 = chunk__14108_14137;
            var G__14145 = count__14109_14138;
            var G__14146 = i__14110_14139 + 1;
            seq__14107_14136 = G__14143;
            chunk__14108_14137 = G__14144;
            count__14109_14138 = G__14145;
            i__14110_14139 = G__14146;
            continue;
          } else {
            var temp__4425__auto___14147 = cljs.core.seq.call(null, seq__14107_14136);
            if (temp__4425__auto___14147) {
              var seq__14107_14148__$1 = temp__4425__auto___14147;
              if (cljs.core.chunked_seq_QMARK_.call(null, seq__14107_14148__$1)) {
                var c__6943__auto___14149 = cljs.core.chunk_first.call(null, seq__14107_14148__$1);
                var G__14150 = cljs.core.chunk_rest.call(null, seq__14107_14148__$1);
                var G__14151 = c__6943__auto___14149;
                var G__14152 = cljs.core.count.call(null, c__6943__auto___14149);
                var G__14153 = 0;
                seq__14107_14136 = G__14150;
                chunk__14108_14137 = G__14151;
                count__14109_14138 = G__14152;
                i__14110_14139 = G__14153;
                continue;
              } else {
                var c_14154 = cljs.core.first.call(null, seq__14107_14148__$1);
                if (cljs.core.truth_(c_14154.isMounted())) {
                  var temp__4425__auto___14155__$1 = c_14154.state["__om_next_cursor"];
                  if (cljs.core.truth_(temp__4425__auto___14155__$1)) {
                    var next_props_14156 = temp__4425__auto___14155__$1;
                    c_14154.props["__om_cursor"] = next_props_14156;
                    c_14154.state["__om_next_cursor"] = null;
                  } else {
                  }
                  if (cljs.core.truth_(function() {
                    var or__6140__auto__ = !function() {
                      var G__14114 = om.core.children.call(null, c_14154);
                      if (!(G__14114 == null)) {
                        if (false || G__14114.om$core$ICheckState$) {
                          return true;
                        } else {
                          if (!G__14114.cljs$lang$protocol_mask$partition$) {
                            return cljs.core.native_satisfies_QMARK_.call(null, om.core.ICheckState, G__14114);
                          } else {
                            return false;
                          }
                        }
                      } else {
                        return cljs.core.native_satisfies_QMARK_.call(null, om.core.ICheckState, G__14114);
                      }
                    }();
                    if (or__6140__auto__) {
                      return or__6140__auto__;
                    } else {
                      return c_14154.shouldComponentUpdate(c_14154.props, c_14154.state);
                    }
                  }())) {
                    c_14154.forceUpdate();
                  } else {
                  }
                } else {
                }
                var G__14157 = cljs.core.next.call(null, seq__14107_14148__$1);
                var G__14158 = null;
                var G__14159 = 0;
                var G__14160 = 0;
                seq__14107_14136 = G__14157;
                chunk__14108_14137 = G__14158;
                count__14109_14138 = G__14159;
                i__14110_14139 = G__14160;
                continue;
              }
            } else {
            }
          }
          break;
        }
      }
      var _refs_14161 = cljs.core.deref.call(null, om.core._refs);
      if (cljs.core.empty_QMARK_.call(null, _refs_14161)) {
      } else {
        var seq__14115_14162 = cljs.core.seq.call(null, _refs_14161);
        var chunk__14116_14163 = null;
        var count__14117_14164 = 0;
        var i__14118_14165 = 0;
        while (true) {
          if (i__14118_14165 < count__14117_14164) {
            var vec__14119_14166 = cljs.core._nth.call(null, chunk__14116_14163, i__14118_14165);
            var path_14167__$1 = cljs.core.nth.call(null, vec__14119_14166, 0, null);
            var cs_14168 = cljs.core.nth.call(null, vec__14119_14166, 1, null);
            var cs_14169__$1 = cljs.core.deref.call(null, cs_14168);
            var seq__14120_14170 = cljs.core.seq.call(null, cs_14169__$1);
            var chunk__14121_14171 = null;
            var count__14122_14172 = 0;
            var i__14123_14173 = 0;
            while (true) {
              if (i__14123_14173 < count__14122_14172) {
                var vec__14124_14174 = cljs.core._nth.call(null, chunk__14121_14171, i__14123_14173);
                var id_14175 = cljs.core.nth.call(null, vec__14124_14174, 0, null);
                var c_14176 = cljs.core.nth.call(null, vec__14124_14174, 1, null);
                if (cljs.core.truth_(c_14176.shouldComponentUpdate(c_14176.props, c_14176.state))) {
                  c_14176.forceUpdate();
                } else {
                }
                var G__14177 = seq__14120_14170;
                var G__14178 = chunk__14121_14171;
                var G__14179 = count__14122_14172;
                var G__14180 = i__14123_14173 + 1;
                seq__14120_14170 = G__14177;
                chunk__14121_14171 = G__14178;
                count__14122_14172 = G__14179;
                i__14123_14173 = G__14180;
                continue;
              } else {
                var temp__4425__auto___14181 = cljs.core.seq.call(null, seq__14120_14170);
                if (temp__4425__auto___14181) {
                  var seq__14120_14182__$1 = temp__4425__auto___14181;
                  if (cljs.core.chunked_seq_QMARK_.call(null, seq__14120_14182__$1)) {
                    var c__6943__auto___14183 = cljs.core.chunk_first.call(null, seq__14120_14182__$1);
                    var G__14184 = cljs.core.chunk_rest.call(null, seq__14120_14182__$1);
                    var G__14185 = c__6943__auto___14183;
                    var G__14186 = cljs.core.count.call(null, c__6943__auto___14183);
                    var G__14187 = 0;
                    seq__14120_14170 = G__14184;
                    chunk__14121_14171 = G__14185;
                    count__14122_14172 = G__14186;
                    i__14123_14173 = G__14187;
                    continue;
                  } else {
                    var vec__14125_14188 = cljs.core.first.call(null, seq__14120_14182__$1);
                    var id_14189 = cljs.core.nth.call(null, vec__14125_14188, 0, null);
                    var c_14190 = cljs.core.nth.call(null, vec__14125_14188, 1, null);
                    if (cljs.core.truth_(c_14190.shouldComponentUpdate(c_14190.props, c_14190.state))) {
                      c_14190.forceUpdate();
                    } else {
                    }
                    var G__14191 = cljs.core.next.call(null, seq__14120_14182__$1);
                    var G__14192 = null;
                    var G__14193 = 0;
                    var G__14194 = 0;
                    seq__14120_14170 = G__14191;
                    chunk__14121_14171 = G__14192;
                    count__14122_14172 = G__14193;
                    i__14123_14173 = G__14194;
                    continue;
                  }
                } else {
                }
              }
              break;
            }
            var G__14195 = seq__14115_14162;
            var G__14196 = chunk__14116_14163;
            var G__14197 = count__14117_14164;
            var G__14198 = i__14118_14165 + 1;
            seq__14115_14162 = G__14195;
            chunk__14116_14163 = G__14196;
            count__14117_14164 = G__14197;
            i__14118_14165 = G__14198;
            continue;
          } else {
            var temp__4425__auto___14199 = cljs.core.seq.call(null, seq__14115_14162);
            if (temp__4425__auto___14199) {
              var seq__14115_14200__$1 = temp__4425__auto___14199;
              if (cljs.core.chunked_seq_QMARK_.call(null, seq__14115_14200__$1)) {
                var c__6943__auto___14201 = cljs.core.chunk_first.call(null, seq__14115_14200__$1);
                var G__14202 = cljs.core.chunk_rest.call(null, seq__14115_14200__$1);
                var G__14203 = c__6943__auto___14201;
                var G__14204 = cljs.core.count.call(null, c__6943__auto___14201);
                var G__14205 = 0;
                seq__14115_14162 = G__14202;
                chunk__14116_14163 = G__14203;
                count__14117_14164 = G__14204;
                i__14118_14165 = G__14205;
                continue;
              } else {
                var vec__14126_14206 = cljs.core.first.call(null, seq__14115_14200__$1);
                var path_14207__$1 = cljs.core.nth.call(null, vec__14126_14206, 0, null);
                var cs_14208 = cljs.core.nth.call(null, vec__14126_14206, 1, null);
                var cs_14209__$1 = cljs.core.deref.call(null, cs_14208);
                var seq__14127_14210 = cljs.core.seq.call(null, cs_14209__$1);
                var chunk__14128_14211 = null;
                var count__14129_14212 = 0;
                var i__14130_14213 = 0;
                while (true) {
                  if (i__14130_14213 < count__14129_14212) {
                    var vec__14131_14214 = cljs.core._nth.call(null, chunk__14128_14211, i__14130_14213);
                    var id_14215 = cljs.core.nth.call(null, vec__14131_14214, 0, null);
                    var c_14216 = cljs.core.nth.call(null, vec__14131_14214, 1, null);
                    if (cljs.core.truth_(c_14216.shouldComponentUpdate(c_14216.props, c_14216.state))) {
                      c_14216.forceUpdate();
                    } else {
                    }
                    var G__14217 = seq__14127_14210;
                    var G__14218 = chunk__14128_14211;
                    var G__14219 = count__14129_14212;
                    var G__14220 = i__14130_14213 + 1;
                    seq__14127_14210 = G__14217;
                    chunk__14128_14211 = G__14218;
                    count__14129_14212 = G__14219;
                    i__14130_14213 = G__14220;
                    continue;
                  } else {
                    var temp__4425__auto___14221__$1 = cljs.core.seq.call(null, seq__14127_14210);
                    if (temp__4425__auto___14221__$1) {
                      var seq__14127_14222__$1 = temp__4425__auto___14221__$1;
                      if (cljs.core.chunked_seq_QMARK_.call(null, seq__14127_14222__$1)) {
                        var c__6943__auto___14223 = cljs.core.chunk_first.call(null, seq__14127_14222__$1);
                        var G__14224 = cljs.core.chunk_rest.call(null, seq__14127_14222__$1);
                        var G__14225 = c__6943__auto___14223;
                        var G__14226 = cljs.core.count.call(null, c__6943__auto___14223);
                        var G__14227 = 0;
                        seq__14127_14210 = G__14224;
                        chunk__14128_14211 = G__14225;
                        count__14129_14212 = G__14226;
                        i__14130_14213 = G__14227;
                        continue;
                      } else {
                        var vec__14132_14228 = cljs.core.first.call(null, seq__14127_14222__$1);
                        var id_14229 = cljs.core.nth.call(null, vec__14132_14228, 0, null);
                        var c_14230 = cljs.core.nth.call(null, vec__14132_14228, 1, null);
                        if (cljs.core.truth_(c_14230.shouldComponentUpdate(c_14230.props, c_14230.state))) {
                          c_14230.forceUpdate();
                        } else {
                        }
                        var G__14231 = cljs.core.next.call(null, seq__14127_14222__$1);
                        var G__14232 = null;
                        var G__14233 = 0;
                        var G__14234 = 0;
                        seq__14127_14210 = G__14231;
                        chunk__14128_14211 = G__14232;
                        count__14129_14212 = G__14233;
                        i__14130_14213 = G__14234;
                        continue;
                      }
                    } else {
                    }
                  }
                  break;
                }
                var G__14235 = cljs.core.next.call(null, seq__14115_14200__$1);
                var G__14236 = null;
                var G__14237 = 0;
                var G__14238 = 0;
                seq__14115_14162 = G__14235;
                chunk__14116_14163 = G__14236;
                count__14117_14164 = G__14237;
                i__14118_14165 = G__14238;
                continue;
              }
            } else {
            }
          }
          break;
        }
      }
      return cljs.core.deref.call(null, ret);
    };
  }(watch_key, state, state__$1, adapt__$1, m, ret, map__14070, map__14070__$1, options, target, tx_listen, path, instrument, descriptor, adapt, raf);
  cljs.core.add_watch.call(null, state__$1, watch_key, function(watch_key, state, state__$1, adapt__$1, m, ret, rootf, map__14070, map__14070__$1, options, target, tx_listen, path, instrument, descriptor, adapt, raf) {
    return function(_, ___$1, o, n) {
      if (cljs.core.not.call(null, om.core._get_property.call(null, state__$1, watch_key, new cljs.core.Keyword(null, "ignore", "ignore", -1631542033))) && !(o === n)) {
        om.core._set_property_BANG_.call(null, state__$1, watch_key, new cljs.core.Keyword(null, "skip-render-root", "skip-render-root", -5219643), false);
      } else {
      }
      om.core._set_property_BANG_.call(null, state__$1, watch_key, new cljs.core.Keyword(null, "ignore", "ignore", -1631542033), false);
      if (cljs.core.contains_QMARK_.call(null, cljs.core.deref.call(null, om.core.refresh_set), rootf)) {
      } else {
        cljs.core.swap_BANG_.call(null, om.core.refresh_set, cljs.core.conj, rootf);
      }
      if (cljs.core.truth_(om.core.refresh_queued)) {
        return null;
      } else {
        om.core.refresh_queued = true;
        if (cljs.core.fn_QMARK_.call(null, raf)) {
          return raf.call(null);
        } else {
          if (raf === false || !(typeof requestAnimationFrame !== "undefined")) {
            return setTimeout(function(watch_key, state, state__$1, adapt__$1, m, ret, rootf, map__14070, map__14070__$1, options, target, tx_listen, path, instrument, descriptor, adapt, raf) {
              return function() {
                return om.core.render_all.call(null, state__$1);
              };
            }(watch_key, state, state__$1, adapt__$1, m, ret, rootf, map__14070, map__14070__$1, options, target, tx_listen, path, instrument, descriptor, adapt, raf), 16);
          } else {
            return requestAnimationFrame(function(watch_key, state, state__$1, adapt__$1, m, ret, rootf, map__14070, map__14070__$1, options, target, tx_listen, path, instrument, descriptor, adapt, raf) {
              return function() {
                return om.core.render_all.call(null, state__$1);
              };
            }(watch_key, state, state__$1, adapt__$1, m, ret, rootf, map__14070, map__14070__$1, options, target, tx_listen, path, instrument, descriptor, adapt, raf));
          }
        }
      }
    };
  }(watch_key, state, state__$1, adapt__$1, m, ret, rootf, map__14070, map__14070__$1, options, target, tx_listen, path, instrument, descriptor, adapt, raf));
  cljs.core.swap_BANG_.call(null, om.core.roots, cljs.core.assoc, target, function(watch_key, state, state__$1, adapt__$1, m, ret, rootf, map__14070, map__14070__$1, options, target, tx_listen, path, instrument, descriptor, adapt, raf) {
    return function() {
      om.core._remove_properties_BANG_.call(null, state__$1, watch_key);
      cljs.core.remove_watch.call(null, state__$1, watch_key);
      om.core.tear_down.call(null, state__$1, watch_key);
      cljs.core.swap_BANG_.call(null, om.core.refresh_set, cljs.core.disj, rootf);
      cljs.core.swap_BANG_.call(null, om.core.roots, cljs.core.dissoc, target);
      return React.unmountComponentAtNode(target);
    };
  }(watch_key, state, state__$1, adapt__$1, m, ret, rootf, map__14070, map__14070__$1, options, target, tx_listen, path, instrument, descriptor, adapt, raf));
  return rootf.call(null);
};
om.core.detach_root = function om$core$detach_root(target) {
  if (cljs.core.truth_(goog.dom.isElement(target))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol("gdom", "isElement", "gdom/isElement", 465934354, null), new cljs.core.Symbol(null, "target", "target", 1893533248, null))))].join(""));
  }
  var temp__4425__auto__ = cljs.core.get.call(null, cljs.core.deref.call(null, om.core.roots), target);
  if (cljs.core.truth_(temp__4425__auto__)) {
    var f = temp__4425__auto__;
    return f.call(null);
  } else {
    return null;
  }
};
om.core.transactable_QMARK_ = function om$core$transactable_QMARK_(x) {
  if (!(x == null)) {
    if (false || x.om$core$ITransact$) {
      return true;
    } else {
      if (!x.cljs$lang$protocol_mask$partition$) {
        return cljs.core.native_satisfies_QMARK_.call(null, om.core.ITransact, x);
      } else {
        return false;
      }
    }
  } else {
    return cljs.core.native_satisfies_QMARK_.call(null, om.core.ITransact, x);
  }
};
om.core.transact_BANG_ = function om$core$transact_BANG_(var_args) {
  var args14241 = [];
  var len__7198__auto___14244 = arguments.length;
  var i__7199__auto___14245 = 0;
  while (true) {
    if (i__7199__auto___14245 < len__7198__auto___14244) {
      args14241.push(arguments[i__7199__auto___14245]);
      var G__14246 = i__7199__auto___14245 + 1;
      i__7199__auto___14245 = G__14246;
      continue;
    } else {
    }
    break;
  }
  var G__14243 = args14241.length;
  switch(G__14243) {
    case 2:
      return om.core.transact_BANG_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return om.core.transact_BANG_.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 4:
      return om.core.transact_BANG_.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args14241.length)].join(""));;
  }
};
om.core.transact_BANG_.cljs$core$IFn$_invoke$arity$2 = function(cursor, f) {
  return om.core.transact_BANG_.call(null, cursor, cljs.core.PersistentVector.EMPTY, f, null);
};
om.core.transact_BANG_.cljs$core$IFn$_invoke$arity$3 = function(cursor, korks, f) {
  return om.core.transact_BANG_.call(null, cursor, korks, f, null);
};
om.core.transact_BANG_.cljs$core$IFn$_invoke$arity$4 = function(cursor, korks, f, tag) {
  if (cljs.core.truth_(om.core.transactable_QMARK_.call(null, cursor))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "transactable?", "transactable?", 780536292, null), new cljs.core.Symbol(null, "cursor", "cursor", -1642498285, null))))].join(""));
  }
  if (cljs.core.ifn_QMARK_.call(null, f)) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "ifn?", "ifn?", -2106461064, null), new cljs.core.Symbol(null, "f", "f", 43394975, null))))].join(""));
  }
  var korks__$1 = korks == null ? cljs.core.PersistentVector.EMPTY : cljs.core.sequential_QMARK_.call(null, korks) ? korks : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [korks], null);
  return om.core._transact_BANG_.call(null, cursor, korks__$1, f, tag);
};
om.core.transact_BANG_.cljs$lang$maxFixedArity = 4;
om.core.update_BANG_ = function om$core$update_BANG_(var_args) {
  var args14248 = [];
  var len__7198__auto___14251 = arguments.length;
  var i__7199__auto___14252 = 0;
  while (true) {
    if (i__7199__auto___14252 < len__7198__auto___14251) {
      args14248.push(arguments[i__7199__auto___14252]);
      var G__14253 = i__7199__auto___14252 + 1;
      i__7199__auto___14252 = G__14253;
      continue;
    } else {
    }
    break;
  }
  var G__14250 = args14248.length;
  switch(G__14250) {
    case 2:
      return om.core.update_BANG_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return om.core.update_BANG_.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    case 4:
      return om.core.update_BANG_.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args14248.length)].join(""));;
  }
};
om.core.update_BANG_.cljs$core$IFn$_invoke$arity$2 = function(cursor, v) {
  if (cljs.core.truth_(om.core.cursor_QMARK_.call(null, cursor))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "cursor?", "cursor?", -648342688, null), new cljs.core.Symbol(null, "cursor", "cursor", -1642498285, null))))].join(""));
  }
  return om.core.transact_BANG_.call(null, cursor, cljs.core.PersistentVector.EMPTY, function(_) {
    return v;
  }, null);
};
om.core.update_BANG_.cljs$core$IFn$_invoke$arity$3 = function(cursor, korks, v) {
  if (cljs.core.truth_(om.core.cursor_QMARK_.call(null, cursor))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "cursor?", "cursor?", -648342688, null), new cljs.core.Symbol(null, "cursor", "cursor", -1642498285, null))))].join(""));
  }
  return om.core.transact_BANG_.call(null, cursor, korks, function(_) {
    return v;
  }, null);
};
om.core.update_BANG_.cljs$core$IFn$_invoke$arity$4 = function(cursor, korks, v, tag) {
  if (cljs.core.truth_(om.core.cursor_QMARK_.call(null, cursor))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "cursor?", "cursor?", -648342688, null), new cljs.core.Symbol(null, "cursor", "cursor", -1642498285, null))))].join(""));
  }
  return om.core.transact_BANG_.call(null, cursor, korks, function(_) {
    return v;
  }, tag);
};
om.core.update_BANG_.cljs$lang$maxFixedArity = 4;
om.core.commit_BANG_ = function om$core$commit_BANG_(cursor, korks, f) {
  if (cljs.core.truth_(om.core.cursor_QMARK_.call(null, cursor))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "cursor?", "cursor?", -648342688, null), new cljs.core.Symbol(null, "cursor", "cursor", -1642498285, null))))].join(""));
  }
  if (cljs.core.ifn_QMARK_.call(null, f)) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "ifn?", "ifn?", -2106461064, null), new cljs.core.Symbol(null, "f", "f", 43394975, null))))].join(""));
  }
  var key = (!(cursor == null) ? false || cursor.om$core$IRootKey$ ? true : !cursor.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IRootKey, cursor) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IRootKey, cursor)) ? om.core._root_key.call(null, cursor) : null;
  var app_state = om.core.state.call(null, cursor);
  var korks__$1 = korks == null ? cljs.core.PersistentVector.EMPTY : cljs.core.sequential_QMARK_.call(null, korks) ? korks : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [korks], null);
  var cpath = om.core.path.call(null, cursor);
  var rpath = cljs.core.into.call(null, cpath, korks__$1);
  if (cljs.core.truth_(key)) {
    om.core._set_property_BANG_.call(null, app_state, key, new cljs.core.Keyword(null, "ignore", "ignore", -1631542033), true);
  } else {
  }
  if (cljs.core.empty_QMARK_.call(null, rpath)) {
    return cljs.core.swap_BANG_.call(null, app_state, f);
  } else {
    return cljs.core.swap_BANG_.call(null, app_state, cljs.core.update_in, rpath, f);
  }
};
om.core.get_node = function om$core$get_node(var_args) {
  var args14257 = [];
  var len__7198__auto___14261 = arguments.length;
  var i__7199__auto___14262 = 0;
  while (true) {
    if (i__7199__auto___14262 < len__7198__auto___14261) {
      args14257.push(arguments[i__7199__auto___14262]);
      var G__14263 = i__7199__auto___14262 + 1;
      i__7199__auto___14262 = G__14263;
      continue;
    } else {
    }
    break;
  }
  var G__14259 = args14257.length;
  switch(G__14259) {
    case 1:
      return om.core.get_node.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return om.core.get_node.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args14257.length)].join(""));;
  }
};
om.core.get_node.cljs$core$IFn$_invoke$arity$1 = function(owner) {
  return owner.getDOMNode();
};
om.core.get_node.cljs$core$IFn$_invoke$arity$2 = function(owner, name) {
  if (typeof name === "string") {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "string?", "string?", -1129175764, null), new cljs.core.Symbol(null, "name", "name", -810760592, null))))].join(""));
  }
  var G__14260 = owner.refs;
  var G__14260__$1 = G__14260 == null ? null : G__14260[name];
  var G__14260__$2 = G__14260__$1 == null ? null : G__14260__$1.getDOMNode();
  return G__14260__$2;
};
om.core.get_node.cljs$lang$maxFixedArity = 2;
om.core.get_ref = function om$core$get_ref(owner, name) {
  if (cljs.core.truth_(om.core.component_QMARK_.call(null, owner))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "component?", "component?", 2048315517, null), new cljs.core.Symbol(null, "owner", "owner", 1247919588, null))))].join(""));
  }
  if (typeof name === "string") {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "string?", "string?", -1129175764, null), new cljs.core.Symbol(null, "name", "name", -810760592, null))))].join(""));
  }
  var G__14266 = owner.refs;
  var G__14266__$1 = G__14266 == null ? null : goog.object.get(G__14266, name);
  return G__14266__$1;
};
om.core.mounted_QMARK_ = function om$core$mounted_QMARK_(owner) {
  return owner.isMounted();
};
om.core.set_state_BANG_ = function om$core$set_state_BANG_(var_args) {
  var args14267 = [];
  var len__7198__auto___14270 = arguments.length;
  var i__7199__auto___14271 = 0;
  while (true) {
    if (i__7199__auto___14271 < len__7198__auto___14270) {
      args14267.push(arguments[i__7199__auto___14271]);
      var G__14272 = i__7199__auto___14271 + 1;
      i__7199__auto___14271 = G__14272;
      continue;
    } else {
    }
    break;
  }
  var G__14269 = args14267.length;
  switch(G__14269) {
    case 2:
      return om.core.set_state_BANG_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return om.core.set_state_BANG_.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args14267.length)].join(""));;
  }
};
om.core.set_state_BANG_.cljs$core$IFn$_invoke$arity$2 = function(owner, v) {
  if (cljs.core.truth_(om.core.component_QMARK_.call(null, owner))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "component?", "component?", 2048315517, null), new cljs.core.Symbol(null, "owner", "owner", 1247919588, null))))].join(""));
  }
  return om.core._set_state_BANG_.call(null, owner, v, true);
};
om.core.set_state_BANG_.cljs$core$IFn$_invoke$arity$3 = function(owner, korks, v) {
  if (cljs.core.truth_(om.core.component_QMARK_.call(null, owner))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "component?", "component?", 2048315517, null), new cljs.core.Symbol(null, "owner", "owner", 1247919588, null))))].join(""));
  }
  var ks = cljs.core.sequential_QMARK_.call(null, korks) ? korks : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [korks], null);
  return om.core._set_state_BANG_.call(null, owner, ks, v, true);
};
om.core.set_state_BANG_.cljs$lang$maxFixedArity = 3;
om.core.set_state_nr_BANG_ = function om$core$set_state_nr_BANG_(var_args) {
  var args14274 = [];
  var len__7198__auto___14277 = arguments.length;
  var i__7199__auto___14278 = 0;
  while (true) {
    if (i__7199__auto___14278 < len__7198__auto___14277) {
      args14274.push(arguments[i__7199__auto___14278]);
      var G__14279 = i__7199__auto___14278 + 1;
      i__7199__auto___14278 = G__14279;
      continue;
    } else {
    }
    break;
  }
  var G__14276 = args14274.length;
  switch(G__14276) {
    case 2:
      return om.core.set_state_nr_BANG_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return om.core.set_state_nr_BANG_.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args14274.length)].join(""));;
  }
};
om.core.set_state_nr_BANG_.cljs$core$IFn$_invoke$arity$2 = function(owner, v) {
  if (cljs.core.truth_(om.core.component_QMARK_.call(null, owner))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "component?", "component?", 2048315517, null), new cljs.core.Symbol(null, "owner", "owner", 1247919588, null))))].join(""));
  }
  return om.core._set_state_BANG_.call(null, owner, v, false);
};
om.core.set_state_nr_BANG_.cljs$core$IFn$_invoke$arity$3 = function(owner, korks, v) {
  if (cljs.core.truth_(om.core.component_QMARK_.call(null, owner))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "component?", "component?", 2048315517, null), new cljs.core.Symbol(null, "owner", "owner", 1247919588, null))))].join(""));
  }
  var ks = cljs.core.sequential_QMARK_.call(null, korks) ? korks : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [korks], null);
  return om.core._set_state_BANG_.call(null, owner, ks, v, false);
};
om.core.set_state_nr_BANG_.cljs$lang$maxFixedArity = 3;
om.core.update_state_BANG_ = function om$core$update_state_BANG_(var_args) {
  var args14281 = [];
  var len__7198__auto___14284 = arguments.length;
  var i__7199__auto___14285 = 0;
  while (true) {
    if (i__7199__auto___14285 < len__7198__auto___14284) {
      args14281.push(arguments[i__7199__auto___14285]);
      var G__14286 = i__7199__auto___14285 + 1;
      i__7199__auto___14285 = G__14286;
      continue;
    } else {
    }
    break;
  }
  var G__14283 = args14281.length;
  switch(G__14283) {
    case 2:
      return om.core.update_state_BANG_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return om.core.update_state_BANG_.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args14281.length)].join(""));;
  }
};
om.core.update_state_BANG_.cljs$core$IFn$_invoke$arity$2 = function(owner, f) {
  if (cljs.core.truth_(om.core.component_QMARK_.call(null, owner))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "component?", "component?", 2048315517, null), new cljs.core.Symbol(null, "owner", "owner", 1247919588, null))))].join(""));
  }
  if (cljs.core.ifn_QMARK_.call(null, f)) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "ifn?", "ifn?", -2106461064, null), new cljs.core.Symbol(null, "f", "f", 43394975, null))))].join(""));
  }
  return om.core.set_state_BANG_.call(null, owner, f.call(null, om.core.get_state.call(null, owner)));
};
om.core.update_state_BANG_.cljs$core$IFn$_invoke$arity$3 = function(owner, korks, f) {
  if (cljs.core.truth_(om.core.component_QMARK_.call(null, owner))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "component?", "component?", 2048315517, null), new cljs.core.Symbol(null, "owner", "owner", 1247919588, null))))].join(""));
  }
  if (cljs.core.ifn_QMARK_.call(null, f)) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "ifn?", "ifn?", -2106461064, null), new cljs.core.Symbol(null, "f", "f", 43394975, null))))].join(""));
  }
  return om.core.set_state_BANG_.call(null, owner, korks, f.call(null, om.core.get_state.call(null, owner, korks)));
};
om.core.update_state_BANG_.cljs$lang$maxFixedArity = 3;
om.core.update_state_nr_BANG_ = function om$core$update_state_nr_BANG_(var_args) {
  var args14288 = [];
  var len__7198__auto___14291 = arguments.length;
  var i__7199__auto___14292 = 0;
  while (true) {
    if (i__7199__auto___14292 < len__7198__auto___14291) {
      args14288.push(arguments[i__7199__auto___14292]);
      var G__14293 = i__7199__auto___14292 + 1;
      i__7199__auto___14292 = G__14293;
      continue;
    } else {
    }
    break;
  }
  var G__14290 = args14288.length;
  switch(G__14290) {
    case 2:
      return om.core.update_state_nr_BANG_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    case 3:
      return om.core.update_state_nr_BANG_.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args14288.length)].join(""));;
  }
};
om.core.update_state_nr_BANG_.cljs$core$IFn$_invoke$arity$2 = function(owner, f) {
  if (cljs.core.truth_(om.core.component_QMARK_.call(null, owner))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "component?", "component?", 2048315517, null), new cljs.core.Symbol(null, "owner", "owner", 1247919588, null))))].join(""));
  }
  if (cljs.core.ifn_QMARK_.call(null, f)) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "ifn?", "ifn?", -2106461064, null), new cljs.core.Symbol(null, "f", "f", 43394975, null))))].join(""));
  }
  return om.core.set_state_nr_BANG_.call(null, owner, f.call(null, om.core.get_state.call(null, owner)));
};
om.core.update_state_nr_BANG_.cljs$core$IFn$_invoke$arity$3 = function(owner, korks, f) {
  if (cljs.core.truth_(om.core.component_QMARK_.call(null, owner))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "component?", "component?", 2048315517, null), new cljs.core.Symbol(null, "owner", "owner", 1247919588, null))))].join(""));
  }
  if (cljs.core.ifn_QMARK_.call(null, f)) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "ifn?", "ifn?", -2106461064, null), new cljs.core.Symbol(null, "f", "f", 43394975, null))))].join(""));
  }
  return om.core.set_state_nr_BANG_.call(null, owner, korks, f.call(null, om.core.get_state.call(null, owner, korks)));
};
om.core.update_state_nr_BANG_.cljs$lang$maxFixedArity = 3;
om.core.refresh_BANG_ = function om$core$refresh_BANG_(owner) {
  if (cljs.core.truth_(om.core.component_QMARK_.call(null, owner))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "component?", "component?", 2048315517, null), new cljs.core.Symbol(null, "owner", "owner", 1247919588, null))))].join(""));
  }
  return om.core.update_state_BANG_.call(null, owner, cljs.core.identity);
};
om.core.get_render_state = function om$core$get_render_state(var_args) {
  var args14295 = [];
  var len__7198__auto___14298 = arguments.length;
  var i__7199__auto___14299 = 0;
  while (true) {
    if (i__7199__auto___14299 < len__7198__auto___14298) {
      args14295.push(arguments[i__7199__auto___14299]);
      var G__14300 = i__7199__auto___14299 + 1;
      i__7199__auto___14299 = G__14300;
      continue;
    } else {
    }
    break;
  }
  var G__14297 = args14295.length;
  switch(G__14297) {
    case 1:
      return om.core.get_render_state.cljs$core$IFn$_invoke$arity$1(arguments[0]);
      break;
    case 2:
      return om.core.get_render_state.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
      break;
    default:
      throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args14295.length)].join(""));;
  }
};
om.core.get_render_state.cljs$core$IFn$_invoke$arity$1 = function(owner) {
  if (cljs.core.truth_(om.core.component_QMARK_.call(null, owner))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "component?", "component?", 2048315517, null), new cljs.core.Symbol(null, "owner", "owner", 1247919588, null))))].join(""));
  }
  return om.core._get_render_state.call(null, owner);
};
om.core.get_render_state.cljs$core$IFn$_invoke$arity$2 = function(owner, korks) {
  if (cljs.core.truth_(om.core.component_QMARK_.call(null, owner))) {
  } else {
    throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "component?", "component?", 2048315517, null), new cljs.core.Symbol(null, "owner", "owner", 1247919588, null))))].join(""));
  }
  var ks = cljs.core.sequential_QMARK_.call(null, korks) ? korks : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [korks], null);
  return om.core._get_render_state.call(null, owner, ks);
};
om.core.get_render_state.cljs$lang$maxFixedArity = 2;
goog.provide("schengencalc.core");
goog.require("cljs.core");
goog.require("om.core");
goog.require("om.dom");
goog.require("kioo.om");
schengencalc.core.store = function schengencalc$core$store(k, obj) {
  return localStorage.setItem(k, JSON.stringify(cljs.core.clj__GT_js.call(null, obj)));
};
schengencalc.core.keywordify = function schengencalc$core$keywordify(m) {
  if (cljs.core.map_QMARK_.call(null, m)) {
    return cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, function() {
      var iter__6912__auto__ = function schengencalc$core$keywordify_$_iter__11626(s__11627) {
        return new cljs.core.LazySeq(null, function() {
          var s__11627__$1 = s__11627;
          while (true) {
            var temp__4425__auto__ = cljs.core.seq.call(null, s__11627__$1);
            if (temp__4425__auto__) {
              var s__11627__$2 = temp__4425__auto__;
              if (cljs.core.chunked_seq_QMARK_.call(null, s__11627__$2)) {
                var c__6910__auto__ = cljs.core.chunk_first.call(null, s__11627__$2);
                var size__6911__auto__ = cljs.core.count.call(null, c__6910__auto__);
                var b__11629 = cljs.core.chunk_buffer.call(null, size__6911__auto__);
                if (function() {
                  var i__11628 = 0;
                  while (true) {
                    if (i__11628 < size__6911__auto__) {
                      var vec__11632 = cljs.core._nth.call(null, c__6910__auto__, i__11628);
                      var k = cljs.core.nth.call(null, vec__11632, 0, null);
                      var v = cljs.core.nth.call(null, vec__11632, 1, null);
                      cljs.core.chunk_append.call(null, b__11629, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.call(null, k), schengencalc$core$keywordify.call(null, v)], null));
                      var G__11634 = i__11628 + 1;
                      i__11628 = G__11634;
                      continue;
                    } else {
                      return true;
                    }
                    break;
                  }
                }()) {
                  return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__11629), schengencalc$core$keywordify_$_iter__11626.call(null, cljs.core.chunk_rest.call(null, s__11627__$2)));
                } else {
                  return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__11629), null);
                }
              } else {
                var vec__11633 = cljs.core.first.call(null, s__11627__$2);
                var k = cljs.core.nth.call(null, vec__11633, 0, null);
                var v = cljs.core.nth.call(null, vec__11633, 1, null);
                return cljs.core.cons.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.call(null, k), schengencalc$core$keywordify.call(null, v)], null), schengencalc$core$keywordify_$_iter__11626.call(null, cljs.core.rest.call(null, s__11627__$2)));
              }
            } else {
              return null;
            }
            break;
          }
        }, null, null);
      };
      return iter__6912__auto__.call(null, m);
    }());
  } else {
    if (cljs.core.coll_QMARK_.call(null, m)) {
      return cljs.core.vec.call(null, cljs.core.map.call(null, schengencalc$core$keywordify, m));
    } else {
      return m;
    }
  }
};
schengencalc.core.__GT_prn = function schengencalc$core$__GT_prn(x) {
  console.log(x);
  return x;
};
schengencalc.core.fetch = function schengencalc$core$fetch(k, default$) {
  var item = localStorage.getItem(k);
  if (cljs.core.truth_(item)) {
    return schengencalc.core.keywordify.call(null, cljs.core.js__GT_clj.call(null, JSON.parse(function() {
      var or__6140__auto__ = localStorage.getItem(k);
      if (cljs.core.truth_(or__6140__auto__)) {
        return or__6140__auto__;
      } else {
        return {};
      }
    }())));
  } else {
    return default$;
  }
};
schengencalc.core.fmt_date = function schengencalc$core$fmt_date(d) {
  return moment(d).format("MMMM Do, YYYY");
};
schengencalc.core.fmt_date_iso = function schengencalc$core$fmt_date_iso(d) {
  return moment(d).format("YYYY-MM-DD");
};
schengencalc.core.duration = function schengencalc$core$duration(p__11639) {
  var map__11642 = p__11639;
  var map__11642__$1 = (!(map__11642 == null) ? map__11642.cljs$lang$protocol_mask$partition0$ & 64 || map__11642.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.call(null, cljs.core.hash_map, map__11642) : map__11642;
  var in$ = map__11642__$1;
  var exit = cljs.core.get.call(null, map__11642__$1, new cljs.core.Keyword(null, "exit", "exit", 351849638));
  var entry = cljs.core.get.call(null, map__11642__$1, new cljs.core.Keyword(null, "entry", "entry", 505168823));
  return Math.round(moment.duration(moment(exit).diff(moment(entry))).asDays()) + 1;
};
schengencalc.core.days_used = function schengencalc$core$days_used(deadline, upcoming_stays) {
  return cljs.core.reduce.call(null, cljs.core._PLUS_, 0, function() {
    var iter__6912__auto__ = function schengencalc$core$days_used_$_iter__11656(s__11657) {
      return new cljs.core.LazySeq(null, function() {
        var s__11657__$1 = s__11657;
        while (true) {
          var temp__4425__auto__ = cljs.core.seq.call(null, s__11657__$1);
          if (temp__4425__auto__) {
            var s__11657__$2 = temp__4425__auto__;
            if (cljs.core.chunked_seq_QMARK_.call(null, s__11657__$2)) {
              var c__6910__auto__ = cljs.core.chunk_first.call(null, s__11657__$2);
              var size__6911__auto__ = cljs.core.count.call(null, c__6910__auto__);
              var b__11659 = cljs.core.chunk_buffer.call(null, size__6911__auto__);
              if (function() {
                var i__11658 = 0;
                while (true) {
                  if (i__11658 < size__6911__auto__) {
                    var map__11664 = cljs.core._nth.call(null, c__6910__auto__, i__11658);
                    var map__11664__$1 = (!(map__11664 == null) ? map__11664.cljs$lang$protocol_mask$partition0$ & 64 || map__11664.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.call(null, cljs.core.hash_map, map__11664) : map__11664;
                    var upcoming = map__11664__$1;
                    var entry = cljs.core.get.call(null, map__11664__$1, new cljs.core.Keyword(null, "entry", "entry", 505168823));
                    var exit = cljs.core.get.call(null, map__11664__$1, new cljs.core.Keyword(null, "exit", "exit", 351849638));
                    cljs.core.chunk_append.call(null, b__11659, cljs.core.truth_(deadline.isBefore(entry)) ? 0 : cljs.core.truth_(deadline.isBefore(exit)) ? schengencalc.core.duration.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "entry", "entry", 505168823), entry, new cljs.core.Keyword(null, "exit", "exit", 351849638), deadline], null)) : schengencalc.core.duration.call(null, upcoming));
                    var G__11668 = i__11658 + 1;
                    i__11658 = G__11668;
                    continue;
                  } else {
                    return true;
                  }
                  break;
                }
              }()) {
                return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__11659), schengencalc$core$days_used_$_iter__11656.call(null, cljs.core.chunk_rest.call(null, s__11657__$2)));
              } else {
                return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__11659), null);
              }
            } else {
              var map__11666 = cljs.core.first.call(null, s__11657__$2);
              var map__11666__$1 = (!(map__11666 == null) ? map__11666.cljs$lang$protocol_mask$partition0$ & 64 || map__11666.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.call(null, cljs.core.hash_map, map__11666) : map__11666;
              var upcoming = map__11666__$1;
              var entry = cljs.core.get.call(null, map__11666__$1, new cljs.core.Keyword(null, "entry", "entry", 505168823));
              var exit = cljs.core.get.call(null, map__11666__$1, new cljs.core.Keyword(null, "exit", "exit", 351849638));
              return cljs.core.cons.call(null, cljs.core.truth_(deadline.isBefore(entry)) ? 0 : cljs.core.truth_(deadline.isBefore(exit)) ? schengencalc.core.duration.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "entry", "entry", 505168823), entry, new cljs.core.Keyword(null, "exit", "exit", 351849638), deadline], null)) : schengencalc.core.duration.call(null, upcoming), schengencalc$core$days_used_$_iter__11656.call(null, cljs.core.rest.call(null, s__11657__$2)));
            }
          } else {
            return null;
          }
          break;
        }
      }, null, null);
    };
    return iter__6912__auto__.call(null, upcoming_stays);
  }());
};
schengencalc.core.days_left = function schengencalc$core$days_left(deadline, upcoming_stays) {
  return 90 - schengencalc.core.days_used.call(null, deadline, upcoming_stays);
};
schengencalc.core.calc_days_left_and_deadline = function schengencalc$core$calc_days_left_and_deadline(upcoming_stays, date) {
  var deadline = moment(date).add("days", 180);
  return new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "from-date", "from-date", 1469949792), date, new cljs.core.Keyword(null, "days-left", "days-left", 145761870), schengencalc.core.days_left.call(null, deadline, upcoming_stays), new cljs.core.Keyword(null, "return-date", "return-date", 520965446), deadline], null);
};
schengencalc.core.update_re_dates = function schengencalc$core$update_re_dates(upcoming_stays, p__11669) {
  var map__11672 = p__11669;
  var map__11672__$1 = (!(map__11672 == null) ? map__11672.cljs$lang$protocol_mask$partition0$ & 64 || map__11672.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.call(null, cljs.core.hash_map, map__11672) : map__11672;
  var stay = map__11672__$1;
  var exit = cljs.core.get.call(null, map__11672__$1, new cljs.core.Keyword(null, "exit", "exit", 351849638));
  return cljs.core.conj.call(null, upcoming_stays, cljs.core.merge.call(null, stay, schengencalc.core.calc_days_left_and_deadline.call(null, upcoming_stays, exit)));
};
schengencalc.core.re_entry_dates = function schengencalc$core$re_entry_dates(travel_dates) {
  var initial = schengencalc.core.calc_days_left_and_deadline.call(null, travel_dates, (new cljs.core.Keyword(null, "entry", "entry", 505168823)).cljs$core$IFn$_invoke$arity$1(cljs.core.first.call(null, travel_dates)));
  var other_dates = cljs.core.filter.call(null, function(initial) {
    return function(p1__11674_SHARP_) {
      return !cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "days-left", "days-left", 145761870)).cljs$core$IFn$_invoke$arity$1(p1__11674_SHARP_), 90);
    };
  }(initial), cljs.core.reduce.call(null, schengencalc.core.update_re_dates, cljs.core.PersistentVector.EMPTY, cljs.core.reverse.call(null, travel_dates)));
  if (cljs.core.empty_QMARK_.call(null, travel_dates)) {
    return cljs.core.PersistentVector.EMPTY;
  } else {
    if (cljs.core.empty_QMARK_.call(null, other_dates)) {
      return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [initial], null);
    } else {
      return cljs.core.apply.call(null, cljs.core.conj, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [initial], null), cljs.core.reverse.call(null, other_dates));
    }
  }
};
schengencalc.core.date_input = function schengencalc$core$date_input(stay_key) {
  return function(stay, owner) {
    if (typeof schengencalc.core.t_schengencalc$core11680 !== "undefined") {
    } else {
      schengencalc.core.t_schengencalc$core11680 = function(date_input, stay_key, stay, owner, meta11681) {
        this.date_input = date_input;
        this.stay_key = stay_key;
        this.stay = stay;
        this.owner = owner;
        this.meta11681 = meta11681;
        this.cljs$lang$protocol_mask$partition0$ = 393216;
        this.cljs$lang$protocol_mask$partition1$ = 0;
      };
      schengencalc.core.t_schengencalc$core11680.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(_11682, meta11681__$1) {
        var self__ = this;
        var _11682__$1 = this;
        return new schengencalc.core.t_schengencalc$core11680(self__.date_input, self__.stay_key, self__.stay, self__.owner, meta11681__$1);
      };
      schengencalc.core.t_schengencalc$core11680.prototype.cljs$core$IMeta$_meta$arity$1 = function(_11682) {
        var self__ = this;
        var _11682__$1 = this;
        return self__.meta11681;
      };
      schengencalc.core.t_schengencalc$core11680.prototype.om$core$IDidMount$ = true;
      schengencalc.core.t_schengencalc$core11680.prototype.om$core$IDidMount$did_mount$arity$1 = function(_) {
        var self__ = this;
        var ___$1 = this;
        return new Pikaday(function() {
          var obj11684 = {"onSelect":function(___$1) {
            return function() {
              var t = this;
              return om.core.update_BANG_.call(null, self__.stay, self__.stay_key, t.getMoment());
            };
          }(___$1), "format":"YYYY-MM-DD", "minDate":new Date(2009, 0, 1), "field":om.core.get_node.call(null, self__.owner)};
          return obj11684;
        }());
      };
      schengencalc.core.t_schengencalc$core11680.prototype.om$core$IRender$ = true;
      schengencalc.core.t_schengencalc$core11680.prototype.om$core$IRender$render$arity$1 = function(_) {
        var self__ = this;
        var ___$1 = this;
        return om.dom.input.call(null, {"value":moment(cljs.core.get.call(null, self__.stay, self__.stay_key)).format("YYYY-MM-DD")});
      };
      schengencalc.core.t_schengencalc$core11680.getBasis = function() {
        return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "date-input", "date-input", 1898177653, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "arglists", "arglists", 1661989754), cljs.core.list(new cljs.core.Symbol(null, "quote", "quote", 1377916282, null), cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, 
        "stay-key", "stay-key", -1405508457, null)], null)))], null)), new cljs.core.Symbol(null, "stay-key", "stay-key", -1405508457, null), new cljs.core.Symbol(null, "stay", "stay", 400204293, null), new cljs.core.Symbol(null, "owner", "owner", 1247919588, null), new cljs.core.Symbol(null, "meta11681", "meta11681", 45742416, null)], null);
      };
      schengencalc.core.t_schengencalc$core11680.cljs$lang$type = true;
      schengencalc.core.t_schengencalc$core11680.cljs$lang$ctorStr = "schengencalc.core/t_schengencalc$core11680";
      schengencalc.core.t_schengencalc$core11680.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
        return cljs.core._write.call(null, writer__6739__auto__, "schengencalc.core/t_schengencalc$core11680");
      };
      schengencalc.core.__GT_t_schengencalc$core11680 = function schengencalc$core$date_input_$___GT_t_schengencalc$core11680(date_input__$1, stay_key__$1, stay__$1, owner__$1, meta11681) {
        return new schengencalc.core.t_schengencalc$core11680(date_input__$1, stay_key__$1, stay__$1, owner__$1, meta11681);
      };
    }
    return new schengencalc.core.t_schengencalc$core11680(schengencalc$core$date_input, stay_key, stay, owner, cljs.core.PersistentArrayMap.EMPTY);
  };
};
schengencalc.core.date_row = function schengencalc$core$date_row(p__11687, travel_dates) {
  var map__11690 = p__11687;
  var map__11690__$1 = (!(map__11690 == null) ? map__11690.cljs$lang$protocol_mask$partition0$ & 64 || map__11690.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.call(null, cljs.core.hash_map, map__11690) : map__11690;
  var rowdata = map__11690__$1;
  var entry = cljs.core.get.call(null, map__11690__$1, new cljs.core.Keyword(null, "entry", "entry", 505168823));
  var exit = cljs.core.get.call(null, map__11690__$1, new cljs.core.Keyword(null, "exit", "exit", 351849638));
  var ch11686 = kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null, om.dom.tr, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "className", "className", -1983287057), "date-row", new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, 
  [cljs.core.apply.call(null, om.dom.td, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [kioo.core.handle_wrapper.call(null, kioo.om.make_dom).call(null, kioo.om.substitute.call(null, om.core.build.call(null, schengencalc.core.date_input.call(null, new cljs.core.Keyword(null, "entry", 
  "entry", 505168823)), rowdata)).call(null, new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "type", "type", 1174270348), new cljs.core.Keyword(null, "element", "element", 1974019749), new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "type", "type", 1174270348), "date", new cljs.core.Keyword(null, "className", "className", -1983287057), "entry", new cljs.core.Keyword(null, "style", "style", -496642736), 
  null], null), new cljs.core.Keyword(null, "tag", "tag", -1290361223), new cljs.core.Keyword(null, "input", "input", 556931961), new cljs.core.Keyword(null, "content", "content", 15833224), kioo.util.flatten_nodes.call(null, cljs.core.PersistentVector.EMPTY), new cljs.core.Keyword(null, "sym", "sym", -1444860305), om.dom.input], null)))], null))), cljs.core.apply.call(null, om.dom.td, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", 
  "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [kioo.core.handle_wrapper.call(null, kioo.om.make_dom).call(null, kioo.om.substitute.call(null, om.core.build.call(null, schengencalc.core.date_input.call(null, new cljs.core.Keyword(null, "exit", "exit", 351849638)), rowdata)).call(null, new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "type", "type", 1174270348), new cljs.core.Keyword(null, 
  "element", "element", 1974019749), new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "type", "type", 1174270348), "date", new cljs.core.Keyword(null, "className", "className", -1983287057), "exit", new cljs.core.Keyword(null, "style", "style", -496642736), null], null), new cljs.core.Keyword(null, "tag", "tag", -1290361223), new cljs.core.Keyword(null, "input", "input", 556931961), new cljs.core.Keyword(null, "content", 
  "content", 15833224), kioo.util.flatten_nodes.call(null, cljs.core.PersistentVector.EMPTY), new cljs.core.Keyword(null, "sym", "sym", -1444860305), om.dom.input], null)))], null))), kioo.core.handle_wrapper.call(null, kioo.om.make_dom).call(null, kioo.om.content.call(null, [cljs.core.str(schengencalc.core.duration.call(null, rowdata)), cljs.core.str(" days")].join("")).call(null, new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "type", "type", 1174270348), new cljs.core.Keyword(null, 
  "element", "element", 1974019749), new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "className", "className", -1983287057), "duration", new cljs.core.Keyword(null, "style", "style", -496642736), null], null), new cljs.core.Keyword(null, "tag", "tag", -1290361223), new cljs.core.Keyword(null, "td", "td", 1479933353), new cljs.core.Keyword(null, "content", "content", 15833224), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 
  1, 5, cljs.core.PersistentVector.EMPTY_NODE, [" 76 days "], null)), new cljs.core.Keyword(null, "sym", "sym", -1444860305), om.dom.td], null))), cljs.core.apply.call(null, om.dom.td, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "className", "className", -1983287057), "dissoc", new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, 
  [kioo.core.handle_wrapper.call(null, kioo.om.make_dom).call(null, kioo.om.listen.call(null, new cljs.core.Keyword(null, "on-click", "on-click", 1632826543), function(map__11690, map__11690__$1, rowdata, entry, exit) {
    return function(e) {
      e.preventDefault();
      return om.core.transact_BANG_.call(null, travel_dates, function(map__11690, map__11690__$1, rowdata, entry, exit) {
        return function(p1__11685_SHARP_) {
          return cljs.core.vec.call(null, cljs.core.filter.call(null, function(map__11690, map__11690__$1, rowdata, entry, exit) {
            return function(x) {
              return !cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "entry", "entry", 505168823)).cljs$core$IFn$_invoke$arity$1(x), entry) && !cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "exit", "exit", 351849638)).cljs$core$IFn$_invoke$arity$1(x), exit);
            };
          }(map__11690, map__11690__$1, rowdata, entry, exit), p1__11685_SHARP_));
        };
      }(map__11690, map__11690__$1, rowdata, entry, exit));
    };
  }(map__11690, map__11690__$1, rowdata, entry, exit)).call(null, new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "type", "type", 1174270348), new cljs.core.Keyword(null, "element", "element", 1974019749), new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", -496642736), null], null), new cljs.core.Keyword(null, "tag", "tag", -1290361223), new cljs.core.Keyword(null, "a", "a", -2123407586), 
  new cljs.core.Keyword(null, "content", "content", 15833224), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null, om.dom.i, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "className", "className", -1983287057), "fi-x", new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, cljs.core.PersistentVector.EMPTY))], 
  null)), new cljs.core.Keyword(null, "sym", "sym", -1444860305), om.dom.a], null)))], null)))], null)))], null));
  if (cljs.core._EQ_.call(null, 1, cljs.core.count.call(null, ch11686))) {
    return cljs.core.first.call(null, ch11686);
  } else {
    return cljs.core.apply.call(null, om.dom.span, null, ch11686);
  }
};
schengencalc.core.result_item = function schengencalc$core$result_item(p__11693) {
  var map__11696 = p__11693;
  var map__11696__$1 = (!(map__11696 == null) ? map__11696.cljs$lang$protocol_mask$partition0$ & 64 || map__11696.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.call(null, cljs.core.hash_map, map__11696) : map__11696;
  var days_left = cljs.core.get.call(null, map__11696__$1, new cljs.core.Keyword(null, "days-left", "days-left", 145761870));
  var return_date = cljs.core.get.call(null, map__11696__$1, new cljs.core.Keyword(null, "return-date", "return-date", 520965446));
  var from_date = cljs.core.get.call(null, map__11696__$1, new cljs.core.Keyword(null, "from-date", "from-date", 1469949792));
  var ch11692 = kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null, om.dom.li, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "className", "className", -1983287057), "stay-tpl", new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, 
  [" If you return before ", kioo.core.handle_wrapper.call(null, kioo.om.make_dom).call(null, kioo.om.content.call(null, schengencalc.core.fmt_date.call(null, return_date)).call(null, new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "type", "type", 1174270348), new cljs.core.Keyword(null, "element", "element", 1974019749), new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "className", "className", 
  -1983287057), "return-date", new cljs.core.Keyword(null, "style", "style", -496642736), null], null), new cljs.core.Keyword(null, "tag", "tag", -1290361223), new cljs.core.Keyword(null, "span", "span", 1394872991), new cljs.core.Keyword(null, "content", "content", 15833224), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["August 12"], null)), new cljs.core.Keyword(null, "sym", "sym", -1444860305), om.dom.span], null))), ", you may stay for ", 
  kioo.core.handle_wrapper.call(null, kioo.om.make_dom).call(null, kioo.om.content.call(null, days_left).call(null, new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "type", "type", 1174270348), new cljs.core.Keyword(null, "element", "element", 1974019749), new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "className", "className", -1983287057), "days-left", new cljs.core.Keyword(null, "style", "style", 
  -496642736), null], null), new cljs.core.Keyword(null, "tag", "tag", -1290361223), new cljs.core.Keyword(null, "span", "span", 1394872991), new cljs.core.Keyword(null, "content", "content", 15833224), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [" 12"], null)), new cljs.core.Keyword(null, "sym", "sym", -1444860305), om.dom.span], null))), " days. "], null)))], null));
  if (cljs.core._EQ_.call(null, 1, cljs.core.count.call(null, ch11692))) {
    return cljs.core.first.call(null, ch11692);
  } else {
    return cljs.core.apply.call(null, om.dom.span, null, ch11692);
  }
};
schengencalc.core.main = function schengencalc$core$main(p__11702) {
  var map__11705 = p__11702;
  var map__11705__$1 = (!(map__11705 == null) ? map__11705.cljs$lang$protocol_mask$partition0$ & 64 || map__11705.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.call(null, cljs.core.hash_map, map__11705) : map__11705;
  var travel_dates = cljs.core.get.call(null, map__11705__$1, new cljs.core.Keyword(null, "travel-dates", "travel-dates", -960218385));
  var ch11701 = kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null, om.dom.div, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "className", "className", -1983287057), "container", new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 7, 5, cljs.core.PersistentVector.EMPTY_NODE, 
  [cljs.core.apply.call(null, om.dom.header, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null, om.dom.h1, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, 
  new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Schengen calculator"], null))), cljs.core.apply.call(null, om.dom.h2, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["For Visa-Free visitors"], null))), cljs.core.apply.call(null, om.dom.p, cljs.core.clj__GT_js.call(null, 
  new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["You may stay in the Schengen area for no more than 90 days in any 180 day period. Simple, right? Well I guess you don't need this calculator at all then."], null)))], null))), cljs.core.apply.call(null, om.dom.main, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 
  1, [new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null, om.dom.p, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, 
  [cljs.core.apply.call(null, om.dom.strong, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Enter your stays in the Schengen area below, in chronological order."], null)))], null))), cljs.core.apply.call(null, om.dom.table, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 
  2, [new cljs.core.Keyword(null, "className", "className", -1983287057), "entry-table", new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null, om.dom.thead, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, 
  new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null, om.dom.tr, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null, om.dom.th, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, 
  [new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Entry"], null))), cljs.core.apply.call(null, om.dom.th, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, 
  ["Exit"], null))), cljs.core.apply.call(null, om.dom.th, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Duration"], null))), cljs.core.apply.call(null, om.dom.th, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", 
  -496642736), null], null)), kioo.util.flatten_nodes.call(null, cljs.core.PersistentVector.EMPTY))], null)))], null))), kioo.core.handle_wrapper.call(null, kioo.om.make_dom).call(null, kioo.om.content.call(null, cljs.core.map.call(null, function(map__11705, map__11705__$1, travel_dates) {
    return function(p1__11698_SHARP_) {
      return schengencalc.core.date_row.call(null, p1__11698_SHARP_, travel_dates);
    };
  }(map__11705, map__11705__$1, travel_dates), travel_dates)).call(null, new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "type", "type", 1174270348), new cljs.core.Keyword(null, "element", "element", 1974019749), new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "className", "className", -1983287057), "travel-dates", new cljs.core.Keyword(null, "style", "style", -496642736), null], null), new cljs.core.Keyword(null, 
  "tag", "tag", -1290361223), new cljs.core.Keyword(null, "tbody", "tbody", -80678300), new cljs.core.Keyword(null, "content", "content", 15833224), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null, om.dom.tr, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "className", "className", -1983287057), "date-row", new cljs.core.Keyword(null, "style", "style", 
  -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null, om.dom.td, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null, om.dom.input, cljs.core.clj__GT_js.call(null, 
  new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "type", "type", 1174270348), "date", new cljs.core.Keyword(null, "className", "className", -1983287057), "entry", new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, cljs.core.PersistentVector.EMPTY))], null))), cljs.core.apply.call(null, om.dom.td, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", 
  -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null, om.dom.input, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "type", "type", 1174270348), "date", new cljs.core.Keyword(null, "className", "className", -1983287057), "exit", new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, 
  cljs.core.PersistentVector.EMPTY))], null))), cljs.core.apply.call(null, om.dom.td, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "className", "className", -1983287057), "duration", new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [" 76 days "], null))), cljs.core.apply.call(null, om.dom.td, cljs.core.clj__GT_js.call(null, 
  new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "className", "className", -1983287057), "dissoc", new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null, om.dom.a, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), 
  kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null, om.dom.i, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "className", "className", -1983287057), "fi-x", new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, cljs.core.PersistentVector.EMPTY))], null)))], null)))], null)))], null)), new cljs.core.Keyword(null, 
  "sym", "sym", -1444860305), om.dom.tbody], null)))], null))), cljs.core.apply.call(null, om.dom.div, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "className", "className", -1983287057), "add-stay", new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [kioo.core.handle_wrapper.call(null, kioo.om.make_dom).call(null, 
  kioo.om.listen.call(null, new cljs.core.Keyword(null, "on-click", "on-click", 1632826543), function(map__11705, map__11705__$1, travel_dates) {
    return function(e) {
      e.preventDefault();
      return om.core.transact_BANG_.call(null, travel_dates, function(map__11705, map__11705__$1, travel_dates) {
        return function(p1__11699_SHARP_) {
          return cljs.core.conj.call(null, p1__11699_SHARP_, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "entry", "entry", 505168823), moment(), new cljs.core.Keyword(null, "exit", "exit", 351849638), moment()], null));
        };
      }(map__11705, map__11705__$1, travel_dates));
    };
  }(map__11705, map__11705__$1, travel_dates)).call(null, new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "type", "type", 1174270348), new cljs.core.Keyword(null, "element", "element", 1974019749), new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", -496642736), null], null), new cljs.core.Keyword(null, "tag", "tag", -1290361223), new cljs.core.Keyword(null, "a", "a", -2123407586), 
  new cljs.core.Keyword(null, "content", "content", 15833224), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null, om.dom.i, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "className", "className", -1983287057), "fi-plus", new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, cljs.core.PersistentVector.EMPTY)), 
  " Add a stay"], null)), new cljs.core.Keyword(null, "sym", "sym", -1444860305), om.dom.a], null)))], null))), cljs.core.apply.call(null, om.dom.div, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "className", "className", -1983287057), "results-area", new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, 
  [cljs.core.apply.call(null, om.dom.h2, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Results"], null))), kioo.core.handle_wrapper.call(null, kioo.om.make_dom).call(null, (cljs.core.every_QMARK_.call(null, function(map__11705, map__11705__$1, travel_dates) {
    return function(p1__11700_SHARP_) {
      return (new cljs.core.Keyword(null, "days-left", "days-left", 145761870)).cljs$core$IFn$_invoke$arity$1(p1__11700_SHARP_) >= 0;
    };
  }(map__11705, map__11705__$1, travel_dates), schengencalc.core.re_entry_dates.call(null, travel_dates)) ? kioo.om.do__GT_.call(null, kioo.om.set_class.call(null, "disclaimer ok"), kioo.om.content.call(null, "This schedule is ok!")) : kioo.om.do__GT_.call(null, kioo.om.set_class.call(null, "disclaimer warn"), kioo.om.content.call(null, "This schedule violates Schengen Visa rules!"))).call(null, new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "type", "type", 1174270348), new cljs.core.Keyword(null, 
  "element", "element", 1974019749), new cljs.core.Keyword(null, "attrs", "attrs", -2090668713), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "className", "className", -1983287057), "disclaimer", new cljs.core.Keyword(null, "style", "style", -496642736), null], null), new cljs.core.Keyword(null, "tag", "tag", -1290361223), new cljs.core.Keyword(null, "p", "p", 151049309), new cljs.core.Keyword(null, "content", "content", 15833224), kioo.util.flatten_nodes.call(null, cljs.core.PersistentVector.EMPTY), 
  new cljs.core.Keyword(null, "sym", "sym", -1444860305), om.dom.p], null))), kioo.core.handle_wrapper.call(null, kioo.om.make_dom).call(null, kioo.om.content.call(null, cljs.core.map.call(null, schengencalc.core.result_item, schengencalc.core.re_entry_dates.call(null, travel_dates))).call(null, new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "type", "type", 1174270348), new cljs.core.Keyword(null, "element", "element", 1974019749), new cljs.core.Keyword(null, "attrs", "attrs", 
  -2090668713), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "className", "className", -1983287057), "results", new cljs.core.Keyword(null, "style", "style", -496642736), null], null), new cljs.core.Keyword(null, "tag", "tag", -1290361223), new cljs.core.Keyword(null, "ul", "ul", -1349521403), new cljs.core.Keyword(null, "content", "content", 15833224), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null, 
  om.dom.li, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "className", "className", -1983287057), "stay-tpl", new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [" If you return before ", cljs.core.apply.call(null, om.dom.span, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, 
  "className", "className", -1983287057), "return-date", new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["August 12"], null))), ", you may stay for ", cljs.core.apply.call(null, om.dom.span, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "className", "className", -1983287057), "days-left", new cljs.core.Keyword(null, 
  "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [" 12"], null))), " days. "], null)))], null)), new cljs.core.Keyword(null, "sym", "sym", -1444860305), om.dom.ul], null))), cljs.core.apply.call(null, om.dom.p, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, 
  new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["If you return after that, you may stay the full 90 days."], null)))], null)))], null))), cljs.core.apply.call(null, om.dom.footer, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null, 
  om.dom.p, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Made by ", cljs.core.apply.call(null, om.dom.a, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "href", "href", -793805698), "http://adambard.com/", new cljs.core.Keyword(null, 
  "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Exceedingly handsome web developer Adam Bard"], null)))], null)))], null))), cljs.core.apply.call(null, om.dom.script, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "src", "src", -1651076051), "https://cdnjs.cloudflare.com/ajax/libs/react/0.12.0/react.min.js", new cljs.core.Keyword(null, 
  "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, cljs.core.PersistentVector.EMPTY)), cljs.core.apply.call(null, om.dom.script, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "src", "src", -1651076051), "http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.7.0/moment.min.js", new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, cljs.core.PersistentVector.EMPTY)), 
  cljs.core.apply.call(null, om.dom.script, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "src", "src", -1651076051), "https://cdnjs.cloudflare.com/ajax/libs/pikaday/1.4.0/pikaday.min.js", new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, cljs.core.PersistentVector.EMPTY)), cljs.core.apply.call(null, om.dom.script, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 
  2, [new cljs.core.Keyword(null, "src", "src", -1651076051), "main.js", new cljs.core.Keyword(null, "style", "style", -496642736), null], null)), kioo.util.flatten_nodes.call(null, cljs.core.PersistentVector.EMPTY))], null)))], null));
  if (cljs.core._EQ_.call(null, 1, cljs.core.count.call(null, ch11701))) {
    return cljs.core.first.call(null, ch11701);
  } else {
    return cljs.core.apply.call(null, om.dom.span, null, ch11701);
  }
};
schengencalc.core.app_state = cljs.core.atom.call(null, schengencalc.core.fetch.call(null, "schengencalc", new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "travel-dates", "travel-dates", -960218385), cljs.core.PersistentVector.EMPTY], null)));
schengencalc.core.app = function schengencalc$core$app(data, owner) {
  schengencalc.core.store.call(null, "schengencalc", data);
  if (typeof schengencalc.core.t_schengencalc$core11710 !== "undefined") {
  } else {
    schengencalc.core.t_schengencalc$core11710 = function(app, data, owner, meta11711) {
      this.app = app;
      this.data = data;
      this.owner = owner;
      this.meta11711 = meta11711;
      this.cljs$lang$protocol_mask$partition0$ = 393216;
      this.cljs$lang$protocol_mask$partition1$ = 0;
    };
    schengencalc.core.t_schengencalc$core11710.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(_11712, meta11711__$1) {
      var self__ = this;
      var _11712__$1 = this;
      return new schengencalc.core.t_schengencalc$core11710(self__.app, self__.data, self__.owner, meta11711__$1);
    };
    schengencalc.core.t_schengencalc$core11710.prototype.cljs$core$IMeta$_meta$arity$1 = function(_11712) {
      var self__ = this;
      var _11712__$1 = this;
      return self__.meta11711;
    };
    schengencalc.core.t_schengencalc$core11710.prototype.om$core$IRender$ = true;
    schengencalc.core.t_schengencalc$core11710.prototype.om$core$IRender$render$arity$1 = function(this__10150__auto__) {
      var self__ = this;
      var this__10150__auto____$1 = this;
      return schengencalc.core.main.call(null, self__.data);
    };
    schengencalc.core.t_schengencalc$core11710.getBasis = function() {
      return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "app", "app", 1079569820, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "arglists", "arglists", 1661989754), cljs.core.list(new cljs.core.Symbol(null, "quote", "quote", 1377916282, null), cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "data", "data", 
      1407862150, null), new cljs.core.Symbol(null, "owner", "owner", 1247919588, null)], null)))], null)), new cljs.core.Symbol(null, "data", "data", 1407862150, null), new cljs.core.Symbol(null, "owner", "owner", 1247919588, null), new cljs.core.Symbol(null, "meta11711", "meta11711", -1684925739, null)], null);
    };
    schengencalc.core.t_schengencalc$core11710.cljs$lang$type = true;
    schengencalc.core.t_schengencalc$core11710.cljs$lang$ctorStr = "schengencalc.core/t_schengencalc$core11710";
    schengencalc.core.t_schengencalc$core11710.cljs$lang$ctorPrWriter = function(this__6738__auto__, writer__6739__auto__, opt__6740__auto__) {
      return cljs.core._write.call(null, writer__6739__auto__, "schengencalc.core/t_schengencalc$core11710");
    };
    schengencalc.core.__GT_t_schengencalc$core11710 = function schengencalc$core$app_$___GT_t_schengencalc$core11710(app__$1, data__$1, owner__$1, meta11711) {
      return new schengencalc.core.t_schengencalc$core11710(app__$1, data__$1, owner__$1, meta11711);
    };
  }
  return new schengencalc.core.t_schengencalc$core11710(schengencalc$core$app, data, owner, null);
};
om.core.root.call(null, schengencalc.core.app, schengencalc.core.app_state, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "target", "target", 253001721), document.body], null));
