picture-processor-cljs/public/index.js

72569 lines
2.7 MiB

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.13.3
*/
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.React = f()}})(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-2015, 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
*/
/* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/
'use strict';
var EventPluginUtils = _dereq_(19);
var ReactChildren = _dereq_(32);
var ReactComponent = _dereq_(34);
var ReactClass = _dereq_(33);
var ReactContext = _dereq_(38);
var ReactCurrentOwner = _dereq_(39);
var ReactElement = _dereq_(57);
var ReactElementValidator = _dereq_(58);
var ReactDOM = _dereq_(40);
var ReactDOMTextComponent = _dereq_(51);
var ReactDefaultInjection = _dereq_(54);
var ReactInstanceHandles = _dereq_(66);
var ReactMount = _dereq_(70);
var ReactPerf = _dereq_(75);
var ReactPropTypes = _dereq_(78);
var ReactReconciler = _dereq_(81);
var ReactServerRendering = _dereq_(84);
var assign = _dereq_(27);
var findDOMNode = _dereq_(117);
var onlyChild = _dereq_(144);
ReactDefaultInjection.inject();
var createElement = ReactElement.createElement;
var createFactory = ReactElement.createFactory;
var cloneElement = ReactElement.cloneElement;
if ("production" !== "development") {
createElement = ReactElementValidator.createElement;
createFactory = ReactElementValidator.createFactory;
cloneElement = ReactElementValidator.cloneElement;
}
var render = ReactPerf.measure('React', 'render', ReactMount.render);
var React = {
Children: {
map: ReactChildren.map,
forEach: ReactChildren.forEach,
count: ReactChildren.count,
only: onlyChild
},
Component: ReactComponent,
DOM: ReactDOM,
PropTypes: ReactPropTypes,
initializeTouchEvents: function(shouldUseTouch) {
EventPluginUtils.useTouchEvents = shouldUseTouch;
},
createClass: ReactClass.createClass,
createElement: createElement,
cloneElement: cloneElement,
createFactory: createFactory,
createMixin: function(mixin) {
// Currently a noop. Will be used to validate and trace mixins.
return mixin;
},
constructAndRenderComponent: ReactMount.constructAndRenderComponent,
constructAndRenderComponentByID: ReactMount.constructAndRenderComponentByID,
findDOMNode: findDOMNode,
render: render,
renderToString: ReactServerRendering.renderToString,
renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup,
unmountComponentAtNode: ReactMount.unmountComponentAtNode,
isValidElement: ReactElement.isValidElement,
withContext: ReactContext.withContext,
// Hook for JSX spread, don't use this for anything else.
__spread: assign
};
// 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({
CurrentOwner: ReactCurrentOwner,
InstanceHandles: ReactInstanceHandles,
Mount: ReactMount,
Reconciler: ReactReconciler,
TextComponent: ReactDOMTextComponent
});
}
if ("production" !== "development") {
var ExecutionEnvironment = _dereq_(21);
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: ' +
'https://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: ' +
'https://fb.me/react-warning-polyfills'
);
break;
}
}
}
}
React.version = '0.13.3';
module.exports = React;
},{"117":117,"144":144,"19":19,"21":21,"27":27,"32":32,"33":33,"34":34,"38":38,"39":39,"40":40,"51":51,"54":54,"57":57,"58":58,"66":66,"70":70,"75":75,"78":78,"81":81,"84":84}],2:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(119);
var AutoFocusMixin = {
componentDidMount: function() {
if (this.props.autoFocus) {
focusNode(this.getDOMNode());
}
}
};
module.exports = AutoFocusMixin;
},{"119":119}],3:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015 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_(15);
var EventPropagators = _dereq_(20);
var ExecutionEnvironment = _dereq_(21);
var FallbackCompositionState = _dereq_(22);
var SyntheticCompositionEvent = _dereq_(93);
var SyntheticInputEvent = _dereq_(97);
var keyOf = _dereq_(141);
var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
var START_KEYCODE = 229;
var canUseCompositionEvent = (
ExecutionEnvironment.canUseDOM &&
'CompositionEvent' in window
);
var documentMode = null;
if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {
documentMode = document.documentMode;
}
// Webkit offers a very useful `textInput` event that can be used to
// directly represent `beforeInput`. The IE `textinput` event is not as
// useful, so we don't use it.
var canUseTextInputEvent = (
ExecutionEnvironment.canUseDOM &&
'TextEvent' in window &&
!documentMode &&
!isPresto()
);
// In IE9+, we have access to composition events, but the data supplied
// by the native compositionend event may be incorrect. Japanese ideographic
// spaces, for instance (\u3000) are not recorded correctly.
var useFallbackCompositionData = (
ExecutionEnvironment.canUseDOM &&
(
(!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11)
)
);
/**
* 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
]
},
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
]
}
};
// 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)
);
}
/**
* 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 isFallbackCompositionStart(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 isFallbackCompositionEnd(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;
}
}
/**
* Google Input Tools provides composition data via a CustomEvent,
* with the `data` property populated in the `detail` object. If this
* is available on the event object, use it. If not, this is a plain
* composition event and we have nothing special to extract.
*
* @param {object} nativeEvent
* @return {?string}
*/
function getDataFromCustomEvent(nativeEvent) {
var detail = nativeEvent.detail;
if (typeof detail === 'object' && 'data' in detail) {
return detail.data;
}
return null;
}
// Track the current IME composition fallback object, if any.
var currentComposition = 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 {?object} A SyntheticCompositionEvent.
*/
function extractCompositionEvent(
topLevelType,
topLevelTarget,
topLevelTargetID,
nativeEvent
) {
var eventType;
var fallbackData;
if (canUseCompositionEvent) {
eventType = getCompositionEventType(topLevelType);
} else if (!currentComposition) {
if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
eventType = eventTypes.compositionStart;
}
} else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
eventType = eventTypes.compositionEnd;
}
if (!eventType) {
return null;
}
if (useFallbackCompositionData) {
// The current composition is stored statically and must not be
// overwritten while composition continues.
if (!currentComposition && eventType === eventTypes.compositionStart) {
currentComposition = FallbackCompositionState.getPooled(topLevelTarget);
} else if (eventType === eventTypes.compositionEnd) {
if (currentComposition) {
fallbackData = currentComposition.getData();
}
}
}
var event = SyntheticCompositionEvent.getPooled(
eventType,
topLevelTargetID,
nativeEvent
);
if (fallbackData) {
// Inject data generated from fallback path into the synthetic event.
// This matches the property of native CompositionEventInterface.
event.data = fallbackData;
} else {
var customData = getDataFromCustomEvent(nativeEvent);
if (customData !== null) {
event.data = customData;
}
}
EventPropagators.accumulateTwoPhaseDispatches(event);
return event;
}
/**
* @param {string} topLevelType Record from `EventConstants`.
* @param {object} nativeEvent Native browser event.
* @return {?string} The string corresponding to this `beforeInput` event.
*/
function getNativeBeforeInputChars(topLevelType, nativeEvent) {
switch (topLevelType) {
case topLevelTypes.topCompositionEnd:
return getDataFromCustomEvent(nativeEvent);
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 null;
}
hasSpaceKeypress = true;
return SPACEBAR_CHAR;
case topLevelTypes.topTextInput:
// Record the characters to be added to the DOM.
var 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 null;
}
return chars;
default:
// For other native event types, do nothing.
return null;
}
}
/**
* For browsers that do not provide the `textInput` event, extract the
* appropriate string to use for SyntheticInputEvent.
*
* @param {string} topLevelType Record from `EventConstants`.
* @param {object} nativeEvent Native browser event.
* @return {?string} The fallback string for this `beforeInput` event.
*/
function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
// If we are currently composing (IME) and using a fallback to do so,
// try to extract the composed characters from the fallback object.
if (currentComposition) {
if (
topLevelType === topLevelTypes.topCompositionEnd ||
isFallbackCompositionEnd(topLevelType, nativeEvent)
) {
var chars = currentComposition.getData();
FallbackCompositionState.release(currentComposition);
currentComposition = null;
return chars;
}
return null;
}
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.
return null;
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)) {
return String.fromCharCode(nativeEvent.which);
}
return null;
case topLevelTypes.topCompositionEnd:
return useFallbackCompositionData ? null : nativeEvent.data;
default:
return null;
}
}
/**
* Extract a SyntheticInputEvent for `beforeInput`, based on either native
* `textInput` or fallback behavior.
*
* @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 {?object} A SyntheticInputEvent.
*/
function extractBeforeInputEvent(
topLevelType,
topLevelTarget,
topLevelTargetID,
nativeEvent
) {
var chars;
if (canUseTextInputEvent) {
chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
} else {
chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
}
// If no characters are being inserted, no BeforeInput event should
// be fired.
if (!chars) {
return null;
}
var event = SyntheticInputEvent.getPooled(
eventTypes.beforeInput,
topLevelTargetID,
nativeEvent
);
event.data = chars;
EventPropagators.accumulateTwoPhaseDispatches(event);
return event;
}
/**
* 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.
*
* This plugin is also responsible for emitting `composition` events, thus
* allowing us to share composition fallback code for both `beforeInput` and
* `composition` event types.
*/
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
) {
return [
extractCompositionEvent(
topLevelType,
topLevelTarget,
topLevelTargetID,
nativeEvent
),
extractBeforeInputEvent(
topLevelType,
topLevelTarget,
topLevelTargetID,
nativeEvent
)
];
}
};
module.exports = BeforeInputEventPlugin;
},{"141":141,"15":15,"20":20,"21":21,"22":22,"93":93,"97":97}],4:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 = {
boxFlex: true,
boxFlexGroup: true,
columnCount: true,
flex: true,
flexGrow: true,
flexPositive: true,
flexShrink: true,
flexNegative: true,
fontWeight: true,
lineClamp: true,
lineHeight: true,
opacity: true,
order: true,
orphans: true,
widows: true,
zIndex: true,
zoom: true,
// SVG-related properties
fillOpacity: true,
strokeDashoffset: true,
strokeOpacity: true,
strokeWidth: 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-2015, 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_(4);
var ExecutionEnvironment = _dereq_(21);
var camelizeStyleName = _dereq_(108);
var dangerousStyleValue = _dereq_(113);
var hyphenateStyleName = _dereq_(133);
var memoizeStringOnly = _dereq_(143);
var warning = _dereq_(154);
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") {
// 'msTransform' is correct, but the other prefixes should be capitalized
var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
// style values shouldn't contain a semicolon
var badStyleValueWithSemicolonPattern = /;\s*$/;
var warnedStyleNames = {};
var warnedStyleValues = {};
var warnHyphenatedStyleName = function(name) {
if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
return;
}
warnedStyleNames[name] = true;
("production" !== "development" ? warning(
false,
'Unsupported style property %s. Did you mean %s?',
name,
camelizeStyleName(name)
) : null);
};
var warnBadVendoredStyleName = function(name) {
if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
return;
}
warnedStyleNames[name] = true;
("production" !== "development" ? warning(
false,
'Unsupported vendor-prefixed style property %s. Did you mean %s?',
name,
name.charAt(0).toUpperCase() + name.slice(1)
) : null);
};
var warnStyleValueWithSemicolon = function(name, value) {
if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
return;
}
warnedStyleValues[value] = true;
("production" !== "development" ? warning(
false,
'Style property values shouldn\'t contain a semicolon. ' +
'Try "%s: %s" instead.',
name,
value.replace(badStyleValueWithSemicolonPattern, '')
) : null);
};
/**
* @param {string} name
* @param {*} value
*/
var warnValidStyle = function(name, value) {
if (name.indexOf('-') > -1) {
warnHyphenatedStyleName(name);
} else if (badVendoredStyleNamePattern.test(name)) {
warnBadVendoredStyleName(name);
} else if (badStyleValueWithSemicolonPattern.test(value)) {
warnStyleValueWithSemicolon(name, value);
}
};
}
/**
* 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;
}
var styleValue = styles[styleName];
if ("production" !== "development") {
warnValidStyle(styleName, styleValue);
}
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") {
warnValidStyle(styleName, styles[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;
},{"108":108,"113":113,"133":133,"143":143,"154":154,"21":21,"4":4}],6:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(28);
var assign = _dereq_(27);
var invariant = _dereq_(135);
/**
* 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;
},{"135":135,"27":27,"28":28}],7:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(15);
var EventPluginHub = _dereq_(17);
var EventPropagators = _dereq_(20);
var ExecutionEnvironment = _dereq_(21);
var ReactUpdates = _dereq_(87);
var SyntheticEvent = _dereq_(95);
var isEventSupported = _dereq_(136);
var isTextInputElement = _dereq_(138);
var keyOf = _dereq_(141);
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;
},{"136":136,"138":138,"141":141,"15":15,"17":17,"20":20,"21":21,"87":87,"95":95}],8:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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-2015, 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_(12);
var ReactMultiChildUpdateTypes = _dereq_(72);
var setTextContent = _dereq_(149);
var invariant = _dereq_(135);
/**
* 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
);
}
/**
* Operations for updating with DOM children.
*/
var DOMChildrenOperations = {
dangerouslyReplaceNodeWithMarkup: Danger.dangerouslyReplaceNodeWithMarkup,
updateTextContent: setTextContent,
/**
* 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; i < updates.length; i++) {
update = updates[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; k < updates.length; k++) {
update = updates[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:
setTextContent(
update.parentNode,
update.textContent
);
break;
case ReactMultiChildUpdateTypes.REMOVE_NODE:
// Already removed by the for-loop above.
break;
}
}
}
};
module.exports = DOMChildrenOperations;
},{"12":12,"135":135,"149":149,"72":72}],10:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(135);
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;
},{"135":135}],11:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(10);
var quoteAttributeValueForBrowser = _dereq_(147);
var warning = _dereq_(154);
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);
}
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 %s. Did you mean %s?',
name,
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 DOMProperty.ID_ATTRIBUTE_NAME + '=' +
quoteAttributeValueForBrowser(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 attributeName;
}
return attributeName + '=' + quoteAttributeValueForBrowser(value);
} else if (DOMProperty.isCustomAttribute(name)) {
if (value == null) {
return '';
}
return name + '=' + quoteAttributeValueForBrowser(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;
},{"10":10,"147":147,"154":154}],12:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(21);
var createNodesFromMarkup = _dereq_(112);
var emptyFunction = _dereq_(114);
var getMarkupWrap = _dereq_(127);
var invariant = _dereq_(135);
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.
var resultIndex;
for (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 (var j = 0; j < renderNodes.length; ++j) {
var renderNode = renderNodes[j];
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 React.renderToString().'
) : invariant(oldChild.tagName.toLowerCase() !== 'html'));
var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
oldChild.parentNode.replaceChild(newChild, oldChild);
}
};
module.exports = Danger;
},{"112":112,"114":114,"127":127,"135":135,"21":21}],13:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(141);
/**
* 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({BeforeInputEventPlugin: null}),
keyOf({AnalyticsEventPlugin: null}),
keyOf({MobileSafariClickEventPlugin: null})
];
module.exports = DefaultEventPluginOrder;
},{"141":141}],14:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(15);
var EventPropagators = _dereq_(20);
var SyntheticMouseEvent = _dereq_(99);
var ReactMount = _dereq_(70);
var keyOf = _dereq_(141);
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;
},{"141":141,"15":15,"20":20,"70":70,"99":99}],15:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(140);
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;
},{"140":140}],16:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(114);
/**
* 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;
},{"114":114}],17:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(18);
var EventPluginUtils = _dereq_(19);
var accumulateInto = _dereq_(105);
var forEachAccumulated = _dereq_(120);
var invariant = _dereq_(135);
/**
* 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 valid =
InstanceHandle &&
InstanceHandle.traverseTwoPhase &&
InstanceHandle.traverseEnterLeave;
("production" !== "development" ? invariant(
valid,
'InstanceHandle not injected before use!'
) : invariant(valid));
}
/**
* 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;
},{"105":105,"120":120,"135":135,"18":18,"19":19}],18:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(135);
/**
* 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;
},{"135":135}],19:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(15);
var invariant = _dereq_(135);
/**
* 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, cb) {
forEachEventDispatch(event, cb);
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;
},{"135":135,"15":15}],20:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(15);
var EventPluginHub = _dereq_(17);
var accumulateInto = _dereq_(105);
var forEachAccumulated = _dereq_(120);
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;
},{"105":105,"120":120,"15":15,"17":17}],21:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],22:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 FallbackCompositionState
* @typechecks static-only
*/
'use strict';
var PooledClass = _dereq_(28);
var assign = _dereq_(27);
var getTextContentAccessor = _dereq_(130);
/**
* This helper class stores information about text content of a target node,
* allowing comparison of content before and after a given event.
*
* Identify the node where selection currently begins, then observe
* both its text content and its current position in the DOM. Since the
* browser may natively replace the target node during composition, we can
* use its position to find its replacement.
*
* @param {DOMEventTarget} root
*/
function FallbackCompositionState(root) {
this._root = root;
this._startText = this.getText();
this._fallbackText = null;
}
assign(FallbackCompositionState.prototype, {
/**
* Get current text of input.
*
* @return {string}
*/
getText: function() {
if ('value' in this._root) {
return this._root.value;
}
return this._root[getTextContentAccessor()];
},
/**
* Determine the differing substring between the initially stored
* text content and the current content.
*
* @return {string}
*/
getData: function() {
if (this._fallbackText) {
return this._fallbackText;
}
var start;
var startValue = this._startText;
var startLength = startValue.length;
var end;
var endValue = this.getText();
var endLength = endValue.length;
for (start = 0; start < startLength; start++) {
if (startValue[start] !== endValue[start]) {
break;
}
}
var minEnd = startLength - start;
for (end = 1; end <= minEnd; end++) {
if (startValue[startLength - end] !== endValue[endLength - end]) {
break;
}
}
var sliceTail = end > 1 ? 1 - end : undefined;
this._fallbackText = endValue.slice(start, sliceTail);
return this._fallbackText;
}
});
PooledClass.addPoolingTo(FallbackCompositionState);
module.exports = FallbackCompositionState;
},{"130":130,"27":27,"28":28}],23:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(10);
var ExecutionEnvironment = _dereq_(21);
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,
headers: null,
height: MUST_USE_ATTRIBUTE,
hidden: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
high: null,
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,
low: null,
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: HAS_BOOLEAN_VALUE,
optimum: 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,
scoped: HAS_BOOLEAN_VALUE,
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 and autoCorrect are supported in Mobile Safari for
// keyboard hints.
autoCapitalize: null,
autoCorrect: null,
// itemProp, itemScope, itemType are for
// Microdata support. See http://schema.org/docs/gs.html
itemProp: MUST_USE_ATTRIBUTE,
itemScope: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
itemType: MUST_USE_ATTRIBUTE,
// itemID and itemRef are for Microdata support as well but
// only specified in the the WHATWG spec document. See
// https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api
itemID: MUST_USE_ATTRIBUTE,
itemRef: MUST_USE_ATTRIBUTE,
// property is supported for OpenGraph in meta tags.
property: null,
// IE-only attribute that controls focus behavior
unselectable: MUST_USE_ATTRIBUTE
},
DOMAttributeNames: {
acceptCharset: 'accept-charset',
className: 'class',
htmlFor: 'for',
httpEquiv: 'http-equiv'
},
DOMPropertyNames: {
autoCapitalize: 'autocapitalize',
autoComplete: 'autocomplete',
autoCorrect: 'autocorrect',
autoFocus: 'autofocus',
autoPlay: 'autoplay',
// `encoding` is equivalent to `enctype`, IE8 lacks an `enctype` setter.
// http://www.w3.org/TR/html5/forms.html#dom-fs-encoding
encType: 'encoding',
hrefLang: 'hreflang',
radioGroup: 'radiogroup',
spellCheck: 'spellcheck',
srcDoc: 'srcdoc',
srcSet: 'srcset'
}
};
module.exports = HTMLDOMPropertyConfig;
},{"10":10,"21":21}],24:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(78);
var invariant = _dereq_(135);
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 null;
}
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 null;
}
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;
},{"135":135,"78":78}],25:[function(_dereq_,module,exports){
/**
* Copyright 2014-2015, 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_(30);
var accumulateInto = _dereq_(105);
var forEachAccumulated = _dereq_(120);
var invariant = _dereq_(135);
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()));
// If a component renders to null or if another component fatals and causes
// the state of the tree to be corrupted, `node` here can be null.
var node = this.getDOMNode();
("production" !== "development" ? invariant(
node,
'LocalEventTrapMixin.trapBubbledEvent(...): Requires node to be rendered.'
) : invariant(node));
var listener = ReactBrowserEventEmitter.trapBubbledEvent(
topLevelType,
handlerBaseName,
node
);
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;
},{"105":105,"120":120,"135":135,"30":30}],26:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(15);
var emptyFunction = _dereq_(114);
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;
},{"114":114,"15":15}],27:[function(_dereq_,module,exports){
/**
* Copyright 2014-2015, 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
'use strict';
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-2015, 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_(135);
/**
* 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;
},{"135":135}],29:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 findDOMNode = _dereq_(117);
var ReactBrowserComponentMixin = {
/**
* Returns the DOM node rendered by this component.
*
* @return {DOMElement} The root node of this component.
* @final
* @protected
*/
getDOMNode: function() {
return findDOMNode(this);
}
};
module.exports = ReactBrowserComponentMixin;
},{"117":117}],30:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(15);
var EventPluginHub = _dereq_(17);
var EventPluginRegistry = _dereq_(18);
var ReactEventEmitterMixin = _dereq_(61);
var ViewportMetrics = _dereq_(104);
var assign = _dereq_(27);
var isEventSupported = _dereq_(136);
/**
* 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;
},{"104":104,"136":136,"15":15,"17":17,"18":18,"27":27,"61":61}],31:[function(_dereq_,module,exports){
/**
* Copyright 2014-2015, 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 ReactChildReconciler
* @typechecks static-only
*/
'use strict';
var ReactReconciler = _dereq_(81);
var flattenChildren = _dereq_(118);
var instantiateReactComponent = _dereq_(134);
var shouldUpdateReactComponent = _dereq_(151);
/**
* ReactChildReconciler provides helpers for initializing or updating a set of
* children. Its output is suitable for passing it onto ReactMultiChild which
* does diffed reordering and insertion.
*/
var ReactChildReconciler = {
/**
* 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} nestedChildNodes Nested child maps.
* @return {?object} A set of child instances.
* @internal
*/
instantiateChildren: function(nestedChildNodes, transaction, context) {
var children = flattenChildren(nestedChildNodes);
for (var name in children) {
if (children.hasOwnProperty(name)) {
var child = children[name];
// The rendered children must be turned into instances as they're
// mounted.
var childInstance = instantiateReactComponent(child, null);
children[name] = childInstance;
}
}
return children;
},
/**
* Updates the rendered children and returns a new set of children.
*
* @param {?object} prevChildren Previously initialized set of children.
* @param {?object} nextNestedChildNodes Nested child maps.
* @param {ReactReconcileTransaction} transaction
* @param {object} context
* @return {?object} A new set of child instances.
* @internal
*/
updateChildren: function(
prevChildren,
nextNestedChildNodes,
transaction,
context) {
// We currently don't have a way to track moves here but if we use iterators
// instead of for..in we can zip the iterators and check if an item has
// moved.
// TODO: If nothing has changed, return the prevChildren object so that we
// can quickly bailout if nothing has changed.
var nextChildren = flattenChildren(nextNestedChildNodes);
if (!nextChildren && !prevChildren) {
return null;
}
var name;
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)) {
ReactReconciler.receiveComponent(
prevChild, nextElement, transaction, context
);
nextChildren[name] = prevChild;
} else {
if (prevChild) {
ReactReconciler.unmountComponent(prevChild, name);
}
// The child must be instantiated before it's mounted.
var nextChildInstance = instantiateReactComponent(
nextElement,
null
);
nextChildren[name] = nextChildInstance;
}
}
// Unmount children that are no longer present.
for (name in prevChildren) {
if (prevChildren.hasOwnProperty(name) &&
!(nextChildren && nextChildren.hasOwnProperty(name))) {
ReactReconciler.unmountComponent(prevChildren[name]);
}
}
return nextChildren;
},
/**
* Unmounts all rendered children. This should be used to clean up children
* when this component is unmounted.
*
* @param {?object} renderedChildren Previously initialized set of children.
* @internal
*/
unmountChildren: function(renderedChildren) {
for (var name in renderedChildren) {
var renderedChild = renderedChildren[name];
ReactReconciler.unmountComponent(renderedChild);
}
}
};
module.exports = ReactChildReconciler;
},{"118":118,"134":134,"151":151,"81":81}],32:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(28);
var ReactFragment = _dereq_(63);
var traverseAllChildren = _dereq_(153);
var warning = _dereq_(154);
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);
if ("production" !== "development") {
("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 ReactFragment.create(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;
},{"153":153,"154":154,"28":28,"63":63}],33:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 ReactClass
*/
'use strict';
var ReactComponent = _dereq_(34);
var ReactCurrentOwner = _dereq_(39);
var ReactElement = _dereq_(57);
var ReactErrorUtils = _dereq_(60);
var ReactInstanceMap = _dereq_(67);
var ReactLifeCycle = _dereq_(68);
var ReactPropTypeLocations = _dereq_(77);
var ReactPropTypeLocationNames = _dereq_(76);
var ReactUpdateQueue = _dereq_(86);
var assign = _dereq_(27);
var invariant = _dereq_(135);
var keyMirror = _dereq_(140);
var keyOf = _dereq_(141);
var warning = _dereq_(154);
var MIXINS_KEY = keyOf({mixins: null});
/**
* Policies that describe methods in `ReactClassInterface`.
*/
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 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 `ReactClass`, 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 `ReactClassInterface` for
* more the comprehensive protocol. Any other properties and methods in the
* class specification will available on the prototype.
*
* @interface ReactClassInterface
* @internal
*/
var ReactClassInterface = {
/**
* 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) {
if ("production" !== "development") {
validateTypeDef(
Constructor,
childContextTypes,
ReactPropTypeLocations.childContext
);
}
Constructor.childContextTypes = assign(
{},
Constructor.childContextTypes,
childContextTypes
);
},
contextTypes: function(Constructor, contextTypes) {
if ("production" !== "development") {
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) {
if ("production" !== "development") {
validateTypeDef(
Constructor,
propTypes,
ReactPropTypeLocations.prop
);
}
Constructor.propTypes = assign(
{},
Constructor.propTypes,
propTypes
);
},
statics: function(Constructor, statics) {
mixStaticSpecIntoComponent(Constructor, statics);
}
};
function validateTypeDef(Constructor, typeDef, location) {
for (var propName in typeDef) {
if (typeDef.hasOwnProperty(propName)) {
// use a warning instead of an invariant so components
// don't show up in prod but not in __DEV__
("production" !== "development" ? warning(
typeof typeDef[propName] === 'function',
'%s: %s type `%s` is invalid; it must be a function, usually from ' +
'React.PropTypes.',
Constructor.displayName || 'ReactClass',
ReactPropTypeLocationNames[location],
propName
) : null);
}
}
}
function validateMethodOverride(proto, name) {
var specPolicy = ReactClassInterface.hasOwnProperty(name) ?
ReactClassInterface[name] :
null;
// Disallow overriding of base class methods unless explicitly allowed.
if (ReactClassMixin.hasOwnProperty(name)) {
("production" !== "development" ? invariant(
specPolicy === SpecPolicy.OVERRIDE_BASE,
'ReactClassInterface: 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,
'ReactClassInterface: 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));
}
}
/**
* Mixin helper which handles policy validation and reserved
* specification keys when building React classses.
*/
function mixSpecIntoComponent(Constructor, spec) {
if (!spec) {
return;
}
("production" !== "development" ? invariant(
typeof spec !== 'function',
'ReactClass: You\'re attempting to ' +
'use a component class as a mixin. Instead, just use a regular object.'
) : invariant(typeof spec !== 'function'));
("production" !== "development" ? invariant(
!ReactElement.isValidElement(spec),
'ReactClass: 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 ReactClass methods (in the "interface").
// 2. Overridden methods (that were mixed in).
var isReactClassMethod =
ReactClassInterface.hasOwnProperty(name);
var isAlreadyDefined = proto.hasOwnProperty(name);
var markedDontBind = property && property.__reactDontBind;
var isFunction = typeof property === 'function';
var shouldAutoBind =
isFunction &&
!isReactClassMethod &&
!isAlreadyDefined &&
!markedDontBind;
if (shouldAutoBind) {
if (!proto.__reactAutoBindMap) {
proto.__reactAutoBindMap = {};
}
proto.__reactAutoBindMap[name] = property;
proto[name] = property;
} else {
if (isAlreadyDefined) {
var specPolicy = ReactClassInterface[name];
// These cases should already be caught by validateMethodOverride
("production" !== "development" ? invariant(
isReactClassMethod && (
(specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY)
),
'ReactClass: Unexpected spec policy %s for key %s ' +
'when mixing in component specs.',
specPolicy,
name
) : invariant(isReactClassMethod && (
(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,
'ReactClass: 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,
'ReactClass: 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 mergeIntoWithNoDuplicateKeys(one, two) {
("production" !== "development" ? invariant(
one && two && typeof one === 'object' && typeof two === 'object',
'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'
) : invariant(one && two && typeof one === 'object' && typeof two === 'object'));
for (var key in two) {
if (two.hasOwnProperty(key)) {
("production" !== "development" ? invariant(
one[key] === undefined,
'mergeIntoWithNoDuplicateKeys(): ' +
'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] = two[key];
}
}
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;
}
var c = {};
mergeIntoWithNoDuplicateKeys(c, a);
mergeIntoWithNoDuplicateKeys(c, b);
return c;
};
}
/**
* 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);
};
}
/**
* Binds a method to the component.
*
* @param {object} component Component whose method is going to be bound.
* @param {function} method Method to be bound.
* @return {function} The bound method.
*/
function bindAutoBindMethod(component, method) {
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;
/* eslint-disable block-scoped-var, no-undef */
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) {
("production" !== "development" ? warning(
false,
'bind(): React component methods may only be bound to the ' +
'component instance. See %s',
componentName
) : null);
} else if (!args.length) {
("production" !== "development" ? warning(
false,
'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 %s',
componentName
) : null);
return boundMethod;
}
var reboundMethod = _bind.apply(boundMethod, arguments);
reboundMethod.__reactBoundContext = component;
reboundMethod.__reactBoundMethod = method;
reboundMethod.__reactBoundArguments = args;
return reboundMethod;
/* eslint-enable */
};
}
return boundMethod;
}
/**
* Binds all auto-bound methods in a component.
*
* @param {object} component Component whose method is going to be bound.
*/
function bindAutoBindMethods(component) {
for (var autoBindKey in component.__reactAutoBindMap) {
if (component.__reactAutoBindMap.hasOwnProperty(autoBindKey)) {
var method = component.__reactAutoBindMap[autoBindKey];
component[autoBindKey] = bindAutoBindMethod(
component,
ReactErrorUtils.guard(
method,
component.constructor.displayName + '.' + autoBindKey
)
);
}
}
}
var typeDeprecationDescriptor = {
enumerable: false,
get: function() {
var displayName = this.displayName || this.name || 'Component';
("production" !== "development" ? warning(
false,
'%s.type is deprecated. Use %s directly to access the class.',
displayName,
displayName
) : null);
Object.defineProperty(this, 'type', {
value: this
});
return this;
}
};
/**
* Add more to the ReactClass base class. These are all legacy features and
* therefore not already part of the modern ReactComponent.
*/
var ReactClassMixin = {
/**
* TODO: This will be deprecated because state should always keep a consistent
* type signature and the only use case for this, is to avoid that.
*/
replaceState: function(newState, callback) {
ReactUpdateQueue.enqueueReplaceState(this, newState);
if (callback) {
ReactUpdateQueue.enqueueCallback(this, callback);
}
},
/**
* Checks whether or not this composite component is mounted.
* @return {boolean} True if mounted, false otherwise.
* @protected
* @final
*/
isMounted: function() {
if ("production" !== "development") {
var owner = ReactCurrentOwner.current;
if (owner !== null) {
("production" !== "development" ? warning(
owner._warnedAboutRefsInRender,
'%s is accessing isMounted inside its render() function. ' +
'render() should be a pure function of props and state. It should ' +
'never access something that requires stale data from the previous ' +
'render, such as refs. Move this logic to componentDidMount and ' +
'componentDidUpdate instead.',
owner.getName() || 'A component'
) : null);
owner._warnedAboutRefsInRender = true;
}
}
var internalInstance = ReactInstanceMap.get(this);
return (
internalInstance &&
internalInstance !== ReactLifeCycle.currentlyMountingInstance
);
},
/**
* Sets a subset of the props.
*
* @param {object} partialProps Subset of the next props.
* @param {?function} callback Called after props are updated.
* @final
* @public
* @deprecated
*/
setProps: function(partialProps, callback) {
ReactUpdateQueue.enqueueSetProps(this, partialProps);
if (callback) {
ReactUpdateQueue.enqueueCallback(this, callback);
}
},
/**
* Replace all the props.
*
* @param {object} newProps Subset of the next props.
* @param {?function} callback Called after props are updated.
* @final
* @public
* @deprecated
*/
replaceProps: function(newProps, callback) {
ReactUpdateQueue.enqueueReplaceProps(this, newProps);
if (callback) {
ReactUpdateQueue.enqueueCallback(this, callback);
}
}
};
var ReactClassComponent = function() {};
assign(
ReactClassComponent.prototype,
ReactComponent.prototype,
ReactClassMixin
);
/**
* Module for creating composite components.
*
* @class ReactClass
*/
var ReactClass = {
/**
* 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, context) {
// This constructor is overridden by mocks. The argument is used
// by mocks to assert on what gets mounted.
if ("production" !== "development") {
("production" !== "development" ? warning(
this instanceof Constructor,
'Something is calling a React component directly. Use a factory or ' +
'JSX instead. See: https://fb.me/react-legacyfactory'
) : null);
}
// Wire up auto-binding
if (this.__reactAutoBindMap) {
bindAutoBindMethods(this);
}
this.props = props;
this.context = context;
this.state = null;
// ReactClasses doesn't have constructors. Instead, they use the
// getInitialState and componentWillMount methods for initialization.
var initialState = this.getInitialState ? this.getInitialState() : null;
if ("production" !== "development") {
// We allow auto-mocks to proceed as if they're returning null.
if (typeof initialState === 'undefined' &&
this.getInitialState._isMockFunction) {
// This is probably bad practice. Consider warning here and
// deprecating this convenience.
initialState = null;
}
}
("production" !== "development" ? invariant(
typeof initialState === 'object' && !Array.isArray(initialState),
'%s.getInitialState(): must return an object or null',
Constructor.displayName || 'ReactCompositeComponent'
) : invariant(typeof initialState === 'object' && !Array.isArray(initialState)));
this.state = initialState;
};
Constructor.prototype = new ReactClassComponent();
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();
}
if ("production" !== "development") {
// This is a tag to indicate that the use of these method names is ok,
// since it's used with createClass. If it's not, then it's likely a
// mistake so we'll warn you to use the static property, property
// initializer or constructor respectively.
if (Constructor.getDefaultProps) {
Constructor.getDefaultProps.isReactClassApproved = {};
}
if (Constructor.prototype.getInitialState) {
Constructor.prototype.getInitialState.isReactClassApproved = {};
}
}
("production" !== "development" ? invariant(
Constructor.prototype.render,
'createClass(...): Class specification must implement a `render` method.'
) : invariant(Constructor.prototype.render));
if ("production" !== "development") {
("production" !== "development" ? warning(
!Constructor.prototype.componentShouldUpdate,
'%s 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.',
spec.displayName || 'A component'
) : null);
}
// Reduce time spent doing lookups by setting these on the prototype.
for (var methodName in ReactClassInterface) {
if (!Constructor.prototype[methodName]) {
Constructor.prototype[methodName] = null;
}
}
// Legacy hook
Constructor.type = Constructor;
if ("production" !== "development") {
try {
Object.defineProperty(Constructor, 'type', typeDeprecationDescriptor);
} catch (x) {
// IE will fail on defineProperty (es5-shim/sham too)
}
}
return Constructor;
},
injection: {
injectMixin: function(mixin) {
injectedMixins.push(mixin);
}
}
};
module.exports = ReactClass;
},{"135":135,"140":140,"141":141,"154":154,"27":27,"34":34,"39":39,"57":57,"60":60,"67":67,"68":68,"76":76,"77":77,"86":86}],34:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 ReactUpdateQueue = _dereq_(86);
var invariant = _dereq_(135);
var warning = _dereq_(154);
/**
* Base class helpers for the updating state of a component.
*/
function ReactComponent(props, context) {
this.props = props;
this.context = context;
}
/**
* Sets a subset of the state. Always use this 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.
*
* When a function is provided to setState, it will be called at some point in
* the future (not synchronously). It will be called with the up to date
* component arguments (state, props, context). These values can be different
* from this.* because your function may be called after receiveProps but before
* shouldComponentUpdate, and this new state, props, and context will not yet be
* assigned to this.
*
* @param {object|function} partialState Next partial state or function to
* produce next partial state to be merged with current state.
* @param {?function} callback Called after state is updated.
* @final
* @protected
*/
ReactComponent.prototype.setState = function(partialState, callback) {
("production" !== "development" ? invariant(
typeof partialState === 'object' ||
typeof partialState === 'function' ||
partialState == null,
'setState(...): takes an object of state variables to update or a ' +
'function which returns an object of state variables.'
) : invariant(typeof partialState === 'object' ||
typeof partialState === 'function' ||
partialState == null));
if ("production" !== "development") {
("production" !== "development" ? warning(
partialState != null,
'setState(...): You passed an undefined or null state object; ' +
'instead, use forceUpdate().'
) : null);
}
ReactUpdateQueue.enqueueSetState(this, partialState);
if (callback) {
ReactUpdateQueue.enqueueCallback(this, callback);
}
};
/**
* 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 `shouldComponentUpdate`, but it will invoke
* `componentWillUpdate` and `componentDidUpdate`.
*
* @param {?function} callback Called after update is complete.
* @final
* @protected
*/
ReactComponent.prototype.forceUpdate = function(callback) {
ReactUpdateQueue.enqueueForceUpdate(this);
if (callback) {
ReactUpdateQueue.enqueueCallback(this, callback);
}
};
/**
* Deprecated APIs. These APIs used to exist on classic React classes but since
* we would like to deprecate them, we're not going to move them over to this
* modern base class. Instead, we define a getter that warns if it's accessed.
*/
if ("production" !== "development") {
var deprecatedAPIs = {
getDOMNode: [
'getDOMNode',
'Use React.findDOMNode(component) instead.'
],
isMounted: [
'isMounted',
'Instead, make sure to clean up subscriptions and pending requests in ' +
'componentWillUnmount to prevent memory leaks.'
],
replaceProps: [
'replaceProps',
'Instead call React.render again at the top level.'
],
replaceState: [
'replaceState',
'Refactor your code to use setState instead (see ' +
'https://github.com/facebook/react/issues/3236).'
],
setProps: [
'setProps',
'Instead call React.render again at the top level.'
]
};
var defineDeprecationWarning = function(methodName, info) {
try {
Object.defineProperty(ReactComponent.prototype, methodName, {
get: function() {
("production" !== "development" ? warning(
false,
'%s(...) is deprecated in plain JavaScript React classes. %s',
info[0],
info[1]
) : null);
return undefined;
}
});
} catch (x) {
// IE will fail on defineProperty (es5-shim/sham too)
}
};
for (var fnName in deprecatedAPIs) {
if (deprecatedAPIs.hasOwnProperty(fnName)) {
defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
}
}
}
module.exports = ReactComponent;
},{"135":135,"154":154,"86":86}],35:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(44);
var ReactMount = _dereq_(70);
/**
* Abstracts away all functionality of the reconciler that requires knowledge of
* the browser context. TODO: These callers should be refactored to avoid the
* need for this injection.
*/
var ReactComponentBrowserEnvironment = {
processChildrenUpdates:
ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,
replaceNodeWithMarkupByID:
ReactDOMIDOperations.dangerouslyReplaceNodeWithMarkupByID,
/**
* 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);
}
};
module.exports = ReactComponentBrowserEnvironment;
},{"44":44,"70":70}],36:[function(_dereq_,module,exports){
/**
* Copyright 2014-2015, 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 ReactComponentEnvironment
*/
'use strict';
var invariant = _dereq_(135);
var injected = false;
var ReactComponentEnvironment = {
/**
* 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.
*/
unmountIDFromEnvironment: null,
/**
* Optionally injectable hook for swapping out mount images in the middle of
* the tree.
*/
replaceNodeWithMarkupByID: null,
/**
* Optionally injectable hook for processing a queue of child updates. Will
* later move into MultiChildComponents.
*/
processChildrenUpdates: null,
injection: {
injectEnvironment: function(environment) {
("production" !== "development" ? invariant(
!injected,
'ReactCompositeComponent: injectEnvironment() can only be called once.'
) : invariant(!injected));
ReactComponentEnvironment.unmountIDFromEnvironment =
environment.unmountIDFromEnvironment;
ReactComponentEnvironment.replaceNodeWithMarkupByID =
environment.replaceNodeWithMarkupByID;
ReactComponentEnvironment.processChildrenUpdates =
environment.processChildrenUpdates;
injected = true;
}
}
};
module.exports = ReactComponentEnvironment;
},{"135":135}],37:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 ReactComponentEnvironment = _dereq_(36);
var ReactContext = _dereq_(38);
var ReactCurrentOwner = _dereq_(39);
var ReactElement = _dereq_(57);
var ReactElementValidator = _dereq_(58);
var ReactInstanceMap = _dereq_(67);
var ReactLifeCycle = _dereq_(68);
var ReactNativeComponent = _dereq_(73);
var ReactPerf = _dereq_(75);
var ReactPropTypeLocations = _dereq_(77);
var ReactPropTypeLocationNames = _dereq_(76);
var ReactReconciler = _dereq_(81);
var ReactUpdates = _dereq_(87);
var assign = _dereq_(27);
var emptyObject = _dereq_(115);
var invariant = _dereq_(135);
var shouldUpdateReactComponent = _dereq_(151);
var warning = _dereq_(154);
function getDeclarationErrorAddendum(component) {
var owner = component._currentElement._owner || null;
if (owner) {
var name = owner.getName();
if (name) {
return ' Check the render method of `' + name + '`.';
}
}
return '';
}
/**
* ------------------ The Life-Cycle of a Composite Component ------------------
*
* - constructor: Initialization of state. The instance is now retained.
* - componentWillMount
* - render
* - [children's constructors]
* - [children's componentWillMount and render]
* - [children's componentDidMount]
* - componentDidMount
*
* Update Phases:
* - componentWillReceiveProps (only called if parent updated)
* - shouldComponentUpdate
* - componentWillUpdate
* - render
* - [children's constructors or receive props phases]
* - componentDidUpdate
*
* - componentWillUnmount
* - [children's componentWillUnmount]
* - [children destroyed]
* - (destroyed): The instance is now blank, released by React and ready for GC.
*
* -----------------------------------------------------------------------------
*/
/**
* An incrementing ID assigned to each component when it is mounted. This is
* used to enforce the order in which `ReactUpdates` updates dirty components.
*
* @private
*/
var nextMountID = 1;
/**
* @lends {ReactCompositeComponent.prototype}
*/
var ReactCompositeComponentMixin = {
/**
* Base constructor for all composite component.
*
* @param {ReactElement} element
* @final
* @internal
*/
construct: function(element) {
this._currentElement = element;
this._rootNodeID = null;
this._instance = null;
// See ReactUpdateQueue
this._pendingElement = null;
this._pendingStateQueue = null;
this._pendingReplaceState = false;
this._pendingForceUpdate = false;
this._renderedComponent = null;
this._context = null;
this._mountOrder = 0;
this._isTopLevel = false;
// See ReactUpdates and ReactUpdateQueue.
this._pendingCallbacks = null;
},
/**
* Initializes the component, renders markup, and registers event listeners.
*
* @param {string} rootID DOM ID of the root node.
* @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
* @return {?string} Rendered markup to be inserted into the DOM.
* @final
* @internal
*/
mountComponent: function(rootID, transaction, context) {
this._context = context;
this._mountOrder = nextMountID++;
this._rootNodeID = rootID;
var publicProps = this._processProps(this._currentElement.props);
var publicContext = this._processContext(this._currentElement._context);
var Component = ReactNativeComponent.getComponentClassForElement(
this._currentElement
);
// Initialize the public class
var inst = new Component(publicProps, publicContext);
if ("production" !== "development") {
// This will throw later in _renderValidatedComponent, but add an early
// warning now to help debugging
("production" !== "development" ? warning(
inst.render != null,
'%s(...): No `render` method found on the returned component ' +
'instance: you may have forgotten to define `render` in your ' +
'component or you may have accidentally tried to render an element ' +
'whose type is a function that isn\'t a React component.',
Component.displayName || Component.name || 'Component'
) : null);
}
// These should be set up in the constructor, but as a convenience for
// simpler class abstractions, we set them up after the fact.
inst.props = publicProps;
inst.context = publicContext;
inst.refs = emptyObject;
this._instance = inst;
// Store a reference from the instance back to the internal representation
ReactInstanceMap.set(inst, this);
if ("production" !== "development") {
this._warnIfContextsDiffer(this._currentElement._context, context);
}
if ("production" !== "development") {
// Since plain JS classes are defined without any special initialization
// logic, we can not catch common errors early. Therefore, we have to
// catch them here, at initialization time, instead.
("production" !== "development" ? warning(
!inst.getInitialState ||
inst.getInitialState.isReactClassApproved,
'getInitialState was defined on %s, a plain JavaScript class. ' +
'This is only supported for classes created using React.createClass. ' +
'Did you mean to define a state property instead?',
this.getName() || 'a component'
) : null);
("production" !== "development" ? warning(
!inst.getDefaultProps ||
inst.getDefaultProps.isReactClassApproved,
'getDefaultProps was defined on %s, a plain JavaScript class. ' +
'This is only supported for classes created using React.createClass. ' +
'Use a static property to define defaultProps instead.',
this.getName() || 'a component'
) : null);
("production" !== "development" ? warning(
!inst.propTypes,
'propTypes was defined as an instance property on %s. Use a static ' +
'property to define propTypes instead.',
this.getName() || 'a component'
) : null);
("production" !== "development" ? warning(
!inst.contextTypes,
'contextTypes was defined as an instance property on %s. Use a ' +
'static property to define contextTypes instead.',
this.getName() || 'a component'
) : null);
("production" !== "development" ? warning(
typeof inst.componentShouldUpdate !== 'function',
'%s 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.',
(this.getName() || 'A component')
) : null);
}
var initialState = inst.state;
if (initialState === undefined) {
inst.state = initialState = null;
}
("production" !== "development" ? invariant(
typeof initialState === 'object' && !Array.isArray(initialState),
'%s.state: must be set to an object or null',
this.getName() || 'ReactCompositeComponent'
) : invariant(typeof initialState === 'object' && !Array.isArray(initialState)));
this._pendingStateQueue = null;
this._pendingReplaceState = false;
this._pendingForceUpdate = false;
var childContext;
var renderedElement;
var previouslyMounting = ReactLifeCycle.currentlyMountingInstance;
ReactLifeCycle.currentlyMountingInstance = this;
try {
if (inst.componentWillMount) {
inst.componentWillMount();
// When mounting, calls to `setState` by `componentWillMount` will set
// `this._pendingStateQueue` without triggering a re-render.
if (this._pendingStateQueue) {
inst.state = this._processPendingState(inst.props, inst.context);
}
}
childContext = this._getValidatedChildContext(context);
renderedElement = this._renderValidatedComponent(childContext);
} finally {
ReactLifeCycle.currentlyMountingInstance = previouslyMounting;
}
this._renderedComponent = this._instantiateReactComponent(
renderedElement,
this._currentElement.type // The wrapping type
);
var markup = ReactReconciler.mountComponent(
this._renderedComponent,
rootID,
transaction,
this._mergeChildContext(context, childContext)
);
if (inst.componentDidMount) {
transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);
}
return markup;
},
/**
* Releases any resources allocated by `mountComponent`.
*
* @final
* @internal
*/
unmountComponent: function() {
var inst = this._instance;
if (inst.componentWillUnmount) {
var previouslyUnmounting = ReactLifeCycle.currentlyUnmountingInstance;
ReactLifeCycle.currentlyUnmountingInstance = this;
try {
inst.componentWillUnmount();
} finally {
ReactLifeCycle.currentlyUnmountingInstance = previouslyUnmounting;
}
}
ReactReconciler.unmountComponent(this._renderedComponent);
this._renderedComponent = null;
// Reset pending fields
this._pendingStateQueue = null;
this._pendingReplaceState = false;
this._pendingForceUpdate = false;
this._pendingCallbacks = null;
this._pendingElement = null;
// These fields do not really need to be reset since this object is no
// longer accessible.
this._context = null;
this._rootNodeID = null;
// Delete the reference from the instance to this internal representation
// which allow the internals to be properly cleaned up even if the user
// leaks a reference to the public instance.
ReactInstanceMap.remove(inst);
// Some existing components rely on inst.props even after they've been
// destroyed (in event handlers).
// TODO: inst.props = null;
// TODO: inst.state = null;
// TODO: inst.context = null;
},
/**
* 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 an 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);
},
/**
* Filters the context object to only contain keys specified in
* `contextTypes`
*
* @param {object} context
* @return {?object}
* @private
*/
_maskContext: function(context) {
var maskedContext = null;
// This really should be getting the component class for the element,
// but we know that we're not going to need it for built-ins.
if (typeof this._currentElement.type === 'string') {
return emptyObject;
}
var contextTypes = this._currentElement.type.contextTypes;
if (!contextTypes) {
return emptyObject;
}
maskedContext = {};
for (var contextName in contextTypes) {
maskedContext[contextName] = context[contextName];
}
return maskedContext;
},
/**
* 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 = this._maskContext(context);
if ("production" !== "development") {
var Component = ReactNativeComponent.getComponentClassForElement(
this._currentElement
);
if (Component.contextTypes) {
this._checkPropTypes(
Component.contextTypes,
maskedContext,
ReactPropTypeLocations.context
);
}
}
return maskedContext;
},
/**
* @param {object} currentContext
* @return {object}
* @private
*/
_getValidatedChildContext: function(currentContext) {
var inst = this._instance;
var childContext = inst.getChildContext && inst.getChildContext();
if (childContext) {
("production" !== "development" ? invariant(
typeof inst.constructor.childContextTypes === 'object',
'%s.getChildContext(): childContextTypes must be defined in order to ' +
'use getChildContext().',
this.getName() || 'ReactCompositeComponent'
) : invariant(typeof inst.constructor.childContextTypes === 'object'));
if ("production" !== "development") {
this._checkPropTypes(
inst.constructor.childContextTypes,
childContext,
ReactPropTypeLocations.childContext
);
}
for (var name in childContext) {
("production" !== "development" ? invariant(
name in inst.constructor.childContextTypes,
'%s.getChildContext(): key "%s" is not defined in childContextTypes.',
this.getName() || 'ReactCompositeComponent',
name
) : invariant(name in inst.constructor.childContextTypes));
}
return childContext;
}
return null;
},
_mergeChildContext: function(currentContext, childContext) {
if (childContext) {
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 Component = ReactNativeComponent.getComponentClassForElement(
this._currentElement
);
if (Component.propTypes) {
this._checkPropTypes(
Component.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.getName();
for (var propName in propTypes) {
if (propTypes.hasOwnProperty(propName)) {
var error;
try {
// This is intentionally an invariant that gets caught. It's the same
// behavior as without this statement except with a better message.
("production" !== "development" ? invariant(
typeof propTypes[propName] === 'function',
'%s: %s type `%s` is invalid; it must be a function, usually ' +
'from React.PropTypes.',
componentName || 'React class',
ReactPropTypeLocationNames[location],
propName
) : invariant(typeof propTypes[propName] === 'function'));
error = propTypes[propName](props, propName, componentName, location);
} catch (ex) {
error = ex;
}
if (error instanceof Error) {
// We may want to extend this logic for similar errors in
// React.render calls, so I'm abstracting it away into
// a function to minimize refactoring in the future
var addendum = getDeclarationErrorAddendum(this);
if (location === ReactPropTypeLocations.prop) {
// Preface gives us something to blacklist in warning module
("production" !== "development" ? warning(
false,
'Failed Composite propType: %s%s',
error.message,
addendum
) : null);
} else {
("production" !== "development" ? warning(
false,
'Failed Context Types: %s%s',
error.message,
addendum
) : null);
}
}
}
}
},
receiveComponent: function(nextElement, transaction, nextContext) {
var prevElement = this._currentElement;
var prevContext = this._context;
this._pendingElement = null;
this.updateComponent(
transaction,
prevElement,
nextElement,
prevContext,
nextContext
);
},
/**
* If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate`
* is set, update the component.
*
* @param {ReactReconcileTransaction} transaction
* @internal
*/
performUpdateIfNecessary: function(transaction) {
if (this._pendingElement != null) {
ReactReconciler.receiveComponent(
this,
this._pendingElement || this._currentElement,
transaction,
this._context
);
}
if (this._pendingStateQueue !== null || this._pendingForceUpdate) {
if ("production" !== "development") {
ReactElementValidator.checkAndWarnForMutatedProps(
this._currentElement
);
}
this.updateComponent(
transaction,
this._currentElement,
this._currentElement,
this._context,
this._context
);
}
},
/**
* Compare two contexts, warning if they are different
* TODO: Remove this check when owner-context is removed
*/
_warnIfContextsDiffer: function(ownerBasedContext, parentBasedContext) {
ownerBasedContext = this._maskContext(ownerBasedContext);
parentBasedContext = this._maskContext(parentBasedContext);
var parentKeys = Object.keys(parentBasedContext).sort();
var displayName = this.getName() || 'ReactCompositeComponent';
for (var i = 0; i < parentKeys.length; i++) {
var key = parentKeys[i];
("production" !== "development" ? warning(
ownerBasedContext[key] === parentBasedContext[key],
'owner-based and parent-based contexts differ ' +
'(values: `%s` vs `%s`) for key (%s) while mounting %s ' +
'(see: http://fb.me/react-context-by-parent)',
ownerBasedContext[key],
parentBasedContext[key],
key,
displayName
) : null);
}
},
/**
* Perform an update to a mounted component. The componentWillReceiveProps and
* shouldComponentUpdate methods are called, then (assuming the update isn't
* skipped) the remaining update lifecycle methods are called and the DOM
* representation is updated.
*
* By default, this implements React's rendering and reconciliation algorithm.
* Sophisticated clients may wish to override this.
*
* @param {ReactReconcileTransaction} transaction
* @param {ReactElement} prevParentElement
* @param {ReactElement} nextParentElement
* @internal
* @overridable
*/
updateComponent: function(
transaction,
prevParentElement,
nextParentElement,
prevUnmaskedContext,
nextUnmaskedContext
) {
var inst = this._instance;
var nextContext = inst.context;
var nextProps = inst.props;
// Distinguish between a props update versus a simple state update
if (prevParentElement !== nextParentElement) {
nextContext = this._processContext(nextParentElement._context);
nextProps = this._processProps(nextParentElement.props);
if ("production" !== "development") {
if (nextUnmaskedContext != null) {
this._warnIfContextsDiffer(
nextParentElement._context,
nextUnmaskedContext
);
}
}
// An update here will schedule an update but immediately set
// _pendingStateQueue which will ensure that any state updates gets
// immediately reconciled instead of waiting for the next batch.
if (inst.componentWillReceiveProps) {
inst.componentWillReceiveProps(nextProps, nextContext);
}
}
var nextState = this._processPendingState(nextProps, nextContext);
var shouldUpdate =
this._pendingForceUpdate ||
!inst.shouldComponentUpdate ||
inst.shouldComponentUpdate(nextProps, nextState, nextContext);
if ("production" !== "development") {
("production" !== "development" ? warning(
typeof shouldUpdate !== 'undefined',
'%s.shouldComponentUpdate(): Returned undefined instead of a ' +
'boolean value. Make sure to return true or false.',
this.getName() || 'ReactCompositeComponent'
) : null);
}
if (shouldUpdate) {
this._pendingForceUpdate = false;
// Will set `this.props`, `this.state` and `this.context`.
this._performComponentUpdate(
nextParentElement,
nextProps,
nextState,
nextContext,
transaction,
nextUnmaskedContext
);
} else {
// If it's determined that a component should not update, we still want
// to set props and state but we shortcut the rest of the update.
this._currentElement = nextParentElement;
this._context = nextUnmaskedContext;
inst.props = nextProps;
inst.state = nextState;
inst.context = nextContext;
}
},
_processPendingState: function(props, context) {
var inst = this._instance;
var queue = this._pendingStateQueue;
var replace = this._pendingReplaceState;
this._pendingReplaceState = false;
this._pendingStateQueue = null;
if (!queue) {
return inst.state;
}
if (replace && queue.length === 1) {
return queue[0];
}
var nextState = assign({}, replace ? queue[0] : inst.state);
for (var i = replace ? 1 : 0; i < queue.length; i++) {
var partial = queue[i];
assign(
nextState,
typeof partial === 'function' ?
partial.call(inst, nextState, props, context) :
partial
);
}
return nextState;
},
/**
* 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
* @param {?object} unmaskedContext
* @private
*/
_performComponentUpdate: function(
nextElement,
nextProps,
nextState,
nextContext,
transaction,
unmaskedContext
) {
var inst = this._instance;
var prevProps = inst.props;
var prevState = inst.state;
var prevContext = inst.context;
if (inst.componentWillUpdate) {
inst.componentWillUpdate(nextProps, nextState, nextContext);
}
this._currentElement = nextElement;
this._context = unmaskedContext;
inst.props = nextProps;
inst.state = nextState;
inst.context = nextContext;
this._updateRenderedComponent(transaction, unmaskedContext);
if (inst.componentDidUpdate) {
transaction.getReactMountReady().enqueue(
inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext),
inst
);
}
},
/**
* Call the component's `render` method and update the DOM accordingly.
*
* @param {ReactReconcileTransaction} transaction
* @internal
*/
_updateRenderedComponent: function(transaction, context) {
var prevComponentInstance = this._renderedComponent;
var prevRenderedElement = prevComponentInstance._currentElement;
var childContext = this._getValidatedChildContext();
var nextRenderedElement = this._renderValidatedComponent(childContext);
if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {
ReactReconciler.receiveComponent(
prevComponentInstance,
nextRenderedElement,
transaction,
this._mergeChildContext(context, childContext)
);
} else {
// These two IDs are actually the same! But nothing should rely on that.
var thisID = this._rootNodeID;
var prevComponentID = prevComponentInstance._rootNodeID;
ReactReconciler.unmountComponent(prevComponentInstance);
this._renderedComponent = this._instantiateReactComponent(
nextRenderedElement,
this._currentElement.type
);
var nextMarkup = ReactReconciler.mountComponent(
this._renderedComponent,
thisID,
transaction,
this._mergeChildContext(context, childContext)
);
this._replaceNodeWithMarkupByID(prevComponentID, nextMarkup);
}
},
/**
* @protected
*/
_replaceNodeWithMarkupByID: function(prevComponentID, nextMarkup) {
ReactComponentEnvironment.replaceNodeWithMarkupByID(
prevComponentID,
nextMarkup
);
},
/**
* @protected
*/
_renderValidatedComponentWithoutOwnerOrContext: function() {
var inst = this._instance;
var renderedComponent = inst.render();
if ("production" !== "development") {
// We allow auto-mocks to proceed as if they're returning null.
if (typeof renderedComponent === 'undefined' &&
inst.render._isMockFunction) {
// This is probably bad practice. Consider warning here and
// deprecating this convenience.
renderedComponent = null;
}
}
return renderedComponent;
},
/**
* @private
*/
_renderValidatedComponent: function(childContext) {
var renderedComponent;
var previousContext = ReactContext.current;
ReactContext.current = this._mergeChildContext(
this._currentElement._context,
childContext
);
ReactCurrentOwner.current = this;
try {
renderedComponent =
this._renderValidatedComponentWithoutOwnerOrContext();
} finally {
ReactContext.current = previousContext;
ReactCurrentOwner.current = null;
}
("production" !== "development" ? invariant(
// TODO: An `isValidNode` function would probably be more appropriate
renderedComponent === null || renderedComponent === false ||
ReactElement.isValidElement(renderedComponent),
'%s.render(): A valid ReactComponent must be returned. You may have ' +
'returned undefined, an array or some other invalid object.',
this.getName() || 'ReactCompositeComponent'
) : invariant(// TODO: An `isValidNode` function would probably be more appropriate
renderedComponent === null || renderedComponent === false ||
ReactElement.isValidElement(renderedComponent)));
return renderedComponent;
},
/**
* 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) {
var inst = this.getPublicInstance();
var refs = inst.refs === emptyObject ? (inst.refs = {}) : inst.refs;
refs[ref] = component.getPublicInstance();
},
/**
* Detaches a reference name.
*
* @param {string} ref Name to dereference.
* @final
* @private
*/
detachRef: function(ref) {
var refs = this.getPublicInstance().refs;
delete refs[ref];
},
/**
* Get a text description of the component that can be used to identify it
* in error messages.
* @return {string} The name or null.
* @internal
*/
getName: function() {
var type = this._currentElement.type;
var constructor = this._instance && this._instance.constructor;
return (
type.displayName || (constructor && constructor.displayName) ||
type.name || (constructor && constructor.name) ||
null
);
},
/**
* Get the publicly accessible representation of this component - i.e. what
* is exposed by refs and returned by React.render. Can be null for stateless
* components.
*
* @return {ReactComponent} the public component instance.
* @internal
*/
getPublicInstance: function() {
return this._instance;
},
// Stub
_instantiateReactComponent: null
};
ReactPerf.measureMethods(
ReactCompositeComponentMixin,
'ReactCompositeComponent',
{
mountComponent: 'mountComponent',
updateComponent: 'updateComponent',
_renderValidatedComponent: '_renderValidatedComponent'
}
);
var ReactCompositeComponent = {
Mixin: ReactCompositeComponentMixin
};
module.exports = ReactCompositeComponent;
},{"115":115,"135":135,"151":151,"154":154,"27":27,"36":36,"38":38,"39":39,"57":57,"58":58,"67":67,"68":68,"73":73,"75":75,"76":76,"77":77,"81":81,"87":87}],38:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(27);
var emptyObject = _dereq_(115);
var warning = _dereq_(154);
var didWarn = false;
/**
* 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: emptyObject,
/**
* 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) {
if ("production" !== "development") {
("production" !== "development" ? warning(
didWarn,
'withContext is deprecated and will be removed in a future version. ' +
'Use a wrapper component with getChildContext instead.'
) : null);
didWarn = true;
}
var result;
var previousContext = ReactContext.current;
ReactContext.current = assign({}, previousContext, newContext);
try {
result = scopedCallback();
} finally {
ReactContext.current = previousContext;
}
return result;
}
};
module.exports = ReactContext;
},{"115":115,"154":154,"27":27}],39:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],40:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(57);
var ReactElementValidator = _dereq_(58);
var mapObject = _dereq_(142);
/**
* Create a factory that creates HTML tag elements.
*
* @param {string} tag Tag name (e.g. `div`).
* @private
*/
function createDOMFactory(tag) {
if ("production" !== "development") {
return ReactElementValidator.createFactory(tag);
}
return 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',
clipPath: 'clipPath',
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;
},{"142":142,"57":57,"58":58}],41:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(2);
var ReactBrowserComponentMixin = _dereq_(29);
var ReactClass = _dereq_(33);
var ReactElement = _dereq_(57);
var keyMirror = _dereq_(140);
var button = ReactElement.createFactory('button');
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 = ReactClass.createClass({
displayName: 'ReactDOMButton',
tagName: 'BUTTON',
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;
},{"140":140,"2":2,"29":29,"33":33,"57":57}],42:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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
*/
/* global hasOwnProperty:true */
'use strict';
var CSSPropertyOperations = _dereq_(5);
var DOMProperty = _dereq_(10);
var DOMPropertyOperations = _dereq_(11);
var ReactBrowserEventEmitter = _dereq_(30);
var ReactComponentBrowserEnvironment =
_dereq_(35);
var ReactMount = _dereq_(70);
var ReactMultiChild = _dereq_(71);
var ReactPerf = _dereq_(75);
var assign = _dereq_(27);
var escapeTextContentForBrowser = _dereq_(116);
var invariant = _dereq_(135);
var isEventSupported = _dereq_(136);
var keyOf = _dereq_(141);
var warning = _dereq_(154);
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;
/**
* Optionally injectable operations for mutating the DOM
*/
var BackendIDOperations = null;
/**
* @param {?object} props
*/
function assertValidProps(props) {
if (!props) {
return;
}
// Note the use of `==` which checks for null or undefined.
if (props.dangerouslySetInnerHTML != null) {
("production" !== "development" ? invariant(
props.children == null,
'Can only set one of `children` or `props.dangerouslySetInnerHTML`.'
) : invariant(props.children == null));
("production" !== "development" ? invariant(
typeof props.dangerouslySetInnerHTML === 'object' &&
'__html' in props.dangerouslySetInnerHTML,
'`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
'Please visit https://fb.me/react-invariant-dangerously-set-inner-html ' +
'for more information.'
) : invariant(typeof props.dangerouslySetInnerHTML === 'object' &&
'__html' in props.dangerouslySetInnerHTML));
}
if ("production" !== "development") {
("production" !== "development" ? warning(
props.innerHTML == null,
'Directly setting property `innerHTML` is not permitted. ' +
'For more information, lookup documentation on `dangerouslySetInnerHTML`.'
) : null);
("production" !== "development" ? warning(
!props.contentEditable || props.children == null,
'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.'
) : null);
}
("production" !== "development" ? invariant(
props.style == null || typeof props.style === 'object',
'The `style` prop expects a mapping from style properties to values, ' +
'not a string. For example, style={{marginRight: spacing + \'em\'}} when ' +
'using JSX.'
) : 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.
("production" !== "development" ? warning(
registrationName !== 'onScroll' || isEventSupported('scroll', true),
'This browser doesn\'t support the `onScroll` event'
) : null);
}
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 ReactMultiChild
*/
function ReactDOMComponent(tag) {
validateDangerousTag(tag);
this._tag = tag;
this._renderedChildren = null;
this._previousStyleCopy = null;
this._rootNodeID = null;
}
ReactDOMComponent.displayName = 'ReactDOMComponent';
ReactDOMComponent.Mixin = {
construct: function(element) {
this._currentElement = element;
},
/**
* 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
* @return {string} The computed markup.
*/
mountComponent: function(rootID, transaction, context) {
this._rootNodeID = rootID;
assertValidProps(this._currentElement.props);
var closeTag = omittedCloseTags[this._tag] ? '' : '</' + this._tag + '>';
return (
this._createOpenTagMarkupAndPutListeners(transaction) +
this._createContentMarkup(transaction, context) +
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._currentElement.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 = this._previousStyleCopy = 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
* @param {object} context
* @return {string} Content markup.
*/
_createContentMarkup: function(transaction, context) {
var prefix = '';
if (this._tag === 'listing' ||
this._tag === 'pre' ||
this._tag === 'textarea') {
// Add an initial newline because browsers ignore the first newline in
// a <listing>, <pre>, or <textarea> as an "authoring convenience" -- see
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody.
prefix = '\n';
}
var props = this._currentElement.props;
// Intentional use of != to avoid catching zero/false.
var innerHTML = props.dangerouslySetInnerHTML;
if (innerHTML != null) {
if (innerHTML.__html != null) {
return prefix + innerHTML.__html;
}
} else {
var contentToUse =
CONTENT_TYPES[typeof props.children] ? props.children : null;
var childrenToUse = contentToUse != null ? null : props.children;
if (contentToUse != null) {
return prefix + escapeTextContentForBrowser(contentToUse);
} else if (childrenToUse != null) {
var mountImages = this.mountChildren(
childrenToUse,
transaction,
context
);
return prefix + mountImages.join('');
}
}
return prefix;
},
receiveComponent: function(nextElement, transaction, context) {
var prevElement = this._currentElement;
this._currentElement = nextElement;
this.updateComponent(transaction, prevElement, nextElement, context);
},
/**
* 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
* @param {ReactElement} nextElement
* @internal
* @overridable
*/
updateComponent: function(transaction, prevElement, nextElement, context) {
assertValidProps(this._currentElement.props);
this._updateDOMProperties(prevElement.props, transaction);
this._updateDOMChildren(prevElement.props, transaction, context);
},
/**
* 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._currentElement.props;
var propKey;
var styleName;
var styleUpdates;
for (propKey in lastProps) {
if (nextProps.hasOwnProperty(propKey) ||
!lastProps.hasOwnProperty(propKey)) {
continue;
}
if (propKey === STYLE) {
var lastStyle = this._previousStyleCopy;
for (styleName in lastStyle) {
if (lastStyle.hasOwnProperty(styleName)) {
styleUpdates = styleUpdates || {};
styleUpdates[styleName] = '';
}
}
this._previousStyleCopy = null;
} else if (registrationNameModules.hasOwnProperty(propKey)) {
deleteListener(this._rootNodeID, propKey);
} else if (
DOMProperty.isStandardName[propKey] ||
DOMProperty.isCustomAttribute(propKey)) {
BackendIDOperations.deletePropertyByID(
this._rootNodeID,
propKey
);
}
}
for (propKey in nextProps) {
var nextProp = nextProps[propKey];
var lastProp = propKey === STYLE ?
this._previousStyleCopy :
lastProps[propKey];
if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp) {
continue;
}
if (propKey === STYLE) {
if (nextProp) {
nextProp = this._previousStyleCopy = assign({}, nextProp);
} else {
this._previousStyleCopy = null;
}
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)) {
BackendIDOperations.updatePropertyByID(
this._rootNodeID,
propKey,
nextProp
);
}
}
if (styleUpdates) {
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, context) {
var nextProps = this._currentElement.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, context);
} else if (lastHasContentOrHtml && !nextHasContentOrHtml) {
this.updateTextContent('');
}
if (nextContent != null) {
if (lastContent !== nextContent) {
this.updateTextContent('' + nextContent);
}
} else if (nextHtml != null) {
if (lastHtml !== nextHtml) {
BackendIDOperations.updateInnerHTMLByID(
this._rootNodeID,
nextHtml
);
}
} else if (nextChildren != null) {
this.updateChildren(nextChildren, transaction, context);
}
},
/**
* 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);
ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID);
this._rootNodeID = null;
}
};
ReactPerf.measureMethods(ReactDOMComponent, 'ReactDOMComponent', {
mountComponent: 'mountComponent',
updateComponent: 'updateComponent'
});
assign(
ReactDOMComponent.prototype,
ReactDOMComponent.Mixin,
ReactMultiChild.Mixin
);
ReactDOMComponent.injection = {
injectIDOperations: function(IDOperations) {
ReactDOMComponent.BackendIDOperations = BackendIDOperations = IDOperations;
}
};
module.exports = ReactDOMComponent;
},{"10":10,"11":11,"116":116,"135":135,"136":136,"141":141,"154":154,"27":27,"30":30,"35":35,"5":5,"70":70,"71":71,"75":75}],43:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(15);
var LocalEventTrapMixin = _dereq_(25);
var ReactBrowserComponentMixin = _dereq_(29);
var ReactClass = _dereq_(33);
var ReactElement = _dereq_(57);
var form = ReactElement.createFactory('form');
/**
* 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 = ReactClass.createClass({
displayName: 'ReactDOMForm',
tagName: 'FORM',
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;
},{"15":15,"25":25,"29":29,"33":33,"57":57}],44:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(5);
var DOMChildrenOperations = _dereq_(9);
var DOMPropertyOperations = _dereq_(11);
var ReactMount = _dereq_(70);
var ReactPerf = _dereq_(75);
var invariant = _dereq_(135);
var setInnerHTML = _dereq_(148);
/**
* 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
* `ReactDOMComponent.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: 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: 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: 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: 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: 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: 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: function(updates, markup) {
for (var i = 0; i < updates.length; i++) {
updates[i].parentNode = ReactMount.getNode(updates[i].parentID);
}
DOMChildrenOperations.processUpdates(updates, markup);
}
};
ReactPerf.measureMethods(ReactDOMIDOperations, 'ReactDOMIDOperations', {
updatePropertyByID: 'updatePropertyByID',
deletePropertyByID: 'deletePropertyByID',
updateStylesByID: 'updateStylesByID',
updateInnerHTMLByID: 'updateInnerHTMLByID',
updateTextContentByID: 'updateTextContentByID',
dangerouslyReplaceNodeWithMarkupByID: 'dangerouslyReplaceNodeWithMarkupByID',
dangerouslyProcessChildrenUpdates: 'dangerouslyProcessChildrenUpdates'
});
module.exports = ReactDOMIDOperations;
},{"11":11,"135":135,"148":148,"5":5,"70":70,"75":75,"9":9}],45:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 ReactDOMIframe
*/
'use strict';
var EventConstants = _dereq_(15);
var LocalEventTrapMixin = _dereq_(25);
var ReactBrowserComponentMixin = _dereq_(29);
var ReactClass = _dereq_(33);
var ReactElement = _dereq_(57);
var iframe = ReactElement.createFactory('iframe');
/**
* Since onLoad doesn't bubble OR capture on the top level in IE8, we need to
* capture it on the <iframe> element itself. There are lots of hacks we could
* do to accomplish this, but the most reliable is to make <iframe> a composite
* component and use `componentDidMount` to attach the event handlers.
*/
var ReactDOMIframe = ReactClass.createClass({
displayName: 'ReactDOMIframe',
tagName: 'IFRAME',
mixins: [ReactBrowserComponentMixin, LocalEventTrapMixin],
render: function() {
return iframe(this.props);
},
componentDidMount: function() {
this.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load');
}
});
module.exports = ReactDOMIframe;
},{"15":15,"25":25,"29":29,"33":33,"57":57}],46:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(15);
var LocalEventTrapMixin = _dereq_(25);
var ReactBrowserComponentMixin = _dereq_(29);
var ReactClass = _dereq_(33);
var ReactElement = _dereq_(57);
var img = ReactElement.createFactory('img');
/**
* 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 = ReactClass.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;
},{"15":15,"25":25,"29":29,"33":33,"57":57}],47:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(2);
var DOMPropertyOperations = _dereq_(11);
var LinkedValueUtils = _dereq_(24);
var ReactBrowserComponentMixin = _dereq_(29);
var ReactClass = _dereq_(33);
var ReactElement = _dereq_(57);
var ReactMount = _dereq_(70);
var ReactUpdates = _dereq_(87);
var assign = _dereq_(27);
var invariant = _dereq_(135);
var input = ReactElement.createFactory('input');
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 = ReactClass.createClass({
displayName: 'ReactDOMInput',
tagName: 'INPUT',
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;
},{"11":11,"135":135,"2":2,"24":24,"27":27,"29":29,"33":33,"57":57,"70":70,"87":87}],48:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(29);
var ReactClass = _dereq_(33);
var ReactElement = _dereq_(57);
var warning = _dereq_(154);
var option = ReactElement.createFactory('option');
/**
* Implements an <option> native component that warns when `selected` is set.
*/
var ReactDOMOption = ReactClass.createClass({
displayName: 'ReactDOMOption',
tagName: 'OPTION',
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;
},{"154":154,"29":29,"33":33,"57":57}],49:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(2);
var LinkedValueUtils = _dereq_(24);
var ReactBrowserComponentMixin = _dereq_(29);
var ReactClass = _dereq_(33);
var ReactElement = _dereq_(57);
var ReactUpdates = _dereq_(87);
var assign = _dereq_(27);
var select = ReactElement.createFactory('select');
function updateOptionsIfPendingUpdateAndMounted() {
/*jshint validthis:true */
if (this._pendingUpdate) {
this._pendingUpdate = false;
var value = LinkedValueUtils.getValue(this);
if (value != null && this.isMounted()) {
updateOptions(this, value);
}
}
}
/**
* Validation function for `value` and `defaultValue`.
* @private
*/
function selectValueType(props, propName, componentName) {
if (props[propName] == null) {
return null;
}
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.")
);
}
}
}
/**
* @param {ReactComponent} component Instance of ReactDOMSelect
* @param {*} propValue A stringable (with `multiple`, a list of stringables).
* @private
*/
function updateOptions(component, propValue) {
var selectedValue, i, l;
var options = component.getDOMNode().options;
if (component.props.multiple) {
selectedValue = {};
for (i = 0, l = propValue.length; i < l; i++) {
selectedValue['' + propValue[i]] = true;
}
for (i = 0, l = options.length; i < l; i++) {
var selected = selectedValue.hasOwnProperty(options[i].value);
if (options[i].selected !== selected) {
options[i].selected = selected;
}
}
} else {
// Do not set `select.value` as exact behavior isn't consistent across all
// browsers for all cases.
selectedValue = '' + propValue;
for (i = 0, l = options.length; i < l; i++) {
if (options[i].value === selectedValue) {
options[i].selected = true;
return;
}
}
if (options.length) {
options[0].selected = true;
}
}
}
/**
* Implements a <select> native component that allows optionally setting the
* props `value` and `defaultValue`. If `multiple` is false, the prop must be a
* stringable. If `multiple` is true, the prop must be an array of stringables.
*
* 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 = ReactClass.createClass({
displayName: 'ReactDOMSelect',
tagName: 'SELECT',
mixins: [AutoFocusMixin, LinkedValueUtils.Mixin, ReactBrowserComponentMixin],
propTypes: {
defaultValue: selectValueType,
value: selectValueType
},
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);
},
componentWillMount: function() {
this._pendingUpdate = false;
},
componentDidMount: function() {
var value = LinkedValueUtils.getValue(this);
if (value != null) {
updateOptions(this, value);
} else if (this.props.defaultValue != null) {
updateOptions(this, this.props.defaultValue);
}
},
componentDidUpdate: function(prevProps) {
var value = LinkedValueUtils.getValue(this);
if (value != null) {
this._pendingUpdate = false;
updateOptions(this, value);
} else if (!prevProps.multiple !== !this.props.multiple) {
// For simplicity, reapply `defaultValue` if `multiple` is toggled.
if (this.props.defaultValue != null) {
updateOptions(this, this.props.defaultValue);
} else {
// Revert the select back to its default unselected state.
updateOptions(this, this.props.multiple ? [] : '');
}
}
},
_handleChange: function(event) {
var returnValue;
var onChange = LinkedValueUtils.getOnChange(this);
if (onChange) {
returnValue = onChange.call(this, event);
}
this._pendingUpdate = true;
ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this);
return returnValue;
}
});
module.exports = ReactDOMSelect;
},{"2":2,"24":24,"27":27,"29":29,"33":33,"57":57,"87":87}],50:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(21);
var getNodeForCharacterOffset = _dereq_(128);
var getTextContentAccessor = _dereq_(130);
/**
* 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 &&
'selection' in document &&
!('getSelection' in window)
);
var ReactDOMSelection = {
/**
* @param {DOMElement} node
*/
getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets,
/**
* @param {DOMElement|DOMTextNode} node
* @param {object} offsets
*/
setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets
};
module.exports = ReactDOMSelection;
},{"128":128,"130":130,"21":21}],51:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 ReactDOMTextComponent
* @typechecks static-only
*/
'use strict';
var DOMPropertyOperations = _dereq_(11);
var ReactComponentBrowserEnvironment =
_dereq_(35);
var ReactDOMComponent = _dereq_(42);
var assign = _dereq_(27);
var escapeTextContentForBrowser = _dereq_(116);
/**
* 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 ReactDOMTextComponent
* @extends ReactComponent
* @internal
*/
var ReactDOMTextComponent = function(props) {
// This constructor and its argument is currently used by mocks.
};
assign(ReactDOMTextComponent.prototype, {
/**
* @param {ReactText} text
* @internal
*/
construct: function(text) {
// TODO: This is really a ReactText (ReactNode), not a ReactElement
this._currentElement = text;
this._stringText = '' + text;
// Properties
this._rootNodeID = null;
this._mountIndex = 0;
},
/**
* 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
* @return {string} Markup for this text node.
* @internal
*/
mountComponent: function(rootID, transaction, context) {
this._rootNodeID = rootID;
var escapedText = escapeTextContentForBrowser(this._stringText);
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 {ReactText} nextText The next text content
* @param {ReactReconcileTransaction} transaction
* @internal
*/
receiveComponent: function(nextText, transaction) {
if (nextText !== this._currentElement) {
this._currentElement = nextText;
var nextStringText = '' + nextText;
if (nextStringText !== this._stringText) {
// TODO: Save this as pending props and use performUpdateIfNecessary
// and/or updateComponent to do the actual update for consistency with
// other component types?
this._stringText = nextStringText;
ReactDOMComponent.BackendIDOperations.updateTextContentByID(
this._rootNodeID,
nextStringText
);
}
}
},
unmountComponent: function() {
ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID);
}
});
module.exports = ReactDOMTextComponent;
},{"11":11,"116":116,"27":27,"35":35,"42":42}],52:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(2);
var DOMPropertyOperations = _dereq_(11);
var LinkedValueUtils = _dereq_(24);
var ReactBrowserComponentMixin = _dereq_(29);
var ReactClass = _dereq_(33);
var ReactElement = _dereq_(57);
var ReactUpdates = _dereq_(87);
var assign = _dereq_(27);
var invariant = _dereq_(135);
var warning = _dereq_(154);
var textarea = ReactElement.createFactory('textarea');
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 = ReactClass.createClass({
displayName: 'ReactDOMTextarea',
tagName: 'TEXTAREA',
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;
},{"11":11,"135":135,"154":154,"2":2,"24":24,"27":27,"29":29,"33":33,"57":57,"87":87}],53:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(87);
var Transaction = _dereq_(103);
var assign = _dereq_(27);
var emptyFunction = _dereq_(114);
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, c, d) {
var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates;
ReactDefaultBatchingStrategy.isBatchingUpdates = true;
// The code is written this way to avoid extra allocations
if (alreadyBatchingUpdates) {
callback(a, b, c, d);
} else {
transaction.perform(callback, null, a, b, c, d);
}
}
};
module.exports = ReactDefaultBatchingStrategy;
},{"103":103,"114":114,"27":27,"87":87}],54:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(3);
var ChangeEventPlugin = _dereq_(7);
var ClientReactRootIndex = _dereq_(8);
var DefaultEventPluginOrder = _dereq_(13);
var EnterLeaveEventPlugin = _dereq_(14);
var ExecutionEnvironment = _dereq_(21);
var HTMLDOMPropertyConfig = _dereq_(23);
var MobileSafariClickEventPlugin = _dereq_(26);
var ReactBrowserComponentMixin = _dereq_(29);
var ReactClass = _dereq_(33);
var ReactComponentBrowserEnvironment =
_dereq_(35);
var ReactDefaultBatchingStrategy = _dereq_(53);
var ReactDOMComponent = _dereq_(42);
var ReactDOMButton = _dereq_(41);
var ReactDOMForm = _dereq_(43);
var ReactDOMImg = _dereq_(46);
var ReactDOMIDOperations = _dereq_(44);
var ReactDOMIframe = _dereq_(45);
var ReactDOMInput = _dereq_(47);
var ReactDOMOption = _dereq_(48);
var ReactDOMSelect = _dereq_(49);
var ReactDOMTextarea = _dereq_(52);
var ReactDOMTextComponent = _dereq_(51);
var ReactElement = _dereq_(57);
var ReactEventListener = _dereq_(62);
var ReactInjection = _dereq_(64);
var ReactInstanceHandles = _dereq_(66);
var ReactMount = _dereq_(70);
var ReactReconcileTransaction = _dereq_(80);
var SelectEventPlugin = _dereq_(89);
var ServerReactRootIndex = _dereq_(90);
var SimpleEventPlugin = _dereq_(91);
var SVGDOMPropertyConfig = _dereq_(88);
var createFullPageComponent = _dereq_(111);
function autoGenerateWrapperClass(type) {
return ReactClass.createClass({
tagName: type.toUpperCase(),
render: function() {
return new ReactElement(
type,
null,
null,
null,
null,
this.props
);
}
});
}
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,
MobileSafariClickEventPlugin: MobileSafariClickEventPlugin,
SelectEventPlugin: SelectEventPlugin,
BeforeInputEventPlugin: BeforeInputEventPlugin
});
ReactInjection.NativeComponent.injectGenericComponentClass(
ReactDOMComponent
);
ReactInjection.NativeComponent.injectTextComponentClass(
ReactDOMTextComponent
);
ReactInjection.NativeComponent.injectAutoWrapper(
autoGenerateWrapperClass
);
// This needs to happen before createFullPageComponent() otherwise the mixin
// won't be included.
ReactInjection.Class.injectMixin(ReactBrowserComponentMixin);
ReactInjection.NativeComponent.injectComponentClasses({
'button': ReactDOMButton,
'form': ReactDOMForm,
'iframe': ReactDOMIframe,
'img': ReactDOMImg,
'input': ReactDOMInput,
'option': ReactDOMOption,
'select': ReactDOMSelect,
'textarea': ReactDOMTextarea,
'html': createFullPageComponent('html'),
'head': createFullPageComponent('head'),
'body': createFullPageComponent('body')
});
ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);
ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);
ReactInjection.EmptyComponent.injectEmptyComponent('noscript');
ReactInjection.Updates.injectReconcileTransaction(
ReactReconcileTransaction
);
ReactInjection.Updates.injectBatchingStrategy(
ReactDefaultBatchingStrategy
);
ReactInjection.RootIndex.injectCreateReactRootIndex(
ExecutionEnvironment.canUseDOM ?
ClientReactRootIndex.createReactRootIndex :
ServerReactRootIndex.createReactRootIndex
);
ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);
ReactInjection.DOMComponent.injectIDOperations(ReactDOMIDOperations);
if ("production" !== "development") {
var url = (ExecutionEnvironment.canUseDOM && window.location.href) || '';
if ((/[?&]react_perf\b/).test(url)) {
var ReactDefaultPerf = _dereq_(55);
ReactDefaultPerf.start();
}
}
}
module.exports = {
inject: inject
};
},{"111":111,"13":13,"14":14,"21":21,"23":23,"26":26,"29":29,"3":3,"33":33,"35":35,"41":41,"42":42,"43":43,"44":44,"45":45,"46":46,"47":47,"48":48,"49":49,"51":51,"52":52,"53":53,"55":55,"57":57,"62":62,"64":64,"66":66,"7":7,"70":70,"8":8,"80":80,"88":88,"89":89,"90":90,"91":91}],55:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(10);
var ReactDefaultPerfAnalysis = _dereq_(56);
var ReactMount = _dereq_(70);
var ReactPerf = _dereq_(75);
var performanceNow = _dereq_(146);
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 (fnName === '_mountImageIntoNode' ||
moduleName === 'ReactDOMIDOperations') {
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' && (
(// TODO: receiveComponent()?
(fnName === 'mountComponent' ||
fnName === 'updateComponent' || fnName === '_renderValidatedComponent')))) {
if (typeof this._currentElement.type === 'string') {
return func.apply(this, args);
}
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.getName(),
owner: this._currentElement._owner ?
this._currentElement._owner.getName() :
'<root>'
};
return rv;
} else {
return func.apply(this, args);
}
};
}
};
module.exports = ReactDefaultPerf;
},{"10":10,"146":146,"56":56,"70":70,"75":75}],56:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(27);
// 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;
},{"27":27}],57:[function(_dereq_,module,exports){
/**
* Copyright 2014-2015, 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_(38);
var ReactCurrentOwner = _dereq_(39);
var assign = _dereq_(27);
var warning = _dereq_(154);
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 %s property of the React element. Instead, ' +
'specify the correct value when initially creating the element.',
key
) : 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 = {props: props, originalProps: assign({}, props)};
// To make comparing ReactElements easier for testing purposes, we make
// the validation flag non-enumerable (where possible, which should
// include every environment we run tests in), so the test framework
// ignores it.
try {
Object.defineProperty(this._store, 'validated', {
configurable: false,
enumerable: false,
writable: true
});
} catch (x) {
}
this._store.validated = false;
// 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;
key = config.key === undefined ? 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.
// Legacy hook TODO: Warn if this is accessed
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;
};
ReactElement.cloneElement = function(element, config, children) {
var propName;
// Original props are copied
var props = assign({}, element.props);
// Reserved names are extracted
var key = element.key;
var ref = element.ref;
// Owner will be preserved, unless ref is overridden
var owner = element._owner;
if (config != null) {
if (config.ref !== undefined) {
// Silently steal the ref from the parent.
ref = config.ref;
owner = ReactCurrentOwner.current;
}
if (config.key !== undefined) {
key = '' + config.key;
}
// Remaining properties override existing props
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;
}
return new ReactElement(
element.type,
key,
ref,
owner,
element._context,
props
);
};
/**
* @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;
},{"154":154,"27":27,"38":38,"39":39}],58:[function(_dereq_,module,exports){
/**
* Copyright 2014-2015, 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_(57);
var ReactFragment = _dereq_(63);
var ReactPropTypeLocations = _dereq_(77);
var ReactPropTypeLocationNames = _dereq_(76);
var ReactCurrentOwner = _dereq_(39);
var ReactNativeComponent = _dereq_(73);
var getIteratorFn = _dereq_(126);
var invariant = _dereq_(135);
var warning = _dereq_(154);
function getDeclarationErrorAddendum() {
if (ReactCurrentOwner.current) {
var name = ReactCurrentOwner.current.getName();
if (name) {
return ' Check the render method of `' + name + '`.';
}
}
return '';
}
/**
* 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 = {};
var loggedTypeFailures = {};
var NUMERIC_PROPERTY_REGEX = /^\d+$/;
/**
* Gets the instance's name for use in warnings.
*
* @internal
* @return {?string} Display name or undefined
*/
function getName(instance) {
var publicInstance = instance && instance.getPublicInstance();
if (!publicInstance) {
return undefined;
}
var constructor = publicInstance.constructor;
if (!constructor) {
return undefined;
}
return constructor.displayName || constructor.name || undefined;
}
/**
* 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 && getName(current) || undefined
);
}
/**
* Warn if the element doesn't have an explicit key assigned to it.
* This element 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 {ReactElement} element Element that requires a key.
* @param {*} parentType element's parent's type.
*/
function validateExplicitKey(element, parentType) {
if (element._store.validated || element.key != null) {
return;
}
element._store.validated = true;
warnAndMonitorForKeyUse(
'Each child in an array or iterator should have a unique "key" prop.',
element,
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 {ReactElement} element Component that requires a key.
* @param {*} parentType element's parent's type.
*/
function validatePropertyKey(name, element, parentType) {
if (!NUMERIC_PROPERTY_REGEX.test(name)) {
return;
}
warnAndMonitorForKeyUse(
'Child objects should have non-numeric keys so ordering is preserved.',
element,
parentType
);
}
/**
* Shared warning and monitoring code for the key warnings.
*
* @internal
* @param {string} message The base warning that gets output.
* @param {ReactElement} element Component that requires a key.
* @param {*} parentType element's parent's type.
*/
function warnAndMonitorForKeyUse(message, element, parentType) {
var ownerName = getCurrentOwnerDisplayName();
var parentName = typeof parentType === 'string' ?
parentType : parentType.displayName || parentType.name;
var useName = ownerName || parentName;
var memoizer = ownerHasKeyUseWarning[message] || (
(ownerHasKeyUseWarning[message] = {})
);
if (memoizer.hasOwnProperty(useName)) {
return;
}
memoizer[useName] = true;
var parentOrOwnerAddendum =
ownerName ? (" Check the render method of " + ownerName + ".") :
parentName ? (" Check the React.render 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 childOwnerAddendum = '';
if (element &&
element._owner &&
element._owner !== ReactCurrentOwner.current) {
// Name of the component that originally created this child.
var childOwnerName = getName(element._owner);
childOwnerAddendum = (" It was passed a child from " + childOwnerName + ".");
}
("production" !== "development" ? warning(
false,
message + '%s%s See https://fb.me/react-warning-keys for more information.',
parentOrOwnerAddendum,
childOwnerAddendum
) : null);
}
/**
* Ensure that every element 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 {ReactNode} node Statically passed child of any type.
* @param {*} parentType node's parent's type.
*/
function validateChildKeys(node, parentType) {
if (Array.isArray(node)) {
for (var i = 0; i < node.length; i++) {
var child = node[i];
if (ReactElement.isValidElement(child)) {
validateExplicitKey(child, parentType);
}
}
} else if (ReactElement.isValidElement(node)) {
// This element was passed in a valid location.
node._store.validated = true;
} else if (node) {
var iteratorFn = getIteratorFn(node);
// Entry iterators provide implicit keys.
if (iteratorFn) {
if (iteratorFn !== node.entries) {
var iterator = iteratorFn.call(node);
var step;
while (!(step = iterator.next()).done) {
if (ReactElement.isValidElement(step.value)) {
validateExplicitKey(step.value, parentType);
}
}
}
} else if (typeof node === 'object') {
var fragment = ReactFragment.extractIfFragment(node);
for (var key in fragment) {
if (fragment.hasOwnProperty(key)) {
validatePropertyKey(key, fragment[key], 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 {
// This is intentionally an invariant that gets caught. It's the same
// behavior as without this statement except with a better message.
("production" !== "development" ? invariant(
typeof propTypes[propName] === 'function',
'%s: %s type `%s` is invalid; it must be a function, usually from ' +
'React.PropTypes.',
componentName || 'React class',
ReactPropTypeLocationNames[location],
propName
) : invariant(typeof propTypes[propName] === 'function'));
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;
var addendum = getDeclarationErrorAddendum(this);
("production" !== "development" ? warning(false, 'Failed propType: %s%s', error.message, addendum) : null);
}
}
}
}
var warnedPropsMutations = {};
/**
* Warn about mutating props when setting `propName` on `element`.
*
* @param {string} propName The string key within props that was set
* @param {ReactElement} element
*/
function warnForPropsMutation(propName, element) {
var type = element.type;
var elementName = typeof type === 'string' ? type : type.displayName;
var ownerName = element._owner ?
element._owner.getPublicInstance().constructor.displayName : null;
var warningKey = propName + '|' + elementName + '|' + ownerName;
if (warnedPropsMutations.hasOwnProperty(warningKey)) {
return;
}
warnedPropsMutations[warningKey] = true;
var elementInfo = '';
if (elementName) {
elementInfo = ' <' + elementName + ' />';
}
var ownerInfo = '';
if (ownerName) {
ownerInfo = ' The element was created by ' + ownerName + '.';
}
("production" !== "development" ? warning(
false,
'Don\'t set .props.%s of the React component%s. Instead, specify the ' +
'correct value when initially creating the element or use ' +
'React.cloneElement to make a new element with updated props.%s',
propName,
elementInfo,
ownerInfo
) : null);
}
// Inline Object.is polyfill
function is(a, b) {
if (a !== a) {
// NaN
return b !== b;
}
if (a === 0 && b === 0) {
// +-0
return 1 / a === 1 / b;
}
return a === b;
}
/**
* Given an element, check if its props have been mutated since element
* creation (or the last call to this function). In particular, check if any
* new props have been added, which we can't directly catch by defining warning
* properties on the props object.
*
* @param {ReactElement} element
*/
function checkAndWarnForMutatedProps(element) {
if (!element._store) {
// Element was created using `new ReactElement` directly or with
// `ReactElement.createElement`; skip mutation checking
return;
}
var originalProps = element._store.originalProps;
var props = element.props;
for (var propName in props) {
if (props.hasOwnProperty(propName)) {
if (!originalProps.hasOwnProperty(propName) ||
!is(originalProps[propName], props[propName])) {
warnForPropsMutation(propName, element);
// Copy over the new value so that the two props objects match again
originalProps[propName] = props[propName];
}
}
}
}
/**
* Given an element, validate that its props follow the propTypes definition,
* provided by the type.
*
* @param {ReactElement} element
*/
function validatePropTypes(element) {
if (element.type == null) {
// This has already warned. Don't throw.
return;
}
// Extract the component class from the element. Converts string types
// to a composite class which may have propTypes.
// TODO: Validating a string's propTypes is not decoupled from the
// rendering target which is problematic.
var componentClass = ReactNativeComponent.getComponentClassForElement(
element
);
var name = componentClass.displayName || componentClass.name;
if (componentClass.propTypes) {
checkPropTypes(
name,
componentClass.propTypes,
element.props,
ReactPropTypeLocations.prop
);
}
if (typeof componentClass.getDefaultProps === 'function') {
("production" !== "development" ? warning(
componentClass.getDefaultProps.isReactClassApproved,
'getDefaultProps is only used on classic React.createClass ' +
'definitions. Use a static property named `defaultProps` instead.'
) : null);
}
}
var ReactElementValidator = {
checkAndWarnForMutatedProps: checkAndWarnForMutatedProps,
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);
}
validatePropTypes(element);
return element;
},
createFactory: function(type) {
var validatedFactory = ReactElementValidator.createElement.bind(
null,
type
);
// Legacy hook TODO: Warn if this is accessed
validatedFactory.type = type;
if ("production" !== "development") {
try {
Object.defineProperty(
validatedFactory,
'type',
{
enumerable: false,
get: function() {
("production" !== "development" ? warning(
false,
'Factory.type is deprecated. Access the class directly ' +
'before passing it to createFactory.'
) : null);
Object.defineProperty(this, 'type', {
value: type
});
return type;
}
}
);
} catch (x) {
// IE will fail on defineProperty (es5-shim/sham too)
}
}
return validatedFactory;
},
cloneElement: function(element, props, children) {
var newElement = ReactElement.cloneElement.apply(this, arguments);
for (var i = 2; i < arguments.length; i++) {
validateChildKeys(arguments[i], newElement.type);
}
validatePropTypes(newElement);
return newElement;
}
};
module.exports = ReactElementValidator;
},{"126":126,"135":135,"154":154,"39":39,"57":57,"63":63,"73":73,"76":76,"77":77}],59:[function(_dereq_,module,exports){
/**
* Copyright 2014-2015, 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_(57);
var ReactInstanceMap = _dereq_(67);
var invariant = _dereq_(135);
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);
}
};
var ReactEmptyComponentType = function() {};
ReactEmptyComponentType.prototype.componentDidMount = function() {
var internalInstance = ReactInstanceMap.get(this);
// TODO: Make sure we run these methods in the correct order, we shouldn't
// need this check. We're going to assume if we're here it means we ran
// componentWillUnmount already so there is no internal instance (it gets
// removed as part of the unmounting process).
if (!internalInstance) {
return;
}
registerNullComponentID(internalInstance._rootNodeID);
};
ReactEmptyComponentType.prototype.componentWillUnmount = function() {
var internalInstance = ReactInstanceMap.get(this);
// TODO: Get rid of this check. See TODO in componentDidMount.
if (!internalInstance) {
return;
}
deregisterNullComponentID(internalInstance._rootNodeID);
};
ReactEmptyComponentType.prototype.render = function() {
("production" !== "development" ? invariant(
component,
'Trying to return null from a render, but no null placeholder component ' +
'was injected.'
) : invariant(component));
return component();
};
var emptyElement = ReactElement.createElement(ReactEmptyComponentType);
/**
* 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 = {
emptyElement: emptyElement,
injection: ReactEmptyComponentInjection,
isNullComponentID: isNullComponentID
};
module.exports = ReactEmptyComponent;
},{"135":135,"57":57,"67":67}],60:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],61:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(17);
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;
},{"17":17}],62:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(16);
var ExecutionEnvironment = _dereq_(21);
var PooledClass = _dereq_(28);
var ReactInstanceHandles = _dereq_(66);
var ReactMount = _dereq_(70);
var ReactUpdates = _dereq_(87);
var assign = _dereq_(27);
var getEventTarget = _dereq_(125);
var getUnboundedScrollPosition = _dereq_(131);
/**
* 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 null;
}
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 null;
}
return EventListener.capture(
element,
handlerBaseName,
ReactEventListener.dispatchEvent.bind(null, topLevelType)
);
},
monitorScrollValue: function(refresh) {
var callback = scrollValueMonitor.bind(null, refresh);
EventListener.listen(window, 'scroll', 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;
},{"125":125,"131":131,"16":16,"21":21,"27":27,"28":28,"66":66,"70":70,"87":87}],63:[function(_dereq_,module,exports){
/**
* Copyright 2015, 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 ReactFragment
*/
'use strict';
var ReactElement = _dereq_(57);
var warning = _dereq_(154);
/**
* We used to allow keyed objects to serve as a collection of ReactElements,
* or nested sets. This allowed us a way to explicitly key a set a fragment of
* components. This is now being replaced with an opaque data structure.
* The upgrade path is to call React.addons.createFragment({ key: value }) to
* create a keyed fragment. The resulting data structure is opaque, for now.
*/
if ("production" !== "development") {
var fragmentKey = '_reactFragment';
var didWarnKey = '_reactDidWarn';
var canWarnForReactFragment = false;
try {
// Feature test. Don't even try to issue this warning if we can't use
// enumerable: false.
var dummy = function() {
return 1;
};
Object.defineProperty(
{},
fragmentKey,
{enumerable: false, value: true}
);
Object.defineProperty(
{},
'key',
{enumerable: true, get: dummy}
);
canWarnForReactFragment = true;
} catch (x) { }
var proxyPropertyAccessWithWarning = function(obj, key) {
Object.defineProperty(obj, key, {
enumerable: true,
get: function() {
("production" !== "development" ? warning(
this[didWarnKey],
'A ReactFragment is an opaque type. Accessing any of its ' +
'properties is deprecated. Pass it to one of the React.Children ' +
'helpers.'
) : null);
this[didWarnKey] = true;
return this[fragmentKey][key];
},
set: function(value) {
("production" !== "development" ? warning(
this[didWarnKey],
'A ReactFragment is an immutable opaque type. Mutating its ' +
'properties is deprecated.'
) : null);
this[didWarnKey] = true;
this[fragmentKey][key] = value;
}
});
};
var issuedWarnings = {};
var didWarnForFragment = function(fragment) {
// We use the keys and the type of the value as a heuristic to dedupe the
// warning to avoid spamming too much.
var fragmentCacheKey = '';
for (var key in fragment) {
fragmentCacheKey += key + ':' + (typeof fragment[key]) + ',';
}
var alreadyWarnedOnce = !!issuedWarnings[fragmentCacheKey];
issuedWarnings[fragmentCacheKey] = true;
return alreadyWarnedOnce;
};
}
var ReactFragment = {
// Wrap a keyed object in an opaque proxy that warns you if you access any
// of its properties.
create: function(object) {
if ("production" !== "development") {
if (typeof object !== 'object' || !object || Array.isArray(object)) {
("production" !== "development" ? warning(
false,
'React.addons.createFragment only accepts a single object.',
object
) : null);
return object;
}
if (ReactElement.isValidElement(object)) {
("production" !== "development" ? warning(
false,
'React.addons.createFragment does not accept a ReactElement ' +
'without a wrapper object.'
) : null);
return object;
}
if (canWarnForReactFragment) {
var proxy = {};
Object.defineProperty(proxy, fragmentKey, {
enumerable: false,
value: object
});
Object.defineProperty(proxy, didWarnKey, {
writable: true,
enumerable: false,
value: false
});
for (var key in object) {
proxyPropertyAccessWithWarning(proxy, key);
}
Object.preventExtensions(proxy);
return proxy;
}
}
return object;
},
// Extract the original keyed object from the fragment opaque type. Warn if
// a plain object is passed here.
extract: function(fragment) {
if ("production" !== "development") {
if (canWarnForReactFragment) {
if (!fragment[fragmentKey]) {
("production" !== "development" ? warning(
didWarnForFragment(fragment),
'Any use of a keyed object should be wrapped in ' +
'React.addons.createFragment(object) before being passed as a ' +
'child.'
) : null);
return fragment;
}
return fragment[fragmentKey];
}
}
return fragment;
},
// Check if this is a fragment and if so, extract the keyed object. If it
// is a fragment-like object, warn that it should be wrapped. Ignore if we
// can't determine what kind of object this is.
extractIfFragment: function(fragment) {
if ("production" !== "development") {
if (canWarnForReactFragment) {
// If it is the opaque type, return the keyed object.
if (fragment[fragmentKey]) {
return fragment[fragmentKey];
}
// Otherwise, check each property if it has an element, if it does
// it is probably meant as a fragment, so we can warn early. Defer,
// the warning to extract.
for (var key in fragment) {
if (fragment.hasOwnProperty(key) &&
ReactElement.isValidElement(fragment[key])) {
// This looks like a fragment object, we should provide an
// early warning.
return ReactFragment.extract(fragment);
}
}
}
}
return fragment;
}
};
module.exports = ReactFragment;
},{"154":154,"57":57}],64:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(10);
var EventPluginHub = _dereq_(17);
var ReactComponentEnvironment = _dereq_(36);
var ReactClass = _dereq_(33);
var ReactEmptyComponent = _dereq_(59);
var ReactBrowserEventEmitter = _dereq_(30);
var ReactNativeComponent = _dereq_(73);
var ReactDOMComponent = _dereq_(42);
var ReactPerf = _dereq_(75);
var ReactRootIndex = _dereq_(83);
var ReactUpdates = _dereq_(87);
var ReactInjection = {
Component: ReactComponentEnvironment.injection,
Class: ReactClass.injection,
DOMComponent: ReactDOMComponent.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;
},{"10":10,"17":17,"30":30,"33":33,"36":36,"42":42,"59":59,"73":73,"75":75,"83":83,"87":87}],65:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(50);
var containsNode = _dereq_(109);
var focusNode = _dereq_(119);
var getActiveElement = _dereq_(121);
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;
},{"109":109,"119":119,"121":121,"50":50}],66:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(83);
var invariant = _dereq_(135);
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;
var i;
for (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;
},{"135":135,"83":83}],67:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 ReactInstanceMap
*/
'use strict';
/**
* `ReactInstanceMap` maintains a mapping from a public facing stateful
* instance (key) and the internal representation (value). This allows public
* methods to accept the user facing instance as an argument and map them back
* to internal methods.
*/
// TODO: Replace this with ES6: var ReactInstanceMap = new Map();
var ReactInstanceMap = {
/**
* This API should be called `delete` but we'd have to make sure to always
* transform these to strings for IE support. When this transform is fully
* supported we can rename it.
*/
remove: function(key) {
key._reactInternalInstance = undefined;
},
get: function(key) {
return key._reactInternalInstance;
},
has: function(key) {
return key._reactInternalInstance !== undefined;
},
set: function(key, value) {
key._reactInternalInstance = value;
}
};
module.exports = ReactInstanceMap;
},{}],68:[function(_dereq_,module,exports){
/**
* Copyright 2015, 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 ReactLifeCycle
*/
'use strict';
/**
* This module manages the bookkeeping when a component is in the process
* of being mounted or being unmounted. This is used as a way to enforce
* invariants (or warnings) when it is not recommended to call
* setState/forceUpdate.
*
* currentlyMountingInstance: During the construction phase, it is not possible
* to trigger an update since the instance is not fully mounted yet. However, we
* currently allow this as a convenience for mutating the initial state.
*
* currentlyUnmountingInstance: During the unmounting phase, the instance is
* still mounted and can therefore schedule an update. However, this is not
* recommended and probably an error since it's about to be unmounted.
* Therefore we still want to trigger in an error for that case.
*/
var ReactLifeCycle = {
currentlyMountingInstance: null,
currentlyUnmountingInstance: null
};
module.exports = ReactLifeCycle;
},{}],69:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(106);
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;
},{"106":106}],70:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(10);
var ReactBrowserEventEmitter = _dereq_(30);
var ReactCurrentOwner = _dereq_(39);
var ReactElement = _dereq_(57);
var ReactElementValidator = _dereq_(58);
var ReactEmptyComponent = _dereq_(59);
var ReactInstanceHandles = _dereq_(66);
var ReactInstanceMap = _dereq_(67);
var ReactMarkupChecksum = _dereq_(69);
var ReactPerf = _dereq_(75);
var ReactReconciler = _dereq_(81);
var ReactUpdateQueue = _dereq_(86);
var ReactUpdates = _dereq_(87);
var emptyObject = _dereq_(115);
var containsNode = _dereq_(109);
var getReactRootElementInContainer = _dereq_(129);
var instantiateReactComponent = _dereq_(134);
var invariant = _dereq_(135);
var setInnerHTML = _dereq_(148);
var shouldUpdateReactComponent = _dereq_(151);
var warning = _dereq_(154);
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 = [];
/**
* Finds the index of the first character
* that's not common between the two given strings.
*
* @return {number} the index of the character where the strings diverge
*/
function firstDifferenceIndex(string1, string2) {
var minLen = Math.min(string1.length, string2.length);
for (var i = 0; i < minLen; i++) {
if (string1.charAt(i) !== string2.charAt(i)) {
return i;
}
}
return string1.length === string2.length ? -1 : minLen;
}
/**
* @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];
}
/**
* Finds the node with the supplied public React instance.
*
* @param {*} instance A public React instance.
* @return {?DOMElement} DOM node with the suppled `id`.
* @internal
*/
function getNodeFromInstance(instance) {
var id = ReactInstanceMap.get(instance)._rootNodeID;
if (ReactEmptyComponent.isNullComponentID(id)) {
return null;
}
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;
}
/**
* Mounts this component and inserts it into the DOM.
*
* @param {ReactComponent} componentInstance The instance to mount.
* @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
*/
function mountComponentIntoNode(
componentInstance,
rootID,
container,
transaction,
shouldReuseMarkup) {
var markup = ReactReconciler.mountComponent(
componentInstance, rootID, transaction, emptyObject
);
componentInstance._isTopLevel = true;
ReactMount._mountImageIntoNode(markup, container, shouldReuseMarkup);
}
/**
* Batched mount.
*
* @param {ReactComponent} componentInstance The instance to mount.
* @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
*/
function batchedMountComponentIntoNode(
componentInstance,
rootID,
container,
shouldReuseMarkup) {
var transaction = ReactUpdates.ReactReconcileTransaction.getPooled();
transaction.perform(
mountComponentIntoNode,
null,
componentInstance,
rootID,
container,
transaction,
shouldReuseMarkup
);
ReactUpdates.ReactReconcileTransaction.release(transaction);
}
/**
* Mounting is the process of initializing a React component by creating 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 {ReactElement} nextElement component instance to render
* @param {DOMElement} container container to render into
* @param {?function} callback function triggered on completion
*/
_updateRootComponent: function(
prevComponent,
nextElement,
container,
callback) {
if ("production" !== "development") {
ReactElementValidator.checkAndWarnForMutatedProps(nextElement);
}
ReactMount.scrollMonitor(container, function() {
ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement);
if (callback) {
ReactUpdateQueue.enqueueCallbackInternal(prevComponent, 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 {ReactElement} nextElement element to render
* @param {DOMElement} container container to render into
* @param {boolean} shouldReuseMarkup if we should skip the markup insertion
* @return {ReactComponent} nextComponent
*/
_renderNewRootComponent: function(
nextElement,
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(nextElement, null);
var reactRootID = ReactMount._registerComponent(
componentInstance,
container
);
// The initial render is synchronous but any updates that happen during
// rendering, in componentWillMount or componentDidMount, will be batched
// according to the current batching strategy.
ReactUpdates.batchedUpdates(
batchedMountComponentIntoNode,
componentInstance,
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),
'React.render(): Invalid component element.%s',
(
typeof nextElement === 'string' ?
' Instead of passing an element string, make sure to instantiate ' +
'it by passing it to React.createElement.' :
typeof nextElement === 'function' ?
' Instead of passing a component class, make sure to instantiate ' +
'it by passing it to React.createElement.' :
// Check if it quacks like an element
nextElement != null && 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
).getPublicInstance();
} else {
ReactMount.unmountComponentAtNode(container);
}
}
var reactRootElement = getReactRootElementInContainer(container);
var containerHasReactMarkup =
reactRootElement && ReactMount.isRenderedByReact(reactRootElement);
if ("production" !== "development") {
if (!containerHasReactMarkup || reactRootElement.nextSibling) {
var rootElementSibling = reactRootElement;
while (rootElementSibling) {
if (ReactMount.isRenderedByReact(rootElementSibling)) {
("production" !== "development" ? warning(
false,
'render(): Target node has markup rendered by React, but there ' +
'are unrelated nodes as well. This is most commonly caused by ' +
'white-space inserted around server-rendered markup.'
) : null);
break;
}
rootElementSibling = rootElementSibling.nextSibling;
}
}
}
var shouldReuseMarkup = containerHasReactMarkup && !prevComponent;
var component = ReactMount._renderNewRootComponent(
nextElement,
container,
shouldReuseMarkup
).getPublicInstance();
if (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 = ReactElement.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);
("production" !== "development" ? invariant(
container && (
(container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE)
),
'unmountComponentAtNode(...): Target container is not a DOM element.'
) : invariant(container && (
(container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE)
)));
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) {
ReactReconciler.unmountComponent(instance);
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 {
("production" !== "development" ? warning(
false,
'ReactMount: Root element has been removed from its original ' +
'container. New container:', rootElement.parentNode
) : null);
}
}
}
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));
},
_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) {
var rootElement = getReactRootElementInContainer(container);
if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) {
return;
} else {
var checksum = rootElement.getAttribute(
ReactMarkupChecksum.CHECKSUM_ATTR_NAME
);
rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
var rootMarkup = rootElement.outerHTML;
rootElement.setAttribute(
ReactMarkupChecksum.CHECKSUM_ATTR_NAME,
checksum
);
var diffIndex = firstDifferenceIndex(markup, rootMarkup);
var difference = ' (client) ' +
markup.substring(diffIndex - 20, diffIndex + 20) +
'\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20);
("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:\n%s',
difference
) : invariant(container.nodeType !== DOC_NODE_TYPE));
if ("production" !== "development") {
("production" !== "development" ? warning(
false,
'React attempted to 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:\n%s',
difference
) : null);
}
}
}
("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 React.renderToString() for server rendering.'
) : invariant(container.nodeType !== DOC_NODE_TYPE));
setInnerHTML(container, markup);
},
/**
* React ID utilities.
*/
getReactRootID: getReactRootID,
getID: getID,
setID: setID,
getNode: getNode,
getNodeFromInstance: getNodeFromInstance,
purgeID: purgeID
};
ReactPerf.measureMethods(ReactMount, 'ReactMount', {
_renderNewRootComponent: '_renderNewRootComponent',
_mountImageIntoNode: '_mountImageIntoNode'
});
module.exports = ReactMount;
},{"10":10,"109":109,"115":115,"129":129,"134":134,"135":135,"148":148,"151":151,"154":154,"30":30,"39":39,"57":57,"58":58,"59":59,"66":66,"67":67,"69":69,"75":75,"81":81,"86":86,"87":87}],71:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 ReactComponentEnvironment = _dereq_(36);
var ReactMultiChildUpdateTypes = _dereq_(72);
var ReactReconciler = _dereq_(81);
var ReactChildReconciler = _dereq_(31);
/**
* 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) {
ReactComponentEnvironment.processChildrenUpdates(
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, context) {
var children = ReactChildReconciler.instantiateChildren(
nestedChildren, transaction, context
);
this._renderedChildren = children;
var mountImages = [];
var index = 0;
for (var name in children) {
if (children.hasOwnProperty(name)) {
var child = children[name];
// Inlined for performance, see `ReactInstanceHandles.createReactID`.
var rootID = this._rootNodeID + name;
var mountImage = ReactReconciler.mountComponent(
child,
rootID,
transaction,
context
);
child._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.
ReactChildReconciler.unmountChildren(prevChildren);
// TODO: The setTextContent operation should be enough
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) {
if (errorThrown) {
clearQueue();
} else {
processQueue();
}
}
}
},
/**
* Updates the rendered children with new children.
*
* @param {?object} nextNestedChildren Nested child maps.
* @param {ReactReconcileTransaction} transaction
* @internal
*/
updateChildren: function(nextNestedChildren, transaction, context) {
updateDepth++;
var errorThrown = true;
try {
this._updateChildren(nextNestedChildren, transaction, context);
errorThrown = false;
} finally {
updateDepth--;
if (!updateDepth) {
if (errorThrown) {
clearQueue();
} else {
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, context) {
var prevChildren = this._renderedChildren;
var nextChildren = ReactChildReconciler.updateChildren(
prevChildren, nextNestedChildren, transaction, context
);
this._renderedChildren = nextChildren;
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 nextChild = nextChildren[name];
if (prevChild === nextChild) {
this.moveChild(prevChild, nextIndex, lastIndex);
lastIndex = Math.max(prevChild._mountIndex, lastIndex);
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.
this._mountChildByNameAtIndex(
nextChild, name, nextIndex, transaction, context
);
}
nextIndex++;
}
// Remove children that are no longer present.
for (name in prevChildren) {
if (prevChildren.hasOwnProperty(name) &&
!(nextChildren && nextChildren.hasOwnProperty(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;
ReactChildReconciler.unmountChildren(renderedChildren);
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,
context) {
// Inlined for performance, see `ReactInstanceHandles.createReactID`.
var rootID = this._rootNodeID + name;
var mountImage = ReactReconciler.mountComponent(
child,
rootID,
transaction,
context
);
child._mountIndex = index;
this.createChild(child, mountImage);
},
/**
* 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;
}
}
};
module.exports = ReactMultiChild;
},{"31":31,"36":36,"72":72,"81":81}],72:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(140);
/**
* 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;
},{"140":140}],73:[function(_dereq_,module,exports){
/**
* Copyright 2014-2015, 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_(27);
var invariant = _dereq_(135);
var autoGenerateWrapperClass = null;
var genericComponentClass = null;
// This registry keeps track of wrapper classes around native tags
var tagToComponentClass = {};
var textComponentClass = null;
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 text component class that takes the text string to be
// rendered as props.
injectTextComponentClass: function(componentClass) {
textComponentClass = 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);
},
// Temporary hack since we expect DOM refs to behave like composites,
// for this release.
injectAutoWrapper: function(wrapperFactory) {
autoGenerateWrapperClass = wrapperFactory;
}
};
/**
* Get a composite component wrapper class for a specific tag.
*
* @param {ReactElement} element The tag for which to get the class.
* @return {function} The React class constructor function.
*/
function getComponentClassForElement(element) {
if (typeof element.type === 'function') {
return element.type;
}
var tag = element.type;
var componentClass = tagToComponentClass[tag];
if (componentClass == null) {
tagToComponentClass[tag] = componentClass = autoGenerateWrapperClass(tag);
}
return componentClass;
}
/**
* Get a native internal component class for a specific tag.
*
* @param {ReactElement} element The element to create.
* @return {function} The internal class constructor function.
*/
function createInternalComponent(element) {
("production" !== "development" ? invariant(
genericComponentClass,
'There is no registered component for the tag %s',
element.type
) : invariant(genericComponentClass));
return new genericComponentClass(element.type, element.props);
}
/**
* @param {ReactText} text
* @return {ReactComponent}
*/
function createInstanceForText(text) {
return new textComponentClass(text);
}
/**
* @param {ReactComponent} component
* @return {boolean}
*/
function isTextComponent(component) {
return component instanceof textComponentClass;
}
var ReactNativeComponent = {
getComponentClassForElement: getComponentClassForElement,
createInternalComponent: createInternalComponent,
createInstanceForText: createInstanceForText,
isTextComponent: isTextComponent,
injection: ReactNativeComponentInjection
};
module.exports = ReactNativeComponent;
},{"135":135,"27":27}],74:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 invariant = _dereq_(135);
/**
* 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.getPublicInstance().refs[ref] === component.getPublicInstance()) {
owner.detachRef(ref);
}
}
};
module.exports = ReactOwner;
},{"135":135}],75:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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,
/**
* @param {object} object
* @param {string} objectName
* @param {object<string>} methodNames
*/
measureMethods: function(object, objectName, methodNames) {
if ("production" !== "development") {
for (var key in methodNames) {
if (!methodNames.hasOwnProperty(key)) {
continue;
}
object[key] = ReactPerf.measure(
objectName,
methodNames[key],
object[key]
);
}
}
},
/**
* 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;
},{}],76:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],77:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(140);
var ReactPropTypeLocations = keyMirror({
prop: null,
context: null,
childContext: null
});
module.exports = ReactPropTypeLocations;
},{"140":140}],78:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(57);
var ReactFragment = _dereq_(63);
var ReactPropTypeLocationNames = _dereq_(76);
var emptyFunction = _dereq_(114);
/**
* 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
};
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 + "`.")
);
}
return null;
} 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 null;
}
return createChainableTypeChecker(validate);
}
function createAnyTypeChecker() {
return createChainableTypeChecker(emptyFunction.thatReturns(null));
}
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 null;
}
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 null;
}
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 null;
}
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 null;
}
}
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 null;
}
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 null;
}
}
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 null;
}
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 null;
}
return createChainableTypeChecker(validate);
}
function isNode(propValue) {
switch (typeof propValue) {
case 'number':
case 'string':
case 'undefined':
return true;
case 'boolean':
return !propValue;
case 'object':
if (Array.isArray(propValue)) {
return propValue.every(isNode);
}
if (propValue === null || ReactElement.isValidElement(propValue)) {
return true;
}
propValue = ReactFragment.extractIfFragment(propValue);
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;
},{"114":114,"57":57,"63":63,"76":76}],79:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(28);
var ReactBrowserEventEmitter = _dereq_(30);
var assign = _dereq_(27);
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;
},{"27":27,"28":28,"30":30}],80:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(6);
var PooledClass = _dereq_(28);
var ReactBrowserEventEmitter = _dereq_(30);
var ReactInputSelection = _dereq_(65);
var ReactPutListenerQueue = _dereq_(79);
var Transaction = _dereq_(103);
var assign = _dereq_(27);
/**
* 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;
},{"103":103,"27":27,"28":28,"30":30,"6":6,"65":65,"79":79}],81:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 ReactReconciler
*/
'use strict';
var ReactRef = _dereq_(82);
var ReactElementValidator = _dereq_(58);
/**
* Helper to call ReactRef.attachRefs with this composite component, split out
* to avoid allocations in the transaction mount-ready queue.
*/
function attachRefs() {
ReactRef.attachRefs(this, this._currentElement);
}
var ReactReconciler = {
/**
* Initializes the component, renders markup, and registers event listeners.
*
* @param {ReactComponent} internalInstance
* @param {string} rootID DOM ID of the root node.
* @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
* @return {?string} Rendered markup to be inserted into the DOM.
* @final
* @internal
*/
mountComponent: function(internalInstance, rootID, transaction, context) {
var markup = internalInstance.mountComponent(rootID, transaction, context);
if ("production" !== "development") {
ReactElementValidator.checkAndWarnForMutatedProps(
internalInstance._currentElement
);
}
transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
return markup;
},
/**
* Releases any resources allocated by `mountComponent`.
*
* @final
* @internal
*/
unmountComponent: function(internalInstance) {
ReactRef.detachRefs(internalInstance, internalInstance._currentElement);
internalInstance.unmountComponent();
},
/**
* Update a component using a new element.
*
* @param {ReactComponent} internalInstance
* @param {ReactElement} nextElement
* @param {ReactReconcileTransaction} transaction
* @param {object} context
* @internal
*/
receiveComponent: function(
internalInstance, nextElement, transaction, context
) {
var prevElement = internalInstance._currentElement;
if (nextElement === prevElement && 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 an element created outside a composite to be
// deeply mutated and reused.
return;
}
if ("production" !== "development") {
ReactElementValidator.checkAndWarnForMutatedProps(nextElement);
}
var refsChanged = ReactRef.shouldUpdateRefs(
prevElement,
nextElement
);
if (refsChanged) {
ReactRef.detachRefs(internalInstance, prevElement);
}
internalInstance.receiveComponent(nextElement, transaction, context);
if (refsChanged) {
transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
}
},
/**
* Flush any dirty changes in a component.
*
* @param {ReactComponent} internalInstance
* @param {ReactReconcileTransaction} transaction
* @internal
*/
performUpdateIfNecessary: function(
internalInstance,
transaction
) {
internalInstance.performUpdateIfNecessary(transaction);
}
};
module.exports = ReactReconciler;
},{"58":58,"82":82}],82:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 ReactRef
*/
'use strict';
var ReactOwner = _dereq_(74);
var ReactRef = {};
function attachRef(ref, component, owner) {
if (typeof ref === 'function') {
ref(component.getPublicInstance());
} else {
// Legacy ref
ReactOwner.addComponentAsRefTo(component, ref, owner);
}
}
function detachRef(ref, component, owner) {
if (typeof ref === 'function') {
ref(null);
} else {
// Legacy ref
ReactOwner.removeComponentAsRefFrom(component, ref, owner);
}
}
ReactRef.attachRefs = function(instance, element) {
var ref = element.ref;
if (ref != null) {
attachRef(ref, instance, element._owner);
}
};
ReactRef.shouldUpdateRefs = function(prevElement, nextElement) {
// 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.
return (
nextElement._owner !== prevElement._owner ||
nextElement.ref !== prevElement.ref
);
};
ReactRef.detachRefs = function(instance, element) {
var ref = element.ref;
if (ref != null) {
detachRef(ref, instance, element._owner);
}
};
module.exports = ReactRef;
},{"74":74}],83:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],84:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(57);
var ReactInstanceHandles = _dereq_(66);
var ReactMarkupChecksum = _dereq_(69);
var ReactServerRenderingTransaction =
_dereq_(85);
var emptyObject = _dereq_(115);
var instantiateReactComponent = _dereq_(134);
var invariant = _dereq_(135);
/**
* @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, emptyObject);
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, emptyObject);
}, null);
} finally {
ReactServerRenderingTransaction.release(transaction);
}
}
module.exports = {
renderToString: renderToString,
renderToStaticMarkup: renderToStaticMarkup
};
},{"115":115,"134":134,"135":135,"57":57,"66":66,"69":69,"85":85}],85:[function(_dereq_,module,exports){
/**
* Copyright 2014-2015, 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_(28);
var CallbackQueue = _dereq_(6);
var ReactPutListenerQueue = _dereq_(79);
var Transaction = _dereq_(103);
var assign = _dereq_(27);
var emptyFunction = _dereq_(114);
/**
* 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;
},{"103":103,"114":114,"27":27,"28":28,"6":6,"79":79}],86:[function(_dereq_,module,exports){
/**
* Copyright 2015, 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 ReactUpdateQueue
*/
'use strict';
var ReactLifeCycle = _dereq_(68);
var ReactCurrentOwner = _dereq_(39);
var ReactElement = _dereq_(57);
var ReactInstanceMap = _dereq_(67);
var ReactUpdates = _dereq_(87);
var assign = _dereq_(27);
var invariant = _dereq_(135);
var warning = _dereq_(154);
function enqueueUpdate(internalInstance) {
if (internalInstance !== ReactLifeCycle.currentlyMountingInstance) {
// 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.
// See bug in #1740.
ReactUpdates.enqueueUpdate(internalInstance);
}
}
function getInternalInstanceReadyForUpdate(publicInstance, callerName) {
("production" !== "development" ? invariant(
ReactCurrentOwner.current == null,
'%s(...): Cannot update during an existing state transition ' +
'(such as within `render`). Render methods should be a pure function ' +
'of props and state.',
callerName
) : invariant(ReactCurrentOwner.current == null));
var internalInstance = ReactInstanceMap.get(publicInstance);
if (!internalInstance) {
if ("production" !== "development") {
// Only warn when we have a callerName. Otherwise we should be silent.
// We're probably calling from enqueueCallback. We don't want to warn
// there because we already warned for the corresponding lifecycle method.
("production" !== "development" ? warning(
!callerName,
'%s(...): Can only update a mounted or mounting component. ' +
'This usually means you called %s() on an unmounted ' +
'component. This is a no-op.',
callerName,
callerName
) : null);
}
return null;
}
if (internalInstance === ReactLifeCycle.currentlyUnmountingInstance) {
return null;
}
return internalInstance;
}
/**
* ReactUpdateQueue allows for state updates to be scheduled into a later
* reconciliation step.
*/
var ReactUpdateQueue = {
/**
* Enqueue a callback that will be executed after all the pending updates
* have processed.
*
* @param {ReactClass} publicInstance The instance to use as `this` context.
* @param {?function} callback Called after state is updated.
* @internal
*/
enqueueCallback: function(publicInstance, callback) {
("production" !== "development" ? invariant(
typeof callback === 'function',
'enqueueCallback(...): You called `setProps`, `replaceProps`, ' +
'`setState`, `replaceState`, or `forceUpdate` with a callback that ' +
'isn\'t callable.'
) : invariant(typeof callback === 'function'));
var internalInstance = getInternalInstanceReadyForUpdate(publicInstance);
// Previously we would throw an error if we didn't have an internal
// instance. Since we want to make it a no-op instead, we mirror the same
// behavior we have in other enqueue* methods.
// We also need to ignore callbacks in componentWillMount. See
// enqueueUpdates.
if (!internalInstance ||
internalInstance === ReactLifeCycle.currentlyMountingInstance) {
return null;
}
if (internalInstance._pendingCallbacks) {
internalInstance._pendingCallbacks.push(callback);
} else {
internalInstance._pendingCallbacks = [callback];
}
// TODO: The callback here is ignored when setState is called from
// componentWillMount. Either fix it or disallow doing so completely in
// favor of getInitialState. Alternatively, we can disallow
// componentWillMount during server-side rendering.
enqueueUpdate(internalInstance);
},
enqueueCallbackInternal: function(internalInstance, callback) {
("production" !== "development" ? invariant(
typeof callback === 'function',
'enqueueCallback(...): You called `setProps`, `replaceProps`, ' +
'`setState`, `replaceState`, or `forceUpdate` with a callback that ' +
'isn\'t callable.'
) : invariant(typeof callback === 'function'));
if (internalInstance._pendingCallbacks) {
internalInstance._pendingCallbacks.push(callback);
} else {
internalInstance._pendingCallbacks = [callback];
}
enqueueUpdate(internalInstance);
},
/**
* 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 {ReactClass} publicInstance The instance that should rerender.
* @internal
*/
enqueueForceUpdate: function(publicInstance) {
var internalInstance = getInternalInstanceReadyForUpdate(
publicInstance,
'forceUpdate'
);
if (!internalInstance) {
return;
}
internalInstance._pendingForceUpdate = true;
enqueueUpdate(internalInstance);
},
/**
* 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 {ReactClass} publicInstance The instance that should rerender.
* @param {object} completeState Next state.
* @internal
*/
enqueueReplaceState: function(publicInstance, completeState) {
var internalInstance = getInternalInstanceReadyForUpdate(
publicInstance,
'replaceState'
);
if (!internalInstance) {
return;
}
internalInstance._pendingStateQueue = [completeState];
internalInstance._pendingReplaceState = true;
enqueueUpdate(internalInstance);
},
/**
* Sets a subset of the state. This only exists because _pendingState is
* internal. This provides a merging strategy that is not available to deep
* properties which is confusing. TODO: Expose pendingState or don't use it
* during the merge.
*
* @param {ReactClass} publicInstance The instance that should rerender.
* @param {object} partialState Next partial state to be merged with state.
* @internal
*/
enqueueSetState: function(publicInstance, partialState) {
var internalInstance = getInternalInstanceReadyForUpdate(
publicInstance,
'setState'
);
if (!internalInstance) {
return;
}
var queue =
internalInstance._pendingStateQueue ||
(internalInstance._pendingStateQueue = []);
queue.push(partialState);
enqueueUpdate(internalInstance);
},
/**
* Sets a subset of the props.
*
* @param {ReactClass} publicInstance The instance that should rerender.
* @param {object} partialProps Subset of the next props.
* @internal
*/
enqueueSetProps: function(publicInstance, partialProps) {
var internalInstance = getInternalInstanceReadyForUpdate(
publicInstance,
'setProps'
);
if (!internalInstance) {
return;
}
("production" !== "development" ? invariant(
internalInstance._isTopLevel,
'setProps(...): You called `setProps` 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(internalInstance._isTopLevel));
// Merge with the pending element if it exists, otherwise with existing
// element props.
var element = internalInstance._pendingElement ||
internalInstance._currentElement;
var props = assign({}, element.props, partialProps);
internalInstance._pendingElement = ReactElement.cloneAndReplaceProps(
element,
props
);
enqueueUpdate(internalInstance);
},
/**
* Replaces all of the props.
*
* @param {ReactClass} publicInstance The instance that should rerender.
* @param {object} props New props.
* @internal
*/
enqueueReplaceProps: function(publicInstance, props) {
var internalInstance = getInternalInstanceReadyForUpdate(
publicInstance,
'replaceProps'
);
if (!internalInstance) {
return;
}
("production" !== "development" ? invariant(
internalInstance._isTopLevel,
'replaceProps(...): You called `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(internalInstance._isTopLevel));
// Merge with the pending element if it exists, otherwise with existing
// element props.
var element = internalInstance._pendingElement ||
internalInstance._currentElement;
internalInstance._pendingElement = ReactElement.cloneAndReplaceProps(
element,
props
);
enqueueUpdate(internalInstance);
},
enqueueElementInternal: function(internalInstance, newElement) {
internalInstance._pendingElement = newElement;
enqueueUpdate(internalInstance);
}
};
module.exports = ReactUpdateQueue;
},{"135":135,"154":154,"27":27,"39":39,"57":57,"67":67,"68":68,"87":87}],87:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(6);
var PooledClass = _dereq_(28);
var ReactCurrentOwner = _dereq_(39);
var ReactPerf = _dereq_(75);
var ReactReconciler = _dereq_(81);
var Transaction = _dereq_(103);
var assign = _dereq_(27);
var invariant = _dereq_(135);
var warning = _dereq_(154);
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, c, d) {
ensureInjected();
batchingStrategy.batchedUpdates(callback, a, b, c, d);
}
/**
* Array comparator for ReactComponents by mount ordering.
*
* @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 mountOrderComparator(c1, c2) {
return c1._mountOrder - c2._mountOrder;
}
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(mountOrderComparator);
for (var i = 0; i < len; i++) {
// If a component is unmounted before pending changes apply, it will still
// be here, but we assume that it has cleared its _pendingCallbacks and
// that performUpdateIfNecessary is a noop.
var component = dirtyComponents[i];
// 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;
ReactReconciler.performUpdateIfNecessary(
component,
transaction.reconcileTransaction
);
if (callbacks) {
for (var j = 0; j < callbacks.length; j++) {
transaction.callbackQueue.enqueue(
callbacks[j],
component.getPublicInstance()
);
}
}
}
}
var 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);
}
}
};
flushBatchedUpdates = ReactPerf.measure(
'ReactUpdates',
'flushBatchedUpdates',
flushBatchedUpdates
);
/**
* 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) {
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);
return;
}
dirtyComponents.push(component);
}
/**
* 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;
},{"103":103,"135":135,"154":154,"27":27,"28":28,"39":39,"6":6,"75":75,"81":81}],88:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(10);
var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE;
var SVGDOMPropertyConfig = {
Properties: {
clipPath: MUST_USE_ATTRIBUTE,
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: {
clipPath: 'clip-path',
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;
},{"10":10}],89:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(15);
var EventPropagators = _dereq_(20);
var ReactInputSelection = _dereq_(65);
var SyntheticEvent = _dereq_(95);
var getActiveElement = _dereq_(121);
var isTextInputElement = _dereq_(138);
var keyOf = _dereq_(141);
var shallowEqual = _dereq_(150);
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 null;
}
// 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;
},{"121":121,"138":138,"141":141,"15":15,"150":150,"20":20,"65":65,"95":95}],90:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],91:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(15);
var EventPluginUtils = _dereq_(19);
var EventPropagators = _dereq_(20);
var SyntheticClipboardEvent = _dereq_(92);
var SyntheticEvent = _dereq_(95);
var SyntheticFocusEvent = _dereq_(96);
var SyntheticKeyboardEvent = _dereq_(98);
var SyntheticMouseEvent = _dereq_(99);
var SyntheticDragEvent = _dereq_(94);
var SyntheticTouchEvent = _dereq_(100);
var SyntheticUIEvent = _dereq_(101);
var SyntheticWheelEvent = _dereq_(102);
var getEventCharCode = _dereq_(122);
var invariant = _dereq_(135);
var keyOf = _dereq_(141);
var warning = _dereq_(154);
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 type in topLevelEventsToDispatchConfig) {
topLevelEventsToDispatchConfig[type].dependencies = [type];
}
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;
},{"100":100,"101":101,"102":102,"122":122,"135":135,"141":141,"15":15,"154":154,"19":19,"20":20,"92":92,"94":94,"95":95,"96":96,"98":98,"99":99}],92:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(95);
/**
* @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;
},{"95":95}],93:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(95);
/**
* @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;
},{"95":95}],94:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(99);
/**
* @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;
},{"99":99}],95:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(28);
var assign = _dereq_(27);
var emptyFunction = _dereq_(114);
var getEventTarget = _dereq_(125);
/**
* @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;
if (event.preventDefault) {
event.preventDefault();
} else {
event.returnValue = false;
}
this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
},
stopPropagation: function() {
var event = this.nativeEvent;
if (event.stopPropagation) {
event.stopPropagation();
} else {
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;
},{"114":114,"125":125,"27":27,"28":28}],96:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(101);
/**
* @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;
},{"101":101}],97:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(95);
/**
* @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;
},{"95":95}],98:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(101);
var getEventCharCode = _dereq_(122);
var getEventKey = _dereq_(123);
var getEventModifierState = _dereq_(124);
/**
* @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;
},{"101":101,"122":122,"123":123,"124":124}],99:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(101);
var ViewportMetrics = _dereq_(104);
var getEventModifierState = _dereq_(124);
/**
* @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;
},{"101":101,"104":104,"124":124}],100:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(101);
var getEventModifierState = _dereq_(124);
/**
* @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;
},{"101":101,"124":124}],101:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(95);
var getEventTarget = _dereq_(125);
/**
* @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;
},{"125":125,"95":95}],102:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(99);
/**
* @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;
},{"99":99}],103:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(135);
/**
* `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 updates.
*
* 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;
},{"135":135}],104:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 ViewportMetrics = {
currentScrollLeft: 0,
currentScrollTop: 0,
refreshScrollValues: function(scrollPosition) {
ViewportMetrics.currentScrollLeft = scrollPosition.x;
ViewportMetrics.currentScrollTop = scrollPosition.y;
}
};
module.exports = ViewportMetrics;
},{}],105:[function(_dereq_,module,exports){
/**
* Copyright 2014-2015, 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_(135);
/**
*
* 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;
},{"135":135}],106:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],107:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],108:[function(_dereq_,module,exports){
/**
* Copyright 2014-2015, 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_(107);
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;
},{"107":107}],109:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(139);
/*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;
},{"139":139}],110:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 createArrayFromMixed
* @typechecks
*/
var toArray = _dereq_(152);
/**
* 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 createArrayFromMixed = require('createArrayFromMixed');
*
* function takesOneOrMoreThings(things) {
* things = createArrayFromMixed(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 createArrayFromMixed(obj) {
if (!hasArrayNature(obj)) {
return [obj];
} else if (Array.isArray(obj)) {
return obj.slice();
} else {
return toArray(obj);
}
}
module.exports = createArrayFromMixed;
},{"152":152}],111:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 ReactClass = _dereq_(33);
var ReactElement = _dereq_(57);
var invariant = _dereq_(135);
/**
* 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 = ReactClass.createClass({
tagName: tag.toUpperCase(),
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;
},{"135":135,"33":33,"57":57}],112:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(21);
var createArrayFromMixed = _dereq_(110);
var getMarkupWrap = _dereq_(127);
var invariant = _dereq_(135);
/**
* 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));
createArrayFromMixed(scripts).forEach(handleScript);
}
var nodes = createArrayFromMixed(node.childNodes);
while (node.lastChild) {
node.removeChild(node.lastChild);
}
return nodes;
}
module.exports = createNodesFromMarkup;
},{"110":110,"127":127,"135":135,"21":21}],113:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(4);
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;
},{"4":4}],114:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],115:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],116:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 escapeTextContentForBrowser
*/
'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 escapeTextContentForBrowser(text) {
return ('' + text).replace(ESCAPE_REGEX, escaper);
}
module.exports = escapeTextContentForBrowser;
},{}],117:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 findDOMNode
* @typechecks static-only
*/
'use strict';
var ReactCurrentOwner = _dereq_(39);
var ReactInstanceMap = _dereq_(67);
var ReactMount = _dereq_(70);
var invariant = _dereq_(135);
var isNode = _dereq_(137);
var warning = _dereq_(154);
/**
* Returns the DOM node rendered by this element.
*
* @param {ReactComponent|DOMElement} componentOrElement
* @return {DOMElement} The root node of this element.
*/
function findDOMNode(componentOrElement) {
if ("production" !== "development") {
var owner = ReactCurrentOwner.current;
if (owner !== null) {
("production" !== "development" ? warning(
owner._warnedAboutRefsInRender,
'%s is accessing getDOMNode or findDOMNode inside its render(). ' +
'render() should be a pure function of props and state. It should ' +
'never access something that requires stale data from the previous ' +
'render, such as refs. Move this logic to componentDidMount and ' +
'componentDidUpdate instead.',
owner.getName() || 'A component'
) : null);
owner._warnedAboutRefsInRender = true;
}
}
if (componentOrElement == null) {
return null;
}
if (isNode(componentOrElement)) {
return componentOrElement;
}
if (ReactInstanceMap.has(componentOrElement)) {
return ReactMount.getNodeFromInstance(componentOrElement);
}
("production" !== "development" ? invariant(
componentOrElement.render == null ||
typeof componentOrElement.render !== 'function',
'Component (with keys: %s) contains `render` method ' +
'but is not mounted in the DOM',
Object.keys(componentOrElement)
) : invariant(componentOrElement.render == null ||
typeof componentOrElement.render !== 'function'));
("production" !== "development" ? invariant(
false,
'Element appears to be neither ReactComponent nor DOMNode (keys: %s)',
Object.keys(componentOrElement)
) : invariant(false));
}
module.exports = findDOMNode;
},{"135":135,"137":137,"154":154,"39":39,"67":67,"70":70}],118:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 traverseAllChildren = _dereq_(153);
var warning = _dereq_(154);
/**
* @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);
if ("production" !== "development") {
("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) {
result[name] = child;
}
}
/**
* 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;
},{"153":153,"154":154}],119:[function(_dereq_,module,exports){
/**
* Copyright 2014-2015, 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;
},{}],120:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],121:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],122:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],123:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(122);
/**
* 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;
},{"122":122}],124:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],125:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],126:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 getIteratorFn
* @typechecks static-only
*/
'use strict';
/* global Symbol */
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
/**
* Returns the iterator method function contained on the iterable object.
*
* Be sure to invoke the function with the iterable as context:
*
* var iteratorFn = getIteratorFn(myIterable);
* if (iteratorFn) {
* var iterator = iteratorFn.call(myIterable);
* ...
* }
*
* @param {?object} maybeIterable
* @return {?function}
*/
function getIteratorFn(maybeIterable) {
var iteratorFn = maybeIterable && (
(ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL])
);
if (typeof iteratorFn === 'function') {
return iteratorFn;
}
}
module.exports = getIteratorFn;
},{}],127:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(21);
var invariant = _dereq_(135);
/**
* 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,
'clipPath': 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,
'clipPath': 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;
},{"135":135,"21":21}],128:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],129:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],130:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(21);
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;
},{"21":21}],131:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],132:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],133:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(132);
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;
},{"132":132}],134:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 ReactCompositeComponent = _dereq_(37);
var ReactEmptyComponent = _dereq_(59);
var ReactNativeComponent = _dereq_(73);
var assign = _dereq_(27);
var invariant = _dereq_(135);
var warning = _dereq_(154);
// To avoid a cyclic dependency, we create the final class in this module
var ReactCompositeComponentWrapper = function() { };
assign(
ReactCompositeComponentWrapper.prototype,
ReactCompositeComponent.Mixin,
{
_instantiateReactComponent: instantiateReactComponent
}
);
/**
* Check if the type reference is a known internal type. I.e. not a user
* provided composite type.
*
* @param {function} type
* @return {boolean} Returns true if this is a valid internal type.
*/
function isInternalComponentType(type) {
return (
typeof type === 'function' &&
typeof type.prototype !== 'undefined' &&
typeof type.prototype.mountComponent === 'function' &&
typeof type.prototype.receiveComponent === 'function'
);
}
/**
* Given a ReactNode, create an instance that will actually be mounted.
*
* @param {ReactNode} node
* @param {*} parentCompositeType The composite type that resolved this.
* @return {object} A new instance of the element's constructor.
* @protected
*/
function instantiateReactComponent(node, parentCompositeType) {
var instance;
if (node === null || node === false) {
node = ReactEmptyComponent.emptyElement;
}
if (typeof node === 'object') {
var element = node;
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);
}
// Special case string values
if (parentCompositeType === element.type &&
typeof element.type === 'string') {
// Avoid recursion if the wrapper renders itself.
instance = ReactNativeComponent.createInternalComponent(element);
// All native components are currently wrapped in a composite so we're
// safe to assume that this is what we should instantiate.
} else if (isInternalComponentType(element.type)) {
// This is temporarily available for custom components that are not string
// represenations. I.e. ART. Once those are updated to use the string
// representation, we can drop this code path.
instance = new element.type(element);
} else {
instance = new ReactCompositeComponentWrapper();
}
} else if (typeof node === 'string' || typeof node === 'number') {
instance = ReactNativeComponent.createInstanceForText(node);
} else {
("production" !== "development" ? invariant(
false,
'Encountered invalid React node of type %s',
typeof node
) : invariant(false));
}
if ("production" !== "development") {
("production" !== "development" ? warning(
typeof instance.construct === 'function' &&
typeof instance.mountComponent === 'function' &&
typeof instance.receiveComponent === 'function' &&
typeof instance.unmountComponent === 'function',
'Only React Components can be mounted.'
) : null);
}
// Sets up the instance. This can probably just move into the constructor now.
instance.construct(node);
// These two fields are used by the DOM and ART diffing algorithms
// respectively. Instead of using expandos on components, we should be
// storing the state needed by the diffing algorithms elsewhere.
instance._mountIndex = 0;
instance._mountImage = null;
if ("production" !== "development") {
instance._isOwnerNecessary = false;
instance._warnedAboutRefsInRender = false;
}
// Internal instances should fully constructed at this point, so they should
// not get any new fields added to them at this point.
if ("production" !== "development") {
if (Object.preventExtensions) {
Object.preventExtensions(instance);
}
}
return instance;
}
module.exports = instantiateReactComponent;
},{"135":135,"154":154,"27":27,"37":37,"59":59,"73":73}],135:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],136:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(21);
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;
},{"21":21}],137:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],138:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],139:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(137);
/**
* @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;
},{"137":137}],140:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(135);
/**
* 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;
},{"135":135}],141:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],142:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],143:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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)) {
cache[string] = callback.call(this, string);
}
return cache[string];
};
}
module.exports = memoizeStringOnly;
},{}],144:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(57);
var invariant = _dereq_(135);
/**
* 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;
},{"135":135,"57":57}],145:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(21);
var performance;
if (ExecutionEnvironment.canUseDOM) {
performance =
window.performance ||
window.msPerformance ||
window.webkitPerformance;
}
module.exports = performance || {};
},{"21":21}],146:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(145);
/**
* 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;
},{"145":145}],147:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 quoteAttributeValueForBrowser
*/
'use strict';
var escapeTextContentForBrowser = _dereq_(116);
/**
* Escapes attribute value to prevent scripting attacks.
*
* @param {*} value Value to escape.
* @return {string} An escaped string.
*/
function quoteAttributeValueForBrowser(value) {
return '"' + escapeTextContentForBrowser(value) + '"';
}
module.exports = quoteAttributeValueForBrowser;
},{"116":116}],148:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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
*/
/* globals MSApp */
'use strict';
var ExecutionEnvironment = _dereq_(21);
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;
};
// Win8 apps: Allow all html to be inserted
if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
setInnerHTML = function(node, html) {
MSApp.execUnsafeLocalFunction(function() {
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;
},{"21":21}],149:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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 setTextContent
*/
'use strict';
var ExecutionEnvironment = _dereq_(21);
var escapeTextContentForBrowser = _dereq_(116);
var setInnerHTML = _dereq_(148);
/**
* Set the textContent property of a node, ensuring that whitespace is preserved
* even in IE8. innerText is a poor substitute for textContent and, among many
* issues, inserts <br> instead of the literal newline chars. innerHTML behaves
* as it should.
*
* @param {DOMElement} node
* @param {string} text
* @internal
*/
var setTextContent = function(node, text) {
node.textContent = text;
};
if (ExecutionEnvironment.canUseDOM) {
if (!('textContent' in document.documentElement)) {
setTextContent = function(node, text) {
setInnerHTML(node, escapeTextContentForBrowser(text));
};
}
}
module.exports = setTextContent;
},{"116":116,"148":148,"21":21}],150:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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;
},{}],151:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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';
var warning = _dereq_(154);
/**
* 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 != null && nextElement != null) {
var prevType = typeof prevElement;
var nextType = typeof nextElement;
if (prevType === 'string' || prevType === 'number') {
return (nextType === 'string' || nextType === 'number');
} else {
if (nextType === 'object' &&
prevElement.type === nextElement.type &&
prevElement.key === nextElement.key) {
var ownersMatch = prevElement._owner === nextElement._owner;
var prevName = null;
var nextName = null;
var nextDisplayName = null;
if ("production" !== "development") {
if (!ownersMatch) {
if (prevElement._owner != null &&
prevElement._owner.getPublicInstance() != null &&
prevElement._owner.getPublicInstance().constructor != null) {
prevName =
prevElement._owner.getPublicInstance().constructor.displayName;
}
if (nextElement._owner != null &&
nextElement._owner.getPublicInstance() != null &&
nextElement._owner.getPublicInstance().constructor != null) {
nextName =
nextElement._owner.getPublicInstance().constructor.displayName;
}
if (nextElement.type != null &&
nextElement.type.displayName != null) {
nextDisplayName = nextElement.type.displayName;
}
if (nextElement.type != null && typeof nextElement.type === 'string') {
nextDisplayName = nextElement.type;
}
if (typeof nextElement.type !== 'string' ||
nextElement.type === 'input' ||
nextElement.type === 'textarea') {
if ((prevElement._owner != null &&
prevElement._owner._isOwnerNecessary === false) ||
(nextElement._owner != null &&
nextElement._owner._isOwnerNecessary === false)) {
if (prevElement._owner != null) {
prevElement._owner._isOwnerNecessary = true;
}
if (nextElement._owner != null) {
nextElement._owner._isOwnerNecessary = true;
}
("production" !== "development" ? warning(
false,
'<%s /> is being rendered by both %s and %s using the same ' +
'key (%s) in the same place. Currently, this means that ' +
'they don\'t preserve state. This behavior should be very ' +
'rare so we\'re considering deprecating it. Please contact ' +
'the React team and explain your use case so that we can ' +
'take that into consideration.',
nextDisplayName || 'Unknown Component',
prevName || '[Unknown]',
nextName || '[Unknown]',
prevElement.key
) : null);
}
}
}
}
return ownersMatch;
}
}
}
return false;
}
module.exports = shouldUpdateReactComponent;
},{"154":154}],152:[function(_dereq_,module,exports){
/**
* Copyright 2014-2015, 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_(135);
/**
* Convert array-like objects to arrays.
*
* This API assumes the caller knows the contents of the data type. For less
* well defined inputs use createArrayFromMixed.
*
* @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;
},{"135":135}],153:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, 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_(57);
var ReactFragment = _dereq_(63);
var ReactInstanceHandles = _dereq_(66);
var getIteratorFn = _dereq_(126);
var invariant = _dereq_(135);
var warning = _dereq_(154);
var SEPARATOR = ReactInstanceHandles.SEPARATOR;
var SUBSEPARATOR = ':';
/**
* TODO: Test that a single child and an array with one item have the same key
* pattern.
*/
var userProvidedKeyEscaperLookup = {
'=': '=0',
'.': '=1',
':': '=2'
};
var userProvidedKeyEscapeRegex = /[=.:]/g;
var didWarnAboutMaps = false;
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.
*/
function traverseAllChildrenImpl(
children,
nameSoFar,
indexSoFar,
callback,
traverseContext
) {
var type = typeof children;
if (type === 'undefined' || type === 'boolean') {
// All of the above are perceived as null.
children = null;
}
if (children === null ||
type === 'string' ||
type === 'number' ||
ReactElement.isValidElement(children)) {
callback(
traverseContext,
children,
// 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.
nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar,
indexSoFar
);
return 1;
}
var child, 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++) {
child = children[i];
nextName = (
(nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) +
getComponentKey(child, i)
);
nextIndex = indexSoFar + subtreeCount;
subtreeCount += traverseAllChildrenImpl(
child,
nextName,
nextIndex,
callback,
traverseContext
);
}
} else {
var iteratorFn = getIteratorFn(children);
if (iteratorFn) {
var iterator = iteratorFn.call(children);
var step;
if (iteratorFn !== children.entries) {
var ii = 0;
while (!(step = iterator.next()).done) {
child = step.value;
nextName = (
(nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) +
getComponentKey(child, ii++)
);
nextIndex = indexSoFar + subtreeCount;
subtreeCount += traverseAllChildrenImpl(
child,
nextName,
nextIndex,
callback,
traverseContext
);
}
} else {
if ("production" !== "development") {
("production" !== "development" ? warning(
didWarnAboutMaps,
'Using Maps as children is not yet fully supported. It is an ' +
'experimental feature that might be removed. Convert it to a ' +
'sequence / iterable of keyed ReactElements instead.'
) : null);
didWarnAboutMaps = true;
}
// Iterator will provide entry [k,v] tuples rather than values.
while (!(step = iterator.next()).done) {
var entry = step.value;
if (entry) {
child = entry[1];
nextName = (
(nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) +
wrapUserProvidedKey(entry[0]) + SUBSEPARATOR +
getComponentKey(child, 0)
);
nextIndex = indexSoFar + subtreeCount;
subtreeCount += traverseAllChildrenImpl(
child,
nextName,
nextIndex,
callback,
traverseContext
);
}
}
}
} else if (type === 'object') {
("production" !== "development" ? invariant(
children.nodeType !== 1,
'traverseAllChildren(...): Encountered an invalid child; DOM ' +
'elements are not valid children of React components.'
) : invariant(children.nodeType !== 1));
var fragment = ReactFragment.extract(children);
for (var key in fragment) {
if (fragment.hasOwnProperty(key)) {
child = fragment[key];
nextName = (
(nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) +
wrapUserProvidedKey(key) + SUBSEPARATOR +
getComponentKey(child, 0)
);
nextIndex = indexSoFar + subtreeCount;
subtreeCount += traverseAllChildrenImpl(
child,
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;
},{"126":126,"135":135,"154":154,"57":57,"63":63,"66":66}],154:[function(_dereq_,module,exports){
/**
* Copyright 2014-2015, 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_(114);
/**
* 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 (format.length < 10 || /^[s\W]*$/.test(format)) {
throw new Error(
'The warning format should be able to uniquely identify this ' +
'warning. Please, use a more descriptive format than: ' + format
);
}
if (format.indexOf('Failed Composite propType: ') === 0) {
return; // Ignore CompositeComponent proptype check.
}
if (!condition) {
var argIndex = 0;
var message = 'Warning: ' + format.replace(/%s/g, function() {return args[argIndex++];});
console.warn(message);
try {
// --- Welcome to debugging React ---
// This error was thrown as a convenience so that you can use this stack
// to find the callsite that caused this warning to fire.
throw new Error(message);
} catch(x) {}
}
};
}
module.exports = warning;
},{"114":114}]},{},[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.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.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.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("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.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.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.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.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("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.170";
cljs.core._STAR_unchecked_if_STAR_ = false;
cljs.core._STAR_target_STAR_;
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.into_array;
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__6780__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__6780 = function(var_args) {
var args = null;
if (arguments.length > 0) {
var G__6781__i = 0, G__6781__a = new Array(arguments.length - 0);
while (G__6781__i < G__6781__a.length) {
G__6781__a[G__6781__i] = arguments[G__6781__i + 0];
++G__6781__i;
}
args = new cljs.core.IndexedSeq(G__6781__a, 0);
}
return G__6780__delegate.call(this, args);
};
G__6780.cljs$lang$maxFixedArity = 0;
G__6780.cljs$lang$applyTo = function(arglist__6782) {
var args = cljs.core.seq(arglist__6782);
return G__6780__delegate(args);
};
G__6780.cljs$core$IFn$_invoke$arity$variadic = G__6780__delegate;
return G__6780;
}();
cljs.core._STAR_print_err_fn_STAR_ = function() {
var G__6783__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__6783 = function(var_args) {
var args = null;
if (arguments.length > 0) {
var G__6784__i = 0, G__6784__a = new Array(arguments.length - 0);
while (G__6784__i < G__6784__a.length) {
G__6784__a[G__6784__i] = arguments[G__6784__i + 0];
++G__6784__i;
}
args = new cljs.core.IndexedSeq(G__6784__a, 0);
}
return G__6783__delegate.call(this, args);
};
G__6783.cljs$lang$maxFixedArity = 0;
G__6783.cljs$lang$applyTo = function(arglist__6785) {
var args = cljs.core.seq(arglist__6785);
return G__6783__delegate(args);
};
G__6783.cljs$core$IFn$_invoke$arity$variadic = G__6783__delegate;
return G__6783;
}();
return null;
};
cljs.core._STAR_1;
cljs.core._STAR_2;
cljs.core._STAR_3;
cljs.core._STAR_e;
cljs.core.truth_ = function cljs$core$truth_(x) {
return x != null && x !== false;
};
cljs.core.not_native = null;
cljs.core.instance_QMARK_;
cljs.core.Keyword;
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_(n) {
return typeof n === "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__4659__auto__ = ty;
if (cljs.core.truth_(and__4659__auto__)) {
return ty.cljs$lang$type;
} else {
return and__4659__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 args6786 = [];
var len__5729__auto___6789 = arguments.length;
var i__5730__auto___6790 = 0;
while (true) {
if (i__5730__auto___6790 < len__5729__auto___6789) {
args6786.push(arguments[i__5730__auto___6790]);
var G__6791 = i__5730__auto___6790 + 1;
i__5730__auto___6790 = G__6791;
continue;
} else {
}
break;
}
var G__6788 = args6786.length;
switch(G__6788) {
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(args6786.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__5574__auto___6793 = len;
var i_6794 = 0;
while (true) {
if (i_6794 < n__5574__auto___6793) {
new_arr[i_6794] = arr[i_6794];
var G__6795 = i_6794 + 1;
i_6794 = G__6795;
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__6796 = i + 1;
i = G__6796;
continue;
} else {
return a;
}
break;
}
};
cljs.core.apply;
cljs.core.aget = function cljs$core$aget(var_args) {
var args6797 = [];
var len__5729__auto___6806 = arguments.length;
var i__5730__auto___6807 = 0;
while (true) {
if (i__5730__auto___6807 < len__5729__auto___6806) {
args6797.push(arguments[i__5730__auto___6807]);
var G__6808 = i__5730__auto___6807 + 1;
i__5730__auto___6807 = G__6808;
continue;
} else {
}
break;
}
var G__6802 = args6797.length;
switch(G__6802) {
case 2:
return cljs.core.aget.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
var argseq__5748__auto__ = new cljs.core.IndexedSeq(args6797.slice(2), 0);
return cljs.core.aget.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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__6803 = cljs.core.aget;
var G__6804 = array[i];
var G__6805 = idxs;
return cljs.core.apply.cljs$core$IFn$_invoke$arity$3 ? cljs.core.apply.cljs$core$IFn$_invoke$arity$3(G__6803, G__6804, G__6805) : cljs.core.apply.call(null, G__6803, G__6804, G__6805);
};
cljs.core.aget.cljs$lang$applyTo = function(seq6798) {
var G__6799 = cljs.core.first(seq6798);
var seq6798__$1 = cljs.core.next(seq6798);
var G__6800 = cljs.core.first(seq6798__$1);
var seq6798__$2 = cljs.core.next(seq6798__$1);
return cljs.core.aget.cljs$core$IFn$_invoke$arity$variadic(G__6799, G__6800, seq6798__$2);
};
cljs.core.aget.cljs$lang$maxFixedArity = 2;
cljs.core.aset = function cljs$core$aset(var_args) {
var args6810 = [];
var len__5729__auto___6821 = arguments.length;
var i__5730__auto___6822 = 0;
while (true) {
if (i__5730__auto___6822 < len__5729__auto___6821) {
args6810.push(arguments[i__5730__auto___6822]);
var G__6823 = i__5730__auto___6822 + 1;
i__5730__auto___6822 = G__6823;
continue;
} else {
}
break;
}
var G__6816 = args6810.length;
switch(G__6816) {
case 3:
return cljs.core.aset.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
break;
default:
var argseq__5748__auto__ = new cljs.core.IndexedSeq(args6810.slice(3), 0);
return cljs.core.aset.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], argseq__5748__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__6817 = cljs.core.aset;
var G__6818 = array[idx];
var G__6819 = idx2;
var G__6820 = idxv;
return cljs.core.apply.cljs$core$IFn$_invoke$arity$4 ? cljs.core.apply.cljs$core$IFn$_invoke$arity$4(G__6817, G__6818, G__6819, G__6820) : cljs.core.apply.call(null, G__6817, G__6818, G__6819, G__6820);
};
cljs.core.aset.cljs$lang$applyTo = function(seq6811) {
var G__6812 = cljs.core.first(seq6811);
var seq6811__$1 = cljs.core.next(seq6811);
var G__6813 = cljs.core.first(seq6811__$1);
var seq6811__$2 = cljs.core.next(seq6811__$1);
var G__6814 = cljs.core.first(seq6811__$2);
var seq6811__$3 = cljs.core.next(seq6811__$2);
return cljs.core.aset.cljs$core$IFn$_invoke$arity$variadic(G__6812, G__6813, G__6814, seq6811__$3);
};
cljs.core.aset.cljs$lang$maxFixedArity = 3;
cljs.core.alength = function cljs$core$alength(array) {
return array.length;
};
cljs.core.reduce;
cljs.core.into_array = function cljs$core$into_array(var_args) {
var args6825 = [];
var len__5729__auto___6831 = arguments.length;
var i__5730__auto___6832 = 0;
while (true) {
if (i__5730__auto___6832 < len__5729__auto___6831) {
args6825.push(arguments[i__5730__auto___6832]);
var G__6833 = i__5730__auto___6832 + 1;
i__5730__auto___6832 = G__6833;
continue;
} else {
}
break;
}
var G__6827 = args6825.length;
switch(G__6827) {
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(args6825.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__6828 = function(a, x) {
a.push(x);
return a;
};
var G__6829 = [];
var G__6830 = aseq;
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3 ? cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(G__6828, G__6829, G__6830) : cljs.core.reduce.call(null, G__6828, G__6829, G__6830);
};
cljs.core.into_array.cljs$lang$maxFixedArity = 2;
cljs.core.js_invoke = function cljs$core$js_invoke(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___6838 = arguments.length;
var i__5730__auto___6839 = 0;
while (true) {
if (i__5730__auto___6839 < len__5729__auto___6838) {
args__5736__auto__.push(arguments[i__5730__auto___6839]);
var G__6840 = i__5730__auto___6839 + 1;
i__5730__auto___6839 = G__6840;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 2 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(2), 0) : null;
return cljs.core.js_invoke.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5737__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(seq6835) {
var G__6836 = cljs.core.first(seq6835);
var seq6835__$1 = cljs.core.next(seq6835);
var G__6837 = cljs.core.first(seq6835__$1);
var seq6835__$2 = cljs.core.next(seq6835__$1);
return cljs.core.js_invoke.cljs$core$IFn$_invoke$arity$variadic(G__6836, G__6837, seq6835__$2);
};
cljs.core.Fn = function() {
};
cljs.core.IFn = function() {
};
cljs.core._invoke = function cljs$core$_invoke(var_args) {
var args6841 = [];
var len__5729__auto___6844 = arguments.length;
var i__5730__auto___6845 = 0;
while (true) {
if (i__5730__auto___6845 < len__5729__auto___6844) {
args6841.push(arguments[i__5730__auto___6845]);
var G__6846 = i__5730__auto___6845 + 1;
i__5730__auto___6845 = G__6846;
continue;
} else {
}
break;
}
var G__6843 = args6841.length;
switch(G__6843) {
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(args6841.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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._invoke[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(this$) : m__5327__auto__.call(null, this$);
} else {
var m__5327__auto____$1 = cljs.core._invoke["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(this$) : m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._invoke[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(this$, a) : m__5327__auto__.call(null, this$, a);
} else {
var m__5327__auto____$1 = cljs.core._invoke["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(this$, a) : m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._invoke[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$3(this$, a, b) : m__5327__auto__.call(null, this$, a, b);
} else {
var m__5327__auto____$1 = cljs.core._invoke["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3(this$, a, b) : m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._invoke[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$4 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$4(this$, a, b, c) : m__5327__auto__.call(null, this$, a, b, c);
} else {
var m__5327__auto____$1 = cljs.core._invoke["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$4 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$4(this$, a, b, c) : m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._invoke[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$5 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$5(this$, a, b, c, d) : m__5327__auto__.call(null, this$, a, b, c, d);
} else {
var m__5327__auto____$1 = cljs.core._invoke["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$5 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$5(this$, a, b, c, d) : m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._invoke[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$6 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$6(this$, a, b, c, d, e) : m__5327__auto__.call(null, this$, a, b, c, d, e);
} else {
var m__5327__auto____$1 = cljs.core._invoke["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$6 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$6(this$, a, b, c, d, e) : m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._invoke[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$7 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$7(this$, a, b, c, d, e, f) : m__5327__auto__.call(null, this$, a, b, c, d, e, f);
} else {
var m__5327__auto____$1 = cljs.core._invoke["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$7 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$7(this$, a, b, c, d, e, f) : m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._invoke[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$8 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$8(this$, a, b, c, d, e, f, g) : m__5327__auto__.call(null, this$, a, b, c, d, e, f, g);
} else {
var m__5327__auto____$1 = cljs.core._invoke["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$8 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$8(this$, a, b, c, d, e, f, g) : m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._invoke[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$9 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$9(this$, a, b, c, d, e, f, g, h) : m__5327__auto__.call(null, this$, a, b, c, d, e, f, g, h);
} else {
var m__5327__auto____$1 = cljs.core._invoke["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$9 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$9(this$, a, b, c, d, e, f, g, h) : m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._invoke[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$10 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$10(this$, a, b, c, d, e, f, g, h, i) : m__5327__auto__.call(null, this$, a, b, c, d, e, f, g, h, i);
} else {
var m__5327__auto____$1 = cljs.core._invoke["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$10 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$10(this$, a, b, c, d, e, f, g, h, i) : m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._invoke[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$11 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$11(this$, a, b, c, d, e, f, g, h, i, j) : m__5327__auto__.call(null, this$, a, b, c, d, e, f, g, h, i, j);
} else {
var m__5327__auto____$1 = cljs.core._invoke["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$11 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$11(this$, a, b, c, d, e, f, g, h, i, j) : m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._invoke[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$12 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$12(this$, a, b, c, d, e, f, g, h, i, j, k) : m__5327__auto__.call(null, this$, a, b, c, d, e, f, g, h, i, j, k);
} else {
var m__5327__auto____$1 = cljs.core._invoke["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$12 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$12(this$, a, b, c, d, e, f, g, h, i, j, k) : m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._invoke[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$13 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$13(this$, a, b, c, d, e, f, g, h, i, j, k, l) : m__5327__auto__.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l);
} else {
var m__5327__auto____$1 = cljs.core._invoke["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$13 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$13(this$, a, b, c, d, e, f, g, h, i, j, k, l) : m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._invoke[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$14 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$14(this$, a, b, c, d, e, f, g, h, i, j, k, l, m) : m__5327__auto__.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m);
} else {
var m__5327__auto____$1 = cljs.core._invoke["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$14 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$14(this$, a, b, c, d, e, f, g, h, i, j, k, l, m) : m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._invoke[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$15 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$15(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n) : m__5327__auto__.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n);
} else {
var m__5327__auto____$1 = cljs.core._invoke["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$15 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$15(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n) : m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._invoke[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$16 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$16(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) : m__5327__auto__.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
} else {
var m__5327__auto____$1 = cljs.core._invoke["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$16 ? m__5327__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__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._invoke[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$17 ? m__5327__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__5327__auto__.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
} else {
var m__5327__auto____$1 = cljs.core._invoke["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$17 ? m__5327__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__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._invoke[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$18 ? m__5327__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__5327__auto__.call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q);
} else {
var m__5327__auto____$1 = cljs.core._invoke["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$18 ? m__5327__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__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._invoke[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$19 ? m__5327__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__5327__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__5327__auto____$1 = cljs.core._invoke["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$19 ? m__5327__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__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._invoke[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$20 ? m__5327__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__5327__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__5327__auto____$1 = cljs.core._invoke["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$20 ? m__5327__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__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._invoke[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$21 ? m__5327__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__5327__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__5327__auto____$1 = cljs.core._invoke["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$21 ? m__5327__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__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._invoke[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$22 ? m__5327__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__5327__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__5327__auto____$1 = cljs.core._invoke["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$22 ? m__5327__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__5327__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__5326__auto__ = value == null ? null : value;
var m__5327__auto__ = cljs.core._clone[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(value) : m__5327__auto__.call(null, value);
} else {
var m__5327__auto____$1 = cljs.core._clone["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(value) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._count[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__auto__.call(null, coll);
} else {
var m__5327__auto____$1 = cljs.core._count["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._empty[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__auto__.call(null, coll);
} else {
var m__5327__auto____$1 = cljs.core._empty["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._conj[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(coll, o) : m__5327__auto__.call(null, coll, o);
} else {
var m__5327__auto____$1 = cljs.core._conj["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(coll, o) : m__5327__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 args6848 = [];
var len__5729__auto___6851 = arguments.length;
var i__5730__auto___6852 = 0;
while (true) {
if (i__5730__auto___6852 < len__5729__auto___6851) {
args6848.push(arguments[i__5730__auto___6852]);
var G__6853 = i__5730__auto___6852 + 1;
i__5730__auto___6852 = G__6853;
continue;
} else {
}
break;
}
var G__6850 = args6848.length;
switch(G__6850) {
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(args6848.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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._nth[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(coll, n) : m__5327__auto__.call(null, coll, n);
} else {
var m__5327__auto____$1 = cljs.core._nth["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(coll, n) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._nth[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$3(coll, n, not_found) : m__5327__auto__.call(null, coll, n, not_found);
} else {
var m__5327__auto____$1 = cljs.core._nth["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3(coll, n, not_found) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._first[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__auto__.call(null, coll);
} else {
var m__5327__auto____$1 = cljs.core._first["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._rest[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__auto__.call(null, coll);
} else {
var m__5327__auto____$1 = cljs.core._rest["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._next[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__auto__.call(null, coll);
} else {
var m__5327__auto____$1 = cljs.core._next["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__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 args6855 = [];
var len__5729__auto___6858 = arguments.length;
var i__5730__auto___6859 = 0;
while (true) {
if (i__5730__auto___6859 < len__5729__auto___6858) {
args6855.push(arguments[i__5730__auto___6859]);
var G__6860 = i__5730__auto___6859 + 1;
i__5730__auto___6859 = G__6860;
continue;
} else {
}
break;
}
var G__6857 = args6855.length;
switch(G__6857) {
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(args6855.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__5326__auto__ = o == null ? null : o;
var m__5327__auto__ = cljs.core._lookup[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(o, k) : m__5327__auto__.call(null, o, k);
} else {
var m__5327__auto____$1 = cljs.core._lookup["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(o, k) : m__5327__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__5326__auto__ = o == null ? null : o;
var m__5327__auto__ = cljs.core._lookup[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$3(o, k, not_found) : m__5327__auto__.call(null, o, k, not_found);
} else {
var m__5327__auto____$1 = cljs.core._lookup["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3(o, k, not_found) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._contains_key_QMARK_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(coll, k) : m__5327__auto__.call(null, coll, k);
} else {
var m__5327__auto____$1 = cljs.core._contains_key_QMARK_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(coll, k) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._assoc[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$3(coll, k, v) : m__5327__auto__.call(null, coll, k, v);
} else {
var m__5327__auto____$1 = cljs.core._assoc["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3(coll, k, v) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._dissoc[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(coll, k) : m__5327__auto__.call(null, coll, k);
} else {
var m__5327__auto____$1 = cljs.core._dissoc["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(coll, k) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._key[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__auto__.call(null, coll);
} else {
var m__5327__auto____$1 = cljs.core._key["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._val[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__auto__.call(null, coll);
} else {
var m__5327__auto____$1 = cljs.core._val["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._disjoin[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(coll, v) : m__5327__auto__.call(null, coll, v);
} else {
var m__5327__auto____$1 = cljs.core._disjoin["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(coll, v) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._peek[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__auto__.call(null, coll);
} else {
var m__5327__auto____$1 = cljs.core._peek["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._pop[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__auto__.call(null, coll);
} else {
var m__5327__auto____$1 = cljs.core._pop["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._assoc_n[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$3(coll, n, val) : m__5327__auto__.call(null, coll, n, val);
} else {
var m__5327__auto____$1 = cljs.core._assoc_n["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3(coll, n, val) : m__5327__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__5326__auto__ = o == null ? null : o;
var m__5327__auto__ = cljs.core._deref[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(o) : m__5327__auto__.call(null, o);
} else {
var m__5327__auto____$1 = cljs.core._deref["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(o) : m__5327__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__5326__auto__ = o == null ? null : o;
var m__5327__auto__ = cljs.core._deref_with_timeout[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$3(o, msec, timeout_val) : m__5327__auto__.call(null, o, msec, timeout_val);
} else {
var m__5327__auto____$1 = cljs.core._deref_with_timeout["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3(o, msec, timeout_val) : m__5327__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__5326__auto__ = o == null ? null : o;
var m__5327__auto__ = cljs.core._meta[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(o) : m__5327__auto__.call(null, o);
} else {
var m__5327__auto____$1 = cljs.core._meta["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(o) : m__5327__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__5326__auto__ = o == null ? null : o;
var m__5327__auto__ = cljs.core._with_meta[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(o, meta) : m__5327__auto__.call(null, o, meta);
} else {
var m__5327__auto____$1 = cljs.core._with_meta["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(o, meta) : m__5327__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 args6862 = [];
var len__5729__auto___6865 = arguments.length;
var i__5730__auto___6866 = 0;
while (true) {
if (i__5730__auto___6866 < len__5729__auto___6865) {
args6862.push(arguments[i__5730__auto___6866]);
var G__6867 = i__5730__auto___6866 + 1;
i__5730__auto___6866 = G__6867;
continue;
} else {
}
break;
}
var G__6864 = args6862.length;
switch(G__6864) {
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(args6862.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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._reduce[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(coll, f) : m__5327__auto__.call(null, coll, f);
} else {
var m__5327__auto____$1 = cljs.core._reduce["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(coll, f) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._reduce[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$3(coll, f, start) : m__5327__auto__.call(null, coll, f, start);
} else {
var m__5327__auto____$1 = cljs.core._reduce["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3(coll, f, start) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._kv_reduce[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$3(coll, f, init) : m__5327__auto__.call(null, coll, f, init);
} else {
var m__5327__auto____$1 = cljs.core._kv_reduce["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3(coll, f, init) : m__5327__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__5326__auto__ = o == null ? null : o;
var m__5327__auto__ = cljs.core._equiv[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(o, other) : m__5327__auto__.call(null, o, other);
} else {
var m__5327__auto____$1 = cljs.core._equiv["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(o, other) : m__5327__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__5326__auto__ = o == null ? null : o;
var m__5327__auto__ = cljs.core._hash[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(o) : m__5327__auto__.call(null, o);
} else {
var m__5327__auto____$1 = cljs.core._hash["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(o) : m__5327__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__5326__auto__ = o == null ? null : o;
var m__5327__auto__ = cljs.core._seq[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(o) : m__5327__auto__.call(null, o);
} else {
var m__5327__auto____$1 = cljs.core._seq["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(o) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._rseq[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__auto__.call(null, coll);
} else {
var m__5327__auto____$1 = cljs.core._rseq["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._sorted_seq[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(coll, ascending_QMARK_) : m__5327__auto__.call(null, coll, ascending_QMARK_);
} else {
var m__5327__auto____$1 = cljs.core._sorted_seq["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(coll, ascending_QMARK_) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._sorted_seq_from[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$3(coll, k, ascending_QMARK_) : m__5327__auto__.call(null, coll, k, ascending_QMARK_);
} else {
var m__5327__auto____$1 = cljs.core._sorted_seq_from["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3(coll, k, ascending_QMARK_) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._entry_key[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(coll, entry) : m__5327__auto__.call(null, coll, entry);
} else {
var m__5327__auto____$1 = cljs.core._entry_key["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(coll, entry) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._comparator[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__auto__.call(null, coll);
} else {
var m__5327__auto____$1 = cljs.core._comparator["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__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__5326__auto__ = writer == null ? null : writer;
var m__5327__auto__ = cljs.core._write[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(writer, s) : m__5327__auto__.call(null, writer, s);
} else {
var m__5327__auto____$1 = cljs.core._write["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(writer, s) : m__5327__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__5326__auto__ = writer == null ? null : writer;
var m__5327__auto__ = cljs.core._flush[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(writer) : m__5327__auto__.call(null, writer);
} else {
var m__5327__auto____$1 = cljs.core._flush["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(writer) : m__5327__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__5326__auto__ = o == null ? null : o;
var m__5327__auto__ = cljs.core._pr_writer[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$3(o, writer, opts) : m__5327__auto__.call(null, o, writer, opts);
} else {
var m__5327__auto____$1 = cljs.core._pr_writer["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3(o, writer, opts) : m__5327__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_(d) {
if (!(d == null) && !(d.cljs$core$IPending$_realized_QMARK_$arity$1 == null)) {
return d.cljs$core$IPending$_realized_QMARK_$arity$1(d);
} else {
var x__5326__auto__ = d == null ? null : d;
var m__5327__auto__ = cljs.core._realized_QMARK_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(d) : m__5327__auto__.call(null, d);
} else {
var m__5327__auto____$1 = cljs.core._realized_QMARK_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(d) : m__5327__auto____$1.call(null, d);
} else {
throw cljs.core.missing_protocol("IPending.-realized?", d);
}
}
}
};
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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._notify_watches[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$3(this$, oldval, newval) : m__5327__auto__.call(null, this$, oldval, newval);
} else {
var m__5327__auto____$1 = cljs.core._notify_watches["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3(this$, oldval, newval) : m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._add_watch[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$3(this$, key, f) : m__5327__auto__.call(null, this$, key, f);
} else {
var m__5327__auto____$1 = cljs.core._add_watch["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3(this$, key, f) : m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = cljs.core._remove_watch[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(this$, key) : m__5327__auto__.call(null, this$, key);
} else {
var m__5327__auto____$1 = cljs.core._remove_watch["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(this$, key) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._as_transient[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__auto__.call(null, coll);
} else {
var m__5327__auto____$1 = cljs.core._as_transient["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__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__5326__auto__ = tcoll == null ? null : tcoll;
var m__5327__auto__ = cljs.core._conj_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(tcoll, val) : m__5327__auto__.call(null, tcoll, val);
} else {
var m__5327__auto____$1 = cljs.core._conj_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(tcoll, val) : m__5327__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__5326__auto__ = tcoll == null ? null : tcoll;
var m__5327__auto__ = cljs.core._persistent_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(tcoll) : m__5327__auto__.call(null, tcoll);
} else {
var m__5327__auto____$1 = cljs.core._persistent_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(tcoll) : m__5327__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__5326__auto__ = tcoll == null ? null : tcoll;
var m__5327__auto__ = cljs.core._assoc_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$3(tcoll, key, val) : m__5327__auto__.call(null, tcoll, key, val);
} else {
var m__5327__auto____$1 = cljs.core._assoc_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3(tcoll, key, val) : m__5327__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__5326__auto__ = tcoll == null ? null : tcoll;
var m__5327__auto__ = cljs.core._dissoc_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(tcoll, key) : m__5327__auto__.call(null, tcoll, key);
} else {
var m__5327__auto____$1 = cljs.core._dissoc_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(tcoll, key) : m__5327__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__5326__auto__ = tcoll == null ? null : tcoll;
var m__5327__auto__ = cljs.core._assoc_n_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$3(tcoll, n, val) : m__5327__auto__.call(null, tcoll, n, val);
} else {
var m__5327__auto____$1 = cljs.core._assoc_n_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3(tcoll, n, val) : m__5327__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__5326__auto__ = tcoll == null ? null : tcoll;
var m__5327__auto__ = cljs.core._pop_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(tcoll) : m__5327__auto__.call(null, tcoll);
} else {
var m__5327__auto____$1 = cljs.core._pop_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(tcoll) : m__5327__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__5326__auto__ = tcoll == null ? null : tcoll;
var m__5327__auto__ = cljs.core._disjoin_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(tcoll, v) : m__5327__auto__.call(null, tcoll, v);
} else {
var m__5327__auto____$1 = cljs.core._disjoin_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(tcoll, v) : m__5327__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__5326__auto__ = x == null ? null : x;
var m__5327__auto__ = cljs.core._compare[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(x, y) : m__5327__auto__.call(null, x, y);
} else {
var m__5327__auto____$1 = cljs.core._compare["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(x, y) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._drop_first[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__auto__.call(null, coll);
} else {
var m__5327__auto____$1 = cljs.core._drop_first["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._chunked_first[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__auto__.call(null, coll);
} else {
var m__5327__auto____$1 = cljs.core._chunked_first["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._chunked_rest[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__auto__.call(null, coll);
} else {
var m__5327__auto____$1 = cljs.core._chunked_rest["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._chunked_next[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__auto__.call(null, coll);
} else {
var m__5327__auto____$1 = cljs.core._chunked_next["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__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__5326__auto__ = x == null ? null : x;
var m__5327__auto__ = cljs.core._name[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(x) : m__5327__auto__.call(null, x);
} else {
var m__5327__auto____$1 = cljs.core._name["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(x) : m__5327__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__5326__auto__ = x == null ? null : x;
var m__5327__auto__ = cljs.core._namespace[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(x) : m__5327__auto__.call(null, x);
} else {
var m__5327__auto____$1 = cljs.core._namespace["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(x) : m__5327__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__5326__auto__ = o == null ? null : o;
var m__5327__auto__ = cljs.core._reset_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(o, new_value) : m__5327__auto__.call(null, o, new_value);
} else {
var m__5327__auto____$1 = cljs.core._reset_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(o, new_value) : m__5327__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 args6869 = [];
var len__5729__auto___6872 = arguments.length;
var i__5730__auto___6873 = 0;
while (true) {
if (i__5730__auto___6873 < len__5729__auto___6872) {
args6869.push(arguments[i__5730__auto___6873]);
var G__6874 = i__5730__auto___6873 + 1;
i__5730__auto___6873 = G__6874;
continue;
} else {
}
break;
}
var G__6871 = args6869.length;
switch(G__6871) {
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(args6869.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__5326__auto__ = o == null ? null : o;
var m__5327__auto__ = cljs.core._swap_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(o, f) : m__5327__auto__.call(null, o, f);
} else {
var m__5327__auto____$1 = cljs.core._swap_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(o, f) : m__5327__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__5326__auto__ = o == null ? null : o;
var m__5327__auto__ = cljs.core._swap_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$3(o, f, a) : m__5327__auto__.call(null, o, f, a);
} else {
var m__5327__auto____$1 = cljs.core._swap_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3(o, f, a) : m__5327__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__5326__auto__ = o == null ? null : o;
var m__5327__auto__ = cljs.core._swap_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$4 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$4(o, f, a, b) : m__5327__auto__.call(null, o, f, a, b);
} else {
var m__5327__auto____$1 = cljs.core._swap_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$4 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$4(o, f, a, b) : m__5327__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__5326__auto__ = o == null ? null : o;
var m__5327__auto__ = cljs.core._swap_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$5 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$5(o, f, a, b, xs) : m__5327__auto__.call(null, o, f, a, b, xs);
} else {
var m__5327__auto____$1 = cljs.core._swap_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$5 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$5(o, f, a, b, xs) : m__5327__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__5326__auto__ = o == null ? null : o;
var m__5327__auto__ = cljs.core._vreset_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(o, new_value) : m__5327__auto__.call(null, o, new_value);
} else {
var m__5327__auto____$1 = cljs.core._vreset_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(o, new_value) : m__5327__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__5326__auto__ = coll == null ? null : coll;
var m__5327__auto__ = cljs.core._iterator[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__auto__.call(null, coll);
} else {
var m__5327__auto____$1 = cljs.core._iterator["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__5327__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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__6876 = i + 2;
var G__6877 = cljs.core.m3_mix_H1(h1, cljs.core.m3_mix_K1(in$.charCodeAt(i - 1) | in$.charCodeAt(i) << 16));
i = G__6876;
h1 = G__6877;
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.list;
cljs.core.Symbol;
cljs.core._EQ_;
cljs.core.compare;
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__6880 = i + 1;
var G__6881 = cljs.core.imul(31, hash) + s.charCodeAt(i);
i = G__6880;
hash = G__6881;
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_(t, o) {
return o instanceof t;
};
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__4659__auto__ = cljs.core.not(a.ns);
if (and__4659__auto__) {
return b.ns;
} else {
return and__4659__auto__;
}
}())) {
return -1;
} else {
if (cljs.core.truth_(a.ns)) {
if (cljs.core.not(b.ns)) {
return 1;
} else {
var nsc = function() {
var G__6894 = a.ns;
var G__6895 = b.ns;
return goog.array.defaultCompare(G__6894, G__6895);
}();
if (0 === nsc) {
var G__6896 = a.name;
var G__6897 = b.name;
return goog.array.defaultCompare(G__6896, G__6897);
} else {
return nsc;
}
}
} else {
var G__6898 = a.name;
var G__6899 = b.name;
return goog.array.defaultCompare(G__6898, G__6899);
}
}
}
};
cljs.core.get;
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__6901 = null;
var G__6901__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__6901__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__6901 = function(self__, coll, not_found) {
switch(arguments.length) {
case 2:
return G__6901__2.call(this, self__, coll);
case 3:
return G__6901__3.call(this, self__, coll, not_found);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__6901.cljs$core$IFn$_invoke$arity$2 = G__6901__2;
G__6901.cljs$core$IFn$_invoke$arity$3 = G__6901__3;
return G__6901;
}();
cljs.core.Symbol.prototype.apply = function(self__, args6900) {
var self__ = this;
var self____$1 = this;
return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args6900)));
};
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__5106__auto__ = self__._hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_symbol(sym__$1);
self__._hash = h__5106__auto____$1;
return h__5106__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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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 args6902 = [];
var len__5729__auto___6905 = arguments.length;
var i__5730__auto___6906 = 0;
while (true) {
if (i__5730__auto___6906 < len__5729__auto___6905) {
args6902.push(arguments[i__5730__auto___6906]);
var G__6907 = i__5730__auto___6906 + 1;
i__5730__auto___6906 = G__6907;
continue;
} else {
}
break;
}
var G__6904 = args6902.length;
switch(G__6904) {
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(args6902.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__6910 = this$__$1.sym;
var G__6911 = other.sym;
return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2 ? cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(G__6910, G__6911) : cljs.core._EQ_.call(null, G__6910, G__6911);
} else {
return false;
}
};
cljs.core.Var.prototype.cljs$core$Fn$ = true;
cljs.core.Var.prototype.call = function() {
var G__6956 = null;
var G__6956__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__6956__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__6956__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__6956__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__6956__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__6956__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__6956__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__6956__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__6956__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__6956__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__6956__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__6956__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__6956__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__6956__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__6956__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__6956__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__6956__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__6956__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__6956__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__6956__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__6956__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__6956__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__6912 = self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null);
var G__6913 = a;
var G__6914 = b;
var G__6915 = c;
var G__6916 = d;
var G__6917 = e;
var G__6918 = f;
var G__6919 = g;
var G__6920 = h;
var G__6921 = i;
var G__6922 = j;
var G__6923 = k;
var G__6924 = l;
var G__6925 = m;
var G__6926 = n;
var G__6927 = o;
var G__6928 = p;
var G__6929 = q;
var G__6930 = r;
var G__6931 = s;
var G__6932 = t;
var G__6933 = rest;
return cljs.core.apply.cljs$core$IFn$_invoke$arity$22 ? cljs.core.apply.cljs$core$IFn$_invoke$arity$22(G__6912, G__6913, G__6914, G__6915, G__6916, G__6917, G__6918, G__6919, G__6920, G__6921, G__6922, G__6923, G__6924, G__6925, G__6926, G__6927, G__6928, G__6929, G__6930, G__6931, G__6932, G__6933) : cljs.core.apply.call(null, G__6912, G__6913, G__6914, G__6915, G__6916, G__6917, G__6918, G__6919, G__6920, G__6921, G__6922, G__6923, G__6924, G__6925, G__6926, G__6927, G__6928, G__6929, G__6930,
G__6931, G__6932, G__6933);
};
G__6956 = 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__6956__1.call(this, self__);
case 2:
return G__6956__2.call(this, self__, a);
case 3:
return G__6956__3.call(this, self__, a, b);
case 4:
return G__6956__4.call(this, self__, a, b, c);
case 5:
return G__6956__5.call(this, self__, a, b, c, d);
case 6:
return G__6956__6.call(this, self__, a, b, c, d, e);
case 7:
return G__6956__7.call(this, self__, a, b, c, d, e, f);
case 8:
return G__6956__8.call(this, self__, a, b, c, d, e, f, g);
case 9:
return G__6956__9.call(this, self__, a, b, c, d, e, f, g, h);
case 10:
return G__6956__10.call(this, self__, a, b, c, d, e, f, g, h, i);
case 11:
return G__6956__11.call(this, self__, a, b, c, d, e, f, g, h, i, j);
case 12:
return G__6956__12.call(this, self__, a, b, c, d, e, f, g, h, i, j, k);
case 13:
return G__6956__13.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l);
case 14:
return G__6956__14.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m);
case 15:
return G__6956__15.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n);
case 16:
return G__6956__16.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
case 17:
return G__6956__17.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
case 18:
return G__6956__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__6956__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__6956__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__6956__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__6956__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__6956.cljs$core$IFn$_invoke$arity$1 = G__6956__1;
G__6956.cljs$core$IFn$_invoke$arity$2 = G__6956__2;
G__6956.cljs$core$IFn$_invoke$arity$3 = G__6956__3;
G__6956.cljs$core$IFn$_invoke$arity$4 = G__6956__4;
G__6956.cljs$core$IFn$_invoke$arity$5 = G__6956__5;
G__6956.cljs$core$IFn$_invoke$arity$6 = G__6956__6;
G__6956.cljs$core$IFn$_invoke$arity$7 = G__6956__7;
G__6956.cljs$core$IFn$_invoke$arity$8 = G__6956__8;
G__6956.cljs$core$IFn$_invoke$arity$9 = G__6956__9;
G__6956.cljs$core$IFn$_invoke$arity$10 = G__6956__10;
G__6956.cljs$core$IFn$_invoke$arity$11 = G__6956__11;
G__6956.cljs$core$IFn$_invoke$arity$12 = G__6956__12;
G__6956.cljs$core$IFn$_invoke$arity$13 = G__6956__13;
G__6956.cljs$core$IFn$_invoke$arity$14 = G__6956__14;
G__6956.cljs$core$IFn$_invoke$arity$15 = G__6956__15;
G__6956.cljs$core$IFn$_invoke$arity$16 = G__6956__16;
G__6956.cljs$core$IFn$_invoke$arity$17 = G__6956__17;
G__6956.cljs$core$IFn$_invoke$arity$18 = G__6956__18;
G__6956.cljs$core$IFn$_invoke$arity$19 = G__6956__19;
G__6956.cljs$core$IFn$_invoke$arity$20 = G__6956__20;
G__6956.cljs$core$IFn$_invoke$arity$21 = G__6956__21;
G__6956.cljs$core$IFn$_invoke$arity$22 = G__6956__22;
return G__6956;
}();
cljs.core.Var.prototype.apply = function(self__, args6909) {
var self__ = this;
var self____$1 = this;
return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args6909)));
};
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__6934 = self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null);
var G__6935 = a;
var G__6936 = b;
var G__6937 = c;
var G__6938 = d;
var G__6939 = e;
var G__6940 = f;
var G__6941 = g;
var G__6942 = h;
var G__6943 = i;
var G__6944 = j;
var G__6945 = k;
var G__6946 = l;
var G__6947 = m;
var G__6948 = n;
var G__6949 = o;
var G__6950 = p;
var G__6951 = q;
var G__6952 = r;
var G__6953 = s;
var G__6954 = t;
var G__6955 = rest;
return cljs.core.apply.cljs$core$IFn$_invoke$arity$22 ? cljs.core.apply.cljs$core$IFn$_invoke$arity$22(G__6934, G__6935, G__6936, G__6937, G__6938, G__6939, G__6940, G__6941, G__6942, G__6943, G__6944, G__6945, G__6946, G__6947, G__6948, G__6949, G__6950, G__6951, G__6952, G__6953, G__6954, G__6955) : cljs.core.apply.call(null, G__6934, G__6935, G__6936, G__6937, G__6938, G__6939, G__6940, G__6941, G__6942, G__6943, G__6944, G__6945, G__6946, G__6947, G__6948, G__6949, G__6950, G__6951, G__6952,
G__6953, G__6954, G__6955);
};
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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.array_seq;
cljs.core.prim_seq;
cljs.core.IndexedSeq;
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 args6969 = [];
var len__5729__auto___6975 = arguments.length;
var i__5730__auto___6976 = 0;
while (true) {
if (i__5730__auto___6976 < len__5729__auto___6975) {
args6969.push(arguments[i__5730__auto___6976]);
var G__6977 = i__5730__auto___6976 + 1;
i__5730__auto___6976 = G__6977;
continue;
} else {
}
break;
}
var G__6974 = args6969.length;
switch(G__6974) {
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__5748__auto__ = new cljs.core.IndexedSeq(args6969.slice(2), 0);
return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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__6979 = y;
var G__6980 = cljs.core.first(more);
var G__6981 = cljs.core.next(more);
x = G__6979;
y = G__6980;
more = G__6981;
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(seq6970) {
var G__6971 = cljs.core.first(seq6970);
var seq6970__$1 = cljs.core.next(seq6970);
var G__6972 = cljs.core.first(seq6970__$1);
var seq6970__$2 = cljs.core.next(seq6970__$1);
return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$variadic(G__6971, G__6972, seq6970__$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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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.es6_iterator_seq;
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__6982 = n + 1;
var G__6983 = cljs.core.imul(31, hash_code) + cljs.core.hash(cljs.core.first(coll__$1)) | 0;
var G__6984 = cljs.core.next(coll__$1);
n = G__6982;
hash_code = G__6983;
coll__$1 = G__6984;
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__6985 = n + 1;
var G__6986 = hash_code + cljs.core.hash(cljs.core.first(coll__$1)) | 0;
var G__6987 = cljs.core.next(coll__$1);
n = G__6985;
hash_code = G__6986;
coll__$1 = G__6987;
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.hash_map;
cljs.core.list;
cljs.core.equiv_sequential;
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__6988 = this$__$1.valueOf();
var G__6989 = other.valueOf();
return goog.array.defaultCompare(G__6988, G__6989);
} 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.with_meta;
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.deref;
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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 args6990 = [];
var len__5729__auto___6999 = arguments.length;
var i__5730__auto___7000 = 0;
while (true) {
if (i__5730__auto___7000 < len__5729__auto___6999) {
args6990.push(arguments[i__5730__auto___7000]);
var G__7001 = i__5730__auto___7000 + 1;
i__5730__auto___7000 = G__7001;
continue;
} else {
}
break;
}
var G__6992 = args6990.length;
switch(G__6992) {
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(args6990.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__6993 = val;
var G__6994 = 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__6993, G__6994) : f.call(null, G__6993, G__6994);
}();
if (cljs.core.reduced_QMARK_(nval)) {
return cljs.core.deref(nval);
} else {
var G__7003 = nval;
var G__7004 = n + 1;
val = G__7003;
n = G__7004;
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__6995 = val__$1;
var G__6996 = 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__6995, G__6996) : f.call(null, G__6995, G__6996);
}();
if (cljs.core.reduced_QMARK_(nval)) {
return cljs.core.deref(nval);
} else {
var G__7005 = nval;
var G__7006 = n + 1;
val__$1 = G__7005;
n = G__7006;
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__6997 = val__$1;
var G__6998 = 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__6997, G__6998) : f.call(null, G__6997, G__6998);
}();
if (cljs.core.reduced_QMARK_(nval)) {
return cljs.core.deref(nval);
} else {
var G__7007 = nval;
var G__7008 = n + 1;
val__$1 = G__7007;
n = G__7008;
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 args7009 = [];
var len__5729__auto___7018 = arguments.length;
var i__5730__auto___7019 = 0;
while (true) {
if (i__5730__auto___7019 < len__5729__auto___7018) {
args7009.push(arguments[i__5730__auto___7019]);
var G__7020 = i__5730__auto___7019 + 1;
i__5730__auto___7019 = G__7020;
continue;
} else {
}
break;
}
var G__7011 = args7009.length;
switch(G__7011) {
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(args7009.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__7012 = val;
var G__7013 = arr[n];
return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__7012, G__7013) : f.call(null, G__7012, G__7013);
}();
if (cljs.core.reduced_QMARK_(nval)) {
return cljs.core.deref(nval);
} else {
var G__7022 = nval;
var G__7023 = n + 1;
val = G__7022;
n = G__7023;
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__7014 = val__$1;
var G__7015 = arr[n];
return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__7014, G__7015) : f.call(null, G__7014, G__7015);
}();
if (cljs.core.reduced_QMARK_(nval)) {
return cljs.core.deref(nval);
} else {
var G__7024 = nval;
var G__7025 = n + 1;
val__$1 = G__7024;
n = G__7025;
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__7016 = val__$1;
var G__7017 = arr[n];
return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__7016, G__7017) : f.call(null, G__7016, G__7017);
}();
if (cljs.core.reduced_QMARK_(nval)) {
return cljs.core.deref(nval);
} else {
var G__7026 = nval;
var G__7027 = n + 1;
val__$1 = G__7026;
n = G__7027;
continue;
}
} else {
return val__$1;
}
break;
}
};
cljs.core.array_reduce.cljs$lang$maxFixedArity = 4;
cljs.core.hash_coll;
cljs.core.cons;
cljs.core.RSeq;
cljs.core.List;
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5002__auto__ = 0;
var y__5003__auto__ = self__.arr.length - self__.i;
return x__5002__auto__ > y__5003__auto__ ? x__5002__auto__ : y__5003__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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__auto__);
};
cljs.core.prim_seq = function cljs$core$prim_seq(var_args) {
var args7032 = [];
var len__5729__auto___7035 = arguments.length;
var i__5730__auto___7036 = 0;
while (true) {
if (i__5730__auto___7036 < len__5729__auto___7035) {
args7032.push(arguments[i__5730__auto___7036]);
var G__7037 = i__5730__auto___7036 + 1;
i__5730__auto___7036 = G__7037;
continue;
} else {
}
break;
}
var G__7034 = args7032.length;
switch(G__7034) {
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(args7032.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 args7039 = [];
var len__5729__auto___7042 = arguments.length;
var i__5730__auto___7043 = 0;
while (true) {
if (i__5730__auto___7043 < len__5729__auto___7042) {
args7039.push(arguments[i__5730__auto___7043]);
var G__7044 = i__5730__auto___7043 + 1;
i__5730__auto___7043 = G__7044;
continue;
} else {
}
break;
}
var G__7041 = args7039.length;
switch(G__7041) {
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(args7039.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.with_meta;
cljs.core.seq_reduce;
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__7046 = cljs.core.List.EMPTY;
var G__7047 = self__.meta;
return cljs.core.with_meta.cljs$core$IFn$_invoke$arity$2 ? cljs.core.with_meta.cljs$core$IFn$_invoke$arity$2(G__7046, G__7047) : cljs.core.with_meta.call(null, G__7046, G__7047);
};
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__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__7048 = sn;
s = G__7048;
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 args7049 = [];
var len__5729__auto___7055 = arguments.length;
var i__5730__auto___7056 = 0;
while (true) {
if (i__5730__auto___7056 < len__5729__auto___7055) {
args7049.push(arguments[i__5730__auto___7056]);
var G__7057 = i__5730__auto___7056 + 1;
i__5730__auto___7056 = G__7057;
continue;
} else {
}
break;
}
var G__7054 = args7049.length;
switch(G__7054) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7049.slice(2), 0);
return cljs.core.conj.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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__7059 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(coll, x);
var G__7060 = cljs.core.first(xs);
var G__7061 = cljs.core.next(xs);
coll = G__7059;
x = G__7060;
xs = G__7061;
continue;
} else {
return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(coll, x);
}
break;
}
};
cljs.core.conj.cljs$lang$applyTo = function(seq7050) {
var G__7051 = cljs.core.first(seq7050);
var seq7050__$1 = cljs.core.next(seq7050);
var G__7052 = cljs.core.first(seq7050__$1);
var seq7050__$2 = cljs.core.next(seq7050__$1);
return cljs.core.conj.cljs$core$IFn$_invoke$arity$variadic(G__7051, G__7052, seq7050__$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__7062 = cljs.core.next(s);
var G__7063 = acc + 1;
s = G__7062;
acc = G__7063;
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 args7068 = [];
var len__5729__auto___7071 = arguments.length;
var i__5730__auto___7072 = 0;
while (true) {
if (i__5730__auto___7072 < len__5729__auto___7071) {
args7068.push(arguments[i__5730__auto___7072]);
var G__7073 = i__5730__auto___7072 + 1;
i__5730__auto___7072 = G__7073;
continue;
} else {
}
break;
}
var G__7070 = args7068.length;
switch(G__7070) {
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(args7068.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__7075 = cljs.core.next(coll);
var G__7076 = n - 1;
coll = G__7075;
n = G__7076;
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__7077 = cljs.core.next(coll);
var G__7078 = n - 1;
var G__7079 = not_found;
coll = G__7077;
n = G__7078;
not_found = G__7079;
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 args7080 = [];
var len__5729__auto___7087 = arguments.length;
var i__5730__auto___7088 = 0;
while (true) {
if (i__5730__auto___7088 < len__5729__auto___7087) {
args7080.push(arguments[i__5730__auto___7088]);
var G__7089 = i__5730__auto___7088 + 1;
i__5730__auto___7088 = G__7089;
continue;
} else {
}
break;
}
var G__7082 = args7080.length;
switch(G__7082) {
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(args7080.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__7091 = n__$1 - 1;
var G__7092 = cljs.core.rest(xs);
n__$1 = G__7091;
xs = G__7092;
continue;
} else {
return xs;
}
break;
}
};
cljs.core.get = function cljs$core$get(var_args) {
var args7093 = [];
var len__5729__auto___7098 = arguments.length;
var i__5730__auto___7099 = 0;
while (true) {
if (i__5730__auto___7099 < len__5729__auto___7098) {
args7093.push(arguments[i__5730__auto___7099]);
var G__7100 = i__5730__auto___7099 + 1;
i__5730__auto___7099 = G__7100;
continue;
} else {
}
break;
}
var G__7095 = args7093.length;
switch(G__7095) {
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(args7093.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.PersistentHashMap;
cljs.core.assoc = function cljs$core$assoc(var_args) {
var args7102 = [];
var len__5729__auto___7109 = arguments.length;
var i__5730__auto___7110 = 0;
while (true) {
if (i__5730__auto___7110 < len__5729__auto___7109) {
args7102.push(arguments[i__5730__auto___7110]);
var G__7111 = i__5730__auto___7110 + 1;
i__5730__auto___7110 = G__7111;
continue;
} else {
}
break;
}
var G__7108 = args7102.length;
switch(G__7108) {
case 3:
return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
break;
default:
var argseq__5748__auto__ = new cljs.core.IndexedSeq(args7102.slice(3), 0);
return cljs.core.assoc.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], argseq__5748__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__7113 = ret;
var G__7114 = cljs.core.first(kvs);
var G__7115 = cljs.core.second(kvs);
var G__7116 = cljs.core.nnext(kvs);
coll = G__7113;
k = G__7114;
v = G__7115;
kvs = G__7116;
continue;
} else {
return ret;
}
break;
}
};
cljs.core.assoc.cljs$lang$applyTo = function(seq7103) {
var G__7104 = cljs.core.first(seq7103);
var seq7103__$1 = cljs.core.next(seq7103);
var G__7105 = cljs.core.first(seq7103__$1);
var seq7103__$2 = cljs.core.next(seq7103__$1);
var G__7106 = cljs.core.first(seq7103__$2);
var seq7103__$3 = cljs.core.next(seq7103__$2);
return cljs.core.assoc.cljs$core$IFn$_invoke$arity$variadic(G__7104, G__7105, G__7106, seq7103__$3);
};
cljs.core.assoc.cljs$lang$maxFixedArity = 3;
cljs.core.dissoc = function cljs$core$dissoc(var_args) {
var args7117 = [];
var len__5729__auto___7123 = arguments.length;
var i__5730__auto___7124 = 0;
while (true) {
if (i__5730__auto___7124 < len__5729__auto___7123) {
args7117.push(arguments[i__5730__auto___7124]);
var G__7125 = i__5730__auto___7124 + 1;
i__5730__auto___7124 = G__7125;
continue;
} else {
}
break;
}
var G__7122 = args7117.length;
switch(G__7122) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7117.slice(2), 0);
return cljs.core.dissoc.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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__7127 = ret;
var G__7128 = cljs.core.first(ks);
var G__7129 = cljs.core.next(ks);
coll = G__7127;
k = G__7128;
ks = G__7129;
continue;
} else {
return ret;
}
}
break;
}
};
cljs.core.dissoc.cljs$lang$applyTo = function(seq7118) {
var G__7119 = cljs.core.first(seq7118);
var seq7118__$1 = cljs.core.next(seq7118);
var G__7120 = cljs.core.first(seq7118__$1);
var seq7118__$2 = cljs.core.next(seq7118__$1);
return cljs.core.dissoc.cljs$core$IFn$_invoke$arity$variadic(G__7119, G__7120, seq7118__$2);
};
cljs.core.dissoc.cljs$lang$maxFixedArity = 2;
cljs.core.fn_QMARK_ = function cljs$core$fn_QMARK_(f) {
var or__4671__auto__ = goog.isFunction(f);
if (or__4671__auto__) {
return or__4671__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__7135 = null;
var G__7135__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__7135__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__7135__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__7135__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__7135__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__7135__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__7135__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__7135__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__7135__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__7135__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__7135__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__7135__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__7135__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__7135__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__7135__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__7135__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__7135__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__7135__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__7135__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__7135__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__7135__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__7135__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__7135 = 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__7135__1.call(this, self__);
case 2:
return G__7135__2.call(this, self__, a);
case 3:
return G__7135__3.call(this, self__, a, b);
case 4:
return G__7135__4.call(this, self__, a, b, c);
case 5:
return G__7135__5.call(this, self__, a, b, c, d);
case 6:
return G__7135__6.call(this, self__, a, b, c, d, e);
case 7:
return G__7135__7.call(this, self__, a, b, c, d, e, f);
case 8:
return G__7135__8.call(this, self__, a, b, c, d, e, f, g);
case 9:
return G__7135__9.call(this, self__, a, b, c, d, e, f, g, h);
case 10:
return G__7135__10.call(this, self__, a, b, c, d, e, f, g, h, i);
case 11:
return G__7135__11.call(this, self__, a, b, c, d, e, f, g, h, i, j);
case 12:
return G__7135__12.call(this, self__, a, b, c, d, e, f, g, h, i, j, k);
case 13:
return G__7135__13.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l);
case 14:
return G__7135__14.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m);
case 15:
return G__7135__15.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n);
case 16:
return G__7135__16.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
case 17:
return G__7135__17.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
case 18:
return G__7135__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__7135__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__7135__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__7135__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__7135__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__7135.cljs$core$IFn$_invoke$arity$1 = G__7135__1;
G__7135.cljs$core$IFn$_invoke$arity$2 = G__7135__2;
G__7135.cljs$core$IFn$_invoke$arity$3 = G__7135__3;
G__7135.cljs$core$IFn$_invoke$arity$4 = G__7135__4;
G__7135.cljs$core$IFn$_invoke$arity$5 = G__7135__5;
G__7135.cljs$core$IFn$_invoke$arity$6 = G__7135__6;
G__7135.cljs$core$IFn$_invoke$arity$7 = G__7135__7;
G__7135.cljs$core$IFn$_invoke$arity$8 = G__7135__8;
G__7135.cljs$core$IFn$_invoke$arity$9 = G__7135__9;
G__7135.cljs$core$IFn$_invoke$arity$10 = G__7135__10;
G__7135.cljs$core$IFn$_invoke$arity$11 = G__7135__11;
G__7135.cljs$core$IFn$_invoke$arity$12 = G__7135__12;
G__7135.cljs$core$IFn$_invoke$arity$13 = G__7135__13;
G__7135.cljs$core$IFn$_invoke$arity$14 = G__7135__14;
G__7135.cljs$core$IFn$_invoke$arity$15 = G__7135__15;
G__7135.cljs$core$IFn$_invoke$arity$16 = G__7135__16;
G__7135.cljs$core$IFn$_invoke$arity$17 = G__7135__17;
G__7135.cljs$core$IFn$_invoke$arity$18 = G__7135__18;
G__7135.cljs$core$IFn$_invoke$arity$19 = G__7135__19;
G__7135.cljs$core$IFn$_invoke$arity$20 = G__7135__20;
G__7135.cljs$core$IFn$_invoke$arity$21 = G__7135__21;
G__7135.cljs$core$IFn$_invoke$arity$22 = G__7135__22;
return G__7135;
}();
cljs.core.MetaFn.prototype.apply = function(self__, args7134) {
var self__ = this;
var self____$1 = this;
return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args7134)));
};
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__4659__auto__ = !(o == null);
if (and__4659__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__4659__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 args7140 = [];
var len__5729__auto___7146 = arguments.length;
var i__5730__auto___7147 = 0;
while (true) {
if (i__5730__auto___7147 < len__5729__auto___7146) {
args7140.push(arguments[i__5730__auto___7147]);
var G__7148 = i__5730__auto___7147 + 1;
i__5730__auto___7147 = G__7148;
continue;
} else {
}
break;
}
var G__7145 = args7140.length;
switch(G__7145) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7140.slice(2), 0);
return cljs.core.disj.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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__7150 = ret;
var G__7151 = cljs.core.first(ks);
var G__7152 = cljs.core.next(ks);
coll = G__7150;
k = G__7151;
ks = G__7152;
continue;
} else {
return ret;
}
}
break;
}
};
cljs.core.disj.cljs$lang$applyTo = function(seq7141) {
var G__7142 = cljs.core.first(seq7141);
var seq7141__$1 = cljs.core.next(seq7141);
var G__7143 = cljs.core.first(seq7141__$1);
var seq7141__$2 = cljs.core.next(seq7141__$1);
return cljs.core.disj.cljs$core$IFn$_invoke$arity$variadic(G__7142, G__7143, seq7141__$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.ChunkedCons;
cljs.core.ChunkedSeq;
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 args7173 = [];
var len__5729__auto___7179 = arguments.length;
var i__5730__auto___7180 = 0;
while (true) {
if (i__5730__auto___7180 < len__5729__auto___7179) {
args7173.push(arguments[i__5730__auto___7180]);
var G__7181 = i__5730__auto___7180 + 1;
i__5730__auto___7180 = G__7181;
continue;
} else {
}
break;
}
var G__7176 = args7173.length;
switch(G__7176) {
case 0:
return cljs.core.js_obj.cljs$core$IFn$_invoke$arity$0();
break;
default:
var argseq__5748__auto__ = new cljs.core.IndexedSeq(args7173.slice(0), 0);
return cljs.core.js_obj.cljs$core$IFn$_invoke$arity$variadic(argseq__5748__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(seq7174) {
return cljs.core.js_obj.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq7174));
};
cljs.core.js_obj.cljs$lang$maxFixedArity = 0;
cljs.core.js_keys = function cljs$core$js_keys(obj) {
var keys = [];
var G__7185_7187 = obj;
var G__7186_7188 = function(G__7185_7187, keys) {
return function(val, key, obj__$1) {
return keys.push(key);
};
}(G__7185_7187, keys);
goog.object.forEach(G__7185_7187, G__7186_7188);
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__7189 = i__$1 + 1;
var G__7190 = j__$1 + 1;
var G__7191 = len__$1 - 1;
i__$1 = G__7189;
j__$1 = G__7190;
len__$1 = G__7191;
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__7192 = i__$1 - 1;
var G__7193 = j__$1 - 1;
var G__7194 = len__$1 - 1;
i__$1 = G__7192;
j__$1 = G__7193;
len__$1 = G__7194;
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__4671__auto__ = cljs.core.fn_QMARK_(f);
if (or__4671__auto__) {
return or__4671__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 args7205 = [];
var len__5729__auto___7211 = arguments.length;
var i__5730__auto___7212 = 0;
while (true) {
if (i__5730__auto___7212 < len__5729__auto___7211) {
args7205.push(arguments[i__5730__auto___7212]);
var G__7213 = i__5730__auto___7212 + 1;
i__5730__auto___7212 = G__7213;
continue;
} else {
}
break;
}
var G__7210 = args7205.length;
switch(G__7210) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7205.slice(2), 0);
return cljs.core.distinct_QMARK_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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__7215 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(s, x__$1);
var G__7216 = etc;
s = G__7215;
xs = G__7216;
continue;
}
} else {
return true;
}
break;
}
} else {
return false;
}
};
cljs.core.distinct_QMARK_.cljs$lang$applyTo = function(seq7206) {
var G__7207 = cljs.core.first(seq7206);
var seq7206__$1 = cljs.core.next(seq7206);
var G__7208 = cljs.core.first(seq7206__$1);
var seq7206__$2 = cljs.core.next(seq7206__$1);
return cljs.core.distinct_QMARK_.cljs$core$IFn$_invoke$arity$variadic(G__7207, G__7208, seq7206__$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 args7219 = [];
var len__5729__auto___7222 = arguments.length;
var i__5730__auto___7223 = 0;
while (true) {
if (i__5730__auto___7223 < len__5729__auto___7222) {
args7219.push(arguments[i__5730__auto___7223]);
var G__7224 = i__5730__auto___7223 + 1;
i__5730__auto___7223 = G__7224;
continue;
} else {
}
break;
}
var G__7221 = args7219.length;
switch(G__7221) {
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(args7219.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__7226 = xs;
var G__7227 = ys;
var G__7228 = len;
var G__7229 = n + 1;
xs = G__7226;
ys = G__7227;
len = G__7228;
n = G__7229;
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.to_array;
cljs.core.sort = function cljs$core$sort(var_args) {
var args7230 = [];
var len__5729__auto___7235 = arguments.length;
var i__5730__auto___7236 = 0;
while (true) {
if (i__5730__auto___7236 < len__5729__auto___7235) {
args7230.push(arguments[i__5730__auto___7236]);
var G__7237 = i__5730__auto___7236 + 1;
i__5730__auto___7236 = G__7237;
continue;
} else {
}
break;
}
var G__7232 = args7230.length;
switch(G__7232) {
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(args7230.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__7233_7239 = a;
var G__7234_7240 = cljs.core.fn__GT_comparator(comp);
goog.array.stableSort(G__7233_7239, G__7234_7240);
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 args7241 = [];
var len__5729__auto___7244 = arguments.length;
var i__5730__auto___7245 = 0;
while (true) {
if (i__5730__auto___7245 < len__5729__auto___7244) {
args7241.push(arguments[i__5730__auto___7245]);
var G__7246 = i__5730__auto___7245 + 1;
i__5730__auto___7245 = G__7246;
continue;
} else {
}
break;
}
var G__7243 = args7241.length;
switch(G__7243) {
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(args7241.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 args7248 = [];
var len__5729__auto___7256 = arguments.length;
var i__5730__auto___7257 = 0;
while (true) {
if (i__5730__auto___7257 < len__5729__auto___7256) {
args7248.push(arguments[i__5730__auto___7257]);
var G__7258 = i__5730__auto___7257 + 1;
i__5730__auto___7257 = G__7258;
continue;
} else {
}
break;
}
var G__7250 = args7248.length;
switch(G__7250) {
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(args7248.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__7251 = f;
var G__7252 = cljs.core.first(s);
var G__7253 = cljs.core.next(s);
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3 ? cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(G__7251, G__7252, G__7253) : cljs.core.reduce.call(null, G__7251, G__7252, G__7253);
} 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__7254 = val__$1;
var G__7255 = cljs.core.first(coll__$1);
return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__7254, G__7255) : f.call(null, G__7254, G__7255);
}();
if (cljs.core.reduced_QMARK_(nval)) {
return cljs.core.deref(nval);
} else {
var G__7260 = nval;
var G__7261 = cljs.core.next(coll__$1);
val__$1 = G__7260;
coll__$1 = G__7261;
continue;
}
} else {
return val__$1;
}
break;
}
};
cljs.core.seq_reduce.cljs$lang$maxFixedArity = 3;
cljs.core.vec;
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 args7262 = [];
var len__5729__auto___7267 = arguments.length;
var i__5730__auto___7268 = 0;
while (true) {
if (i__5730__auto___7268 < len__5729__auto___7267) {
args7262.push(arguments[i__5730__auto___7268]);
var G__7269 = i__5730__auto___7268 + 1;
i__5730__auto___7268 = G__7269;
continue;
} else {
}
break;
}
var G__7264 = args7262.length;
switch(G__7264) {
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(args7262.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 args7271 = [];
var len__5729__auto___7274 = arguments.length;
var i__5730__auto___7275 = 0;
while (true) {
if (i__5730__auto___7275 < len__5729__auto___7274) {
args7271.push(arguments[i__5730__auto___7275]);
var G__7276 = i__5730__auto___7275 + 1;
i__5730__auto___7275 = G__7276;
continue;
} else {
}
break;
}
var G__7273 = args7271.length;
switch(G__7273) {
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(args7271.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__7278 = null;
var G__7278__0 = function() {
return f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null);
};
var G__7278__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__7278__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__7278 = function(x, y) {
switch(arguments.length) {
case 0:
return G__7278__0.call(this);
case 1:
return G__7278__1.call(this, x);
case 2:
return G__7278__2.call(this, x, y);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__7278.cljs$core$IFn$_invoke$arity$0 = G__7278__0;
G__7278.cljs$core$IFn$_invoke$arity$1 = G__7278__1;
G__7278.cljs$core$IFn$_invoke$arity$2 = G__7278__2;
return G__7278;
}();
};
cljs.core.completing.cljs$lang$maxFixedArity = 2;
cljs.core.transduce = function cljs$core$transduce(var_args) {
var args7279 = [];
var len__5729__auto___7282 = arguments.length;
var i__5730__auto___7283 = 0;
while (true) {
if (i__5730__auto___7283 < len__5729__auto___7282) {
args7279.push(arguments[i__5730__auto___7283]);
var G__7284 = i__5730__auto___7283 + 1;
i__5730__auto___7283 = G__7284;
continue;
} else {
}
break;
}
var G__7281 = args7279.length;
switch(G__7281) {
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(args7279.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 args7286 = [];
var len__5729__auto___7292 = arguments.length;
var i__5730__auto___7293 = 0;
while (true) {
if (i__5730__auto___7293 < len__5729__auto___7292) {
args7286.push(arguments[i__5730__auto___7293]);
var G__7294 = i__5730__auto___7293 + 1;
i__5730__auto___7293 = G__7294;
continue;
} else {
}
break;
}
var G__7291 = args7286.length;
switch(G__7291) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7286.slice(2), 0);
return cljs.core._PLUS_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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(seq7287) {
var G__7288 = cljs.core.first(seq7287);
var seq7287__$1 = cljs.core.next(seq7287);
var G__7289 = cljs.core.first(seq7287__$1);
var seq7287__$2 = cljs.core.next(seq7287__$1);
return cljs.core._PLUS_.cljs$core$IFn$_invoke$arity$variadic(G__7288, G__7289, seq7287__$2);
};
cljs.core._PLUS_.cljs$lang$maxFixedArity = 2;
cljs.core._ = function cljs$core$_(var_args) {
var args7296 = [];
var len__5729__auto___7302 = arguments.length;
var i__5730__auto___7303 = 0;
while (true) {
if (i__5730__auto___7303 < len__5729__auto___7302) {
args7296.push(arguments[i__5730__auto___7303]);
var G__7304 = i__5730__auto___7303 + 1;
i__5730__auto___7303 = G__7304;
continue;
} else {
}
break;
}
var G__7301 = args7296.length;
switch(G__7301) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7296.slice(2), 0);
return cljs.core._.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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(seq7297) {
var G__7298 = cljs.core.first(seq7297);
var seq7297__$1 = cljs.core.next(seq7297);
var G__7299 = cljs.core.first(seq7297__$1);
var seq7297__$2 = cljs.core.next(seq7297__$1);
return cljs.core._.cljs$core$IFn$_invoke$arity$variadic(G__7298, G__7299, seq7297__$2);
};
cljs.core._.cljs$lang$maxFixedArity = 2;
cljs.core._STAR_ = function cljs$core$_STAR_(var_args) {
var args7306 = [];
var len__5729__auto___7312 = arguments.length;
var i__5730__auto___7313 = 0;
while (true) {
if (i__5730__auto___7313 < len__5729__auto___7312) {
args7306.push(arguments[i__5730__auto___7313]);
var G__7314 = i__5730__auto___7313 + 1;
i__5730__auto___7313 = G__7314;
continue;
} else {
}
break;
}
var G__7311 = args7306.length;
switch(G__7311) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7306.slice(2), 0);
return cljs.core._STAR_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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(seq7307) {
var G__7308 = cljs.core.first(seq7307);
var seq7307__$1 = cljs.core.next(seq7307);
var G__7309 = cljs.core.first(seq7307__$1);
var seq7307__$2 = cljs.core.next(seq7307__$1);
return cljs.core._STAR_.cljs$core$IFn$_invoke$arity$variadic(G__7308, G__7309, seq7307__$2);
};
cljs.core._STAR_.cljs$lang$maxFixedArity = 2;
cljs.core.divide;
cljs.core._SLASH_ = function cljs$core$_SLASH_(var_args) {
var args7316 = [];
var len__5729__auto___7322 = arguments.length;
var i__5730__auto___7323 = 0;
while (true) {
if (i__5730__auto___7323 < len__5729__auto___7322) {
args7316.push(arguments[i__5730__auto___7323]);
var G__7324 = i__5730__auto___7323 + 1;
i__5730__auto___7323 = G__7324;
continue;
} else {
}
break;
}
var G__7321 = args7316.length;
switch(G__7321) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7316.slice(2), 0);
return cljs.core._SLASH_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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(seq7317) {
var G__7318 = cljs.core.first(seq7317);
var seq7317__$1 = cljs.core.next(seq7317);
var G__7319 = cljs.core.first(seq7317__$1);
var seq7317__$2 = cljs.core.next(seq7317__$1);
return cljs.core._SLASH_.cljs$core$IFn$_invoke$arity$variadic(G__7318, G__7319, seq7317__$2);
};
cljs.core._SLASH_.cljs$lang$maxFixedArity = 2;
cljs.core._LT_ = function cljs$core$_LT_(var_args) {
var args7326 = [];
var len__5729__auto___7332 = arguments.length;
var i__5730__auto___7333 = 0;
while (true) {
if (i__5730__auto___7333 < len__5729__auto___7332) {
args7326.push(arguments[i__5730__auto___7333]);
var G__7334 = i__5730__auto___7333 + 1;
i__5730__auto___7333 = G__7334;
continue;
} else {
}
break;
}
var G__7331 = args7326.length;
switch(G__7331) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7326.slice(2), 0);
return cljs.core._LT_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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__7336 = y;
var G__7337 = cljs.core.first(more);
var G__7338 = cljs.core.next(more);
x = G__7336;
y = G__7337;
more = G__7338;
continue;
} else {
return y < cljs.core.first(more);
}
} else {
return false;
}
break;
}
};
cljs.core._LT_.cljs$lang$applyTo = function(seq7327) {
var G__7328 = cljs.core.first(seq7327);
var seq7327__$1 = cljs.core.next(seq7327);
var G__7329 = cljs.core.first(seq7327__$1);
var seq7327__$2 = cljs.core.next(seq7327__$1);
return cljs.core._LT_.cljs$core$IFn$_invoke$arity$variadic(G__7328, G__7329, seq7327__$2);
};
cljs.core._LT_.cljs$lang$maxFixedArity = 2;
cljs.core._LT__EQ_ = function cljs$core$_LT__EQ_(var_args) {
var args7339 = [];
var len__5729__auto___7345 = arguments.length;
var i__5730__auto___7346 = 0;
while (true) {
if (i__5730__auto___7346 < len__5729__auto___7345) {
args7339.push(arguments[i__5730__auto___7346]);
var G__7347 = i__5730__auto___7346 + 1;
i__5730__auto___7346 = G__7347;
continue;
} else {
}
break;
}
var G__7344 = args7339.length;
switch(G__7344) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7339.slice(2), 0);
return cljs.core._LT__EQ_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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__7349 = y;
var G__7350 = cljs.core.first(more);
var G__7351 = cljs.core.next(more);
x = G__7349;
y = G__7350;
more = G__7351;
continue;
} else {
return y <= cljs.core.first(more);
}
} else {
return false;
}
break;
}
};
cljs.core._LT__EQ_.cljs$lang$applyTo = function(seq7340) {
var G__7341 = cljs.core.first(seq7340);
var seq7340__$1 = cljs.core.next(seq7340);
var G__7342 = cljs.core.first(seq7340__$1);
var seq7340__$2 = cljs.core.next(seq7340__$1);
return cljs.core._LT__EQ_.cljs$core$IFn$_invoke$arity$variadic(G__7341, G__7342, seq7340__$2);
};
cljs.core._LT__EQ_.cljs$lang$maxFixedArity = 2;
cljs.core._GT_ = function cljs$core$_GT_(var_args) {
var args7352 = [];
var len__5729__auto___7358 = arguments.length;
var i__5730__auto___7359 = 0;
while (true) {
if (i__5730__auto___7359 < len__5729__auto___7358) {
args7352.push(arguments[i__5730__auto___7359]);
var G__7360 = i__5730__auto___7359 + 1;
i__5730__auto___7359 = G__7360;
continue;
} else {
}
break;
}
var G__7357 = args7352.length;
switch(G__7357) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7352.slice(2), 0);
return cljs.core._GT_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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__7362 = y;
var G__7363 = cljs.core.first(more);
var G__7364 = cljs.core.next(more);
x = G__7362;
y = G__7363;
more = G__7364;
continue;
} else {
return y > cljs.core.first(more);
}
} else {
return false;
}
break;
}
};
cljs.core._GT_.cljs$lang$applyTo = function(seq7353) {
var G__7354 = cljs.core.first(seq7353);
var seq7353__$1 = cljs.core.next(seq7353);
var G__7355 = cljs.core.first(seq7353__$1);
var seq7353__$2 = cljs.core.next(seq7353__$1);
return cljs.core._GT_.cljs$core$IFn$_invoke$arity$variadic(G__7354, G__7355, seq7353__$2);
};
cljs.core._GT_.cljs$lang$maxFixedArity = 2;
cljs.core._GT__EQ_ = function cljs$core$_GT__EQ_(var_args) {
var args7365 = [];
var len__5729__auto___7371 = arguments.length;
var i__5730__auto___7372 = 0;
while (true) {
if (i__5730__auto___7372 < len__5729__auto___7371) {
args7365.push(arguments[i__5730__auto___7372]);
var G__7373 = i__5730__auto___7372 + 1;
i__5730__auto___7372 = G__7373;
continue;
} else {
}
break;
}
var G__7370 = args7365.length;
switch(G__7370) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7365.slice(2), 0);
return cljs.core._GT__EQ_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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__7375 = y;
var G__7376 = cljs.core.first(more);
var G__7377 = cljs.core.next(more);
x = G__7375;
y = G__7376;
more = G__7377;
continue;
} else {
return y >= cljs.core.first(more);
}
} else {
return false;
}
break;
}
};
cljs.core._GT__EQ_.cljs$lang$applyTo = function(seq7366) {
var G__7367 = cljs.core.first(seq7366);
var seq7366__$1 = cljs.core.next(seq7366);
var G__7368 = cljs.core.first(seq7366__$1);
var seq7366__$2 = cljs.core.next(seq7366__$1);
return cljs.core._GT__EQ_.cljs$core$IFn$_invoke$arity$variadic(G__7367, G__7368, seq7366__$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 args7378 = [];
var len__5729__auto___7384 = arguments.length;
var i__5730__auto___7385 = 0;
while (true) {
if (i__5730__auto___7385 < len__5729__auto___7384) {
args7378.push(arguments[i__5730__auto___7385]);
var G__7386 = i__5730__auto___7385 + 1;
i__5730__auto___7385 = G__7386;
continue;
} else {
}
break;
}
var G__7383 = args7378.length;
switch(G__7383) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7378.slice(2), 0);
return cljs.core.max.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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__5002__auto__ = x;
var y__5003__auto__ = y;
return x__5002__auto__ > y__5003__auto__ ? x__5002__auto__ : y__5003__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__5002__auto__ = x;
var y__5003__auto__ = y;
return x__5002__auto__ > y__5003__auto__ ? x__5002__auto__ : y__5003__auto__;
}(), more);
};
cljs.core.max.cljs$lang$applyTo = function(seq7379) {
var G__7380 = cljs.core.first(seq7379);
var seq7379__$1 = cljs.core.next(seq7379);
var G__7381 = cljs.core.first(seq7379__$1);
var seq7379__$2 = cljs.core.next(seq7379__$1);
return cljs.core.max.cljs$core$IFn$_invoke$arity$variadic(G__7380, G__7381, seq7379__$2);
};
cljs.core.max.cljs$lang$maxFixedArity = 2;
cljs.core.min = function cljs$core$min(var_args) {
var args7388 = [];
var len__5729__auto___7394 = arguments.length;
var i__5730__auto___7395 = 0;
while (true) {
if (i__5730__auto___7395 < len__5729__auto___7394) {
args7388.push(arguments[i__5730__auto___7395]);
var G__7396 = i__5730__auto___7395 + 1;
i__5730__auto___7395 = G__7396;
continue;
} else {
}
break;
}
var G__7393 = args7388.length;
switch(G__7393) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7388.slice(2), 0);
return cljs.core.min.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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__5009__auto__ = x;
var y__5010__auto__ = y;
return x__5009__auto__ < y__5010__auto__ ? x__5009__auto__ : y__5010__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__5009__auto__ = x;
var y__5010__auto__ = y;
return x__5009__auto__ < y__5010__auto__ ? x__5009__auto__ : y__5010__auto__;
}(), more);
};
cljs.core.min.cljs$lang$applyTo = function(seq7389) {
var G__7390 = cljs.core.first(seq7389);
var seq7389__$1 = cljs.core.next(seq7389);
var G__7391 = cljs.core.first(seq7389__$1);
var seq7389__$2 = cljs.core.next(seq7389__$1);
return cljs.core.min.cljs$core$IFn$_invoke$arity$variadic(G__7390, G__7391, seq7389__$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 args7398 = [];
var len__5729__auto___7404 = arguments.length;
var i__5730__auto___7405 = 0;
while (true) {
if (i__5730__auto___7405 < len__5729__auto___7404) {
args7398.push(arguments[i__5730__auto___7405]);
var G__7406 = i__5730__auto___7405 + 1;
i__5730__auto___7405 = G__7406;
continue;
} else {
}
break;
}
var G__7403 = args7398.length;
switch(G__7403) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7398.slice(2), 0);
return cljs.core.unchecked_add.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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(seq7399) {
var G__7400 = cljs.core.first(seq7399);
var seq7399__$1 = cljs.core.next(seq7399);
var G__7401 = cljs.core.first(seq7399__$1);
var seq7399__$2 = cljs.core.next(seq7399__$1);
return cljs.core.unchecked_add.cljs$core$IFn$_invoke$arity$variadic(G__7400, G__7401, seq7399__$2);
};
cljs.core.unchecked_add.cljs$lang$maxFixedArity = 2;
cljs.core.unchecked_add_int = function cljs$core$unchecked_add_int(var_args) {
var args7408 = [];
var len__5729__auto___7414 = arguments.length;
var i__5730__auto___7415 = 0;
while (true) {
if (i__5730__auto___7415 < len__5729__auto___7414) {
args7408.push(arguments[i__5730__auto___7415]);
var G__7416 = i__5730__auto___7415 + 1;
i__5730__auto___7415 = G__7416;
continue;
} else {
}
break;
}
var G__7413 = args7408.length;
switch(G__7413) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7408.slice(2), 0);
return cljs.core.unchecked_add_int.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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(seq7409) {
var G__7410 = cljs.core.first(seq7409);
var seq7409__$1 = cljs.core.next(seq7409);
var G__7411 = cljs.core.first(seq7409__$1);
var seq7409__$2 = cljs.core.next(seq7409__$1);
return cljs.core.unchecked_add_int.cljs$core$IFn$_invoke$arity$variadic(G__7410, G__7411, seq7409__$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 args7418 = [];
var len__5729__auto___7424 = arguments.length;
var i__5730__auto___7425 = 0;
while (true) {
if (i__5730__auto___7425 < len__5729__auto___7424) {
args7418.push(arguments[i__5730__auto___7425]);
var G__7426 = i__5730__auto___7425 + 1;
i__5730__auto___7425 = G__7426;
continue;
} else {
}
break;
}
var G__7423 = args7418.length;
switch(G__7423) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7418.slice(2), 0);
return cljs.core.unchecked_divide_int.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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(seq7419) {
var G__7420 = cljs.core.first(seq7419);
var seq7419__$1 = cljs.core.next(seq7419);
var G__7421 = cljs.core.first(seq7419__$1);
var seq7419__$2 = cljs.core.next(seq7419__$1);
return cljs.core.unchecked_divide_int.cljs$core$IFn$_invoke$arity$variadic(G__7420, G__7421, seq7419__$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 args7428 = [];
var len__5729__auto___7434 = arguments.length;
var i__5730__auto___7435 = 0;
while (true) {
if (i__5730__auto___7435 < len__5729__auto___7434) {
args7428.push(arguments[i__5730__auto___7435]);
var G__7436 = i__5730__auto___7435 + 1;
i__5730__auto___7435 = G__7436;
continue;
} else {
}
break;
}
var G__7433 = args7428.length;
switch(G__7433) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7428.slice(2), 0);
return cljs.core.unchecked_multiply.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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(seq7429) {
var G__7430 = cljs.core.first(seq7429);
var seq7429__$1 = cljs.core.next(seq7429);
var G__7431 = cljs.core.first(seq7429__$1);
var seq7429__$2 = cljs.core.next(seq7429__$1);
return cljs.core.unchecked_multiply.cljs$core$IFn$_invoke$arity$variadic(G__7430, G__7431, seq7429__$2);
};
cljs.core.unchecked_multiply.cljs$lang$maxFixedArity = 2;
cljs.core.unchecked_multiply_int = function cljs$core$unchecked_multiply_int(var_args) {
var args7438 = [];
var len__5729__auto___7444 = arguments.length;
var i__5730__auto___7445 = 0;
while (true) {
if (i__5730__auto___7445 < len__5729__auto___7444) {
args7438.push(arguments[i__5730__auto___7445]);
var G__7446 = i__5730__auto___7445 + 1;
i__5730__auto___7445 = G__7446;
continue;
} else {
}
break;
}
var G__7443 = args7438.length;
switch(G__7443) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7438.slice(2), 0);
return cljs.core.unchecked_multiply_int.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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(seq7439) {
var G__7440 = cljs.core.first(seq7439);
var seq7439__$1 = cljs.core.next(seq7439);
var G__7441 = cljs.core.first(seq7439__$1);
var seq7439__$2 = cljs.core.next(seq7439__$1);
return cljs.core.unchecked_multiply_int.cljs$core$IFn$_invoke$arity$variadic(G__7440, G__7441, seq7439__$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.mod;
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 args7448 = [];
var len__5729__auto___7454 = arguments.length;
var i__5730__auto___7455 = 0;
while (true) {
if (i__5730__auto___7455 < len__5729__auto___7454) {
args7448.push(arguments[i__5730__auto___7455]);
var G__7456 = i__5730__auto___7455 + 1;
i__5730__auto___7455 = G__7456;
continue;
} else {
}
break;
}
var G__7453 = args7448.length;
switch(G__7453) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7448.slice(2), 0);
return cljs.core.unchecked_subtract.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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(seq7449) {
var G__7450 = cljs.core.first(seq7449);
var seq7449__$1 = cljs.core.next(seq7449);
var G__7451 = cljs.core.first(seq7449__$1);
var seq7449__$2 = cljs.core.next(seq7449__$1);
return cljs.core.unchecked_subtract.cljs$core$IFn$_invoke$arity$variadic(G__7450, G__7451, seq7449__$2);
};
cljs.core.unchecked_subtract.cljs$lang$maxFixedArity = 2;
cljs.core.unchecked_subtract_int = function cljs$core$unchecked_subtract_int(var_args) {
var args7458 = [];
var len__5729__auto___7464 = arguments.length;
var i__5730__auto___7465 = 0;
while (true) {
if (i__5730__auto___7465 < len__5729__auto___7464) {
args7458.push(arguments[i__5730__auto___7465]);
var G__7466 = i__5730__auto___7465 + 1;
i__5730__auto___7465 = G__7466;
continue;
} else {
}
break;
}
var G__7463 = args7458.length;
switch(G__7463) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7458.slice(2), 0);
return cljs.core.unchecked_subtract_int.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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(seq7459) {
var G__7460 = cljs.core.first(seq7459);
var seq7459__$1 = cljs.core.next(seq7459);
var G__7461 = cljs.core.first(seq7459__$1);
var seq7459__$2 = cljs.core.next(seq7459__$1);
return cljs.core.unchecked_subtract_int.cljs$core$IFn$_invoke$arity$variadic(G__7460, G__7461, seq7459__$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 args7468 = [];
var len__5729__auto___7474 = arguments.length;
var i__5730__auto___7475 = 0;
while (true) {
if (i__5730__auto___7475 < len__5729__auto___7474) {
args7468.push(arguments[i__5730__auto___7475]);
var G__7476 = i__5730__auto___7475 + 1;
i__5730__auto___7475 = G__7476;
continue;
} else {
}
break;
}
var G__7473 = args7468.length;
switch(G__7473) {
case 2:
return cljs.core.bit_xor.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
var argseq__5748__auto__ = new cljs.core.IndexedSeq(args7468.slice(2), 0);
return cljs.core.bit_xor.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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(seq7469) {
var G__7470 = cljs.core.first(seq7469);
var seq7469__$1 = cljs.core.next(seq7469);
var G__7471 = cljs.core.first(seq7469__$1);
var seq7469__$2 = cljs.core.next(seq7469__$1);
return cljs.core.bit_xor.cljs$core$IFn$_invoke$arity$variadic(G__7470, G__7471, seq7469__$2);
};
cljs.core.bit_xor.cljs$lang$maxFixedArity = 2;
cljs.core.bit_and = function cljs$core$bit_and(var_args) {
var args7478 = [];
var len__5729__auto___7484 = arguments.length;
var i__5730__auto___7485 = 0;
while (true) {
if (i__5730__auto___7485 < len__5729__auto___7484) {
args7478.push(arguments[i__5730__auto___7485]);
var G__7486 = i__5730__auto___7485 + 1;
i__5730__auto___7485 = G__7486;
continue;
} else {
}
break;
}
var G__7483 = args7478.length;
switch(G__7483) {
case 2:
return cljs.core.bit_and.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
var argseq__5748__auto__ = new cljs.core.IndexedSeq(args7478.slice(2), 0);
return cljs.core.bit_and.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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(seq7479) {
var G__7480 = cljs.core.first(seq7479);
var seq7479__$1 = cljs.core.next(seq7479);
var G__7481 = cljs.core.first(seq7479__$1);
var seq7479__$2 = cljs.core.next(seq7479__$1);
return cljs.core.bit_and.cljs$core$IFn$_invoke$arity$variadic(G__7480, G__7481, seq7479__$2);
};
cljs.core.bit_and.cljs$lang$maxFixedArity = 2;
cljs.core.bit_or = function cljs$core$bit_or(var_args) {
var args7488 = [];
var len__5729__auto___7494 = arguments.length;
var i__5730__auto___7495 = 0;
while (true) {
if (i__5730__auto___7495 < len__5729__auto___7494) {
args7488.push(arguments[i__5730__auto___7495]);
var G__7496 = i__5730__auto___7495 + 1;
i__5730__auto___7495 = G__7496;
continue;
} else {
}
break;
}
var G__7493 = args7488.length;
switch(G__7493) {
case 2:
return cljs.core.bit_or.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
var argseq__5748__auto__ = new cljs.core.IndexedSeq(args7488.slice(2), 0);
return cljs.core.bit_or.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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(seq7489) {
var G__7490 = cljs.core.first(seq7489);
var seq7489__$1 = cljs.core.next(seq7489);
var G__7491 = cljs.core.first(seq7489__$1);
var seq7489__$2 = cljs.core.next(seq7489__$1);
return cljs.core.bit_or.cljs$core$IFn$_invoke$arity$variadic(G__7490, G__7491, seq7489__$2);
};
cljs.core.bit_or.cljs$lang$maxFixedArity = 2;
cljs.core.bit_and_not = function cljs$core$bit_and_not(var_args) {
var args7498 = [];
var len__5729__auto___7504 = arguments.length;
var i__5730__auto___7505 = 0;
while (true) {
if (i__5730__auto___7505 < len__5729__auto___7504) {
args7498.push(arguments[i__5730__auto___7505]);
var G__7506 = i__5730__auto___7505 + 1;
i__5730__auto___7505 = G__7506;
continue;
} else {
}
break;
}
var G__7503 = args7498.length;
switch(G__7503) {
case 2:
return cljs.core.bit_and_not.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
var argseq__5748__auto__ = new cljs.core.IndexedSeq(args7498.slice(2), 0);
return cljs.core.bit_and_not.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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(seq7499) {
var G__7500 = cljs.core.first(seq7499);
var seq7499__$1 = cljs.core.next(seq7499);
var G__7501 = cljs.core.first(seq7499__$1);
var seq7499__$2 = cljs.core.next(seq7499__$1);
return cljs.core.bit_and_not.cljs$core$IFn$_invoke$arity$variadic(G__7500, G__7501, seq7499__$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 args7508 = [];
var len__5729__auto___7514 = arguments.length;
var i__5730__auto___7515 = 0;
while (true) {
if (i__5730__auto___7515 < len__5729__auto___7514) {
args7508.push(arguments[i__5730__auto___7515]);
var G__7516 = i__5730__auto___7515 + 1;
i__5730__auto___7515 = G__7516;
continue;
} else {
}
break;
}
var G__7513 = args7508.length;
switch(G__7513) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7508.slice(2), 0);
return cljs.core._EQ__EQ_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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__7518 = y;
var G__7519 = cljs.core.first(more);
var G__7520 = cljs.core.next(more);
x = G__7518;
y = G__7519;
more = G__7520;
continue;
} else {
return y === cljs.core.first(more);
}
} else {
return false;
}
break;
}
};
cljs.core._EQ__EQ_.cljs$lang$applyTo = function(seq7509) {
var G__7510 = cljs.core.first(seq7509);
var seq7509__$1 = cljs.core.next(seq7509);
var G__7511 = cljs.core.first(seq7509__$1);
var seq7509__$2 = cljs.core.next(seq7509__$1);
return cljs.core._EQ__EQ_.cljs$core$IFn$_invoke$arity$variadic(G__7510, G__7511, seq7509__$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__7521 = n__$1 - 1;
var G__7522 = cljs.core.next(xs);
n__$1 = G__7521;
xs = G__7522;
continue;
} else {
return xs;
}
break;
}
};
cljs.core.str = function cljs$core$str(var_args) {
var args7523 = [];
var len__5729__auto___7528 = arguments.length;
var i__5730__auto___7529 = 0;
while (true) {
if (i__5730__auto___7529 < len__5729__auto___7528) {
args7523.push(arguments[i__5730__auto___7529]);
var G__7530 = i__5730__auto___7529 + 1;
i__5730__auto___7529 = G__7530;
continue;
} else {
}
break;
}
var G__7527 = args7523.length;
switch(G__7527) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7523.slice(1), 0);
return cljs.core.str.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5748__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__7532 = sb.append([cljs.core.str(cljs.core.first(more))].join(""));
var G__7533 = cljs.core.next(more);
sb = G__7532;
more = G__7533;
continue;
} else {
return sb.toString();
}
break;
}
};
cljs.core.str.cljs$lang$applyTo = function(seq7524) {
var G__7525 = cljs.core.first(seq7524);
var seq7524__$1 = cljs.core.next(seq7524);
return cljs.core.str.cljs$core$IFn$_invoke$arity$variadic(G__7525, seq7524__$1);
};
cljs.core.str.cljs$lang$maxFixedArity = 1;
cljs.core.subs = function cljs$core$subs(var_args) {
var args7534 = [];
var len__5729__auto___7537 = arguments.length;
var i__5730__auto___7538 = 0;
while (true) {
if (i__5730__auto___7538 < len__5729__auto___7537) {
args7534.push(arguments[i__5730__auto___7538]);
var G__7539 = i__5730__auto___7538 + 1;
i__5730__auto___7538 = G__7539;
continue;
} else {
}
break;
}
var G__7536 = args7534.length;
switch(G__7536) {
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(args7534.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.map;
cljs.core.name;
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__7541 = cljs.core.next(xs);
var G__7542 = cljs.core.next(ys);
xs = G__7541;
ys = G__7542;
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__7543 = cljs.core.hash_combine(res, cljs.core.hash(cljs.core.first(s)));
var G__7544 = cljs.core.next(s);
res = G__7543;
s = G__7544;
continue;
}
break;
}
} else {
return 0;
}
};
cljs.core.key;
cljs.core.val;
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__7545 = (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__7546 = cljs.core.next(s);
h = G__7545;
s = G__7546;
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__7547 = (h + cljs.core.hash(e)) % 4503599627370496;
var G__7548 = cljs.core.next(s__$1);
h = G__7547;
s__$1 = G__7548;
continue;
} else {
return h;
}
break;
}
};
cljs.core.name;
cljs.core.chunk_first;
cljs.core.chunk_rest;
cljs.core.extend_object_BANG_ = function cljs$core$extend_object_BANG_(obj, fn_map) {
var seq__7555_7561 = cljs.core.seq(fn_map);
var chunk__7556_7562 = null;
var count__7557_7563 = 0;
var i__7558_7564 = 0;
while (true) {
if (i__7558_7564 < count__7557_7563) {
var vec__7559_7565 = chunk__7556_7562.cljs$core$IIndexed$_nth$arity$2(null, i__7558_7564);
var key_name_7566 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__7559_7565, 0, null);
var f_7567 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__7559_7565, 1, null);
var str_name_7568 = cljs.core.name.cljs$core$IFn$_invoke$arity$1 ? cljs.core.name.cljs$core$IFn$_invoke$arity$1(key_name_7566) : cljs.core.name.call(null, key_name_7566);
obj[str_name_7568] = f_7567;
var G__7569 = seq__7555_7561;
var G__7570 = chunk__7556_7562;
var G__7571 = count__7557_7563;
var G__7572 = i__7558_7564 + 1;
seq__7555_7561 = G__7569;
chunk__7556_7562 = G__7570;
count__7557_7563 = G__7571;
i__7558_7564 = G__7572;
continue;
} else {
var temp__4425__auto___7573 = cljs.core.seq(seq__7555_7561);
if (temp__4425__auto___7573) {
var seq__7555_7574__$1 = temp__4425__auto___7573;
if (cljs.core.chunked_seq_QMARK_(seq__7555_7574__$1)) {
var c__5474__auto___7575 = cljs.core.chunk_first.cljs$core$IFn$_invoke$arity$1 ? cljs.core.chunk_first.cljs$core$IFn$_invoke$arity$1(seq__7555_7574__$1) : cljs.core.chunk_first.call(null, seq__7555_7574__$1);
var G__7576 = cljs.core.chunk_rest.cljs$core$IFn$_invoke$arity$1 ? cljs.core.chunk_rest.cljs$core$IFn$_invoke$arity$1(seq__7555_7574__$1) : cljs.core.chunk_rest.call(null, seq__7555_7574__$1);
var G__7577 = c__5474__auto___7575;
var G__7578 = cljs.core.count(c__5474__auto___7575);
var G__7579 = 0;
seq__7555_7561 = G__7576;
chunk__7556_7562 = G__7577;
count__7557_7563 = G__7578;
i__7558_7564 = G__7579;
continue;
} else {
var vec__7560_7580 = cljs.core.first(seq__7555_7574__$1);
var key_name_7581 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__7560_7580, 0, null);
var f_7582 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__7560_7580, 1, null);
var str_name_7583 = cljs.core.name.cljs$core$IFn$_invoke$arity$1 ? cljs.core.name.cljs$core$IFn$_invoke$arity$1(key_name_7581) : cljs.core.name.call(null, key_name_7581);
obj[str_name_7583] = f_7582;
var G__7584 = cljs.core.next(seq__7555_7574__$1);
var G__7585 = null;
var G__7586 = 0;
var G__7587 = 0;
seq__7555_7561 = G__7584;
chunk__7556_7562 = G__7585;
count__7557_7563 = G__7586;
i__7558_7564 = G__7587;
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__5106__auto__ = self__.__hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
self__.__hash = h__5106__auto____$1;
return h__5106__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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__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(coll) {
return cljs.core._rseq(coll);
};
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__5736__auto__ = [];
var len__5729__auto___7593 = arguments.length;
var i__5730__auto___7594 = 0;
while (true) {
if (i__5730__auto___7594 < len__5729__auto___7593) {
args__5736__auto__.push(arguments[i__5730__auto___7594]);
var G__7595 = i__5730__auto___7594 + 1;
i__5730__auto___7594 = G__7595;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 0 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(0), 0) : null;
return cljs.core.list.cljs$core$IFn$_invoke$arity$variadic(argseq__5737__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__7596 = xs__$1.cljs$core$INext$_next$arity$1(null);
xs__$1 = G__7596;
continue;
} else {
return arr;
}
break;
}
}();
var i = arr.length;
var r = cljs.core.List.EMPTY;
while (true) {
if (i > 0) {
var G__7597 = i - 1;
var G__7598 = r.cljs$core$ICollection$_conj$arity$2(null, arr[i - 1]);
i = G__7597;
r = G__7598;
continue;
} else {
return r;
}
break;
}
};
cljs.core.list.cljs$lang$maxFixedArity = 0;
cljs.core.list.cljs$lang$applyTo = function(seq7592) {
return cljs.core.list.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq7592));
};
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__5106__auto__ = self__.__hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
self__.__hash = h__5106__auto____$1;
return h__5106__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, self__.__hash);
};
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__auto__);
};
cljs.core.cons = function cljs$core$cons(x, coll) {
if (function() {
var or__4671__auto__ = coll == null;
if (or__4671__auto__) {
return or__4671__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__4659__auto__ = cljs.core.not(a.ns);
if (and__4659__auto__) {
return b.ns;
} else {
return and__4659__auto__;
}
}())) {
return -1;
} else {
if (cljs.core.truth_(a.ns)) {
if (cljs.core.not(b.ns)) {
return 1;
} else {
var nsc = function() {
var G__7609 = a.ns;
var G__7610 = b.ns;
return goog.array.defaultCompare(G__7609, G__7610);
}();
if (0 === nsc) {
var G__7611 = a.name;
var G__7612 = b.name;
return goog.array.defaultCompare(G__7611, G__7612);
} else {
return nsc;
}
}
} else {
var G__7613 = a.name;
var G__7614 = b.name;
return goog.array.defaultCompare(G__7613, G__7614);
}
}
}
};
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__7616 = null;
var G__7616__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__7616__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__7616 = function(self__, coll, not_found) {
switch(arguments.length) {
case 2:
return G__7616__2.call(this, self__, coll);
case 3:
return G__7616__3.call(this, self__, coll, not_found);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__7616.cljs$core$IFn$_invoke$arity$2 = G__7616__2;
G__7616.cljs$core$IFn$_invoke$arity$3 = G__7616__3;
return G__7616;
}();
cljs.core.Keyword.prototype.apply = function(self__, args7615) {
var self__ = this;
var self____$1 = this;
return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args7615)));
};
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__5106__auto__ = self__._hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_keyword(this$__$1);
self__._hash = h__5106__auto____$1;
return h__5106__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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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 args7619 = [];
var len__5729__auto___7622 = arguments.length;
var i__5730__auto___7623 = 0;
while (true) {
if (i__5730__auto___7623 < len__5729__auto___7622) {
args7619.push(arguments[i__5730__auto___7623]);
var G__7624 = i__5730__auto___7623 + 1;
i__5730__auto___7623 = G__7624;
continue;
} else {
}
break;
}
var G__7621 = args7619.length;
switch(G__7621) {
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(args7619.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$ = 0;
};
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__5106__auto__ = self__.__hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
self__.__hash = h__5106__auto____$1;
return h__5106__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$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__7626 = ls.sval();
ls = G__7626;
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__auto__);
};
cljs.core.ArrayChunk;
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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 args7627 = [];
var len__5729__auto___7630 = arguments.length;
var i__5730__auto___7631 = 0;
while (true) {
if (i__5730__auto___7631 < len__5729__auto___7630) {
args7627.push(arguments[i__5730__auto___7631]);
var G__7632 = i__5730__auto___7631 + 1;
i__5730__auto___7631 = G__7632;
continue;
} else {
}
break;
}
var G__7629 = args7627.length;
switch(G__7629) {
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(args7627.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__5106__auto__ = self__.__hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
self__.__hash = h__5106__auto____$1;
return h__5106__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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__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__7636 = cljs.core.next(s__$1);
s__$1 = G__7636;
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_7637 = 0;
var xs_7638 = cljs.core.seq(coll);
while (true) {
if (xs_7638) {
ret[i_7637] = cljs.core.to_array(cljs.core.first(xs_7638));
var G__7639 = i_7637 + 1;
var G__7640 = cljs.core.next(xs_7638);
i_7637 = G__7639;
xs_7638 = G__7640;
continue;
} else {
}
break;
}
return ret;
};
cljs.core.int_array = function cljs$core$int_array(var_args) {
var args7641 = [];
var len__5729__auto___7644 = arguments.length;
var i__5730__auto___7645 = 0;
while (true) {
if (i__5730__auto___7645 < len__5729__auto___7644) {
args7641.push(arguments[i__5730__auto___7645]);
var G__7646 = i__5730__auto___7645 + 1;
i__5730__auto___7645 = G__7646;
continue;
} else {
}
break;
}
var G__7643 = args7641.length;
switch(G__7643) {
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(args7641.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__7648 = i + 1;
var G__7649 = cljs.core.next(s__$1);
i = G__7648;
s__$1 = G__7649;
continue;
} else {
return a;
}
break;
}
} else {
var n__5574__auto___7650 = size;
var i_7651 = 0;
while (true) {
if (i_7651 < n__5574__auto___7650) {
a[i_7651] = init_val_or_seq;
var G__7652 = i_7651 + 1;
i_7651 = G__7652;
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 args7653 = [];
var len__5729__auto___7656 = arguments.length;
var i__5730__auto___7657 = 0;
while (true) {
if (i__5730__auto___7657 < len__5729__auto___7656) {
args7653.push(arguments[i__5730__auto___7657]);
var G__7658 = i__5730__auto___7657 + 1;
i__5730__auto___7657 = G__7658;
continue;
} else {
}
break;
}
var G__7655 = args7653.length;
switch(G__7655) {
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(args7653.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__7660 = i + 1;
var G__7661 = cljs.core.next(s__$1);
i = G__7660;
s__$1 = G__7661;
continue;
} else {
return a;
}
break;
}
} else {
var n__5574__auto___7662 = size;
var i_7663 = 0;
while (true) {
if (i_7663 < n__5574__auto___7662) {
a[i_7663] = init_val_or_seq;
var G__7664 = i_7663 + 1;
i_7663 = G__7664;
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 args7665 = [];
var len__5729__auto___7668 = arguments.length;
var i__5730__auto___7669 = 0;
while (true) {
if (i__5730__auto___7669 < len__5729__auto___7668) {
args7665.push(arguments[i__5730__auto___7669]);
var G__7670 = i__5730__auto___7669 + 1;
i__5730__auto___7669 = G__7670;
continue;
} else {
}
break;
}
var G__7667 = args7665.length;
switch(G__7667) {
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(args7665.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__7672 = i + 1;
var G__7673 = cljs.core.next(s__$1);
i = G__7672;
s__$1 = G__7673;
continue;
} else {
return a;
}
break;
}
} else {
var n__5574__auto___7674 = size;
var i_7675 = 0;
while (true) {
if (i_7675 < n__5574__auto___7674) {
a[i_7675] = init_val_or_seq;
var G__7676 = i_7675 + 1;
i_7675 = G__7676;
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 args7677 = [];
var len__5729__auto___7680 = arguments.length;
var i__5730__auto___7681 = 0;
while (true) {
if (i__5730__auto___7681 < len__5729__auto___7680) {
args7677.push(arguments[i__5730__auto___7681]);
var G__7682 = i__5730__auto___7681 + 1;
i__5730__auto___7681 = G__7682;
continue;
} else {
}
break;
}
var G__7679 = args7677.length;
switch(G__7679) {
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(args7677.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__7684 = i + 1;
var G__7685 = cljs.core.next(s__$1);
i = G__7684;
s__$1 = G__7685;
continue;
} else {
return a;
}
break;
}
} else {
var n__5574__auto___7686 = size;
var i_7687 = 0;
while (true) {
if (i_7687 < n__5574__auto___7686) {
a[i_7687] = init_val_or_seq;
var G__7688 = i_7687 + 1;
i_7687 = G__7688;
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__7689 = cljs.core.next(s__$1);
var G__7690 = i - 1;
var G__7691 = sum + 1;
s__$1 = G__7689;
i = G__7690;
sum = G__7691;
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 args7693 = [];
var len__5729__auto___7705 = arguments.length;
var i__5730__auto___7706 = 0;
while (true) {
if (i__5730__auto___7706 < len__5729__auto___7705) {
args7693.push(arguments[i__5730__auto___7706]);
var G__7707 = i__5730__auto___7706 + 1;
i__5730__auto___7706 = G__7707;
continue;
} else {
}
break;
}
var G__7698 = args7693.length;
switch(G__7698) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7693.slice(2), 0);
return cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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(seq7694) {
var G__7695 = cljs.core.first(seq7694);
var seq7694__$1 = cljs.core.next(seq7694);
var G__7696 = cljs.core.first(seq7694__$1);
var seq7694__$2 = cljs.core.next(seq7694__$1);
return cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic(G__7695, G__7696, seq7694__$2);
};
cljs.core.concat.cljs$lang$maxFixedArity = 2;
cljs.core.list_STAR_ = function cljs$core$list_STAR_(var_args) {
var args7709 = [];
var len__5729__auto___7717 = arguments.length;
var i__5730__auto___7718 = 0;
while (true) {
if (i__5730__auto___7718 < len__5729__auto___7717) {
args7709.push(arguments[i__5730__auto___7718]);
var G__7719 = i__5730__auto___7718 + 1;
i__5730__auto___7718 = G__7719;
continue;
} else {
}
break;
}
var G__7716 = args7709.length;
switch(G__7716) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7709.slice(4), 0);
return cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], arguments[3], argseq__5748__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(seq7710) {
var G__7711 = cljs.core.first(seq7710);
var seq7710__$1 = cljs.core.next(seq7710);
var G__7712 = cljs.core.first(seq7710__$1);
var seq7710__$2 = cljs.core.next(seq7710__$1);
var G__7713 = cljs.core.first(seq7710__$2);
var seq7710__$3 = cljs.core.next(seq7710__$2);
var G__7714 = cljs.core.first(seq7710__$3);
var seq7710__$4 = cljs.core.next(seq7710__$3);
return cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$variadic(G__7711, G__7712, G__7713, G__7714, seq7710__$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 args7721 = [];
var len__5729__auto___7727 = arguments.length;
var i__5730__auto___7728 = 0;
while (true) {
if (i__5730__auto___7728 < len__5729__auto___7727) {
args7721.push(arguments[i__5730__auto___7728]);
var G__7729 = i__5730__auto___7728 + 1;
i__5730__auto___7728 = G__7729;
continue;
} else {
}
break;
}
var G__7726 = args7721.length;
switch(G__7726) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7721.slice(2), 0);
return cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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__7731 = ntcoll;
var G__7732 = cljs.core.first(vals);
var G__7733 = cljs.core.next(vals);
tcoll = G__7731;
val = G__7732;
vals = G__7733;
continue;
} else {
return ntcoll;
}
break;
}
};
cljs.core.conj_BANG_.cljs$lang$applyTo = function(seq7722) {
var G__7723 = cljs.core.first(seq7722);
var seq7722__$1 = cljs.core.next(seq7722);
var G__7724 = cljs.core.first(seq7722__$1);
var seq7722__$2 = cljs.core.next(seq7722__$1);
return cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__7723, G__7724, seq7722__$2);
};
cljs.core.conj_BANG_.cljs$lang$maxFixedArity = 2;
cljs.core.assoc_BANG_ = function cljs$core$assoc_BANG_(var_args) {
var args7734 = [];
var len__5729__auto___7741 = arguments.length;
var i__5730__auto___7742 = 0;
while (true) {
if (i__5730__auto___7742 < len__5729__auto___7741) {
args7734.push(arguments[i__5730__auto___7742]);
var G__7743 = i__5730__auto___7742 + 1;
i__5730__auto___7742 = G__7743;
continue;
} else {
}
break;
}
var G__7740 = args7734.length;
switch(G__7740) {
case 3:
return cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
break;
default:
var argseq__5748__auto__ = new cljs.core.IndexedSeq(args7734.slice(3), 0);
return cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], argseq__5748__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__7745 = ntcoll;
var G__7746 = cljs.core.first(kvs);
var G__7747 = cljs.core.second(kvs);
var G__7748 = cljs.core.nnext(kvs);
tcoll = G__7745;
key = G__7746;
val = G__7747;
kvs = G__7748;
continue;
} else {
return ntcoll;
}
break;
}
};
cljs.core.assoc_BANG_.cljs$lang$applyTo = function(seq7735) {
var G__7736 = cljs.core.first(seq7735);
var seq7735__$1 = cljs.core.next(seq7735);
var G__7737 = cljs.core.first(seq7735__$1);
var seq7735__$2 = cljs.core.next(seq7735__$1);
var G__7738 = cljs.core.first(seq7735__$2);
var seq7735__$3 = cljs.core.next(seq7735__$2);
return cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__7736, G__7737, G__7738, seq7735__$3);
};
cljs.core.assoc_BANG_.cljs$lang$maxFixedArity = 3;
cljs.core.dissoc_BANG_ = function cljs$core$dissoc_BANG_(var_args) {
var args7749 = [];
var len__5729__auto___7755 = arguments.length;
var i__5730__auto___7756 = 0;
while (true) {
if (i__5730__auto___7756 < len__5729__auto___7755) {
args7749.push(arguments[i__5730__auto___7756]);
var G__7757 = i__5730__auto___7756 + 1;
i__5730__auto___7756 = G__7757;
continue;
} else {
}
break;
}
var G__7754 = args7749.length;
switch(G__7754) {
case 2:
return cljs.core.dissoc_BANG_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
var argseq__5748__auto__ = new cljs.core.IndexedSeq(args7749.slice(2), 0);
return cljs.core.dissoc_BANG_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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__7759 = ntcoll;
var G__7760 = cljs.core.first(ks);
var G__7761 = cljs.core.next(ks);
tcoll = G__7759;
key = G__7760;
ks = G__7761;
continue;
} else {
return ntcoll;
}
break;
}
};
cljs.core.dissoc_BANG_.cljs$lang$applyTo = function(seq7750) {
var G__7751 = cljs.core.first(seq7750);
var seq7750__$1 = cljs.core.next(seq7750);
var G__7752 = cljs.core.first(seq7750__$1);
var seq7750__$2 = cljs.core.next(seq7750__$1);
return cljs.core.dissoc_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__7751, G__7752, seq7750__$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 args7762 = [];
var len__5729__auto___7768 = arguments.length;
var i__5730__auto___7769 = 0;
while (true) {
if (i__5730__auto___7769 < len__5729__auto___7768) {
args7762.push(arguments[i__5730__auto___7769]);
var G__7770 = i__5730__auto___7769 + 1;
i__5730__auto___7769 = G__7770;
continue;
} else {
}
break;
}
var G__7767 = args7762.length;
switch(G__7767) {
case 2:
return cljs.core.disj_BANG_.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
var argseq__5748__auto__ = new cljs.core.IndexedSeq(args7762.slice(2), 0);
return cljs.core.disj_BANG_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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__7772 = ntcoll;
var G__7773 = cljs.core.first(vals);
var G__7774 = cljs.core.next(vals);
tcoll = G__7772;
val = G__7773;
vals = G__7774;
continue;
} else {
return ntcoll;
}
break;
}
};
cljs.core.disj_BANG_.cljs$lang$applyTo = function(seq7763) {
var G__7764 = cljs.core.first(seq7763);
var seq7763__$1 = cljs.core.next(seq7763);
var G__7765 = cljs.core.first(seq7763__$1);
var seq7763__$2 = cljs.core.next(seq7763__$1);
return cljs.core.disj_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__7764, G__7765, seq7763__$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 a5618 = 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(a5618);
} else {
return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(a5618) : f.call(null, a5618);
}
} else {
var b5619 = 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(a5618, b5619);
} else {
return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(a5618, b5619) : f.call(null, a5618, b5619);
}
} else {
var c5620 = 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(a5618, b5619, c5620);
} else {
return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(a5618, b5619, c5620) : f.call(null, a5618, b5619, c5620);
}
} else {
var d5621 = 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(a5618, b5619, c5620, d5621);
} else {
return f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(a5618, b5619, c5620, d5621) : f.call(null, a5618, b5619, c5620, d5621);
}
} else {
var e5622 = 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(a5618, b5619, c5620, d5621, e5622);
} else {
return f.cljs$core$IFn$_invoke$arity$5 ? f.cljs$core$IFn$_invoke$arity$5(a5618, b5619, c5620, d5621, e5622) : f.call(null, a5618, b5619, c5620, d5621, e5622);
}
} else {
var f5623 = 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(a5618, b5619, c5620, d5621, e5622, f5623);
} else {
return f.cljs$core$IFn$_invoke$arity$6 ? f.cljs$core$IFn$_invoke$arity$6(a5618, b5619, c5620, d5621, e5622, f5623) : f.call(null, a5618, b5619, c5620, d5621, e5622, f5623);
}
} else {
var g5624 = 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(a5618, b5619, c5620, d5621, e5622, f5623, g5624);
} else {
return f.cljs$core$IFn$_invoke$arity$7 ? f.cljs$core$IFn$_invoke$arity$7(a5618, b5619, c5620, d5621, e5622, f5623, g5624) : f.call(null, a5618, b5619, c5620, d5621, e5622, f5623, g5624);
}
} else {
var h5625 = 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(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625);
} else {
return f.cljs$core$IFn$_invoke$arity$8 ? f.cljs$core$IFn$_invoke$arity$8(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625) : f.call(null, a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625);
}
} else {
var i5626 = 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(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626);
} else {
return f.cljs$core$IFn$_invoke$arity$9 ? f.cljs$core$IFn$_invoke$arity$9(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626) : f.call(null, a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626);
}
} else {
var j5627 = 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(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627);
} else {
return f.cljs$core$IFn$_invoke$arity$10 ? f.cljs$core$IFn$_invoke$arity$10(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627) : f.call(null, a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627);
}
} else {
var k5628 = 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(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628);
} else {
return f.cljs$core$IFn$_invoke$arity$11 ? f.cljs$core$IFn$_invoke$arity$11(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628) : f.call(null, a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628);
}
} else {
var l5629 = 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(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629);
} else {
return f.cljs$core$IFn$_invoke$arity$12 ? f.cljs$core$IFn$_invoke$arity$12(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629) : f.call(null, a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629);
}
} else {
var m5630 = 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(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630);
} else {
return f.cljs$core$IFn$_invoke$arity$13 ? f.cljs$core$IFn$_invoke$arity$13(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630) : f.call(null, a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630);
}
} else {
var n5631 = 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(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630, n5631);
} else {
return f.cljs$core$IFn$_invoke$arity$14 ? f.cljs$core$IFn$_invoke$arity$14(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630, n5631) : f.call(null, a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630, n5631);
}
} else {
var o5632 = 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(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630, n5631, o5632);
} else {
return f.cljs$core$IFn$_invoke$arity$15 ? f.cljs$core$IFn$_invoke$arity$15(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630, n5631, o5632) : f.call(null, a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630, n5631, o5632);
}
} else {
var p5633 = 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(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630, n5631, o5632, p5633);
} else {
return f.cljs$core$IFn$_invoke$arity$16 ? f.cljs$core$IFn$_invoke$arity$16(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630, n5631, o5632, p5633) : f.call(null, a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630, n5631, o5632, p5633);
}
} else {
var q5634 = 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(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630, n5631, o5632, p5633, q5634);
} else {
return f.cljs$core$IFn$_invoke$arity$17 ? f.cljs$core$IFn$_invoke$arity$17(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630, n5631, o5632, p5633, q5634) : f.call(null, a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630, n5631, o5632, p5633, q5634);
}
} else {
var r5635 = 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(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630, n5631, o5632, p5633, q5634, r5635);
} else {
return f.cljs$core$IFn$_invoke$arity$18 ? f.cljs$core$IFn$_invoke$arity$18(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630, n5631, o5632, p5633, q5634, r5635) : f.call(null, a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630, n5631, o5632, p5633, q5634, r5635);
}
} else {
var s5636 = 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(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630, n5631, o5632, p5633, q5634, r5635, s5636);
} else {
return f.cljs$core$IFn$_invoke$arity$19 ? f.cljs$core$IFn$_invoke$arity$19(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630, n5631, o5632, p5633, q5634, r5635, s5636) : f.call(null, a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630, n5631, o5632, p5633, q5634, r5635, s5636);
}
} else {
var t5637 = 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(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630, n5631, o5632, p5633, q5634, r5635, s5636, t5637);
} else {
return f.cljs$core$IFn$_invoke$arity$20 ? f.cljs$core$IFn$_invoke$arity$20(a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630, n5631, o5632, p5633, q5634, r5635, s5636, t5637) : f.call(null, a5618, b5619, c5620, d5621, e5622, f5623, g5624, h5625, i5626, j5627, k5628, l5629, m5630, n5631, o5632, p5633, q5634, r5635, s5636, t5637);
}
} else {
throw new Error("Only up to 20 arguments supported on functions");
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
};
cljs.core.apply = function cljs$core$apply(var_args) {
var args7775 = [];
var len__5729__auto___7784 = arguments.length;
var i__5730__auto___7785 = 0;
while (true) {
if (i__5730__auto___7785 < len__5729__auto___7784) {
args7775.push(arguments[i__5730__auto___7785]);
var G__7786 = i__5730__auto___7785 + 1;
i__5730__auto___7785 = G__7786;
continue;
} else {
}
break;
}
var G__7783 = args7775.length;
switch(G__7783) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7775.slice(5), 0);
return cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], argseq__5748__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(seq7776) {
var G__7777 = cljs.core.first(seq7776);
var seq7776__$1 = cljs.core.next(seq7776);
var G__7778 = cljs.core.first(seq7776__$1);
var seq7776__$2 = cljs.core.next(seq7776__$1);
var G__7779 = cljs.core.first(seq7776__$2);
var seq7776__$3 = cljs.core.next(seq7776__$2);
var G__7780 = cljs.core.first(seq7776__$3);
var seq7776__$4 = cljs.core.next(seq7776__$3);
var G__7781 = cljs.core.first(seq7776__$4);
var seq7776__$5 = cljs.core.next(seq7776__$4);
return cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(G__7777, G__7778, G__7779, G__7780, G__7781, seq7776__$5);
};
cljs.core.apply.cljs$lang$maxFixedArity = 5;
cljs.core.vary_meta = function cljs$core$vary_meta(var_args) {
var args7788 = [];
var len__5729__auto___7813 = arguments.length;
var i__5730__auto___7814 = 0;
while (true) {
if (i__5730__auto___7814 < len__5729__auto___7813) {
args7788.push(arguments[i__5730__auto___7814]);
var G__7815 = i__5730__auto___7814 + 1;
i__5730__auto___7814 = G__7815;
continue;
} else {
}
break;
}
var G__7797 = args7788.length;
switch(G__7797) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7788.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__5748__auto__);
}
};
cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$2 = function(obj, f) {
return cljs.core.with_meta(obj, function() {
var G__7798 = cljs.core.meta(obj);
return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__7798) : f.call(null, G__7798);
}());
};
cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$3 = function(obj, f, a) {
return cljs.core.with_meta(obj, function() {
var G__7799 = cljs.core.meta(obj);
var G__7800 = a;
return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__7799, G__7800) : f.call(null, G__7799, G__7800);
}());
};
cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$4 = function(obj, f, a, b) {
return cljs.core.with_meta(obj, function() {
var G__7801 = cljs.core.meta(obj);
var G__7802 = a;
var G__7803 = b;
return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__7801, G__7802, G__7803) : f.call(null, G__7801, G__7802, G__7803);
}());
};
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__7804 = cljs.core.meta(obj);
var G__7805 = a;
var G__7806 = b;
var G__7807 = c;
return f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(G__7804, G__7805, G__7806, G__7807) : f.call(null, G__7804, G__7805, G__7806, G__7807);
}());
};
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__7808 = cljs.core.meta(obj);
var G__7809 = a;
var G__7810 = b;
var G__7811 = c;
var G__7812 = d;
return f.cljs$core$IFn$_invoke$arity$5 ? f.cljs$core$IFn$_invoke$arity$5(G__7808, G__7809, G__7810, G__7811, G__7812) : f.call(null, G__7808, G__7809, G__7810, G__7811, G__7812);
}());
};
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(seq7789) {
var G__7790 = cljs.core.first(seq7789);
var seq7789__$1 = cljs.core.next(seq7789);
var G__7791 = cljs.core.first(seq7789__$1);
var seq7789__$2 = cljs.core.next(seq7789__$1);
var G__7792 = cljs.core.first(seq7789__$2);
var seq7789__$3 = cljs.core.next(seq7789__$2);
var G__7793 = cljs.core.first(seq7789__$3);
var seq7789__$4 = cljs.core.next(seq7789__$3);
var G__7794 = cljs.core.first(seq7789__$4);
var seq7789__$5 = cljs.core.next(seq7789__$4);
var G__7795 = cljs.core.first(seq7789__$5);
var seq7789__$6 = cljs.core.next(seq7789__$5);
return cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$variadic(G__7790, G__7791, G__7792, G__7793, G__7794, G__7795, seq7789__$6);
};
cljs.core.vary_meta.cljs$lang$maxFixedArity = 6;
cljs.core.not_EQ_ = function cljs$core$not_EQ_(var_args) {
var args7817 = [];
var len__5729__auto___7823 = arguments.length;
var i__5730__auto___7824 = 0;
while (true) {
if (i__5730__auto___7824 < len__5729__auto___7823) {
args7817.push(arguments[i__5730__auto___7824]);
var G__7825 = i__5730__auto___7824 + 1;
i__5730__auto___7824 = G__7825;
continue;
} else {
}
break;
}
var G__7822 = args7817.length;
switch(G__7822) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7817.slice(2), 0);
return cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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(seq7818) {
var G__7819 = cljs.core.first(seq7818);
var seq7818__$1 = cljs.core.next(seq7818);
var G__7820 = cljs.core.first(seq7818__$1);
var seq7818__$2 = cljs.core.next(seq7818__$1);
return cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$variadic(G__7819, G__7820, seq7818__$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$core7830 !== "undefined") {
} else {
cljs.core.t_cljs$core7830 = function(nil_iter, meta7831) {
this.nil_iter = nil_iter;
this.meta7831 = meta7831;
this.cljs$lang$protocol_mask$partition0$ = 393216;
this.cljs$lang$protocol_mask$partition1$ = 0;
};
cljs.core.t_cljs$core7830.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(_7832, meta7831__$1) {
var self__ = this;
var _7832__$1 = this;
return new cljs.core.t_cljs$core7830(self__.nil_iter, meta7831__$1);
};
cljs.core.t_cljs$core7830.prototype.cljs$core$IMeta$_meta$arity$1 = function(_7832) {
var self__ = this;
var _7832__$1 = this;
return self__.meta7831;
};
cljs.core.t_cljs$core7830.prototype.hasNext = function() {
var self__ = this;
var _ = this;
return false;
};
cljs.core.t_cljs$core7830.prototype.next = function() {
var self__ = this;
var _ = this;
return new Error("No such element");
};
cljs.core.t_cljs$core7830.prototype.remove = function() {
var self__ = this;
var _ = this;
return new Error("Unsupported operation");
};
cljs.core.t_cljs$core7830.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, "meta7831", "meta7831", -927519845, null)],
null);
};
cljs.core.t_cljs$core7830.cljs$lang$type = true;
cljs.core.t_cljs$core7830.cljs$lang$ctorStr = "cljs.core/t_cljs$core7830";
cljs.core.t_cljs$core7830.cljs$lang$ctorPrWriter = function(this__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__auto__, "cljs.core/t_cljs$core7830");
};
cljs.core.__GT_t_cljs$core7830 = function cljs$core$nil_iter_$___GT_t_cljs$core7830(nil_iter__$1, meta7831) {
return new cljs.core.t_cljs$core7830(nil_iter__$1, meta7831);
};
}
return new cljs.core.t_cljs$core7830(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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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.truth_(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.LazyTransformer;
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__4659__auto__ = !(lt.stepper == null);
if (and__4659__auto__) {
return self__.iter.hasNext();
} else {
return and__4659__auto__;
}
}())) {
if (cljs.core.reduced_QMARK_(function() {
var G__7833 = lt;
var G__7834 = self__.iter.next();
return self__.xform.cljs$core$IFn$_invoke$arity$2 ? self__.xform.cljs$core$IFn$_invoke$arity$2(G__7833, G__7834) : self__.xform.call(null, G__7833, G__7834);
}())) {
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__7835 = cljs.core.next(iters__$1);
iters__$1 = G__7835;
continue;
}
} else {
return true;
}
break;
}
};
cljs.core.MultiStepper.prototype.next = function() {
var self__ = this;
var _ = this;
var n__5574__auto___7836 = self__.iters.length;
var i_7837 = 0;
while (true) {
if (i_7837 < n__5574__auto___7836) {
self__.nexts[i_7837] = self__.iters[i_7837].next();
var G__7838 = i_7837 + 1;
i_7837 = G__7838;
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__4659__auto__ = !(lt.stepper == null);
if (and__4659__auto__) {
return this$.hasNext();
} else {
return and__4659__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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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 args7839 = [];
var len__5729__auto___7842 = arguments.length;
var i__5730__auto___7843 = 0;
while (true) {
if (i__5730__auto___7843 < len__5729__auto___7842) {
args7839.push(arguments[i__5730__auto___7843]);
var G__7844 = i__5730__auto___7843 + 1;
i__5730__auto___7843 = G__7844;
continue;
} else {
}
break;
}
var G__7841 = args7839.length;
switch(G__7841) {
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(args7839.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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__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__7846_7850 = cljs.core.seq(colls);
var chunk__7847_7851 = null;
var count__7848_7852 = 0;
var i__7849_7853 = 0;
while (true) {
if (i__7849_7853 < count__7848_7852) {
var coll_7854 = chunk__7847_7851.cljs$core$IIndexed$_nth$arity$2(null, i__7849_7853);
iters.push(cljs.core.iter(coll_7854));
var G__7855 = seq__7846_7850;
var G__7856 = chunk__7847_7851;
var G__7857 = count__7848_7852;
var G__7858 = i__7849_7853 + 1;
seq__7846_7850 = G__7855;
chunk__7847_7851 = G__7856;
count__7848_7852 = G__7857;
i__7849_7853 = G__7858;
continue;
} else {
var temp__4425__auto___7859 = cljs.core.seq(seq__7846_7850);
if (temp__4425__auto___7859) {
var seq__7846_7860__$1 = temp__4425__auto___7859;
if (cljs.core.chunked_seq_QMARK_(seq__7846_7860__$1)) {
var c__5474__auto___7861 = cljs.core.chunk_first(seq__7846_7860__$1);
var G__7862 = cljs.core.chunk_rest(seq__7846_7860__$1);
var G__7863 = c__5474__auto___7861;
var G__7864 = cljs.core.count(c__5474__auto___7861);
var G__7865 = 0;
seq__7846_7850 = G__7862;
chunk__7847_7851 = G__7863;
count__7848_7852 = G__7864;
i__7849_7853 = G__7865;
continue;
} else {
var coll_7866 = cljs.core.first(seq__7846_7860__$1);
iters.push(cljs.core.iter(coll_7866));
var G__7867 = cljs.core.next(seq__7846_7860__$1);
var G__7868 = null;
var G__7869 = 0;
var G__7870 = 0;
seq__7846_7850 = G__7867;
chunk__7847_7851 = G__7868;
count__7848_7852 = G__7869;
i__7849_7853 = G__7870;
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 args7871 = [];
var len__5729__auto___7877 = arguments.length;
var i__5730__auto___7878 = 0;
while (true) {
if (i__5730__auto___7878 < len__5729__auto___7877) {
args7871.push(arguments[i__5730__auto___7878]);
var G__7879 = i__5730__auto___7878 + 1;
i__5730__auto___7878 = G__7879;
continue;
} else {
}
break;
}
var G__7876 = args7871.length;
switch(G__7876) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7871.slice(2), 0);
return cljs.core.sequence.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__auto__);
}
};
cljs.core.sequence.cljs$core$IFn$_invoke$arity$1 = function(coll) {
if (cljs.core.seq_QMARK_(coll)) {
return coll;
} else {
var or__4671__auto__ = cljs.core.seq(coll);
if (or__4671__auto__) {
return or__4671__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(seq7872) {
var G__7873 = cljs.core.first(seq7872);
var seq7872__$1 = cljs.core.next(seq7872);
var G__7874 = cljs.core.first(seq7872__$1);
var seq7872__$2 = cljs.core.next(seq7872__$1);
return cljs.core.sequence.cljs$core$IFn$_invoke$arity$variadic(G__7873, G__7874, seq7872__$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__7882 = cljs.core.first(coll);
return pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(G__7882) : pred.call(null, G__7882);
}())) {
var G__7883 = pred;
var G__7884 = cljs.core.next(coll);
pred = G__7883;
coll = G__7884;
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__4671__auto__ = function() {
var G__7888 = cljs.core.first(coll);
return pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(G__7888) : pred.call(null, G__7888);
}();
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
var G__7889 = pred;
var G__7890 = cljs.core.next(coll);
pred = G__7889;
coll = G__7890;
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__7891 = null;
var G__7891__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__7891__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__7891__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__7891__3 = function() {
var G__7892__delegate = function(x, y, zs) {
return cljs.core.not(cljs.core.apply.cljs$core$IFn$_invoke$arity$4(f, x, y, zs));
};
var G__7892 = function(x, y, var_args) {
var zs = null;
if (arguments.length > 2) {
var G__7893__i = 0, G__7893__a = new Array(arguments.length - 2);
while (G__7893__i < G__7893__a.length) {
G__7893__a[G__7893__i] = arguments[G__7893__i + 2];
++G__7893__i;
}
zs = new cljs.core.IndexedSeq(G__7893__a, 0);
}
return G__7892__delegate.call(this, x, y, zs);
};
G__7892.cljs$lang$maxFixedArity = 2;
G__7892.cljs$lang$applyTo = function(arglist__7894) {
var x = cljs.core.first(arglist__7894);
arglist__7894 = cljs.core.next(arglist__7894);
var y = cljs.core.first(arglist__7894);
var zs = cljs.core.rest(arglist__7894);
return G__7892__delegate(x, y, zs);
};
G__7892.cljs$core$IFn$_invoke$arity$variadic = G__7892__delegate;
return G__7892;
}();
G__7891 = function(x, y, var_args) {
var zs = var_args;
switch(arguments.length) {
case 0:
return G__7891__0.call(this);
case 1:
return G__7891__1.call(this, x);
case 2:
return G__7891__2.call(this, x, y);
default:
var G__7895 = null;
if (arguments.length > 2) {
var G__7896__i = 0, G__7896__a = new Array(arguments.length - 2);
while (G__7896__i < G__7896__a.length) {
G__7896__a[G__7896__i] = arguments[G__7896__i + 2];
++G__7896__i;
}
G__7895 = new cljs.core.IndexedSeq(G__7896__a, 0);
}
return G__7891__3.cljs$core$IFn$_invoke$arity$variadic(x, y, G__7895);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__7891.cljs$lang$maxFixedArity = 2;
G__7891.cljs$lang$applyTo = G__7891__3.cljs$lang$applyTo;
G__7891.cljs$core$IFn$_invoke$arity$0 = G__7891__0;
G__7891.cljs$core$IFn$_invoke$arity$1 = G__7891__1;
G__7891.cljs$core$IFn$_invoke$arity$2 = G__7891__2;
G__7891.cljs$core$IFn$_invoke$arity$variadic = G__7891__3.cljs$core$IFn$_invoke$arity$variadic;
return G__7891;
}();
};
cljs.core.constantly = function cljs$core$constantly(x) {
return function() {
var G__7897__delegate = function(args) {
return x;
};
var G__7897 = function(var_args) {
var args = null;
if (arguments.length > 0) {
var G__7898__i = 0, G__7898__a = new Array(arguments.length - 0);
while (G__7898__i < G__7898__a.length) {
G__7898__a[G__7898__i] = arguments[G__7898__i + 0];
++G__7898__i;
}
args = new cljs.core.IndexedSeq(G__7898__a, 0);
}
return G__7897__delegate.call(this, args);
};
G__7897.cljs$lang$maxFixedArity = 0;
G__7897.cljs$lang$applyTo = function(arglist__7899) {
var args = cljs.core.seq(arglist__7899);
return G__7897__delegate(args);
};
G__7897.cljs$core$IFn$_invoke$arity$variadic = G__7897__delegate;
return G__7897;
}();
};
cljs.core.comp = function cljs$core$comp(var_args) {
var args7900 = [];
var len__5729__auto___7927 = arguments.length;
var i__5730__auto___7928 = 0;
while (true) {
if (i__5730__auto___7928 < len__5729__auto___7927) {
args7900.push(arguments[i__5730__auto___7928]);
var G__7929 = i__5730__auto___7928 + 1;
i__5730__auto___7928 = G__7929;
continue;
} else {
}
break;
}
var G__7906 = args7900.length;
switch(G__7906) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7900.slice(3), 0);
return cljs.core.comp.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], argseq__5748__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__7931 = null;
var G__7931__0 = function() {
var G__7907 = 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__7907) : f.call(null, G__7907);
};
var G__7931__1 = function(x) {
var G__7908 = 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__7908) : f.call(null, G__7908);
};
var G__7931__2 = function(x, y) {
var G__7909 = 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__7909) : f.call(null, G__7909);
};
var G__7931__3 = function(x, y, z) {
var G__7910 = 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__7910) : f.call(null, G__7910);
};
var G__7931__4 = function() {
var G__7932__delegate = function(x, y, z, args) {
var G__7911 = 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__7911) : f.call(null, G__7911);
};
var G__7932 = function(x, y, z, var_args) {
var args = null;
if (arguments.length > 3) {
var G__7933__i = 0, G__7933__a = new Array(arguments.length - 3);
while (G__7933__i < G__7933__a.length) {
G__7933__a[G__7933__i] = arguments[G__7933__i + 3];
++G__7933__i;
}
args = new cljs.core.IndexedSeq(G__7933__a, 0);
}
return G__7932__delegate.call(this, x, y, z, args);
};
G__7932.cljs$lang$maxFixedArity = 3;
G__7932.cljs$lang$applyTo = function(arglist__7934) {
var x = cljs.core.first(arglist__7934);
arglist__7934 = cljs.core.next(arglist__7934);
var y = cljs.core.first(arglist__7934);
arglist__7934 = cljs.core.next(arglist__7934);
var z = cljs.core.first(arglist__7934);
var args = cljs.core.rest(arglist__7934);
return G__7932__delegate(x, y, z, args);
};
G__7932.cljs$core$IFn$_invoke$arity$variadic = G__7932__delegate;
return G__7932;
}();
G__7931 = function(x, y, z, var_args) {
var args = var_args;
switch(arguments.length) {
case 0:
return G__7931__0.call(this);
case 1:
return G__7931__1.call(this, x);
case 2:
return G__7931__2.call(this, x, y);
case 3:
return G__7931__3.call(this, x, y, z);
default:
var G__7935 = null;
if (arguments.length > 3) {
var G__7936__i = 0, G__7936__a = new Array(arguments.length - 3);
while (G__7936__i < G__7936__a.length) {
G__7936__a[G__7936__i] = arguments[G__7936__i + 3];
++G__7936__i;
}
G__7935 = new cljs.core.IndexedSeq(G__7936__a, 0);
}
return G__7931__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__7935);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__7931.cljs$lang$maxFixedArity = 3;
G__7931.cljs$lang$applyTo = G__7931__4.cljs$lang$applyTo;
G__7931.cljs$core$IFn$_invoke$arity$0 = G__7931__0;
G__7931.cljs$core$IFn$_invoke$arity$1 = G__7931__1;
G__7931.cljs$core$IFn$_invoke$arity$2 = G__7931__2;
G__7931.cljs$core$IFn$_invoke$arity$3 = G__7931__3;
G__7931.cljs$core$IFn$_invoke$arity$variadic = G__7931__4.cljs$core$IFn$_invoke$arity$variadic;
return G__7931;
}();
};
cljs.core.comp.cljs$core$IFn$_invoke$arity$3 = function(f, g, h) {
return function() {
var G__7937 = null;
var G__7937__0 = function() {
var G__7913 = function() {
var G__7914 = 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__7914) : g.call(null, G__7914);
}();
return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__7913) : f.call(null, G__7913);
};
var G__7937__1 = function(x) {
var G__7916 = function() {
var G__7917 = 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__7917) : g.call(null, G__7917);
}();
return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__7916) : f.call(null, G__7916);
};
var G__7937__2 = function(x, y) {
var G__7919 = function() {
var G__7920 = 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__7920) : g.call(null, G__7920);
}();
return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__7919) : f.call(null, G__7919);
};
var G__7937__3 = function(x, y, z) {
var G__7922 = function() {
var G__7923 = 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__7923) : g.call(null, G__7923);
}();
return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__7922) : f.call(null, G__7922);
};
var G__7937__4 = function() {
var G__7938__delegate = function(x, y, z, args) {
var G__7925 = function() {
var G__7926 = 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__7926) : g.call(null, G__7926);
}();
return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__7925) : f.call(null, G__7925);
};
var G__7938 = function(x, y, z, var_args) {
var args = null;
if (arguments.length > 3) {
var G__7939__i = 0, G__7939__a = new Array(arguments.length - 3);
while (G__7939__i < G__7939__a.length) {
G__7939__a[G__7939__i] = arguments[G__7939__i + 3];
++G__7939__i;
}
args = new cljs.core.IndexedSeq(G__7939__a, 0);
}
return G__7938__delegate.call(this, x, y, z, args);
};
G__7938.cljs$lang$maxFixedArity = 3;
G__7938.cljs$lang$applyTo = function(arglist__7940) {
var x = cljs.core.first(arglist__7940);
arglist__7940 = cljs.core.next(arglist__7940);
var y = cljs.core.first(arglist__7940);
arglist__7940 = cljs.core.next(arglist__7940);
var z = cljs.core.first(arglist__7940);
var args = cljs.core.rest(arglist__7940);
return G__7938__delegate(x, y, z, args);
};
G__7938.cljs$core$IFn$_invoke$arity$variadic = G__7938__delegate;
return G__7938;
}();
G__7937 = function(x, y, z, var_args) {
var args = var_args;
switch(arguments.length) {
case 0:
return G__7937__0.call(this);
case 1:
return G__7937__1.call(this, x);
case 2:
return G__7937__2.call(this, x, y);
case 3:
return G__7937__3.call(this, x, y, z);
default:
var G__7941 = null;
if (arguments.length > 3) {
var G__7942__i = 0, G__7942__a = new Array(arguments.length - 3);
while (G__7942__i < G__7942__a.length) {
G__7942__a[G__7942__i] = arguments[G__7942__i + 3];
++G__7942__i;
}
G__7941 = new cljs.core.IndexedSeq(G__7942__a, 0);
}
return G__7937__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__7941);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__7937.cljs$lang$maxFixedArity = 3;
G__7937.cljs$lang$applyTo = G__7937__4.cljs$lang$applyTo;
G__7937.cljs$core$IFn$_invoke$arity$0 = G__7937__0;
G__7937.cljs$core$IFn$_invoke$arity$1 = G__7937__1;
G__7937.cljs$core$IFn$_invoke$arity$2 = G__7937__2;
G__7937.cljs$core$IFn$_invoke$arity$3 = G__7937__3;
G__7937.cljs$core$IFn$_invoke$arity$variadic = G__7937__4.cljs$core$IFn$_invoke$arity$variadic;
return G__7937;
}();
};
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__7943__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__7944 = cljs.core.first(fs__$2).call(null, ret);
var G__7945 = cljs.core.next(fs__$2);
ret = G__7944;
fs__$2 = G__7945;
continue;
} else {
return ret;
}
break;
}
};
var G__7943 = function(var_args) {
var args = null;
if (arguments.length > 0) {
var G__7946__i = 0, G__7946__a = new Array(arguments.length - 0);
while (G__7946__i < G__7946__a.length) {
G__7946__a[G__7946__i] = arguments[G__7946__i + 0];
++G__7946__i;
}
args = new cljs.core.IndexedSeq(G__7946__a, 0);
}
return G__7943__delegate.call(this, args);
};
G__7943.cljs$lang$maxFixedArity = 0;
G__7943.cljs$lang$applyTo = function(arglist__7947) {
var args = cljs.core.seq(arglist__7947);
return G__7943__delegate(args);
};
G__7943.cljs$core$IFn$_invoke$arity$variadic = G__7943__delegate;
return G__7943;
}();
}(fs__$1);
};
cljs.core.comp.cljs$lang$applyTo = function(seq7901) {
var G__7902 = cljs.core.first(seq7901);
var seq7901__$1 = cljs.core.next(seq7901);
var G__7903 = cljs.core.first(seq7901__$1);
var seq7901__$2 = cljs.core.next(seq7901__$1);
var G__7904 = cljs.core.first(seq7901__$2);
var seq7901__$3 = cljs.core.next(seq7901__$2);
return cljs.core.comp.cljs$core$IFn$_invoke$arity$variadic(G__7902, G__7903, G__7904, seq7901__$3);
};
cljs.core.comp.cljs$lang$maxFixedArity = 3;
cljs.core.partial = function cljs$core$partial(var_args) {
var args7948 = [];
var len__5729__auto___7956 = arguments.length;
var i__5730__auto___7957 = 0;
while (true) {
if (i__5730__auto___7957 < len__5729__auto___7956) {
args7948.push(arguments[i__5730__auto___7957]);
var G__7958 = i__5730__auto___7957 + 1;
i__5730__auto___7957 = G__7958;
continue;
} else {
}
break;
}
var G__7955 = args7948.length;
switch(G__7955) {
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__5748__auto__ = new cljs.core.IndexedSeq(args7948.slice(4), 0);
return cljs.core.partial.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], arguments[3], argseq__5748__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__7960 = null;
var G__7960__0 = function() {
return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(arg1) : f.call(null, arg1);
};
var G__7960__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__7960__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__7960__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__7960__4 = function() {
var G__7961__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__7961 = function(x, y, z, var_args) {
var args = null;
if (arguments.length > 3) {
var G__7962__i = 0, G__7962__a = new Array(arguments.length - 3);
while (G__7962__i < G__7962__a.length) {
G__7962__a[G__7962__i] = arguments[G__7962__i + 3];
++G__7962__i;
}
args = new cljs.core.IndexedSeq(G__7962__a, 0);
}
return G__7961__delegate.call(this, x, y, z, args);
};
G__7961.cljs$lang$maxFixedArity = 3;
G__7961.cljs$lang$applyTo = function(arglist__7963) {
var x = cljs.core.first(arglist__7963);
arglist__7963 = cljs.core.next(arglist__7963);
var y = cljs.core.first(arglist__7963);
arglist__7963 = cljs.core.next(arglist__7963);
var z = cljs.core.first(arglist__7963);
var args = cljs.core.rest(arglist__7963);
return G__7961__delegate(x, y, z, args);
};
G__7961.cljs$core$IFn$_invoke$arity$variadic = G__7961__delegate;
return G__7961;
}();
G__7960 = function(x, y, z, var_args) {
var args = var_args;
switch(arguments.length) {
case 0:
return G__7960__0.call(this);
case 1:
return G__7960__1.call(this, x);
case 2:
return G__7960__2.call(this, x, y);
case 3:
return G__7960__3.call(this, x, y, z);
default:
var G__7964 = null;
if (arguments.length > 3) {
var G__7965__i = 0, G__7965__a = new Array(arguments.length - 3);
while (G__7965__i < G__7965__a.length) {
G__7965__a[G__7965__i] = arguments[G__7965__i + 3];
++G__7965__i;
}
G__7964 = new cljs.core.IndexedSeq(G__7965__a, 0);
}
return G__7960__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__7964);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__7960.cljs$lang$maxFixedArity = 3;
G__7960.cljs$lang$applyTo = G__7960__4.cljs$lang$applyTo;
G__7960.cljs$core$IFn$_invoke$arity$0 = G__7960__0;
G__7960.cljs$core$IFn$_invoke$arity$1 = G__7960__1;
G__7960.cljs$core$IFn$_invoke$arity$2 = G__7960__2;
G__7960.cljs$core$IFn$_invoke$arity$3 = G__7960__3;
G__7960.cljs$core$IFn$_invoke$arity$variadic = G__7960__4.cljs$core$IFn$_invoke$arity$variadic;
return G__7960;
}();
};
cljs.core.partial.cljs$core$IFn$_invoke$arity$3 = function(f, arg1, arg2) {
return function() {
var G__7966 = null;
var G__7966__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__7966__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__7966__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__7966__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__7966__4 = function() {
var G__7967__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__7967 = function(x, y, z, var_args) {
var args = null;
if (arguments.length > 3) {
var G__7968__i = 0, G__7968__a = new Array(arguments.length - 3);
while (G__7968__i < G__7968__a.length) {
G__7968__a[G__7968__i] = arguments[G__7968__i + 3];
++G__7968__i;
}
args = new cljs.core.IndexedSeq(G__7968__a, 0);
}
return G__7967__delegate.call(this, x, y, z, args);
};
G__7967.cljs$lang$maxFixedArity = 3;
G__7967.cljs$lang$applyTo = function(arglist__7969) {
var x = cljs.core.first(arglist__7969);
arglist__7969 = cljs.core.next(arglist__7969);
var y = cljs.core.first(arglist__7969);
arglist__7969 = cljs.core.next(arglist__7969);
var z = cljs.core.first(arglist__7969);
var args = cljs.core.rest(arglist__7969);
return G__7967__delegate(x, y, z, args);
};
G__7967.cljs$core$IFn$_invoke$arity$variadic = G__7967__delegate;
return G__7967;
}();
G__7966 = function(x, y, z, var_args) {
var args = var_args;
switch(arguments.length) {
case 0:
return G__7966__0.call(this);
case 1:
return G__7966__1.call(this, x);
case 2:
return G__7966__2.call(this, x, y);
case 3:
return G__7966__3.call(this, x, y, z);
default:
var G__7970 = null;
if (arguments.length > 3) {
var G__7971__i = 0, G__7971__a = new Array(arguments.length - 3);
while (G__7971__i < G__7971__a.length) {
G__7971__a[G__7971__i] = arguments[G__7971__i + 3];
++G__7971__i;
}
G__7970 = new cljs.core.IndexedSeq(G__7971__a, 0);
}
return G__7966__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__7970);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__7966.cljs$lang$maxFixedArity = 3;
G__7966.cljs$lang$applyTo = G__7966__4.cljs$lang$applyTo;
G__7966.cljs$core$IFn$_invoke$arity$0 = G__7966__0;
G__7966.cljs$core$IFn$_invoke$arity$1 = G__7966__1;
G__7966.cljs$core$IFn$_invoke$arity$2 = G__7966__2;
G__7966.cljs$core$IFn$_invoke$arity$3 = G__7966__3;
G__7966.cljs$core$IFn$_invoke$arity$variadic = G__7966__4.cljs$core$IFn$_invoke$arity$variadic;
return G__7966;
}();
};
cljs.core.partial.cljs$core$IFn$_invoke$arity$4 = function(f, arg1, arg2, arg3) {
return function() {
var G__7972 = null;
var G__7972__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__7972__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__7972__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__7972__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__7972__4 = function() {
var G__7973__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__7973 = function(x, y, z, var_args) {
var args = null;
if (arguments.length > 3) {
var G__7974__i = 0, G__7974__a = new Array(arguments.length - 3);
while (G__7974__i < G__7974__a.length) {
G__7974__a[G__7974__i] = arguments[G__7974__i + 3];
++G__7974__i;
}
args = new cljs.core.IndexedSeq(G__7974__a, 0);
}
return G__7973__delegate.call(this, x, y, z, args);
};
G__7973.cljs$lang$maxFixedArity = 3;
G__7973.cljs$lang$applyTo = function(arglist__7975) {
var x = cljs.core.first(arglist__7975);
arglist__7975 = cljs.core.next(arglist__7975);
var y = cljs.core.first(arglist__7975);
arglist__7975 = cljs.core.next(arglist__7975);
var z = cljs.core.first(arglist__7975);
var args = cljs.core.rest(arglist__7975);
return G__7973__delegate(x, y, z, args);
};
G__7973.cljs$core$IFn$_invoke$arity$variadic = G__7973__delegate;
return G__7973;
}();
G__7972 = function(x, y, z, var_args) {
var args = var_args;
switch(arguments.length) {
case 0:
return G__7972__0.call(this);
case 1:
return G__7972__1.call(this, x);
case 2:
return G__7972__2.call(this, x, y);
case 3:
return G__7972__3.call(this, x, y, z);
default:
var G__7976 = null;
if (arguments.length > 3) {
var G__7977__i = 0, G__7977__a = new Array(arguments.length - 3);
while (G__7977__i < G__7977__a.length) {
G__7977__a[G__7977__i] = arguments[G__7977__i + 3];
++G__7977__i;
}
G__7976 = new cljs.core.IndexedSeq(G__7977__a, 0);
}
return G__7972__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__7976);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__7972.cljs$lang$maxFixedArity = 3;
G__7972.cljs$lang$applyTo = G__7972__4.cljs$lang$applyTo;
G__7972.cljs$core$IFn$_invoke$arity$0 = G__7972__0;
G__7972.cljs$core$IFn$_invoke$arity$1 = G__7972__1;
G__7972.cljs$core$IFn$_invoke$arity$2 = G__7972__2;
G__7972.cljs$core$IFn$_invoke$arity$3 = G__7972__3;
G__7972.cljs$core$IFn$_invoke$arity$variadic = G__7972__4.cljs$core$IFn$_invoke$arity$variadic;
return G__7972;
}();
};
cljs.core.partial.cljs$core$IFn$_invoke$arity$variadic = function(f, arg1, arg2, arg3, more) {
return function() {
var G__7978__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__7978 = function(var_args) {
var args = null;
if (arguments.length > 0) {
var G__7979__i = 0, G__7979__a = new Array(arguments.length - 0);
while (G__7979__i < G__7979__a.length) {
G__7979__a[G__7979__i] = arguments[G__7979__i + 0];
++G__7979__i;
}
args = new cljs.core.IndexedSeq(G__7979__a, 0);
}
return G__7978__delegate.call(this, args);
};
G__7978.cljs$lang$maxFixedArity = 0;
G__7978.cljs$lang$applyTo = function(arglist__7980) {
var args = cljs.core.seq(arglist__7980);
return G__7978__delegate(args);
};
G__7978.cljs$core$IFn$_invoke$arity$variadic = G__7978__delegate;
return G__7978;
}();
};
cljs.core.partial.cljs$lang$applyTo = function(seq7949) {
var G__7950 = cljs.core.first(seq7949);
var seq7949__$1 = cljs.core.next(seq7949);
var G__7951 = cljs.core.first(seq7949__$1);
var seq7949__$2 = cljs.core.next(seq7949__$1);
var G__7952 = cljs.core.first(seq7949__$2);
var seq7949__$3 = cljs.core.next(seq7949__$2);
var G__7953 = cljs.core.first(seq7949__$3);
var seq7949__$4 = cljs.core.next(seq7949__$3);
return cljs.core.partial.cljs$core$IFn$_invoke$arity$variadic(G__7950, G__7951, G__7952, G__7953, seq7949__$4);
};
cljs.core.partial.cljs$lang$maxFixedArity = 4;
cljs.core.fnil = function cljs$core$fnil(var_args) {
var args7981 = [];
var len__5729__auto___8000 = arguments.length;
var i__5730__auto___8001 = 0;
while (true) {
if (i__5730__auto___8001 < len__5729__auto___8000) {
args7981.push(arguments[i__5730__auto___8001]);
var G__8002 = i__5730__auto___8001 + 1;
i__5730__auto___8001 = G__8002;
continue;
} else {
}
break;
}
var G__7983 = args7981.length;
switch(G__7983) {
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(args7981.length)].join(""));;
}
};
cljs.core.fnil.cljs$core$IFn$_invoke$arity$2 = function(f, x) {
return function() {
var G__8004 = null;
var G__8004__1 = function(a) {
var G__7984 = a == null ? x : a;
return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__7984) : f.call(null, G__7984);
};
var G__8004__2 = function(a, b) {
var G__7985 = a == null ? x : a;
var G__7986 = b;
return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__7985, G__7986) : f.call(null, G__7985, G__7986);
};
var G__8004__3 = function(a, b, c) {
var G__7987 = a == null ? x : a;
var G__7988 = b;
var G__7989 = c;
return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__7987, G__7988, G__7989) : f.call(null, G__7987, G__7988, G__7989);
};
var G__8004__4 = function() {
var G__8005__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__8005 = function(a, b, c, var_args) {
var ds = null;
if (arguments.length > 3) {
var G__8006__i = 0, G__8006__a = new Array(arguments.length - 3);
while (G__8006__i < G__8006__a.length) {
G__8006__a[G__8006__i] = arguments[G__8006__i + 3];
++G__8006__i;
}
ds = new cljs.core.IndexedSeq(G__8006__a, 0);
}
return G__8005__delegate.call(this, a, b, c, ds);
};
G__8005.cljs$lang$maxFixedArity = 3;
G__8005.cljs$lang$applyTo = function(arglist__8007) {
var a = cljs.core.first(arglist__8007);
arglist__8007 = cljs.core.next(arglist__8007);
var b = cljs.core.first(arglist__8007);
arglist__8007 = cljs.core.next(arglist__8007);
var c = cljs.core.first(arglist__8007);
var ds = cljs.core.rest(arglist__8007);
return G__8005__delegate(a, b, c, ds);
};
G__8005.cljs$core$IFn$_invoke$arity$variadic = G__8005__delegate;
return G__8005;
}();
G__8004 = function(a, b, c, var_args) {
var ds = var_args;
switch(arguments.length) {
case 1:
return G__8004__1.call(this, a);
case 2:
return G__8004__2.call(this, a, b);
case 3:
return G__8004__3.call(this, a, b, c);
default:
var G__8008 = null;
if (arguments.length > 3) {
var G__8009__i = 0, G__8009__a = new Array(arguments.length - 3);
while (G__8009__i < G__8009__a.length) {
G__8009__a[G__8009__i] = arguments[G__8009__i + 3];
++G__8009__i;
}
G__8008 = new cljs.core.IndexedSeq(G__8009__a, 0);
}
return G__8004__4.cljs$core$IFn$_invoke$arity$variadic(a, b, c, G__8008);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8004.cljs$lang$maxFixedArity = 3;
G__8004.cljs$lang$applyTo = G__8004__4.cljs$lang$applyTo;
G__8004.cljs$core$IFn$_invoke$arity$1 = G__8004__1;
G__8004.cljs$core$IFn$_invoke$arity$2 = G__8004__2;
G__8004.cljs$core$IFn$_invoke$arity$3 = G__8004__3;
G__8004.cljs$core$IFn$_invoke$arity$variadic = G__8004__4.cljs$core$IFn$_invoke$arity$variadic;
return G__8004;
}();
};
cljs.core.fnil.cljs$core$IFn$_invoke$arity$3 = function(f, x, y) {
return function() {
var G__8010 = null;
var G__8010__2 = function(a, b) {
var G__7990 = a == null ? x : a;
var G__7991 = b == null ? y : b;
return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__7990, G__7991) : f.call(null, G__7990, G__7991);
};
var G__8010__3 = function(a, b, c) {
var G__7992 = a == null ? x : a;
var G__7993 = b == null ? y : b;
var G__7994 = c;
return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__7992, G__7993, G__7994) : f.call(null, G__7992, G__7993, G__7994);
};
var G__8010__4 = function() {
var G__8011__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__8011 = function(a, b, c, var_args) {
var ds = null;
if (arguments.length > 3) {
var G__8012__i = 0, G__8012__a = new Array(arguments.length - 3);
while (G__8012__i < G__8012__a.length) {
G__8012__a[G__8012__i] = arguments[G__8012__i + 3];
++G__8012__i;
}
ds = new cljs.core.IndexedSeq(G__8012__a, 0);
}
return G__8011__delegate.call(this, a, b, c, ds);
};
G__8011.cljs$lang$maxFixedArity = 3;
G__8011.cljs$lang$applyTo = function(arglist__8013) {
var a = cljs.core.first(arglist__8013);
arglist__8013 = cljs.core.next(arglist__8013);
var b = cljs.core.first(arglist__8013);
arglist__8013 = cljs.core.next(arglist__8013);
var c = cljs.core.first(arglist__8013);
var ds = cljs.core.rest(arglist__8013);
return G__8011__delegate(a, b, c, ds);
};
G__8011.cljs$core$IFn$_invoke$arity$variadic = G__8011__delegate;
return G__8011;
}();
G__8010 = function(a, b, c, var_args) {
var ds = var_args;
switch(arguments.length) {
case 2:
return G__8010__2.call(this, a, b);
case 3:
return G__8010__3.call(this, a, b, c);
default:
var G__8014 = null;
if (arguments.length > 3) {
var G__8015__i = 0, G__8015__a = new Array(arguments.length - 3);
while (G__8015__i < G__8015__a.length) {
G__8015__a[G__8015__i] = arguments[G__8015__i + 3];
++G__8015__i;
}
G__8014 = new cljs.core.IndexedSeq(G__8015__a, 0);
}
return G__8010__4.cljs$core$IFn$_invoke$arity$variadic(a, b, c, G__8014);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8010.cljs$lang$maxFixedArity = 3;
G__8010.cljs$lang$applyTo = G__8010__4.cljs$lang$applyTo;
G__8010.cljs$core$IFn$_invoke$arity$2 = G__8010__2;
G__8010.cljs$core$IFn$_invoke$arity$3 = G__8010__3;
G__8010.cljs$core$IFn$_invoke$arity$variadic = G__8010__4.cljs$core$IFn$_invoke$arity$variadic;
return G__8010;
}();
};
cljs.core.fnil.cljs$core$IFn$_invoke$arity$4 = function(f, x, y, z) {
return function() {
var G__8016 = null;
var G__8016__2 = function(a, b) {
var G__7995 = a == null ? x : a;
var G__7996 = b == null ? y : b;
return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__7995, G__7996) : f.call(null, G__7995, G__7996);
};
var G__8016__3 = function(a, b, c) {
var G__7997 = a == null ? x : a;
var G__7998 = b == null ? y : b;
var G__7999 = c == null ? z : c;
return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__7997, G__7998, G__7999) : f.call(null, G__7997, G__7998, G__7999);
};
var G__8016__4 = function() {
var G__8017__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__8017 = function(a, b, c, var_args) {
var ds = null;
if (arguments.length > 3) {
var G__8018__i = 0, G__8018__a = new Array(arguments.length - 3);
while (G__8018__i < G__8018__a.length) {
G__8018__a[G__8018__i] = arguments[G__8018__i + 3];
++G__8018__i;
}
ds = new cljs.core.IndexedSeq(G__8018__a, 0);
}
return G__8017__delegate.call(this, a, b, c, ds);
};
G__8017.cljs$lang$maxFixedArity = 3;
G__8017.cljs$lang$applyTo = function(arglist__8019) {
var a = cljs.core.first(arglist__8019);
arglist__8019 = cljs.core.next(arglist__8019);
var b = cljs.core.first(arglist__8019);
arglist__8019 = cljs.core.next(arglist__8019);
var c = cljs.core.first(arglist__8019);
var ds = cljs.core.rest(arglist__8019);
return G__8017__delegate(a, b, c, ds);
};
G__8017.cljs$core$IFn$_invoke$arity$variadic = G__8017__delegate;
return G__8017;
}();
G__8016 = function(a, b, c, var_args) {
var ds = var_args;
switch(arguments.length) {
case 2:
return G__8016__2.call(this, a, b);
case 3:
return G__8016__3.call(this, a, b, c);
default:
var G__8020 = null;
if (arguments.length > 3) {
var G__8021__i = 0, G__8021__a = new Array(arguments.length - 3);
while (G__8021__i < G__8021__a.length) {
G__8021__a[G__8021__i] = arguments[G__8021__i + 3];
++G__8021__i;
}
G__8020 = new cljs.core.IndexedSeq(G__8021__a, 0);
}
return G__8016__4.cljs$core$IFn$_invoke$arity$variadic(a, b, c, G__8020);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8016.cljs$lang$maxFixedArity = 3;
G__8016.cljs$lang$applyTo = G__8016__4.cljs$lang$applyTo;
G__8016.cljs$core$IFn$_invoke$arity$2 = G__8016__2;
G__8016.cljs$core$IFn$_invoke$arity$3 = G__8016__3;
G__8016.cljs$core$IFn$_invoke$arity$variadic = G__8016__4.cljs$core$IFn$_invoke$arity$variadic;
return G__8016;
}();
};
cljs.core.fnil.cljs$lang$maxFixedArity = 4;
cljs.core.volatile_BANG_;
cljs.core.map_indexed = function cljs$core$map_indexed(var_args) {
var args8022 = [];
var len__5729__auto___8055 = arguments.length;
var i__5730__auto___8056 = 0;
while (true) {
if (i__5730__auto___8056 < len__5729__auto___8055) {
args8022.push(arguments[i__5730__auto___8056]);
var G__8057 = i__5730__auto___8056 + 1;
i__5730__auto___8056 = G__8057;
continue;
} else {
}
break;
}
var G__8024 = args8022.length;
switch(G__8024) {
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(args8022.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__8059 = null;
var G__8059__0 = function() {
return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
};
var G__8059__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__8059__2 = function(result, input) {
var G__8027 = result;
var G__8028 = function() {
var G__8029 = cljs.core._vreset_BANG_(i, cljs.core._deref(i) + 1);
var G__8030 = input;
return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__8029, G__8030) : f.call(null, G__8029, G__8030);
}();
return rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(G__8027, G__8028) : rf.call(null, G__8027, G__8028);
};
G__8059 = function(result, input) {
switch(arguments.length) {
case 0:
return G__8059__0.call(this);
case 1:
return G__8059__1.call(this, result);
case 2:
return G__8059__2.call(this, result, input);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8059.cljs$core$IFn$_invoke$arity$0 = G__8059__0;
G__8059.cljs$core$IFn$_invoke$arity$1 = G__8059__1;
G__8059.cljs$core$IFn$_invoke$arity$2 = G__8059__2;
return G__8059;
}();
}(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__5574__auto___8060 = size;
var i_8061 = 0;
while (true) {
if (i_8061 < n__5574__auto___8060) {
cljs.core.chunk_append(b, function() {
var G__8051 = idx + i_8061;
var G__8052 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(c, i_8061);
return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__8051, G__8052) : f.call(null, G__8051, G__8052);
}());
var G__8062 = i_8061 + 1;
i_8061 = G__8062;
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__8053 = idx;
var G__8054 = cljs.core.first(s);
return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__8053, G__8054) : f.call(null, G__8053, G__8054);
}(), 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 args8063 = [];
var len__5729__auto___8068 = arguments.length;
var i__5730__auto___8069 = 0;
while (true) {
if (i__5730__auto___8069 < len__5729__auto___8068) {
args8063.push(arguments[i__5730__auto___8069]);
var G__8070 = i__5730__auto___8069 + 1;
i__5730__auto___8069 = G__8070;
continue;
} else {
}
break;
}
var G__8065 = args8063.length;
switch(G__8065) {
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(args8063.length)].join(""));;
}
};
cljs.core.keep.cljs$core$IFn$_invoke$arity$1 = function(f) {
return function(rf) {
return function() {
var G__8072 = null;
var G__8072__0 = function() {
return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
};
var G__8072__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__8072__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__8072 = function(result, input) {
switch(arguments.length) {
case 0:
return G__8072__0.call(this);
case 1:
return G__8072__1.call(this, result);
case 2:
return G__8072__2.call(this, result, input);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8072.cljs$core$IFn$_invoke$arity$0 = G__8072__0;
G__8072.cljs$core$IFn$_invoke$arity$1 = G__8072__1;
G__8072.cljs$core$IFn$_invoke$arity$2 = G__8072__2;
return G__8072;
}();
};
};
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__5574__auto___8073 = size;
var i_8074 = 0;
while (true) {
if (i_8074 < n__5574__auto___8073) {
var x_8075 = function() {
var G__8066 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(c, i_8074);
return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__8066) : f.call(null, G__8066);
}();
if (x_8075 == null) {
} else {
cljs.core.chunk_append(b, x_8075);
}
var G__8076 = i_8074 + 1;
i_8074 = G__8076;
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__8067 = cljs.core.first(s);
return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__8067) : f.call(null, G__8067);
}();
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__8077 = cljs.core.seq(self__.watches);
var chunk__8078 = null;
var count__8079 = 0;
var i__8080 = 0;
while (true) {
if (i__8080 < count__8079) {
var vec__8081 = chunk__8078.cljs$core$IIndexed$_nth$arity$2(null, i__8080);
var key = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8081, 0, null);
var f = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8081, 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__8083 = seq__8077;
var G__8084 = chunk__8078;
var G__8085 = count__8079;
var G__8086 = i__8080 + 1;
seq__8077 = G__8083;
chunk__8078 = G__8084;
count__8079 = G__8085;
i__8080 = G__8086;
continue;
} else {
var temp__4425__auto__ = cljs.core.seq(seq__8077);
if (temp__4425__auto__) {
var seq__8077__$1 = temp__4425__auto__;
if (cljs.core.chunked_seq_QMARK_(seq__8077__$1)) {
var c__5474__auto__ = cljs.core.chunk_first(seq__8077__$1);
var G__8087 = cljs.core.chunk_rest(seq__8077__$1);
var G__8088 = c__5474__auto__;
var G__8089 = cljs.core.count(c__5474__auto__);
var G__8090 = 0;
seq__8077 = G__8087;
chunk__8078 = G__8088;
count__8079 = G__8089;
i__8080 = G__8090;
continue;
} else {
var vec__8082 = cljs.core.first(seq__8077__$1);
var key = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8082, 0, null);
var f = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8082, 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__8091 = cljs.core.next(seq__8077__$1);
var G__8092 = null;
var G__8093 = 0;
var G__8094 = 0;
seq__8077 = G__8091;
chunk__8078 = G__8092;
count__8079 = G__8093;
i__8080 = G__8094;
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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 args8095 = [];
var len__5729__auto___8103 = arguments.length;
var i__5730__auto___8104 = 0;
while (true) {
if (i__5730__auto___8104 < len__5729__auto___8103) {
args8095.push(arguments[i__5730__auto___8104]);
var G__8105 = i__5730__auto___8104 + 1;
i__5730__auto___8104 = G__8105;
continue;
} else {
}
break;
}
var G__8099 = args8095.length;
switch(G__8099) {
case 1:
return cljs.core.atom.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
default:
var argseq__5748__auto__ = new cljs.core.IndexedSeq(args8095.slice(1), 0);
return cljs.core.atom.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5748__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__8100) {
var map__8101 = p__8100;
var map__8101__$1 = (!(map__8101 == null) ? map__8101.cljs$lang$protocol_mask$partition0$ & 64 || map__8101.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map, map__8101) : map__8101;
var meta = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__8101__$1, new cljs.core.Keyword(null, "meta", "meta", 1499536964));
var validator = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__8101__$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(seq8096) {
var G__8097 = cljs.core.first(seq8096);
var seq8096__$1 = cljs.core.next(seq8096);
return cljs.core.atom.cljs$core$IFn$_invoke$arity$variadic(G__8097, seq8096__$1);
};
cljs.core.atom.cljs$lang$maxFixedArity = 1;
cljs.core.pr_str;
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__8108 = 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__8108) : cljs.core.pr_str.call(null, G__8108);
}())].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 args8109 = [];
var len__5729__auto___8123 = arguments.length;
var i__5730__auto___8124 = 0;
while (true) {
if (i__5730__auto___8124 < len__5729__auto___8123) {
args8109.push(arguments[i__5730__auto___8124]);
var G__8125 = i__5730__auto___8124 + 1;
i__5730__auto___8124 = G__8125;
continue;
} else {
}
break;
}
var G__8116 = args8109.length;
switch(G__8116) {
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__5748__auto__ = new cljs.core.IndexedSeq(args8109.slice(4), 0);
return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], arguments[3], argseq__5748__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__8117 = a.state;
return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__8117) : f.call(null, G__8117);
}());
} 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__8118 = a.state;
var G__8119 = x;
return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__8118, G__8119) : f.call(null, G__8118, G__8119);
}());
} 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__8120 = a.state;
var G__8121 = x;
var G__8122 = y;
return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__8120, G__8121, G__8122) : f.call(null, G__8120, G__8121, G__8122);
}());
} 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(seq8110) {
var G__8111 = cljs.core.first(seq8110);
var seq8110__$1 = cljs.core.next(seq8110);
var G__8112 = cljs.core.first(seq8110__$1);
var seq8110__$2 = cljs.core.next(seq8110__$1);
var G__8113 = cljs.core.first(seq8110__$2);
var seq8110__$3 = cljs.core.next(seq8110__$2);
var G__8114 = cljs.core.first(seq8110__$3);
var seq8110__$4 = cljs.core.next(seq8110__$3);
return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__8111, G__8112, G__8113, G__8114, seq8110__$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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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 args8127 = [];
var len__5729__auto___8158 = arguments.length;
var i__5730__auto___8159 = 0;
while (true) {
if (i__5730__auto___8159 < len__5729__auto___8158) {
args8127.push(arguments[i__5730__auto___8159]);
var G__8160 = i__5730__auto___8159 + 1;
i__5730__auto___8159 = G__8160;
continue;
} else {
}
break;
}
var G__8129 = args8127.length;
switch(G__8129) {
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(args8127.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__8162 = null;
var G__8162__0 = function() {
return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
};
var G__8162__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__8162__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__8162 = function(result, input) {
switch(arguments.length) {
case 0:
return G__8162__0.call(this);
case 1:
return G__8162__1.call(this, result);
case 2:
return G__8162__2.call(this, result, input);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8162.cljs$core$IFn$_invoke$arity$0 = G__8162__0;
G__8162.cljs$core$IFn$_invoke$arity$1 = G__8162__1;
G__8162.cljs$core$IFn$_invoke$arity$2 = G__8162__2;
return G__8162;
}();
}(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__5574__auto___8163 = size;
var i_8164 = 0;
while (true) {
if (i_8164 < n__5574__auto___8163) {
var x_8165 = function() {
var G__8154 = idx + i_8164;
var G__8155 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(c, i_8164);
return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__8154, G__8155) : f.call(null, G__8154, G__8155);
}();
if (x_8165 == null) {
} else {
cljs.core.chunk_append(b, x_8165);
}
var G__8166 = i_8164 + 1;
i_8164 = G__8166;
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__8156 = idx;
var G__8157 = cljs.core.first(s);
return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__8156, G__8157) : f.call(null, G__8156, G__8157);
}();
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 args8173 = [];
var len__5729__auto___8180 = arguments.length;
var i__5730__auto___8181 = 0;
while (true) {
if (i__5730__auto___8181 < len__5729__auto___8180) {
args8173.push(arguments[i__5730__auto___8181]);
var G__8182 = i__5730__auto___8181 + 1;
i__5730__auto___8181 = G__8182;
continue;
} else {
}
break;
}
var G__8179 = args8173.length;
switch(G__8179) {
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__5748__auto__ = new cljs.core.IndexedSeq(args8173.slice(3), 0);
return cljs.core.every_pred.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], argseq__5748__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__4659__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__4659__auto__)) {
return p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(y) : p.call(null, y);
} else {
return and__4659__auto__;
}
}());
};
var cljs$core$ep1__3 = function(x, y, z) {
return cljs.core.boolean$(function() {
var and__4659__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__4659__auto__)) {
var and__4659__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__4659__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__4659__auto____$1;
}
} else {
return and__4659__auto__;
}
}());
};
var cljs$core$ep1__4 = function() {
var G__8184__delegate = function(x, y, z, args) {
return cljs.core.boolean$(function() {
var and__4659__auto__ = cljs$core$ep1.cljs$core$IFn$_invoke$arity$3(x, y, z);
if (cljs.core.truth_(and__4659__auto__)) {
return cljs.core.every_QMARK_(p, args);
} else {
return and__4659__auto__;
}
}());
};
var G__8184 = function(x, y, z, var_args) {
var args = null;
if (arguments.length > 3) {
var G__8185__i = 0, G__8185__a = new Array(arguments.length - 3);
while (G__8185__i < G__8185__a.length) {
G__8185__a[G__8185__i] = arguments[G__8185__i + 3];
++G__8185__i;
}
args = new cljs.core.IndexedSeq(G__8185__a, 0);
}
return G__8184__delegate.call(this, x, y, z, args);
};
G__8184.cljs$lang$maxFixedArity = 3;
G__8184.cljs$lang$applyTo = function(arglist__8186) {
var x = cljs.core.first(arglist__8186);
arglist__8186 = cljs.core.next(arglist__8186);
var y = cljs.core.first(arglist__8186);
arglist__8186 = cljs.core.next(arglist__8186);
var z = cljs.core.first(arglist__8186);
var args = cljs.core.rest(arglist__8186);
return G__8184__delegate(x, y, z, args);
};
G__8184.cljs$core$IFn$_invoke$arity$variadic = G__8184__delegate;
return G__8184;
}();
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__8187 = null;
if (arguments.length > 3) {
var G__8188__i = 0, G__8188__a = new Array(arguments.length - 3);
while (G__8188__i < G__8188__a.length) {
G__8188__a[G__8188__i] = arguments[G__8188__i + 3];
++G__8188__i;
}
G__8187 = new cljs.core.IndexedSeq(G__8188__a, 0);
}
return cljs$core$ep1__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__8187);
}
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__4659__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__4659__auto__)) {
return p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null, x);
} else {
return and__4659__auto__;
}
}());
};
var cljs$core$ep2__2 = function(x, y) {
return cljs.core.boolean$(function() {
var and__4659__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__4659__auto__)) {
var and__4659__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__4659__auto____$1)) {
var and__4659__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__4659__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__4659__auto____$2;
}
} else {
return and__4659__auto____$1;
}
} else {
return and__4659__auto__;
}
}());
};
var cljs$core$ep2__3 = function(x, y, z) {
return cljs.core.boolean$(function() {
var and__4659__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__4659__auto__)) {
var and__4659__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__4659__auto____$1)) {
var and__4659__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__4659__auto____$2)) {
var and__4659__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__4659__auto____$3)) {
var and__4659__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__4659__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__4659__auto____$4;
}
} else {
return and__4659__auto____$3;
}
} else {
return and__4659__auto____$2;
}
} else {
return and__4659__auto____$1;
}
} else {
return and__4659__auto__;
}
}());
};
var cljs$core$ep2__4 = function() {
var G__8189__delegate = function(x, y, z, args) {
return cljs.core.boolean$(function() {
var and__4659__auto__ = cljs$core$ep2.cljs$core$IFn$_invoke$arity$3(x, y, z);
if (cljs.core.truth_(and__4659__auto__)) {
return cljs.core.every_QMARK_(function(and__4659__auto__) {
return function(p1__8167_SHARP_) {
var and__4659__auto____$1 = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(p1__8167_SHARP_) : p1.call(null, p1__8167_SHARP_);
if (cljs.core.truth_(and__4659__auto____$1)) {
return p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(p1__8167_SHARP_) : p2.call(null, p1__8167_SHARP_);
} else {
return and__4659__auto____$1;
}
};
}(and__4659__auto__), args);
} else {
return and__4659__auto__;
}
}());
};
var G__8189 = function(x, y, z, var_args) {
var args = null;
if (arguments.length > 3) {
var G__8190__i = 0, G__8190__a = new Array(arguments.length - 3);
while (G__8190__i < G__8190__a.length) {
G__8190__a[G__8190__i] = arguments[G__8190__i + 3];
++G__8190__i;
}
args = new cljs.core.IndexedSeq(G__8190__a, 0);
}
return G__8189__delegate.call(this, x, y, z, args);
};
G__8189.cljs$lang$maxFixedArity = 3;
G__8189.cljs$lang$applyTo = function(arglist__8191) {
var x = cljs.core.first(arglist__8191);
arglist__8191 = cljs.core.next(arglist__8191);
var y = cljs.core.first(arglist__8191);
arglist__8191 = cljs.core.next(arglist__8191);
var z = cljs.core.first(arglist__8191);
var args = cljs.core.rest(arglist__8191);
return G__8189__delegate(x, y, z, args);
};
G__8189.cljs$core$IFn$_invoke$arity$variadic = G__8189__delegate;
return G__8189;
}();
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__8192 = null;
if (arguments.length > 3) {
var G__8193__i = 0, G__8193__a = new Array(arguments.length - 3);
while (G__8193__i < G__8193__a.length) {
G__8193__a[G__8193__i] = arguments[G__8193__i + 3];
++G__8193__i;
}
G__8192 = new cljs.core.IndexedSeq(G__8193__a, 0);
}
return cljs$core$ep2__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__8192);
}
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__4659__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__4659__auto__)) {
var and__4659__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__4659__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__4659__auto____$1;
}
} else {
return and__4659__auto__;
}
}());
};
var cljs$core$ep3__2 = function(x, y) {
return cljs.core.boolean$(function() {
var and__4659__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__4659__auto__)) {
var and__4659__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__4659__auto____$1)) {
var and__4659__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__4659__auto____$2)) {
var and__4659__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__4659__auto____$3)) {
var and__4659__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__4659__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__4659__auto____$4;
}
} else {
return and__4659__auto____$3;
}
} else {
return and__4659__auto____$2;
}
} else {
return and__4659__auto____$1;
}
} else {
return and__4659__auto__;
}
}());
};
var cljs$core$ep3__3 = function(x, y, z) {
return cljs.core.boolean$(function() {
var and__4659__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__4659__auto__)) {
var and__4659__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__4659__auto____$1)) {
var and__4659__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__4659__auto____$2)) {
var and__4659__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__4659__auto____$3)) {
var and__4659__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__4659__auto____$4)) {
var and__4659__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__4659__auto____$5)) {
var and__4659__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__4659__auto____$6)) {
var and__4659__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__4659__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__4659__auto____$7;
}
} else {
return and__4659__auto____$6;
}
} else {
return and__4659__auto____$5;
}
} else {
return and__4659__auto____$4;
}
} else {
return and__4659__auto____$3;
}
} else {
return and__4659__auto____$2;
}
} else {
return and__4659__auto____$1;
}
} else {
return and__4659__auto__;
}
}());
};
var cljs$core$ep3__4 = function() {
var G__8194__delegate = function(x, y, z, args) {
return cljs.core.boolean$(function() {
var and__4659__auto__ = cljs$core$ep3.cljs$core$IFn$_invoke$arity$3(x, y, z);
if (cljs.core.truth_(and__4659__auto__)) {
return cljs.core.every_QMARK_(function(and__4659__auto__) {
return function(p1__8168_SHARP_) {
var and__4659__auto____$1 = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(p1__8168_SHARP_) : p1.call(null, p1__8168_SHARP_);
if (cljs.core.truth_(and__4659__auto____$1)) {
var and__4659__auto____$2 = p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(p1__8168_SHARP_) : p2.call(null, p1__8168_SHARP_);
if (cljs.core.truth_(and__4659__auto____$2)) {
return p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(p1__8168_SHARP_) : p3.call(null, p1__8168_SHARP_);
} else {
return and__4659__auto____$2;
}
} else {
return and__4659__auto____$1;
}
};
}(and__4659__auto__), args);
} else {
return and__4659__auto__;
}
}());
};
var G__8194 = function(x, y, z, var_args) {
var args = null;
if (arguments.length > 3) {
var G__8195__i = 0, G__8195__a = new Array(arguments.length - 3);
while (G__8195__i < G__8195__a.length) {
G__8195__a[G__8195__i] = arguments[G__8195__i + 3];
++G__8195__i;
}
args = new cljs.core.IndexedSeq(G__8195__a, 0);
}
return G__8194__delegate.call(this, x, y, z, args);
};
G__8194.cljs$lang$maxFixedArity = 3;
G__8194.cljs$lang$applyTo = function(arglist__8196) {
var x = cljs.core.first(arglist__8196);
arglist__8196 = cljs.core.next(arglist__8196);
var y = cljs.core.first(arglist__8196);
arglist__8196 = cljs.core.next(arglist__8196);
var z = cljs.core.first(arglist__8196);
var args = cljs.core.rest(arglist__8196);
return G__8194__delegate(x, y, z, args);
};
G__8194.cljs$core$IFn$_invoke$arity$variadic = G__8194__delegate;
return G__8194;
}();
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__8197 = null;
if (arguments.length > 3) {
var G__8198__i = 0, G__8198__a = new Array(arguments.length - 3);
while (G__8198__i < G__8198__a.length) {
G__8198__a[G__8198__i] = arguments[G__8198__i + 3];
++G__8198__i;
}
G__8197 = new cljs.core.IndexedSeq(G__8198__a, 0);
}
return cljs$core$ep3__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__8197);
}
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__8169_SHARP_) {
return p1__8169_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__8169_SHARP_.cljs$core$IFn$_invoke$arity$1(x) : p1__8169_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__8170_SHARP_) {
var and__4659__auto__ = p1__8170_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__8170_SHARP_.cljs$core$IFn$_invoke$arity$1(x) : p1__8170_SHARP_.call(null, x);
if (cljs.core.truth_(and__4659__auto__)) {
return p1__8170_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__8170_SHARP_.cljs$core$IFn$_invoke$arity$1(y) : p1__8170_SHARP_.call(null, y);
} else {
return and__4659__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__8171_SHARP_) {
var and__4659__auto__ = p1__8171_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__8171_SHARP_.cljs$core$IFn$_invoke$arity$1(x) : p1__8171_SHARP_.call(null, x);
if (cljs.core.truth_(and__4659__auto__)) {
var and__4659__auto____$1 = p1__8171_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__8171_SHARP_.cljs$core$IFn$_invoke$arity$1(y) : p1__8171_SHARP_.call(null, y);
if (cljs.core.truth_(and__4659__auto____$1)) {
return p1__8171_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__8171_SHARP_.cljs$core$IFn$_invoke$arity$1(z) : p1__8171_SHARP_.call(null, z);
} else {
return and__4659__auto____$1;
}
} else {
return and__4659__auto__;
}
};
}(ps__$1), ps__$1);
};
var cljs$core$epn__4 = function() {
var G__8199__delegate = function(x, y, z, args) {
return cljs.core.boolean$(function() {
var and__4659__auto__ = cljs$core$epn.cljs$core$IFn$_invoke$arity$3(x, y, z);
if (cljs.core.truth_(and__4659__auto__)) {
return cljs.core.every_QMARK_(function(and__4659__auto__, ps__$1) {
return function(p1__8172_SHARP_) {
return cljs.core.every_QMARK_(p1__8172_SHARP_, args);
};
}(and__4659__auto__, ps__$1), ps__$1);
} else {
return and__4659__auto__;
}
}());
};
var G__8199 = function(x, y, z, var_args) {
var args = null;
if (arguments.length > 3) {
var G__8200__i = 0, G__8200__a = new Array(arguments.length - 3);
while (G__8200__i < G__8200__a.length) {
G__8200__a[G__8200__i] = arguments[G__8200__i + 3];
++G__8200__i;
}
args = new cljs.core.IndexedSeq(G__8200__a, 0);
}
return G__8199__delegate.call(this, x, y, z, args);
};
G__8199.cljs$lang$maxFixedArity = 3;
G__8199.cljs$lang$applyTo = function(arglist__8201) {
var x = cljs.core.first(arglist__8201);
arglist__8201 = cljs.core.next(arglist__8201);
var y = cljs.core.first(arglist__8201);
arglist__8201 = cljs.core.next(arglist__8201);
var z = cljs.core.first(arglist__8201);
var args = cljs.core.rest(arglist__8201);
return G__8199__delegate(x, y, z, args);
};
G__8199.cljs$core$IFn$_invoke$arity$variadic = G__8199__delegate;
return G__8199;
}();
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__8202 = null;
if (arguments.length > 3) {
var G__8203__i = 0, G__8203__a = new Array(arguments.length - 3);
while (G__8203__i < G__8203__a.length) {
G__8203__a[G__8203__i] = arguments[G__8203__i + 3];
++G__8203__i;
}
G__8202 = new cljs.core.IndexedSeq(G__8203__a, 0);
}
return cljs$core$epn__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__8202);
}
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(seq8174) {
var G__8175 = cljs.core.first(seq8174);
var seq8174__$1 = cljs.core.next(seq8174);
var G__8176 = cljs.core.first(seq8174__$1);
var seq8174__$2 = cljs.core.next(seq8174__$1);
var G__8177 = cljs.core.first(seq8174__$2);
var seq8174__$3 = cljs.core.next(seq8174__$2);
return cljs.core.every_pred.cljs$core$IFn$_invoke$arity$variadic(G__8175, G__8176, G__8177, seq8174__$3);
};
cljs.core.every_pred.cljs$lang$maxFixedArity = 3;
cljs.core.some_fn = function cljs$core$some_fn(var_args) {
var args8210 = [];
var len__5729__auto___8217 = arguments.length;
var i__5730__auto___8218 = 0;
while (true) {
if (i__5730__auto___8218 < len__5729__auto___8217) {
args8210.push(arguments[i__5730__auto___8218]);
var G__8219 = i__5730__auto___8218 + 1;
i__5730__auto___8218 = G__8219;
continue;
} else {
}
break;
}
var G__8216 = args8210.length;
switch(G__8216) {
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__5748__auto__ = new cljs.core.IndexedSeq(args8210.slice(3), 0);
return cljs.core.some_fn.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], argseq__5748__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__4671__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__4671__auto__)) {
return or__4671__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__4671__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__4671__auto__)) {
return or__4671__auto__;
} else {
var or__4671__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__4671__auto____$1)) {
return or__4671__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__8221__delegate = function(x, y, z, args) {
var or__4671__auto__ = cljs$core$sp1.cljs$core$IFn$_invoke$arity$3(x, y, z);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return cljs.core.some(p, args);
}
};
var G__8221 = function(x, y, z, var_args) {
var args = null;
if (arguments.length > 3) {
var G__8222__i = 0, G__8222__a = new Array(arguments.length - 3);
while (G__8222__i < G__8222__a.length) {
G__8222__a[G__8222__i] = arguments[G__8222__i + 3];
++G__8222__i;
}
args = new cljs.core.IndexedSeq(G__8222__a, 0);
}
return G__8221__delegate.call(this, x, y, z, args);
};
G__8221.cljs$lang$maxFixedArity = 3;
G__8221.cljs$lang$applyTo = function(arglist__8223) {
var x = cljs.core.first(arglist__8223);
arglist__8223 = cljs.core.next(arglist__8223);
var y = cljs.core.first(arglist__8223);
arglist__8223 = cljs.core.next(arglist__8223);
var z = cljs.core.first(arglist__8223);
var args = cljs.core.rest(arglist__8223);
return G__8221__delegate(x, y, z, args);
};
G__8221.cljs$core$IFn$_invoke$arity$variadic = G__8221__delegate;
return G__8221;
}();
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__8224 = null;
if (arguments.length > 3) {
var G__8225__i = 0, G__8225__a = new Array(arguments.length - 3);
while (G__8225__i < G__8225__a.length) {
G__8225__a[G__8225__i] = arguments[G__8225__i + 3];
++G__8225__i;
}
G__8224 = new cljs.core.IndexedSeq(G__8225__a, 0);
}
return cljs$core$sp1__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__8224);
}
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__4671__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__4671__auto__)) {
return or__4671__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__4671__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__4671__auto__)) {
return or__4671__auto__;
} else {
var or__4671__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__4671__auto____$1)) {
return or__4671__auto____$1;
} else {
var or__4671__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__4671__auto____$2)) {
return or__4671__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__4671__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__4671__auto__)) {
return or__4671__auto__;
} else {
var or__4671__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__4671__auto____$1)) {
return or__4671__auto____$1;
} else {
var or__4671__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__4671__auto____$2)) {
return or__4671__auto____$2;
} else {
var or__4671__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__4671__auto____$3)) {
return or__4671__auto____$3;
} else {
var or__4671__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__4671__auto____$4)) {
return or__4671__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__8226__delegate = function(x, y, z, args) {
var or__4671__auto__ = cljs$core$sp2.cljs$core$IFn$_invoke$arity$3(x, y, z);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return cljs.core.some(function(or__4671__auto__) {
return function(p1__8204_SHARP_) {
var or__4671__auto____$1 = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(p1__8204_SHARP_) : p1.call(null, p1__8204_SHARP_);
if (cljs.core.truth_(or__4671__auto____$1)) {
return or__4671__auto____$1;
} else {
return p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(p1__8204_SHARP_) : p2.call(null, p1__8204_SHARP_);
}
};
}(or__4671__auto__), args);
}
};
var G__8226 = function(x, y, z, var_args) {
var args = null;
if (arguments.length > 3) {
var G__8227__i = 0, G__8227__a = new Array(arguments.length - 3);
while (G__8227__i < G__8227__a.length) {
G__8227__a[G__8227__i] = arguments[G__8227__i + 3];
++G__8227__i;
}
args = new cljs.core.IndexedSeq(G__8227__a, 0);
}
return G__8226__delegate.call(this, x, y, z, args);
};
G__8226.cljs$lang$maxFixedArity = 3;
G__8226.cljs$lang$applyTo = function(arglist__8228) {
var x = cljs.core.first(arglist__8228);
arglist__8228 = cljs.core.next(arglist__8228);
var y = cljs.core.first(arglist__8228);
arglist__8228 = cljs.core.next(arglist__8228);
var z = cljs.core.first(arglist__8228);
var args = cljs.core.rest(arglist__8228);
return G__8226__delegate(x, y, z, args);
};
G__8226.cljs$core$IFn$_invoke$arity$variadic = G__8226__delegate;
return G__8226;
}();
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__8229 = null;
if (arguments.length > 3) {
var G__8230__i = 0, G__8230__a = new Array(arguments.length - 3);
while (G__8230__i < G__8230__a.length) {
G__8230__a[G__8230__i] = arguments[G__8230__i + 3];
++G__8230__i;
}
G__8229 = new cljs.core.IndexedSeq(G__8230__a, 0);
}
return cljs$core$sp2__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__8229);
}
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__4671__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__4671__auto__)) {
return or__4671__auto__;
} else {
var or__4671__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__4671__auto____$1)) {
return or__4671__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__4671__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__4671__auto__)) {
return or__4671__auto__;
} else {
var or__4671__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__4671__auto____$1)) {
return or__4671__auto____$1;
} else {
var or__4671__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__4671__auto____$2)) {
return or__4671__auto____$2;
} else {
var or__4671__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__4671__auto____$3)) {
return or__4671__auto____$3;
} else {
var or__4671__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__4671__auto____$4)) {
return or__4671__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__4671__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__4671__auto__)) {
return or__4671__auto__;
} else {
var or__4671__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__4671__auto____$1)) {
return or__4671__auto____$1;
} else {
var or__4671__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__4671__auto____$2)) {
return or__4671__auto____$2;
} else {
var or__4671__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__4671__auto____$3)) {
return or__4671__auto____$3;
} else {
var or__4671__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__4671__auto____$4)) {
return or__4671__auto____$4;
} else {
var or__4671__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__4671__auto____$5)) {
return or__4671__auto____$5;
} else {
var or__4671__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__4671__auto____$6)) {
return or__4671__auto____$6;
} else {
var or__4671__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__4671__auto____$7)) {
return or__4671__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__8231__delegate = function(x, y, z, args) {
var or__4671__auto__ = cljs$core$sp3.cljs$core$IFn$_invoke$arity$3(x, y, z);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return cljs.core.some(function(or__4671__auto__) {
return function(p1__8205_SHARP_) {
var or__4671__auto____$1 = p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(p1__8205_SHARP_) : p1.call(null, p1__8205_SHARP_);
if (cljs.core.truth_(or__4671__auto____$1)) {
return or__4671__auto____$1;
} else {
var or__4671__auto____$2 = p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(p1__8205_SHARP_) : p2.call(null, p1__8205_SHARP_);
if (cljs.core.truth_(or__4671__auto____$2)) {
return or__4671__auto____$2;
} else {
return p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(p1__8205_SHARP_) : p3.call(null, p1__8205_SHARP_);
}
}
};
}(or__4671__auto__), args);
}
};
var G__8231 = function(x, y, z, var_args) {
var args = null;
if (arguments.length > 3) {
var G__8232__i = 0, G__8232__a = new Array(arguments.length - 3);
while (G__8232__i < G__8232__a.length) {
G__8232__a[G__8232__i] = arguments[G__8232__i + 3];
++G__8232__i;
}
args = new cljs.core.IndexedSeq(G__8232__a, 0);
}
return G__8231__delegate.call(this, x, y, z, args);
};
G__8231.cljs$lang$maxFixedArity = 3;
G__8231.cljs$lang$applyTo = function(arglist__8233) {
var x = cljs.core.first(arglist__8233);
arglist__8233 = cljs.core.next(arglist__8233);
var y = cljs.core.first(arglist__8233);
arglist__8233 = cljs.core.next(arglist__8233);
var z = cljs.core.first(arglist__8233);
var args = cljs.core.rest(arglist__8233);
return G__8231__delegate(x, y, z, args);
};
G__8231.cljs$core$IFn$_invoke$arity$variadic = G__8231__delegate;
return G__8231;
}();
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__8234 = null;
if (arguments.length > 3) {
var G__8235__i = 0, G__8235__a = new Array(arguments.length - 3);
while (G__8235__i < G__8235__a.length) {
G__8235__a[G__8235__i] = arguments[G__8235__i + 3];
++G__8235__i;
}
G__8234 = new cljs.core.IndexedSeq(G__8235__a, 0);
}
return cljs$core$sp3__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__8234);
}
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__8206_SHARP_) {
return p1__8206_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__8206_SHARP_.cljs$core$IFn$_invoke$arity$1(x) : p1__8206_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__8207_SHARP_) {
var or__4671__auto__ = p1__8207_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__8207_SHARP_.cljs$core$IFn$_invoke$arity$1(x) : p1__8207_SHARP_.call(null, x);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return p1__8207_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__8207_SHARP_.cljs$core$IFn$_invoke$arity$1(y) : p1__8207_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__8208_SHARP_) {
var or__4671__auto__ = p1__8208_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__8208_SHARP_.cljs$core$IFn$_invoke$arity$1(x) : p1__8208_SHARP_.call(null, x);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
var or__4671__auto____$1 = p1__8208_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__8208_SHARP_.cljs$core$IFn$_invoke$arity$1(y) : p1__8208_SHARP_.call(null, y);
if (cljs.core.truth_(or__4671__auto____$1)) {
return or__4671__auto____$1;
} else {
return p1__8208_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__8208_SHARP_.cljs$core$IFn$_invoke$arity$1(z) : p1__8208_SHARP_.call(null, z);
}
}
};
}(ps__$1), ps__$1);
};
var cljs$core$spn__4 = function() {
var G__8236__delegate = function(x, y, z, args) {
var or__4671__auto__ = cljs$core$spn.cljs$core$IFn$_invoke$arity$3(x, y, z);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return cljs.core.some(function(or__4671__auto__, ps__$1) {
return function(p1__8209_SHARP_) {
return cljs.core.some(p1__8209_SHARP_, args);
};
}(or__4671__auto__, ps__$1), ps__$1);
}
};
var G__8236 = function(x, y, z, var_args) {
var args = null;
if (arguments.length > 3) {
var G__8237__i = 0, G__8237__a = new Array(arguments.length - 3);
while (G__8237__i < G__8237__a.length) {
G__8237__a[G__8237__i] = arguments[G__8237__i + 3];
++G__8237__i;
}
args = new cljs.core.IndexedSeq(G__8237__a, 0);
}
return G__8236__delegate.call(this, x, y, z, args);
};
G__8236.cljs$lang$maxFixedArity = 3;
G__8236.cljs$lang$applyTo = function(arglist__8238) {
var x = cljs.core.first(arglist__8238);
arglist__8238 = cljs.core.next(arglist__8238);
var y = cljs.core.first(arglist__8238);
arglist__8238 = cljs.core.next(arglist__8238);
var z = cljs.core.first(arglist__8238);
var args = cljs.core.rest(arglist__8238);
return G__8236__delegate(x, y, z, args);
};
G__8236.cljs$core$IFn$_invoke$arity$variadic = G__8236__delegate;
return G__8236;
}();
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__8239 = null;
if (arguments.length > 3) {
var G__8240__i = 0, G__8240__a = new Array(arguments.length - 3);
while (G__8240__i < G__8240__a.length) {
G__8240__a[G__8240__i] = arguments[G__8240__i + 3];
++G__8240__i;
}
G__8239 = new cljs.core.IndexedSeq(G__8240__a, 0);
}
return cljs$core$spn__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__8239);
}
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(seq8211) {
var G__8212 = cljs.core.first(seq8211);
var seq8211__$1 = cljs.core.next(seq8211);
var G__8213 = cljs.core.first(seq8211__$1);
var seq8211__$2 = cljs.core.next(seq8211__$1);
var G__8214 = cljs.core.first(seq8211__$2);
var seq8211__$3 = cljs.core.next(seq8211__$2);
return cljs.core.some_fn.cljs$core$IFn$_invoke$arity$variadic(G__8212, G__8213, G__8214, seq8211__$3);
};
cljs.core.some_fn.cljs$lang$maxFixedArity = 3;
cljs.core.map = function cljs$core$map(var_args) {
var args8242 = [];
var len__5729__auto___8262 = arguments.length;
var i__5730__auto___8263 = 0;
while (true) {
if (i__5730__auto___8263 < len__5729__auto___8262) {
args8242.push(arguments[i__5730__auto___8263]);
var G__8264 = i__5730__auto___8263 + 1;
i__5730__auto___8263 = G__8264;
continue;
} else {
}
break;
}
var G__8249 = args8242.length;
switch(G__8249) {
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__5748__auto__ = new cljs.core.IndexedSeq(args8242.slice(4), 0);
return cljs.core.map.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], arguments[3], argseq__5748__auto__);
}
};
cljs.core.map.cljs$core$IFn$_invoke$arity$1 = function(f) {
return function(rf) {
return function() {
var G__8266 = null;
var G__8266__0 = function() {
return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
};
var G__8266__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__8266__2 = function(result, input) {
var G__8250 = result;
var G__8251 = 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__8250, G__8251) : rf.call(null, G__8250, G__8251);
};
var G__8266__3 = function() {
var G__8267__delegate = function(result, input, inputs) {
var G__8252 = result;
var G__8253 = 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__8252, G__8253) : rf.call(null, G__8252, G__8253);
};
var G__8267 = function(result, input, var_args) {
var inputs = null;
if (arguments.length > 2) {
var G__8268__i = 0, G__8268__a = new Array(arguments.length - 2);
while (G__8268__i < G__8268__a.length) {
G__8268__a[G__8268__i] = arguments[G__8268__i + 2];
++G__8268__i;
}
inputs = new cljs.core.IndexedSeq(G__8268__a, 0);
}
return G__8267__delegate.call(this, result, input, inputs);
};
G__8267.cljs$lang$maxFixedArity = 2;
G__8267.cljs$lang$applyTo = function(arglist__8269) {
var result = cljs.core.first(arglist__8269);
arglist__8269 = cljs.core.next(arglist__8269);
var input = cljs.core.first(arglist__8269);
var inputs = cljs.core.rest(arglist__8269);
return G__8267__delegate(result, input, inputs);
};
G__8267.cljs$core$IFn$_invoke$arity$variadic = G__8267__delegate;
return G__8267;
}();
G__8266 = function(result, input, var_args) {
var inputs = var_args;
switch(arguments.length) {
case 0:
return G__8266__0.call(this);
case 1:
return G__8266__1.call(this, result);
case 2:
return G__8266__2.call(this, result, input);
default:
var G__8270 = null;
if (arguments.length > 2) {
var G__8271__i = 0, G__8271__a = new Array(arguments.length - 2);
while (G__8271__i < G__8271__a.length) {
G__8271__a[G__8271__i] = arguments[G__8271__i + 2];
++G__8271__i;
}
G__8270 = new cljs.core.IndexedSeq(G__8271__a, 0);
}
return G__8266__3.cljs$core$IFn$_invoke$arity$variadic(result, input, G__8270);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8266.cljs$lang$maxFixedArity = 2;
G__8266.cljs$lang$applyTo = G__8266__3.cljs$lang$applyTo;
G__8266.cljs$core$IFn$_invoke$arity$0 = G__8266__0;
G__8266.cljs$core$IFn$_invoke$arity$1 = G__8266__1;
G__8266.cljs$core$IFn$_invoke$arity$2 = G__8266__2;
G__8266.cljs$core$IFn$_invoke$arity$variadic = G__8266__3.cljs$core$IFn$_invoke$arity$variadic;
return G__8266;
}();
};
};
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__5574__auto___8272 = size;
var i_8273 = 0;
while (true) {
if (i_8273 < n__5574__auto___8272) {
cljs.core.chunk_append(b, function() {
var G__8254 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(c, i_8273);
return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__8254) : f.call(null, G__8254);
}());
var G__8274 = i_8273 + 1;
i_8273 = G__8274;
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__8255 = cljs.core.first(s);
return f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__8255) : f.call(null, G__8255);
}(), 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__8256 = cljs.core.first(s1);
var G__8257 = cljs.core.first(s2);
return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__8256, G__8257) : f.call(null, G__8256, G__8257);
}(), 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__8258 = cljs.core.first(s1);
var G__8259 = cljs.core.first(s2);
var G__8260 = cljs.core.first(s3);
return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__8258, G__8259, G__8260) : f.call(null, G__8258, G__8259, G__8260);
}(), 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__8241_SHARP_) {
return cljs.core.apply.cljs$core$IFn$_invoke$arity$2(f, p1__8241_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(seq8243) {
var G__8244 = cljs.core.first(seq8243);
var seq8243__$1 = cljs.core.next(seq8243);
var G__8245 = cljs.core.first(seq8243__$1);
var seq8243__$2 = cljs.core.next(seq8243__$1);
var G__8246 = cljs.core.first(seq8243__$2);
var seq8243__$3 = cljs.core.next(seq8243__$2);
var G__8247 = cljs.core.first(seq8243__$3);
var seq8243__$4 = cljs.core.next(seq8243__$3);
return cljs.core.map.cljs$core$IFn$_invoke$arity$variadic(G__8244, G__8245, G__8246, G__8247, seq8243__$4);
};
cljs.core.map.cljs$lang$maxFixedArity = 4;
cljs.core.take = function cljs$core$take(var_args) {
var args8275 = [];
var len__5729__auto___8280 = arguments.length;
var i__5730__auto___8281 = 0;
while (true) {
if (i__5730__auto___8281 < len__5729__auto___8280) {
args8275.push(arguments[i__5730__auto___8281]);
var G__8282 = i__5730__auto___8281 + 1;
i__5730__auto___8281 = G__8282;
continue;
} else {
}
break;
}
var G__8277 = args8275.length;
switch(G__8277) {
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(args8275.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__8278 = 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__8278) : cljs.core.pr_str.call(null, G__8278);
}())].join(""));
}
return function(rf) {
var na = cljs.core.volatile_BANG_(n);
return function(na) {
return function() {
var G__8284 = null;
var G__8284__0 = function() {
return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
};
var G__8284__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__8284__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__8284 = function(result, input) {
switch(arguments.length) {
case 0:
return G__8284__0.call(this);
case 1:
return G__8284__1.call(this, result);
case 2:
return G__8284__2.call(this, result, input);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8284.cljs$core$IFn$_invoke$arity$0 = G__8284__0;
G__8284.cljs$core$IFn$_invoke$arity$1 = G__8284__1;
G__8284.cljs$core$IFn$_invoke$arity$2 = G__8284__2;
return G__8284;
}();
}(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__8279 = 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__8279) : cljs.core.pr_str.call(null, G__8279);
}())].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 args8285 = [];
var len__5729__auto___8290 = arguments.length;
var i__5730__auto___8291 = 0;
while (true) {
if (i__5730__auto___8291 < len__5729__auto___8290) {
args8285.push(arguments[i__5730__auto___8291]);
var G__8292 = i__5730__auto___8291 + 1;
i__5730__auto___8291 = G__8292;
continue;
} else {
}
break;
}
var G__8287 = args8285.length;
switch(G__8287) {
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(args8285.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__8288 = 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__8288) : cljs.core.pr_str.call(null, G__8288);
}())].join(""));
}
return function(rf) {
var na = cljs.core.volatile_BANG_(n);
return function(na) {
return function() {
var G__8294 = null;
var G__8294__0 = function() {
return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
};
var G__8294__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__8294__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__8294 = function(result, input) {
switch(arguments.length) {
case 0:
return G__8294__0.call(this);
case 1:
return G__8294__1.call(this, result);
case 2:
return G__8294__2.call(this, result, input);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8294.cljs$core$IFn$_invoke$arity$0 = G__8294__0;
G__8294.cljs$core$IFn$_invoke$arity$1 = G__8294__1;
G__8294.cljs$core$IFn$_invoke$arity$2 = G__8294__2;
return G__8294;
}();
}(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__8289 = 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__8289) : cljs.core.pr_str.call(null, G__8289);
}())].join(""));
}
var step = function(n__$1, coll__$1) {
while (true) {
var s = cljs.core.seq(coll__$1);
if (n__$1 > 0 && s) {
var G__8295 = n__$1 - 1;
var G__8296 = cljs.core.rest(s);
n__$1 = G__8295;
coll__$1 = G__8296;
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 args8297 = [];
var len__5729__auto___8300 = arguments.length;
var i__5730__auto___8301 = 0;
while (true) {
if (i__5730__auto___8301 < len__5729__auto___8300) {
args8297.push(arguments[i__5730__auto___8301]);
var G__8302 = i__5730__auto___8301 + 1;
i__5730__auto___8301 = G__8302;
continue;
} else {
}
break;
}
var G__8299 = args8297.length;
switch(G__8299) {
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(args8297.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__8304 = cljs.core.next(s);
var G__8305 = cljs.core.next(lead);
s = G__8304;
lead = G__8305;
continue;
} else {
return s;
}
break;
}
};
cljs.core.drop_while = function cljs$core$drop_while(var_args) {
var args8306 = [];
var len__5729__auto___8311 = arguments.length;
var i__5730__auto___8312 = 0;
while (true) {
if (i__5730__auto___8312 < len__5729__auto___8311) {
args8306.push(arguments[i__5730__auto___8312]);
var G__8313 = i__5730__auto___8312 + 1;
i__5730__auto___8312 = G__8313;
continue;
} else {
}
break;
}
var G__8308 = args8306.length;
switch(G__8308) {
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(args8306.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__8315 = null;
var G__8315__0 = function() {
return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
};
var G__8315__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__8315__2 = function(result, input) {
var drop_QMARK_ = cljs.core.deref(da);
if (cljs.core.truth_(function() {
var and__4659__auto__ = drop_QMARK_;
if (cljs.core.truth_(and__4659__auto__)) {
return pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(input) : pred.call(null, input);
} else {
return and__4659__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__8315 = function(result, input) {
switch(arguments.length) {
case 0:
return G__8315__0.call(this);
case 1:
return G__8315__1.call(this, result);
case 2:
return G__8315__2.call(this, result, input);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8315.cljs$core$IFn$_invoke$arity$0 = G__8315__0;
G__8315.cljs$core$IFn$_invoke$arity$1 = G__8315__1;
G__8315.cljs$core$IFn$_invoke$arity$2 = G__8315__2;
return G__8315;
}();
}(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__4659__auto__ = s;
if (and__4659__auto__) {
var G__8310 = cljs.core.first(s);
return pred__$1.cljs$core$IFn$_invoke$arity$1 ? pred__$1.cljs$core$IFn$_invoke$arity$1(G__8310) : pred__$1.call(null, G__8310);
} else {
return and__4659__auto__;
}
}())) {
var G__8316 = pred__$1;
var G__8317 = cljs.core.rest(s);
pred__$1 = G__8316;
coll__$1 = G__8317;
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 args8318 = [];
var len__5729__auto___8321 = arguments.length;
var i__5730__auto___8322 = 0;
while (true) {
if (i__5730__auto___8322 < len__5729__auto___8321) {
args8318.push(arguments[i__5730__auto___8322]);
var G__8323 = i__5730__auto___8322 + 1;
i__5730__auto___8322 = G__8323;
continue;
} else {
}
break;
}
var G__8320 = args8318.length;
switch(G__8320) {
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(args8318.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 args8325 = [];
var len__5729__auto___8328 = arguments.length;
var i__5730__auto___8329 = 0;
while (true) {
if (i__5730__auto___8329 < len__5729__auto___8328) {
args8325.push(arguments[i__5730__auto___8329]);
var G__8330 = i__5730__auto___8329 + 1;
i__5730__auto___8329 = G__8330;
continue;
} else {
}
break;
}
var G__8327 = args8325.length;
switch(G__8327) {
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(args8325.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 args8334 = [];
var len__5729__auto___8340 = arguments.length;
var i__5730__auto___8341 = 0;
while (true) {
if (i__5730__auto___8341 < len__5729__auto___8340) {
args8334.push(arguments[i__5730__auto___8341]);
var G__8342 = i__5730__auto___8341 + 1;
i__5730__auto___8341 = G__8342;
continue;
} else {
}
break;
}
var G__8339 = args8334.length;
switch(G__8339) {
case 2:
return cljs.core.interleave.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
var argseq__5748__auto__ = new cljs.core.IndexedSeq(args8334.slice(2), 0);
return cljs.core.interleave.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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(seq8335) {
var G__8336 = cljs.core.first(seq8335);
var seq8335__$1 = cljs.core.next(seq8335);
var G__8337 = cljs.core.first(seq8335__$1);
var seq8335__$2 = cljs.core.next(seq8335__$1);
return cljs.core.interleave.cljs$core$IFn$_invoke$arity$variadic(G__8336, G__8337, seq8335__$2);
};
cljs.core.interleave.cljs$lang$maxFixedArity = 2;
cljs.core.interpose = function cljs$core$interpose(var_args) {
var args8344 = [];
var len__5729__auto___8347 = arguments.length;
var i__5730__auto___8348 = 0;
while (true) {
if (i__5730__auto___8348 < len__5729__auto___8347) {
args8344.push(arguments[i__5730__auto___8348]);
var G__8349 = i__5730__auto___8348 + 1;
i__5730__auto___8348 = G__8349;
continue;
} else {
}
break;
}
var G__8346 = args8344.length;
switch(G__8346) {
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(args8344.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__8351 = null;
var G__8351__0 = function() {
return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
};
var G__8351__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__8351__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__8351 = function(result, input) {
switch(arguments.length) {
case 0:
return G__8351__0.call(this);
case 1:
return G__8351__1.call(this, result);
case 2:
return G__8351__2.call(this, result, input);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8351.cljs$core$IFn$_invoke$arity$0 = G__8351__0;
G__8351.cljs$core$IFn$_invoke$arity$1 = G__8351__1;
G__8351.cljs$core$IFn$_invoke$arity$2 = G__8351__2;
return G__8351;
}();
}(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.cat;
cljs.core.mapcat = function cljs$core$mapcat(var_args) {
var args8360 = [];
var len__5729__auto___8365 = arguments.length;
var i__5730__auto___8366 = 0;
while (true) {
if (i__5730__auto___8366 < len__5729__auto___8365) {
args8360.push(arguments[i__5730__auto___8366]);
var G__8367 = i__5730__auto___8366 + 1;
i__5730__auto___8366 = G__8367;
continue;
} else {
}
break;
}
var G__8364 = args8360.length;
switch(G__8364) {
case 1:
return cljs.core.mapcat.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
default:
var argseq__5748__auto__ = new cljs.core.IndexedSeq(args8360.slice(1), 0);
return cljs.core.mapcat.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5748__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(seq8361) {
var G__8362 = cljs.core.first(seq8361);
var seq8361__$1 = cljs.core.next(seq8361);
return cljs.core.mapcat.cljs$core$IFn$_invoke$arity$variadic(G__8362, seq8361__$1);
};
cljs.core.mapcat.cljs$lang$maxFixedArity = 1;
cljs.core.filter = function cljs$core$filter(var_args) {
var args8369 = [];
var len__5729__auto___8373 = arguments.length;
var i__5730__auto___8374 = 0;
while (true) {
if (i__5730__auto___8374 < len__5729__auto___8373) {
args8369.push(arguments[i__5730__auto___8374]);
var G__8375 = i__5730__auto___8374 + 1;
i__5730__auto___8374 = G__8375;
continue;
} else {
}
break;
}
var G__8371 = args8369.length;
switch(G__8371) {
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(args8369.length)].join(""));;
}
};
cljs.core.filter.cljs$core$IFn$_invoke$arity$1 = function(pred) {
return function(rf) {
return function() {
var G__8377 = null;
var G__8377__0 = function() {
return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
};
var G__8377__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__8377__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__8377 = function(result, input) {
switch(arguments.length) {
case 0:
return G__8377__0.call(this);
case 1:
return G__8377__1.call(this, result);
case 2:
return G__8377__2.call(this, result, input);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8377.cljs$core$IFn$_invoke$arity$0 = G__8377__0;
G__8377.cljs$core$IFn$_invoke$arity$1 = G__8377__1;
G__8377.cljs$core$IFn$_invoke$arity$2 = G__8377__2;
return G__8377;
}();
};
};
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__5574__auto___8378 = size;
var i_8379 = 0;
while (true) {
if (i_8379 < n__5574__auto___8378) {
if (cljs.core.truth_(function() {
var G__8372 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(c, i_8379);
return pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(G__8372) : pred.call(null, G__8372);
}())) {
cljs.core.chunk_append(b, cljs.core._nth.cljs$core$IFn$_invoke$arity$2(c, i_8379));
} else {
}
var G__8380 = i_8379 + 1;
i_8379 = G__8380;
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 args8381 = [];
var len__5729__auto___8384 = arguments.length;
var i__5730__auto___8385 = 0;
while (true) {
if (i__5730__auto___8385 < len__5729__auto___8384) {
args8381.push(arguments[i__5730__auto___8385]);
var G__8386 = i__5730__auto___8385 + 1;
i__5730__auto___8385 = G__8386;
continue;
} else {
}
break;
}
var G__8383 = args8381.length;
switch(G__8383) {
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(args8381.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__8388_SHARP_) {
return !cljs.core.sequential_QMARK_(p1__8388_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 args8389 = [];
var len__5729__auto___8394 = arguments.length;
var i__5730__auto___8395 = 0;
while (true) {
if (i__5730__auto___8395 < len__5729__auto___8394) {
args8389.push(arguments[i__5730__auto___8395]);
var G__8396 = i__5730__auto___8395 + 1;
i__5730__auto___8395 = G__8396;
continue;
} else {
}
break;
}
var G__8391 = args8389.length;
switch(G__8391) {
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(args8389.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 args8398 = [];
var len__5729__auto___8406 = arguments.length;
var i__5730__auto___8407 = 0;
while (true) {
if (i__5730__auto___8407 < len__5729__auto___8406) {
args8398.push(arguments[i__5730__auto___8407]);
var G__8408 = i__5730__auto___8407 + 1;
i__5730__auto___8407 = G__8408;
continue;
} else {
}
break;
}
var G__8405 = args8398.length;
switch(G__8405) {
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__5748__auto__ = new cljs.core.IndexedSeq(args8398.slice(4), 0);
return cljs.core.mapv.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], arguments[3], argseq__5748__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(seq8399) {
var G__8400 = cljs.core.first(seq8399);
var seq8399__$1 = cljs.core.next(seq8399);
var G__8401 = cljs.core.first(seq8399__$1);
var seq8399__$2 = cljs.core.next(seq8399__$1);
var G__8402 = cljs.core.first(seq8399__$2);
var seq8399__$3 = cljs.core.next(seq8399__$2);
var G__8403 = cljs.core.first(seq8399__$3);
var seq8399__$4 = cljs.core.next(seq8399__$3);
return cljs.core.mapv.cljs$core$IFn$_invoke$arity$variadic(G__8400, G__8401, G__8402, G__8403, seq8399__$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 args8410 = [];
var len__5729__auto___8413 = arguments.length;
var i__5730__auto___8414 = 0;
while (true) {
if (i__5730__auto___8414 < len__5729__auto___8413) {
args8410.push(arguments[i__5730__auto___8414]);
var G__8415 = i__5730__auto___8414 + 1;
i__5730__auto___8414 = G__8415;
continue;
} else {
}
break;
}
var G__8412 = args8410.length;
switch(G__8412) {
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(args8410.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 args8417 = [];
var len__5729__auto___8421 = arguments.length;
var i__5730__auto___8422 = 0;
while (true) {
if (i__5730__auto___8422 < len__5729__auto___8421) {
args8417.push(arguments[i__5730__auto___8422]);
var G__8423 = i__5730__auto___8422 + 1;
i__5730__auto___8422 = G__8423;
continue;
} else {
}
break;
}
var G__8419 = args8417.length;
switch(G__8419) {
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(args8417.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__8425 = sentinel;
var G__8426 = m__$2;
var G__8427 = cljs.core.next(ks__$1);
sentinel = G__8425;
m__$1 = G__8426;
ks__$1 = G__8427;
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__8428, v) {
var vec__8433 = p__8428;
var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8433, 0, null);
var ks = cljs.core.nthnext(vec__8433, 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 args8434 = [];
var len__5729__auto___8464 = arguments.length;
var i__5730__auto___8465 = 0;
while (true) {
if (i__5730__auto___8465 < len__5729__auto___8464) {
args8434.push(arguments[i__5730__auto___8465]);
var G__8466 = i__5730__auto___8465 + 1;
i__5730__auto___8465 = G__8466;
continue;
} else {
}
break;
}
var G__8443 = args8434.length;
switch(G__8443) {
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__5748__auto__ = new cljs.core.IndexedSeq(args8434.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__5748__auto__);
}
};
cljs.core.update_in.cljs$core$IFn$_invoke$arity$3 = function(m, p__8444, f) {
var vec__8445 = p__8444;
var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8445, 0, null);
var ks = cljs.core.nthnext(vec__8445, 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__8446 = 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__8446) : f.call(null, G__8446);
}());
}
};
cljs.core.update_in.cljs$core$IFn$_invoke$arity$4 = function(m, p__8447, f, a) {
var vec__8448 = p__8447;
var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8448, 0, null);
var ks = cljs.core.nthnext(vec__8448, 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__8449 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k);
var G__8450 = a;
return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__8449, G__8450) : f.call(null, G__8449, G__8450);
}());
}
};
cljs.core.update_in.cljs$core$IFn$_invoke$arity$5 = function(m, p__8451, f, a, b) {
var vec__8452 = p__8451;
var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8452, 0, null);
var ks = cljs.core.nthnext(vec__8452, 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__8453 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k);
var G__8454 = a;
var G__8455 = b;
return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__8453, G__8454, G__8455) : f.call(null, G__8453, G__8454, G__8455);
}());
}
};
cljs.core.update_in.cljs$core$IFn$_invoke$arity$6 = function(m, p__8456, f, a, b, c) {
var vec__8457 = p__8456;
var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8457, 0, null);
var ks = cljs.core.nthnext(vec__8457, 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__8458 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k);
var G__8459 = a;
var G__8460 = b;
var G__8461 = c;
return f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(G__8458, G__8459, G__8460, G__8461) : f.call(null, G__8458, G__8459, G__8460, G__8461);
}());
}
};
cljs.core.update_in.cljs$core$IFn$_invoke$arity$variadic = function(m, p__8462, f, a, b, c, args) {
var vec__8463 = p__8462;
var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8463, 0, null);
var ks = cljs.core.nthnext(vec__8463, 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(seq8435) {
var G__8436 = cljs.core.first(seq8435);
var seq8435__$1 = cljs.core.next(seq8435);
var G__8437 = cljs.core.first(seq8435__$1);
var seq8435__$2 = cljs.core.next(seq8435__$1);
var G__8438 = cljs.core.first(seq8435__$2);
var seq8435__$3 = cljs.core.next(seq8435__$2);
var G__8439 = cljs.core.first(seq8435__$3);
var seq8435__$4 = cljs.core.next(seq8435__$3);
var G__8440 = cljs.core.first(seq8435__$4);
var seq8435__$5 = cljs.core.next(seq8435__$4);
var G__8441 = cljs.core.first(seq8435__$5);
var seq8435__$6 = cljs.core.next(seq8435__$5);
return cljs.core.update_in.cljs$core$IFn$_invoke$arity$variadic(G__8436, G__8437, G__8438, G__8439, G__8440, G__8441, seq8435__$6);
};
cljs.core.update_in.cljs$lang$maxFixedArity = 6;
cljs.core.update = function cljs$core$update(var_args) {
var args8468 = [];
var len__5729__auto___8488 = arguments.length;
var i__5730__auto___8489 = 0;
while (true) {
if (i__5730__auto___8489 < len__5729__auto___8488) {
args8468.push(arguments[i__5730__auto___8489]);
var G__8490 = i__5730__auto___8489 + 1;
i__5730__auto___8489 = G__8490;
continue;
} else {
}
break;
}
var G__8477 = args8468.length;
switch(G__8477) {
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__5748__auto__ = new cljs.core.IndexedSeq(args8468.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__5748__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__8478 = 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__8478) : f.call(null, G__8478);
}());
};
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__8479 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k);
var G__8480 = x;
return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__8479, G__8480) : f.call(null, G__8479, G__8480);
}());
};
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__8481 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k);
var G__8482 = x;
var G__8483 = y;
return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__8481, G__8482, G__8483) : f.call(null, G__8481, G__8482, G__8483);
}());
};
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__8484 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k);
var G__8485 = x;
var G__8486 = y;
var G__8487 = z;
return f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(G__8484, G__8485, G__8486, G__8487) : f.call(null, G__8484, G__8485, G__8486, G__8487);
}());
};
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(seq8469) {
var G__8470 = cljs.core.first(seq8469);
var seq8469__$1 = cljs.core.next(seq8469);
var G__8471 = cljs.core.first(seq8469__$1);
var seq8469__$2 = cljs.core.next(seq8469__$1);
var G__8472 = cljs.core.first(seq8469__$2);
var seq8469__$3 = cljs.core.next(seq8469__$2);
var G__8473 = cljs.core.first(seq8469__$3);
var seq8469__$4 = cljs.core.next(seq8469__$3);
var G__8474 = cljs.core.first(seq8469__$4);
var seq8469__$5 = cljs.core.next(seq8469__$4);
var G__8475 = cljs.core.first(seq8469__$5);
var seq8469__$6 = cljs.core.next(seq8469__$5);
return cljs.core.update.cljs$core$IFn$_invoke$arity$variadic(G__8470, G__8471, G__8472, G__8473, G__8474, G__8475, seq8469__$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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__8492 = ll - 5;
var G__8493 = r;
ll = G__8492;
ret = G__8493;
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__8498 = cljs.core.pv_aget(node, 0);
var G__8499 = level - 5;
node = G__8498;
level = G__8499;
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__8500 = cljs.core.pv_aget(node, i >>> level & 31);
var G__8501 = level - 5;
node = G__8500;
level = G__8501;
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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.tv_editable_root;
cljs.core.tv_editable_tail;
cljs.core.TransientVector;
cljs.core.deref;
cljs.core.pr_sequential_writer;
cljs.core.pr_writer;
cljs.core.chunked_seq;
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__8511 = init__$2;
var G__8512 = j + i;
var G__8513 = arr[j];
return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__8511, G__8512, G__8513) : f.call(null, G__8511, G__8512, G__8513);
}();
if (cljs.core.reduced_QMARK_(init__$3)) {
return init__$3;
} else {
var G__8520 = j + 1;
var G__8521 = init__$3;
j = G__8520;
init__$2 = G__8521;
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__8522 = i + len;
var G__8523 = init__$2;
i = G__8522;
init__$1 = G__8523;
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__5106__auto__ = self__.__hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
self__.__hash = h__5106__auto____$1;
return h__5106__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__8514 = init__$2;
var G__8515 = arr[j];
return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__8514, G__8515) : f.call(null, G__8514, G__8515);
}();
if (cljs.core.reduced_QMARK_(init__$3)) {
return init__$3;
} else {
var G__8524 = j + 1;
var G__8525 = init__$3;
j = G__8524;
init__$2 = G__8525;
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__8526 = i + len;
var G__8527 = init__$2;
i = G__8526;
init__$1 = G__8527;
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__8516 = coll__$1;
var G__8517 = cljs.core.first_array_for_longvec(coll__$1);
var G__8518 = 0;
var G__8519 = 0;
return cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4 ? cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4(G__8516, G__8517, G__8518, G__8519) : cljs.core.chunked_seq.call(null, G__8516, G__8517, G__8518, G__8519);
}
}
};
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__5574__auto___8528 = len;
var i_8529 = 0;
while (true) {
if (i_8529 < n__5574__auto___8528) {
new_tail[i_8529] = self__.tail[i_8529];
var G__8530 = i_8529 + 1;
i_8529 = G__8530;
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__8531 = null;
var G__8531__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__8531__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__8531 = function(self__, k, not_found) {
switch(arguments.length) {
case 2:
return G__8531__2.call(this, self__, k);
case 3:
return G__8531__3.call(this, self__, k, not_found);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8531.cljs$core$IFn$_invoke$arity$2 = G__8531__2;
G__8531.cljs$core$IFn$_invoke$arity$3 = G__8531__3;
return G__8531;
}();
cljs.core.PersistentVector.prototype.apply = function(self__, args8510) {
var self__ = this;
var self____$1 = this;
return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args8510)));
};
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__8532 = i + 1;
var G__8533 = cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$2(out, xs__$1[i]);
i = G__8532;
out = G__8533;
continue;
} else {
return cljs.core.persistent_BANG_(out);
}
break;
}
}
};
cljs.core.PersistentVector.prototype[cljs.core.ITER_SYMBOL] = function() {
var this__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__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__5736__auto__ = [];
var len__5729__auto___8535 = arguments.length;
var i__5730__auto___8536 = 0;
while (true) {
if (i__5730__auto___8536 < len__5729__auto___8535) {
args__5736__auto__.push(arguments[i__5730__auto___8536]);
var G__8537 = i__5730__auto___8536 + 1;
i__5730__auto___8536 = G__8537;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 0 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(0), 0) : null;
return cljs.core.vector.cljs$core$IFn$_invoke$arity$variadic(argseq__5737__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(seq8534) {
return cljs.core.vector.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq8534));
};
cljs.core.subvec;
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__8538 = self__.vec;
var G__8539 = self__.node;
var G__8540 = self__.i;
var G__8541 = 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__8538, G__8539, G__8540, G__8541) : cljs.core.chunked_seq.call(null, G__8538, G__8539, G__8540, G__8541);
}();
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__5106__auto__ = self__.__hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
self__.__hash = h__5106__auto____$1;
return h__5106__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__8542 = self__.vec;
var G__8543 = self__.i + self__.off;
var G__8544 = 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__8542, G__8543, G__8544) : cljs.core.subvec.call(null, G__8542, G__8543, G__8544);
}(), 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__8545 = self__.vec;
var G__8546 = self__.i + self__.off;
var G__8547 = 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__8545, G__8546, G__8547) : cljs.core.subvec.call(null, G__8545, G__8546, G__8547);
}(), 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__8548 = self__.vec;
var G__8549 = self__.node;
var G__8550 = self__.i;
var G__8551 = 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__8548, G__8549, G__8550, G__8551) : cljs.core.chunked_seq.call(null, G__8548, G__8549, G__8550, G__8551);
}();
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__8552 = self__.vec;
var G__8553 = cljs.core.unchecked_array_for(self__.vec, end);
var G__8554 = end;
var G__8555 = 0;
return cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4 ? cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4(G__8552, G__8553, G__8554, G__8555) : cljs.core.chunked_seq.call(null, G__8552, G__8553, G__8554, G__8555);
} 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__8556 = self__.vec;
var G__8557 = cljs.core.unchecked_array_for(self__.vec, end);
var G__8558 = end;
var G__8559 = 0;
return cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4 ? cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4(G__8556, G__8557, G__8558, G__8559) : cljs.core.chunked_seq.call(null, G__8556, G__8557, G__8558, G__8559);
} 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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__auto__);
};
cljs.core.chunked_seq = function cljs$core$chunked_seq(var_args) {
var args8560 = [];
var len__5729__auto___8563 = arguments.length;
var i__5730__auto___8564 = 0;
while (true) {
if (i__5730__auto___8564 < len__5729__auto___8563) {
args8560.push(arguments[i__5730__auto___8564]);
var G__8565 = i__5730__auto___8564 + 1;
i__5730__auto___8564 = G__8565;
continue;
} else {
}
break;
}
var G__8562 = args8560.length;
switch(G__8562) {
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(args8560.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.build_subvec;
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__8568 = init__$1;
var G__8569 = j;
var G__8570 = 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__8568, G__8569, G__8570) : f.call(null, G__8568, G__8569, G__8570);
}();
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__8587 = i + 1;
var G__8588 = j + 1;
var G__8589 = init__$2;
i = G__8587;
j = G__8588;
init__$1 = G__8589;
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__8571 = self__.meta;
var G__8572 = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(self__.v, v_pos, val);
var G__8573 = self__.start;
var G__8574 = function() {
var x__5002__auto__ = self__.end;
var y__5003__auto__ = v_pos + 1;
return x__5002__auto__ > y__5003__auto__ ? x__5002__auto__ : y__5003__auto__;
}();
var G__8575 = null;
return cljs.core.build_subvec.cljs$core$IFn$_invoke$arity$5 ? cljs.core.build_subvec.cljs$core$IFn$_invoke$arity$5(G__8571, G__8572, G__8573, G__8574, G__8575) : cljs.core.build_subvec.call(null, G__8571, G__8572, G__8573, G__8574, G__8575);
};
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__8576 = self__.meta;
var G__8577 = self__.v;
var G__8578 = self__.start;
var G__8579 = self__.end - 1;
var G__8580 = null;
return cljs.core.build_subvec.cljs$core$IFn$_invoke$arity$5 ? cljs.core.build_subvec.cljs$core$IFn$_invoke$arity$5(G__8576, G__8577, G__8578, G__8579, G__8580) : cljs.core.build_subvec.call(null, G__8576, G__8577, G__8578, G__8579, G__8580);
}
};
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__5106__auto__ = self__.__hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
self__.__hash = h__5106__auto____$1;
return h__5106__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__8582 = self__.meta;
var G__8583 = cljs.core._assoc_n(self__.v, self__.end, o);
var G__8584 = self__.start;
var G__8585 = self__.end + 1;
var G__8586 = null;
return cljs.core.build_subvec.cljs$core$IFn$_invoke$arity$5 ? cljs.core.build_subvec.cljs$core$IFn$_invoke$arity$5(G__8582, G__8583, G__8584, G__8585, G__8586) : cljs.core.build_subvec.call(null, G__8582, G__8583, G__8584, G__8585, G__8586);
};
cljs.core.Subvec.prototype.call = function() {
var G__8590 = null;
var G__8590__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__8590__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__8590 = function(self__, k, not_found) {
switch(arguments.length) {
case 2:
return G__8590__2.call(this, self__, k);
case 3:
return G__8590__3.call(this, self__, k, not_found);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8590.cljs$core$IFn$_invoke$arity$2 = G__8590__2;
G__8590.cljs$core$IFn$_invoke$arity$3 = G__8590__3;
return G__8590;
}();
cljs.core.Subvec.prototype.apply = function(self__, args8567) {
var self__ = this;
var self____$1 = this;
return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args8567)));
};
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__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__8591 = meta;
var G__8592 = v.v;
var G__8593 = v.start + start;
var G__8594 = v.start + end;
var G__8595 = __hash;
meta = G__8591;
v = G__8592;
start = G__8593;
end = G__8594;
__hash = G__8595;
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 args8596 = [];
var len__5729__auto___8599 = arguments.length;
var i__5730__auto___8600 = 0;
while (true) {
if (i__5730__auto___8600 < len__5729__auto___8599) {
args8596.push(arguments[i__5730__auto___8600]);
var G__8601 = i__5730__auto___8600 + 1;
i__5730__auto___8600 = G__8601;
continue;
} else {
}
break;
}
var G__8598 = args8596.length;
switch(G__8598) {
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(args8596.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__8614 = cljs.core.tv_ensure_editable(root.edit, cljs.core.pv_aget(node, i >>> level & 31));
var G__8615 = level - 5;
node = G__8614;
level = G__8615;
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__8619 = null;
var G__8619__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__8619__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__8619 = function(self__, k, not_found) {
switch(arguments.length) {
case 2:
return G__8619__2.call(this, self__, k);
case 3:
return G__8619__3.call(this, self__, k, not_found);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8619.cljs$core$IFn$_invoke$arity$2 = G__8619__2;
G__8619.cljs$core$IFn$_invoke$arity$3 = G__8619__3;
return G__8619;
}();
cljs.core.TransientVector.prototype.apply = function(self__, args8616) {
var self__ = this;
var self____$1 = this;
return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args8616)));
};
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__4671__auto__ = cljs.core.some_QMARK_(self__.fseq) && cljs.core.seq(self__.fseq);
if (or__4671__auto__) {
return or__4671__auto__;
} else {
var and__4659__auto__ = cljs.core.some_QMARK_(self__.riter);
if (and__4659__auto__) {
return self__.riter.hasNext();
} else {
return and__4659__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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5106__auto__ = self__.__hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
self__.__hash = h__5106__auto____$1;
return h__5106__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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__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__5106__auto__ = self__.__hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
self__.__hash = h__5106__auto____$1;
return h__5106__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__4671__auto__ = self__.front;
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__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__4671__auto__ = self__.rear;
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__8620 = i + incr;
i = G__8620;
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__8621 = i + 1;
var G__8622 = cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(out, k__$1, so[k__$1]);
i = G__8621;
out = G__8622;
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_8627 = 0;
while (true) {
if (i_8627 < l) {
var k_8628 = ks[i_8627];
new_obj[k_8628] = obj[k_8628];
var G__8629 = i_8627 + 1;
i_8627 = G__8629;
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__8632 = init__$1;
var G__8633 = k;
var G__8634 = self__.strobj[k];
return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__8632, G__8633, G__8634) : f.call(null, G__8632, G__8633, G__8634);
}();
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__8635 = cljs.core.rest(keys__$1);
var G__8636 = init__$2;
keys__$1 = G__8635;
init__$1 = G__8636;
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__5106__auto__ = self__.__hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_unordered_coll(coll__$1);
self__.__hash = h__5106__auto____$1;
return h__5106__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__8630_SHARP_) {
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [p1__8630_SHARP_, self__.strobj[p1__8630_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__8637 = null;
var G__8637__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__8637__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__8637 = function(self__, k, not_found) {
switch(arguments.length) {
case 2:
return G__8637__2.call(this, self__, k);
case 3:
return G__8637__3.call(this, self__, k, not_found);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8637.cljs$core$IFn$_invoke$arity$2 = G__8637__2;
G__8637.cljs$core$IFn$_invoke$arity$3 = G__8637__3;
return G__8637;
}();
cljs.core.ObjMap.prototype.apply = function(self__, args8631) {
var self__ = this;
var self____$1 = this;
return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args8631)));
};
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__4671__auto__ = self__.i < self__.base_count;
if (or__4671__auto__) {
return or__4671__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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__8640 = cljs.core.first(self__.s);
var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8640, 0, null);
var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8640, 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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__8641 = i + 2;
i = G__8641;
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__8642 = i + 2;
i = G__8642;
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__8643 = i + 2;
i = G__8643;
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__8644 = i + 2;
i = G__8644;
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__8645 = i + 2;
i = G__8645;
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_8646 = 0;
while (true) {
if (i_8646 < l) {
narr[i_8646] = arr[i_8646];
var G__8647 = i_8646 + 1;
i_8646 = G__8647;
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.TransientArrayMap;
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__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.keys;
cljs.core.vals;
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__8649 = cljs.core.seq(coll);
var chunk__8650 = null;
var count__8651 = 0;
var i__8652 = 0;
while (true) {
if (i__8652 < count__8651) {
var vec__8653 = chunk__8650.cljs$core$IIndexed$_nth$arity$2(null, i__8652);
var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8653, 0, null);
var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8653, 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__8662 = seq__8649;
var G__8663 = chunk__8650;
var G__8664 = count__8651;
var G__8665 = i__8652 + 1;
seq__8649 = G__8662;
chunk__8650 = G__8663;
count__8651 = G__8664;
i__8652 = G__8665;
continue;
} else {
var temp__4425__auto__ = cljs.core.seq(seq__8649);
if (temp__4425__auto__) {
var seq__8649__$1 = temp__4425__auto__;
if (cljs.core.chunked_seq_QMARK_(seq__8649__$1)) {
var c__5474__auto__ = cljs.core.chunk_first(seq__8649__$1);
var G__8666 = cljs.core.chunk_rest(seq__8649__$1);
var G__8667 = c__5474__auto__;
var G__8668 = cljs.core.count(c__5474__auto__);
var G__8669 = 0;
seq__8649 = G__8666;
chunk__8650 = G__8667;
count__8651 = G__8668;
i__8652 = G__8669;
continue;
} else {
var vec__8654 = cljs.core.first(seq__8649__$1);
var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8654, 0, null);
var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8654, 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__8670 = cljs.core.next(seq__8649__$1);
var G__8671 = null;
var G__8672 = 0;
var G__8673 = 0;
seq__8649 = G__8670;
chunk__8650 = G__8671;
count__8651 = G__8672;
i__8652 = G__8673;
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__8655 = init__$1;
var G__8656 = self__.arr[i];
var G__8657 = self__.arr[i + 1];
return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__8655, G__8656, G__8657) : f.call(null, G__8655, G__8656, G__8657);
}();
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__8674 = i + 2;
var G__8675 = init__$2;
i = G__8674;
init__$1 = G__8675;
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__5106__auto__ = self__.__hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_unordered_coll(coll__$1);
self__.__hash = h__5106__auto____$1;
return h__5106__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__8676 = i + 2;
i = G__8676;
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__8677 = s + 2;
var G__8678 = d;
s = G__8677;
d = G__8678;
continue;
} else {
new_arr[d] = self__.arr[s];
new_arr[d + 1] = self__.arr[s + 1];
var G__8679 = s + 2;
var G__8680 = d + 2;
s = G__8679;
d = G__8680;
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__8661 = cljs.core.aclone(self__.arr);
G__8661[idx + 1] = v;
return G__8661;
}();
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__8681 = 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__8682 = cljs.core.next(es);
ret = G__8681;
es = G__8682;
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__8683 = null;
var G__8683__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__8683__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__8683 = function(self__, k, not_found) {
switch(arguments.length) {
case 2:
return G__8683__2.call(this, self__, k);
case 3:
return G__8683__3.call(this, self__, k, not_found);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8683.cljs$core$IFn$_invoke$arity$2 = G__8683__2;
G__8683.cljs$core$IFn$_invoke$arity$3 = G__8683__3;
return G__8683;
}();
cljs.core.PersistentArrayMap.prototype.apply = function(self__, args8648) {
var self__ = this;
var self____$1 = this;
return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args8648)));
};
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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_8684 = 0;
while (true) {
if (i_8684 < arr__$1.length) {
var k_8685 = arr__$1[i_8684];
var v_8686 = arr__$1[i_8684 + 1];
var idx_8687 = cljs.core.array_index_of(ret, k_8685);
if (idx_8687 === -1) {
ret.push(k_8685);
ret.push(v_8686);
} else {
}
var G__8688 = i_8684 + 2;
i_8684 = G__8688;
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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__auto__);
};
cljs.core.array__GT_transient_hash_map;
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__8691 = cljs.core.next(es);
var G__8692 = 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__8691;
tcoll__$2 = G__8692;
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__8690_8693 = self__.arr;
G__8690_8693.pop();
G__8690_8693.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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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.TransientHashMap;
cljs.core.PersistentHashMap;
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__8694 = cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(out, arr[i], arr[i + 1]);
var G__8695 = i + 2;
out = G__8694;
i = G__8695;
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__auto__, "cljs.core/Box");
};
cljs.core.__GT_Box = function cljs$core$__GT_Box(val) {
return new cljs.core.Box(val);
};
cljs.core.create_inode_seq;
cljs.core.create_array_node_seq;
cljs.core.reset_BANG_;
cljs.core.create_node;
cljs.core.atom;
cljs.core.deref;
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 args8696 = [];
var len__5729__auto___8701 = arguments.length;
var i__5730__auto___8702 = 0;
while (true) {
if (i__5730__auto___8702 < len__5729__auto___8701) {
args8696.push(arguments[i__5730__auto___8702]);
var G__8703 = i__5730__auto___8702 + 1;
i__5730__auto___8702 = G__8703;
continue;
} else {
}
break;
}
var G__8698 = args8696.length;
switch(G__8698) {
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(args8696.length)].join(""));;
}
};
cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$3 = function(arr, i, a) {
var G__8699 = cljs.core.aclone(arr);
G__8699[i] = a;
return G__8699;
};
cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$5 = function(arr, i, a, j, b) {
var G__8700 = cljs.core.aclone(arr);
G__8700[i] = a;
G__8700[j] = b;
return G__8700;
};
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 args8705 = [];
var len__5729__auto___8708 = arguments.length;
var i__5730__auto___8709 = 0;
while (true) {
if (i__5730__auto___8709 < len__5729__auto___8708) {
args8705.push(arguments[i__5730__auto___8709]);
var G__8710 = i__5730__auto___8709 + 1;
i__5730__auto___8709 = G__8710;
continue;
} else {
}
break;
}
var G__8707 = args8705.length;
switch(G__8707) {
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(args8705.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__8715 = init__$1;
var G__8716 = k;
var G__8717 = arr[i + 1];
return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__8715, G__8716, G__8717) : f.call(null, G__8715, G__8716, G__8717);
} 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__8718 = i + 2;
var G__8719 = init__$2;
i = G__8718;
init__$1 = G__8719;
continue;
}
} else {
return init__$1;
}
break;
}
};
cljs.core.ArrayNode;
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__4671__auto__ = cljs.core.some_QMARK_(self__.next_entry);
if (or__4671__auto__) {
return or__4671__auto__;
} else {
var or__4671__auto____$1 = cljs.core.some_QMARK_(self__.next_iter);
if (or__4671__auto____$1) {
return or__4671__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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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_8733 = 0;
var j_8734 = 0;
while (true) {
if (i_8733 < 32) {
if ((self__.bitmap >>> i_8733 & 1) === 0) {
var G__8735 = i_8733 + 1;
var G__8736 = j_8734;
i_8733 = G__8735;
j_8734 = G__8736;
continue;
} else {
nodes[i_8733] = !(self__.arr[j_8734] == null) ? cljs.core.BitmapIndexedNode.EMPTY.inode_assoc_BANG_(edit__$1, shift + 5, cljs.core.hash(self__.arr[j_8734]), self__.arr[j_8734], self__.arr[j_8734 + 1], added_leaf_QMARK_) : self__.arr[j_8734 + 1];
var G__8737 = i_8733 + 1;
var G__8738 = j_8734 + 2;
i_8733 = G__8737;
j_8734 = G__8738;
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__8720 = edit__$1;
var G__8721 = shift + 5;
var G__8722 = key_or_nil;
var G__8723 = val_or_node;
var G__8724 = hash;
var G__8725 = key;
var G__8726 = val;
return cljs.core.create_node.cljs$core$IFn$_invoke$arity$7 ? cljs.core.create_node.cljs$core$IFn$_invoke$arity$7(G__8720, G__8721, G__8722, G__8723, G__8724, G__8725, G__8726) : cljs.core.create_node.call(null, G__8720, G__8721, G__8722, G__8723, G__8724, G__8725, G__8726);
}());
}
}
}
};
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_8739 = 0;
var j_8740 = 0;
while (true) {
if (i_8739 < 32) {
if ((self__.bitmap >>> i_8739 & 1) === 0) {
var G__8741 = i_8739 + 1;
var G__8742 = j_8740;
i_8739 = G__8741;
j_8740 = G__8742;
continue;
} else {
nodes[i_8739] = !(self__.arr[j_8740] == null) ? cljs.core.BitmapIndexedNode.EMPTY.inode_assoc(shift + 5, cljs.core.hash(self__.arr[j_8740]), self__.arr[j_8740], self__.arr[j_8740 + 1], added_leaf_QMARK_) : self__.arr[j_8740 + 1];
var G__8743 = i_8739 + 1;
var G__8744 = j_8740 + 2;
i_8739 = G__8743;
j_8740 = G__8744;
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__8727 = shift + 5;
var G__8728 = key_or_nil;
var G__8729 = val_or_node;
var G__8730 = hash;
var G__8731 = key;
var G__8732 = val;
return cljs.core.create_node.cljs$core$IFn$_invoke$arity$6 ? cljs.core.create_node.cljs$core$IFn$_invoke$arity$6(G__8727, G__8728, G__8729, G__8730, G__8731, G__8732) : cljs.core.create_node.call(null, G__8727, G__8728, G__8729, G__8730, G__8731, G__8732);
}()));
}
}
}
};
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__8745 = i + 1;
var G__8746 = j + 2;
var G__8747 = bitmap | 1 << i;
i = G__8745;
j = G__8746;
bitmap = G__8747;
continue;
} else {
var G__8748 = i + 1;
var G__8749 = j;
var G__8750 = bitmap;
i = G__8748;
j = G__8749;
bitmap = G__8750;
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__8751 = i + 1;
var G__8752 = init__$2;
i = G__8751;
init__$1 = G__8752;
continue;
}
} else {
var G__8753 = i + 1;
var G__8754 = init__$1;
i = G__8753;
init__$1 = G__8754;
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__8755 = i + 2;
i = G__8755;
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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 args8756 = [];
var len__5729__auto___8759 = arguments.length;
var i__5730__auto___8760 = 0;
while (true) {
if (i__5730__auto___8760 < len__5729__auto___8759) {
args8756.push(arguments[i__5730__auto___8760]);
var G__8761 = i__5730__auto___8760 + 1;
i__5730__auto___8760 = G__8761;
continue;
} else {
}
break;
}
var G__8758 = args8756.length;
switch(G__8758) {
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(args8756.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__5106__auto__ = self__.__hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
self__.__hash = h__5106__auto____$1;
return h__5106__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__8763 = self__.nodes;
var G__8764 = self__.i + 2;
var G__8765 = 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__8763, G__8764, G__8765) : cljs.core.create_inode_seq.call(null, G__8763, G__8764, G__8765);
} else {
var G__8766 = self__.nodes;
var G__8767 = self__.i;
var G__8768 = 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__8766, G__8767, G__8768) : cljs.core.create_inode_seq.call(null, G__8766, G__8767, G__8768);
}
};
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__auto__);
};
cljs.core.create_inode_seq = function cljs$core$create_inode_seq(var_args) {
var args8769 = [];
var len__5729__auto___8772 = arguments.length;
var i__5730__auto___8773 = 0;
while (true) {
if (i__5730__auto___8773 < len__5729__auto___8772) {
args8769.push(arguments[i__5730__auto___8773]);
var G__8774 = i__5730__auto___8773 + 1;
i__5730__auto___8773 = G__8774;
continue;
} else {
}
break;
}
var G__8771 = args8769.length;
switch(G__8771) {
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(args8769.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__8776 = j + 2;
j = G__8776;
continue;
}
} else {
var G__8777 = j + 2;
j = G__8777;
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__5106__auto__ = self__.__hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
self__.__hash = h__5106__auto____$1;
return h__5106__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__8778 = null;
var G__8779 = self__.nodes;
var G__8780 = self__.i;
var G__8781 = 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__8778, G__8779, G__8780, G__8781) : cljs.core.create_array_node_seq.call(null, G__8778, G__8779, G__8780, G__8781);
};
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__auto__);
};
cljs.core.create_array_node_seq = function cljs$core$create_array_node_seq(var_args) {
var args8782 = [];
var len__5729__auto___8785 = arguments.length;
var i__5730__auto___8786 = 0;
while (true) {
if (i__5730__auto___8786 < len__5729__auto___8785) {
args8782.push(arguments[i__5730__auto___8786]);
var G__8787 = i__5730__auto___8786 + 1;
i__5730__auto___8786 = G__8787;
continue;
} else {
}
break;
}
var G__8784 = args8782.length;
switch(G__8784) {
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(args8782.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__8789 = j + 1;
j = G__8789;
continue;
}
} else {
var G__8790 = j + 1;
j = G__8790;
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.TransientHashMap;
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__8792 = cljs.core.seq(coll);
var chunk__8793 = null;
var count__8794 = 0;
var i__8795 = 0;
while (true) {
if (i__8795 < count__8794) {
var vec__8796 = chunk__8793.cljs$core$IIndexed$_nth$arity$2(null, i__8795);
var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8796, 0, null);
var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8796, 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__8800 = seq__8792;
var G__8801 = chunk__8793;
var G__8802 = count__8794;
var G__8803 = i__8795 + 1;
seq__8792 = G__8800;
chunk__8793 = G__8801;
count__8794 = G__8802;
i__8795 = G__8803;
continue;
} else {
var temp__4425__auto__ = cljs.core.seq(seq__8792);
if (temp__4425__auto__) {
var seq__8792__$1 = temp__4425__auto__;
if (cljs.core.chunked_seq_QMARK_(seq__8792__$1)) {
var c__5474__auto__ = cljs.core.chunk_first(seq__8792__$1);
var G__8804 = cljs.core.chunk_rest(seq__8792__$1);
var G__8805 = c__5474__auto__;
var G__8806 = cljs.core.count(c__5474__auto__);
var G__8807 = 0;
seq__8792 = G__8804;
chunk__8793 = G__8805;
count__8794 = G__8806;
i__8795 = G__8807;
continue;
} else {
var vec__8797 = cljs.core.first(seq__8792__$1);
var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8797, 0, null);
var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8797, 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__8808 = cljs.core.next(seq__8792__$1);
var G__8809 = null;
var G__8810 = 0;
var G__8811 = 0;
seq__8792 = G__8808;
chunk__8793 = G__8809;
count__8794 = G__8810;
i__8795 = G__8811;
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__5106__auto__ = self__.__hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_unordered_coll(coll__$1);
self__.__hash = h__5106__auto____$1;
return h__5106__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__8812 = 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__8813 = cljs.core.next(es);
ret = G__8812;
es = G__8813;
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__8814 = null;
var G__8814__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__8814__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__8814 = function(self__, k, not_found) {
switch(arguments.length) {
case 2:
return G__8814__2.call(this, self__, k);
case 3:
return G__8814__3.call(this, self__, k, not_found);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8814.cljs$core$IFn$_invoke$arity$2 = G__8814__2;
G__8814.cljs$core$IFn$_invoke$arity$3 = G__8814__3;
return G__8814;
}();
cljs.core.PersistentHashMap.prototype.apply = function(self__, args8791) {
var self__ = this;
var self____$1 = this;
return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args8791)));
};
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__8815 = i + 2;
var G__8816 = cljs.core._assoc_BANG_(ret, arr__$1[i], arr__$1[i + 1]);
i = G__8815;
ret = G__8816;
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__8817 = i + 1;
var G__8818 = out.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3(null, ks[i], vs[i]);
i = G__8817;
out = G__8818;
continue;
} else {
return cljs.core.persistent_BANG_(out);
}
break;
}
};
cljs.core.PersistentHashMap.prototype[cljs.core.ITER_SYMBOL] = function() {
var this__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__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__8820 = cljs.core.next(es);
var G__8821 = 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__8820;
tcoll__$1 = G__8821;
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__8822 = ascending_QMARK_ ? t.left : t.right;
var G__8823 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(stack__$1, t);
t = G__8822;
stack__$1 = G__8823;
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__5106__auto__ = self__.__hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
self__.__hash = h__5106__auto____$1;
return h__5106__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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__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.RedNode;
cljs.core.BlackNode;
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__8833 = init__$1;
var G__8834 = node.key;
var G__8835 = node.val;
return f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__8833, G__8834, G__8835) : f.call(null, G__8833, G__8834, G__8835);
}();
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__5106__auto__ = self__.__hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
self__.__hash = h__5106__auto____$1;
return h__5106__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__8837 = null;
var G__8837__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__8837__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__8837 = function(self__, k, not_found) {
switch(arguments.length) {
case 2:
return G__8837__2.call(this, self__, k);
case 3:
return G__8837__3.call(this, self__, k, not_found);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8837.cljs$core$IFn$_invoke$arity$2 = G__8837__2;
G__8837.cljs$core$IFn$_invoke$arity$3 = G__8837__3;
return G__8837;
}();
cljs.core.BlackNode.prototype.apply = function(self__, args8836) {
var self__ = this;
var self____$1 = this;
return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args8836)));
};
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__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__5106__auto__ = self__.__hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_ordered_coll(coll__$1);
self__.__hash = h__5106__auto____$1;
return h__5106__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__8839 = null;
var G__8839__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__8839__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__8839 = function(self__, k, not_found) {
switch(arguments.length) {
case 2:
return G__8839__2.call(this, self__, k);
case 3:
return G__8839__3.call(this, self__, k, not_found);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8839.cljs$core$IFn$_invoke$arity$2 = G__8839__2;
G__8839.cljs$core$IFn$_invoke$arity$3 = G__8839__3;
return G__8839;
}();
cljs.core.RedNode.prototype.apply = function(self__, args8838) {
var self__ = this;
var self____$1 = this;
return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args8838)));
};
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__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__8852 = k;
var G__8853 = tree.key;
return comp.cljs$core$IFn$_invoke$arity$2 ? comp.cljs$core$IFn$_invoke$arity$2(G__8852, G__8853) : comp.call(null, G__8852, G__8853);
}();
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__8872 = k;
var G__8873 = tree.key;
return comp.cljs$core$IFn$_invoke$arity$2 ? comp.cljs$core$IFn$_invoke$arity$2(G__8872, G__8873) : comp.call(null, G__8872, G__8873);
}();
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.key;
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__8883 = cljs.core.seq(coll);
var chunk__8884 = null;
var count__8885 = 0;
var i__8886 = 0;
while (true) {
if (i__8886 < count__8885) {
var vec__8887 = chunk__8884.cljs$core$IIndexed$_nth$arity$2(null, i__8886);
var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8887, 0, null);
var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8887, 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__8893 = seq__8883;
var G__8894 = chunk__8884;
var G__8895 = count__8885;
var G__8896 = i__8886 + 1;
seq__8883 = G__8893;
chunk__8884 = G__8894;
count__8885 = G__8895;
i__8886 = G__8896;
continue;
} else {
var temp__4425__auto__ = cljs.core.seq(seq__8883);
if (temp__4425__auto__) {
var seq__8883__$1 = temp__4425__auto__;
if (cljs.core.chunked_seq_QMARK_(seq__8883__$1)) {
var c__5474__auto__ = cljs.core.chunk_first(seq__8883__$1);
var G__8897 = cljs.core.chunk_rest(seq__8883__$1);
var G__8898 = c__5474__auto__;
var G__8899 = cljs.core.count(c__5474__auto__);
var G__8900 = 0;
seq__8883 = G__8897;
chunk__8884 = G__8898;
count__8885 = G__8899;
i__8886 = G__8900;
continue;
} else {
var vec__8888 = cljs.core.first(seq__8883__$1);
var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8888, 0, null);
var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8888, 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__8901 = cljs.core.next(seq__8883__$1);
var G__8902 = null;
var G__8903 = 0;
var G__8904 = 0;
seq__8883 = G__8901;
chunk__8884 = G__8902;
count__8885 = G__8903;
i__8886 = G__8904;
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__8889 = k;
var G__8890 = t.key;
return self__.comp.cljs$core$IFn$_invoke$arity$2 ? self__.comp.cljs$core$IFn$_invoke$arity$2(G__8889, G__8890) : self__.comp.call(null, G__8889, G__8890);
}();
if (c === 0) {
return t;
} else {
if (c < 0) {
var G__8905 = t.left;
t = G__8905;
continue;
} else {
var G__8906 = t.right;
t = G__8906;
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__5106__auto__ = self__.__hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_unordered_coll(coll__$1);
self__.__hash = h__5106__auto____$1;
return h__5106__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__8907 = 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__8908 = cljs.core.next(es);
ret = G__8907;
es = G__8908;
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__8909 = null;
var G__8909__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__8909__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__8909 = function(self__, k, not_found) {
switch(arguments.length) {
case 2:
return G__8909__2.call(this, self__, k);
case 3:
return G__8909__3.call(this, self__, k, not_found);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8909.cljs$core$IFn$_invoke$arity$2 = G__8909__2;
G__8909.cljs$core$IFn$_invoke$arity$3 = G__8909__3;
return G__8909;
}();
cljs.core.PersistentTreeMap.prototype.apply = function(self__, args8882) {
var self__ = this;
var self____$1 = this;
return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args8882)));
};
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__8891 = k;
var G__8892 = t.key;
return self__.comp.cljs$core$IFn$_invoke$arity$2 ? self__.comp.cljs$core$IFn$_invoke$arity$2(G__8891, G__8892) : self__.comp.call(null, G__8891, G__8892);
}();
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__8910 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(stack, t);
var G__8911 = t.left;
stack = G__8910;
t = G__8911;
continue;
} else {
var G__8912 = stack;
var G__8913 = t.right;
stack = G__8912;
t = G__8913;
continue;
}
} else {
if (c > 0) {
var G__8914 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(stack, t);
var G__8915 = t.right;
stack = G__8914;
t = G__8915;
continue;
} else {
var G__8916 = stack;
var G__8917 = t.left;
stack = G__8916;
t = G__8917;
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__auto__);
};
cljs.core.hash_map = function cljs$core$hash_map(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___8919 = arguments.length;
var i__5730__auto___8920 = 0;
while (true) {
if (i__5730__auto___8920 < len__5729__auto___8919) {
args__5736__auto__.push(arguments[i__5730__auto___8920]);
var G__8921 = i__5730__auto___8920 + 1;
i__5730__auto___8920 = G__8921;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 0 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(0), 0) : null;
return cljs.core.hash_map.cljs$core$IFn$_invoke$arity$variadic(argseq__5737__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__8922 = cljs.core.nnext(in$);
var G__8923 = cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(out, cljs.core.first(in$), cljs.core.second(in$));
in$ = G__8922;
out = G__8923;
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(seq8918) {
return cljs.core.hash_map.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq8918));
};
cljs.core.array_map = function cljs$core$array_map(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___8925 = arguments.length;
var i__5730__auto___8926 = 0;
while (true) {
if (i__5730__auto___8926 < len__5729__auto___8925) {
args__5736__auto__.push(arguments[i__5730__auto___8926]);
var G__8927 = i__5730__auto___8926 + 1;
i__5730__auto___8926 = G__8927;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 0 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(0), 0) : null;
return cljs.core.array_map.cljs$core$IFn$_invoke$arity$variadic(argseq__5737__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(seq8924) {
return cljs.core.array_map.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq8924));
};
cljs.core.obj_map = function cljs$core$obj_map(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___8931 = arguments.length;
var i__5730__auto___8932 = 0;
while (true) {
if (i__5730__auto___8932 < len__5729__auto___8931) {
args__5736__auto__.push(arguments[i__5730__auto___8932]);
var G__8933 = i__5730__auto___8932 + 1;
i__5730__auto___8932 = G__8933;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 0 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(0), 0) : null;
return cljs.core.obj_map.cljs$core$IFn$_invoke$arity$variadic(argseq__5737__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__8934 = cljs.core.nnext(kvs);
kvs = G__8934;
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(seq8928) {
return cljs.core.obj_map.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq8928));
};
cljs.core.sorted_map = function cljs$core$sorted_map(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___8936 = arguments.length;
var i__5730__auto___8937 = 0;
while (true) {
if (i__5730__auto___8937 < len__5729__auto___8936) {
args__5736__auto__.push(arguments[i__5730__auto___8937]);
var G__8938 = i__5730__auto___8937 + 1;
i__5730__auto___8937 = G__8938;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 0 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(0), 0) : null;
return cljs.core.sorted_map.cljs$core$IFn$_invoke$arity$variadic(argseq__5737__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__8939 = cljs.core.nnext(in$);
var G__8940 = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(out, cljs.core.first(in$), cljs.core.second(in$));
in$ = G__8939;
out = G__8940;
continue;
} else {
return out;
}
break;
}
};
cljs.core.sorted_map.cljs$lang$maxFixedArity = 0;
cljs.core.sorted_map.cljs$lang$applyTo = function(seq8935) {
return cljs.core.sorted_map.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq8935));
};
cljs.core.sorted_map_by = function cljs$core$sorted_map_by(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___8943 = arguments.length;
var i__5730__auto___8944 = 0;
while (true) {
if (i__5730__auto___8944 < len__5729__auto___8943) {
args__5736__auto__.push(arguments[i__5730__auto___8944]);
var G__8945 = i__5730__auto___8944 + 1;
i__5730__auto___8944 = G__8945;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return cljs.core.sorted_map_by.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__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__8946 = cljs.core.nnext(in$);
var G__8947 = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(out, cljs.core.first(in$), cljs.core.second(in$));
in$ = G__8946;
out = G__8947;
continue;
} else {
return out;
}
break;
}
};
cljs.core.sorted_map_by.cljs$lang$maxFixedArity = 1;
cljs.core.sorted_map_by.cljs$lang$applyTo = function(seq8941) {
var G__8942 = cljs.core.first(seq8941);
var seq8941__$1 = cljs.core.next(seq8941);
return cljs.core.sorted_map_by.cljs$core$IFn$_invoke$arity$variadic(G__8942, seq8941__$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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__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__5736__auto__ = [];
var len__5729__auto___8955 = arguments.length;
var i__5730__auto___8956 = 0;
while (true) {
if (i__5730__auto___8956 < len__5729__auto___8955) {
args__5736__auto__.push(arguments[i__5730__auto___8956]);
var G__8957 = i__5730__auto___8956 + 1;
i__5730__auto___8956 = G__8957;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 0 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(0), 0) : null;
return cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(argseq__5737__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__8952_SHARP_, p2__8953_SHARP_) {
return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(function() {
var or__4671__auto__ = p1__8952_SHARP_;
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return cljs.core.PersistentArrayMap.EMPTY;
}
}(), p2__8953_SHARP_);
}, maps);
} else {
return null;
}
};
cljs.core.merge.cljs$lang$maxFixedArity = 0;
cljs.core.merge.cljs$lang$applyTo = function(seq8954) {
return cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq8954));
};
cljs.core.merge_with = function cljs$core$merge_with(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___8962 = arguments.length;
var i__5730__auto___8963 = 0;
while (true) {
if (i__5730__auto___8963 < len__5729__auto___8962) {
args__5736__auto__.push(arguments[i__5730__auto___8963]);
var G__8964 = i__5730__auto___8963 + 1;
i__5730__auto___8963 = G__8964;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return cljs.core.merge_with.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__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__8960 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m, k);
var G__8961 = v;
return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__8960, G__8961) : f.call(null, G__8960, G__8961);
}());
} 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__4671__auto__ = m1;
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__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(seq8958) {
var G__8959 = cljs.core.first(seq8958);
var seq8958__$1 = cljs.core.next(seq8958);
return cljs.core.merge_with.cljs$core$IFn$_invoke$arity$variadic(G__8959, seq8958__$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__8965 = 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__8966 = cljs.core.next(keys);
ret = G__8965;
keys = G__8966;
continue;
} else {
return cljs.core.with_meta(ret, cljs.core.meta(map));
}
break;
}
};
cljs.core.TransientHashSet;
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__8969 = cljs.core.seq(coll);
var chunk__8970 = null;
var count__8971 = 0;
var i__8972 = 0;
while (true) {
if (i__8972 < count__8971) {
var vec__8973 = chunk__8970.cljs$core$IIndexed$_nth$arity$2(null, i__8972);
var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8973, 0, null);
var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8973, 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__8975 = seq__8969;
var G__8976 = chunk__8970;
var G__8977 = count__8971;
var G__8978 = i__8972 + 1;
seq__8969 = G__8975;
chunk__8970 = G__8976;
count__8971 = G__8977;
i__8972 = G__8978;
continue;
} else {
var temp__4425__auto__ = cljs.core.seq(seq__8969);
if (temp__4425__auto__) {
var seq__8969__$1 = temp__4425__auto__;
if (cljs.core.chunked_seq_QMARK_(seq__8969__$1)) {
var c__5474__auto__ = cljs.core.chunk_first(seq__8969__$1);
var G__8979 = cljs.core.chunk_rest(seq__8969__$1);
var G__8980 = c__5474__auto__;
var G__8981 = cljs.core.count(c__5474__auto__);
var G__8982 = 0;
seq__8969 = G__8979;
chunk__8970 = G__8980;
count__8971 = G__8981;
i__8972 = G__8982;
continue;
} else {
var vec__8974 = cljs.core.first(seq__8969__$1);
var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8974, 0, null);
var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__8974, 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__8983 = cljs.core.next(seq__8969__$1);
var G__8984 = null;
var G__8985 = 0;
var G__8986 = 0;
seq__8969 = G__8983;
chunk__8970 = G__8984;
count__8971 = G__8985;
i__8972 = G__8986;
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__5106__auto__ = self__.__hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_unordered_coll(coll__$1);
self__.__hash = h__5106__auto____$1;
return h__5106__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__8967_SHARP_) {
return cljs.core.contains_QMARK_(coll__$1, p1__8967_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__8987 = null;
var G__8987__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__8987__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__8987 = function(self__, k, not_found) {
switch(arguments.length) {
case 2:
return G__8987__2.call(this, self__, k);
case 3:
return G__8987__3.call(this, self__, k, not_found);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8987.cljs$core$IFn$_invoke$arity$2 = G__8987__2;
G__8987.cljs$core$IFn$_invoke$arity$3 = G__8987__3;
return G__8987;
}();
cljs.core.PersistentHashSet.prototype.apply = function(self__, args8968) {
var self__ = this;
var self____$1 = this;
return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args8968)));
};
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__8988 = i + 1;
var G__8989 = cljs.core._assoc_BANG_(out, items[i], null);
i = G__8988;
out = G__8989;
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__8990 = i + 1;
var G__8991 = cljs.core._conj_BANG_(out, items[i]);
i = G__8990;
out = G__8991;
continue;
} else {
return cljs.core._persistent_BANG_(out);
}
break;
}
}
};
cljs.core.PersistentHashSet.prototype[cljs.core.ITER_SYMBOL] = function() {
var this__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__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__8993 = null;
var G__8993__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__8993__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__8993 = function(self__, k, not_found) {
switch(arguments.length) {
case 2:
return G__8993__2.call(this, self__, k);
case 3:
return G__8993__3.call(this, self__, k, not_found);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__8993.cljs$core$IFn$_invoke$arity$2 = G__8993__2;
G__8993.cljs$core$IFn$_invoke$arity$3 = G__8993__3;
return G__8993;
}();
cljs.core.TransientHashSet.prototype.apply = function(self__, args8992) {
var self__ = this;
var self____$1 = this;
return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args8992)));
};
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__8996 = cljs.core.seq(coll);
var chunk__8997 = null;
var count__8998 = 0;
var i__8999 = 0;
while (true) {
if (i__8999 < count__8998) {
var vec__9000 = chunk__8997.cljs$core$IIndexed$_nth$arity$2(null, i__8999);
var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9000, 0, null);
var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9000, 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__9002 = seq__8996;
var G__9003 = chunk__8997;
var G__9004 = count__8998;
var G__9005 = i__8999 + 1;
seq__8996 = G__9002;
chunk__8997 = G__9003;
count__8998 = G__9004;
i__8999 = G__9005;
continue;
} else {
var temp__4425__auto__ = cljs.core.seq(seq__8996);
if (temp__4425__auto__) {
var seq__8996__$1 = temp__4425__auto__;
if (cljs.core.chunked_seq_QMARK_(seq__8996__$1)) {
var c__5474__auto__ = cljs.core.chunk_first(seq__8996__$1);
var G__9006 = cljs.core.chunk_rest(seq__8996__$1);
var G__9007 = c__5474__auto__;
var G__9008 = cljs.core.count(c__5474__auto__);
var G__9009 = 0;
seq__8996 = G__9006;
chunk__8997 = G__9007;
count__8998 = G__9008;
i__8999 = G__9009;
continue;
} else {
var vec__9001 = cljs.core.first(seq__8996__$1);
var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9001, 0, null);
var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9001, 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__9010 = cljs.core.next(seq__8996__$1);
var G__9011 = null;
var G__9012 = 0;
var G__9013 = 0;
seq__8996 = G__9010;
chunk__8997 = G__9011;
count__8998 = G__9012;
i__8999 = G__9013;
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__5106__auto__ = self__.__hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_unordered_coll(coll__$1);
self__.__hash = h__5106__auto____$1;
return h__5106__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__8994_SHARP_) {
return cljs.core.contains_QMARK_(coll__$1, p1__8994_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__9014 = null;
var G__9014__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__9014__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__9014 = function(self__, k, not_found) {
switch(arguments.length) {
case 2:
return G__9014__2.call(this, self__, k);
case 3:
return G__9014__3.call(this, self__, k, not_found);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__9014.cljs$core$IFn$_invoke$arity$2 = G__9014__2;
G__9014.cljs$core$IFn$_invoke$arity$3 = G__9014__3;
return G__9014;
}();
cljs.core.PersistentTreeSet.prototype.apply = function(self__, args8995) {
var self__ = this;
var self____$1 = this;
return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args8995)));
};
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__auto__);
};
cljs.core.set_from_indexed_seq = function cljs$core$set_from_indexed_seq(iseq) {
var arr = iseq.arr;
var ret = function() {
var a__5568__auto__ = arr;
var i = 0;
var res = cljs.core._as_transient(cljs.core.PersistentHashSet.EMPTY);
while (true) {
if (i < a__5568__auto__.length) {
var G__9015 = i + 1;
var G__9016 = res.cljs$core$ITransientCollection$_conj_BANG_$arity$2(null, arr[i]);
i = G__9015;
res = G__9016;
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__9017 = cljs.core.next(in$__$1);
var G__9018 = out.cljs$core$ITransientCollection$_conj_BANG_$arity$2(null, in$__$1.cljs$core$ISeq$_first$arity$1(null));
in$__$1 = G__9017;
out = G__9018;
continue;
} else {
return cljs.core.persistent_BANG_(out);
}
break;
}
}
}
};
cljs.core.hash_set = function cljs$core$hash_set(var_args) {
var args9019 = [];
var len__5729__auto___9023 = arguments.length;
var i__5730__auto___9024 = 0;
while (true) {
if (i__5730__auto___9024 < len__5729__auto___9023) {
args9019.push(arguments[i__5730__auto___9024]);
var G__9025 = i__5730__auto___9024 + 1;
i__5730__auto___9024 = G__9025;
continue;
} else {
}
break;
}
var G__9022 = args9019.length;
switch(G__9022) {
case 0:
return cljs.core.hash_set.cljs$core$IFn$_invoke$arity$0();
break;
default:
var argseq__5748__auto__ = new cljs.core.IndexedSeq(args9019.slice(0), 0);
return cljs.core.hash_set.cljs$core$IFn$_invoke$arity$variadic(argseq__5748__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(seq9020) {
return cljs.core.hash_set.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq9020));
};
cljs.core.hash_set.cljs$lang$maxFixedArity = 0;
cljs.core.sorted_set = function cljs$core$sorted_set(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___9028 = arguments.length;
var i__5730__auto___9029 = 0;
while (true) {
if (i__5730__auto___9029 < len__5729__auto___9028) {
args__5736__auto__.push(arguments[i__5730__auto___9029]);
var G__9030 = i__5730__auto___9029 + 1;
i__5730__auto___9029 = G__9030;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 0 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(0), 0) : null;
return cljs.core.sorted_set.cljs$core$IFn$_invoke$arity$variadic(argseq__5737__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(seq9027) {
return cljs.core.sorted_set.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq9027));
};
cljs.core.sorted_set_by = function cljs$core$sorted_set_by(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___9033 = arguments.length;
var i__5730__auto___9034 = 0;
while (true) {
if (i__5730__auto___9034 < len__5729__auto___9033) {
args__5736__auto__.push(arguments[i__5730__auto___9034]);
var G__9035 = i__5730__auto___9034 + 1;
i__5730__auto___9034 = G__9035;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return cljs.core.sorted_set_by.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__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(seq9031) {
var G__9032 = cljs.core.first(seq9031);
var seq9031__$1 = cljs.core.next(seq9031);
return cljs.core.sorted_set_by.cljs$core$IFn$_invoke$arity$variadic(G__9032, seq9031__$1);
};
cljs.core.replace = function cljs$core$replace(var_args) {
var args9038 = [];
var len__5729__auto___9041 = arguments.length;
var i__5730__auto___9042 = 0;
while (true) {
if (i__5730__auto___9042 < len__5729__auto___9041) {
args9038.push(arguments[i__5730__auto___9042]);
var G__9043 = i__5730__auto___9042 + 1;
i__5730__auto___9042 = G__9043;
continue;
} else {
}
break;
}
var G__9040 = args9038.length;
switch(G__9040) {
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(args9038.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__9036_SHARP_) {
var temp__4423__auto__ = cljs.core.find(smap, p1__9036_SHARP_);
if (cljs.core.truth_(temp__4423__auto__)) {
var e = temp__4423__auto__;
return cljs.core.val(e);
} else {
return p1__9036_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__9037_SHARP_) {
var temp__4423__auto__ = cljs.core.find(smap, p1__9037_SHARP_);
if (cljs.core.truth_(temp__4423__auto__)) {
var e = temp__4423__auto__;
return cljs.core.second(e);
} else {
return p1__9037_SHARP_;
}
}, coll);
}
};
cljs.core.replace.cljs$lang$maxFixedArity = 2;
cljs.core.distinct = function cljs$core$distinct(var_args) {
var args9045 = [];
var len__5729__auto___9054 = arguments.length;
var i__5730__auto___9055 = 0;
while (true) {
if (i__5730__auto___9055 < len__5729__auto___9054) {
args9045.push(arguments[i__5730__auto___9055]);
var G__9056 = i__5730__auto___9055 + 1;
i__5730__auto___9055 = G__9056;
continue;
} else {
}
break;
}
var G__9047 = args9045.length;
switch(G__9047) {
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(args9045.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__9058 = null;
var G__9058__0 = function() {
return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
};
var G__9058__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__9058__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__9058 = function(result, input) {
switch(arguments.length) {
case 0:
return G__9058__0.call(this);
case 1:
return G__9058__1.call(this, result);
case 2:
return G__9058__2.call(this, result, input);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__9058.cljs$core$IFn$_invoke$arity$0 = G__9058__0;
G__9058.cljs$core$IFn$_invoke$arity$1 = G__9058__1;
G__9058.cljs$core$IFn$_invoke$arity$2 = G__9058__2;
return G__9058;
}();
}(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__9052, seen__$1) {
while (true) {
var vec__9053 = p__9052;
var f = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9053, 0, null);
var xs__$1 = vec__9053;
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__9059 = cljs.core.rest(s);
var G__9060 = seen__$1;
p__9052 = G__9059;
seen__$1 = G__9060;
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__9061 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(ret, cljs.core.first(s__$1));
var G__9062 = cljs.core.next(s__$1);
ret = G__9061;
s__$1 = G__9062;
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__9065 = cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(map, cljs.core.first(ks), cljs.core.first(vs));
var G__9066 = cljs.core.next(ks);
var G__9067 = cljs.core.next(vs);
map = G__9065;
ks = G__9066;
vs = G__9067;
continue;
} else {
return cljs.core.persistent_BANG_(map);
}
break;
}
};
cljs.core.max_key = function cljs$core$max_key(var_args) {
var args9070 = [];
var len__5729__auto___9077 = arguments.length;
var i__5730__auto___9078 = 0;
while (true) {
if (i__5730__auto___9078 < len__5729__auto___9077) {
args9070.push(arguments[i__5730__auto___9078]);
var G__9079 = i__5730__auto___9078 + 1;
i__5730__auto___9078 = G__9079;
continue;
} else {
}
break;
}
var G__9076 = args9070.length;
switch(G__9076) {
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__5748__auto__ = new cljs.core.IndexedSeq(args9070.slice(3), 0);
return cljs.core.max_key.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], argseq__5748__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__9068_SHARP_, p2__9069_SHARP_) {
return cljs.core.max_key.cljs$core$IFn$_invoke$arity$3(k, p1__9068_SHARP_, p2__9069_SHARP_);
}, cljs.core.max_key.cljs$core$IFn$_invoke$arity$3(k, x, y), more);
};
cljs.core.max_key.cljs$lang$applyTo = function(seq9071) {
var G__9072 = cljs.core.first(seq9071);
var seq9071__$1 = cljs.core.next(seq9071);
var G__9073 = cljs.core.first(seq9071__$1);
var seq9071__$2 = cljs.core.next(seq9071__$1);
var G__9074 = cljs.core.first(seq9071__$2);
var seq9071__$3 = cljs.core.next(seq9071__$2);
return cljs.core.max_key.cljs$core$IFn$_invoke$arity$variadic(G__9072, G__9073, G__9074, seq9071__$3);
};
cljs.core.max_key.cljs$lang$maxFixedArity = 3;
cljs.core.min_key = function cljs$core$min_key(var_args) {
var args9083 = [];
var len__5729__auto___9090 = arguments.length;
var i__5730__auto___9091 = 0;
while (true) {
if (i__5730__auto___9091 < len__5729__auto___9090) {
args9083.push(arguments[i__5730__auto___9091]);
var G__9092 = i__5730__auto___9091 + 1;
i__5730__auto___9091 = G__9092;
continue;
} else {
}
break;
}
var G__9089 = args9083.length;
switch(G__9089) {
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__5748__auto__ = new cljs.core.IndexedSeq(args9083.slice(3), 0);
return cljs.core.min_key.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], argseq__5748__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__9081_SHARP_, p2__9082_SHARP_) {
return cljs.core.min_key.cljs$core$IFn$_invoke$arity$3(k, p1__9081_SHARP_, p2__9082_SHARP_);
}, cljs.core.min_key.cljs$core$IFn$_invoke$arity$3(k, x, y), more);
};
cljs.core.min_key.cljs$lang$applyTo = function(seq9084) {
var G__9085 = cljs.core.first(seq9084);
var seq9084__$1 = cljs.core.next(seq9084);
var G__9086 = cljs.core.first(seq9084__$1);
var seq9084__$2 = cljs.core.next(seq9084__$1);
var G__9087 = cljs.core.first(seq9084__$2);
var seq9084__$3 = cljs.core.next(seq9084__$2);
return cljs.core.min_key.cljs$core$IFn$_invoke$arity$variadic(G__9085, G__9086, G__9087, seq9084__$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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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 args9094 = [];
var len__5729__auto___9097 = arguments.length;
var i__5730__auto___9098 = 0;
while (true) {
if (i__5730__auto___9098 < len__5729__auto___9097) {
args9094.push(arguments[i__5730__auto___9098]);
var G__9099 = i__5730__auto___9098 + 1;
i__5730__auto___9098 = G__9099;
continue;
} else {
}
break;
}
var G__9096 = args9094.length;
switch(G__9096) {
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(args9094.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__9101 = null;
var G__9101__0 = function() {
return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
};
var G__9101__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__9101__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__9101 = function(result, input) {
switch(arguments.length) {
case 0:
return G__9101__0.call(this);
case 1:
return G__9101__1.call(this, result);
case 2:
return G__9101__2.call(this, result, input);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__9101.cljs$core$IFn$_invoke$arity$0 = G__9101__0;
G__9101.cljs$core$IFn$_invoke$arity$1 = G__9101__1;
G__9101.cljs$core$IFn$_invoke$arity$2 = G__9101__2;
return G__9101;
}();
}(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 args9102 = [];
var len__5729__auto___9106 = arguments.length;
var i__5730__auto___9107 = 0;
while (true) {
if (i__5730__auto___9107 < len__5729__auto___9106) {
args9102.push(arguments[i__5730__auto___9107]);
var G__9108 = i__5730__auto___9107 + 1;
i__5730__auto___9107 = G__9108;
continue;
} else {
}
break;
}
var G__9104 = args9102.length;
switch(G__9104) {
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(args9102.length)].join(""));;
}
};
cljs.core.take_while.cljs$core$IFn$_invoke$arity$1 = function(pred) {
return function(rf) {
return function() {
var G__9110 = null;
var G__9110__0 = function() {
return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
};
var G__9110__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__9110__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__9110 = function(result, input) {
switch(arguments.length) {
case 0:
return G__9110__0.call(this);
case 1:
return G__9110__1.call(this, result);
case 2:
return G__9110__2.call(this, result, input);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__9110.cljs$core$IFn$_invoke$arity$0 = G__9110__0;
G__9110.cljs$core$IFn$_invoke$arity$1 = G__9110__1;
G__9110.cljs$core$IFn$_invoke$arity$2 = G__9110__2;
return G__9110;
}();
};
};
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__9105 = cljs.core.first(s);
return pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(G__9105) : pred.call(null, G__9105);
}())) {
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__9119 = function() {
var G__9121 = cljs.core._entry_key(sc, e);
var G__9122 = key;
return comp.cljs$core$IFn$_invoke$arity$2 ? comp.cljs$core$IFn$_invoke$arity$2(G__9121, G__9122) : comp.call(null, G__9121, G__9122);
}();
var G__9120 = 0;
return test.cljs$core$IFn$_invoke$arity$2 ? test.cljs$core$IFn$_invoke$arity$2(G__9119, G__9120) : test.call(null, G__9119, G__9120);
};
};
cljs.core.subseq = function cljs$core$subseq(var_args) {
var args9123 = [];
var len__5729__auto___9128 = arguments.length;
var i__5730__auto___9129 = 0;
while (true) {
if (i__5730__auto___9129 < len__5729__auto___9128) {
args9123.push(arguments[i__5730__auto___9129]);
var G__9130 = i__5730__auto___9129 + 1;
i__5730__auto___9129 = G__9130;
continue;
} else {
}
break;
}
var G__9125 = args9123.length;
switch(G__9125) {
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(args9123.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__9126 = temp__4425__auto__;
var e = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9126, 0, null);
var s = vec__9126;
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__9127 = temp__4425__auto__;
var e = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9127, 0, null);
var s = vec__9127;
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 args9132 = [];
var len__5729__auto___9137 = arguments.length;
var i__5730__auto___9138 = 0;
while (true) {
if (i__5730__auto___9138 < len__5729__auto___9137) {
args9132.push(arguments[i__5730__auto___9138]);
var G__9139 = i__5730__auto___9138 + 1;
i__5730__auto___9138 = G__9139;
continue;
} else {
}
break;
}
var G__9134 = args9132.length;
switch(G__9134) {
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(args9132.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__9135 = temp__4425__auto__;
var e = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9135, 0, null);
var s = vec__9135;
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__9136 = temp__4425__auto__;
var e = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9136, 0, null);
var s = vec__9136;
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__9141 = (self__.end - self__.start) / self__.step;
return Math.ceil(G__9141);
}
};
cljs.core.Range.prototype.cljs$core$IHash$_hash$arity$1 = function(rng) {
var self__ = this;
var rng__$1 = this;
var h__5106__auto__ = self__.__hash;
if (!(h__5106__auto__ == null)) {
return h__5106__auto__;
} else {
var h__5106__auto____$1 = cljs.core.hash_ordered_coll(rng__$1);
self__.__hash = h__5106__auto____$1;
return h__5106__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__9142 = i + self__.step;
var G__9143 = ret__$1;
i = G__9142;
ret = G__9143;
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__auto__);
};
cljs.core.range = function cljs$core$range(var_args) {
var args9144 = [];
var len__5729__auto___9147 = arguments.length;
var i__5730__auto___9148 = 0;
while (true) {
if (i__5730__auto___9148 < len__5729__auto___9147) {
args9144.push(arguments[i__5730__auto___9148]);
var G__9149 = i__5730__auto___9148 + 1;
i__5730__auto___9148 = G__9149;
continue;
} else {
}
break;
}
var G__9146 = args9144.length;
switch(G__9146) {
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(args9144.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 args9151 = [];
var len__5729__auto___9156 = arguments.length;
var i__5730__auto___9157 = 0;
while (true) {
if (i__5730__auto___9157 < len__5729__auto___9156) {
args9151.push(arguments[i__5730__auto___9157]);
var G__9158 = i__5730__auto___9157 + 1;
i__5730__auto___9157 = G__9158;
continue;
} else {
}
break;
}
var G__9153 = args9151.length;
switch(G__9153) {
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(args9151.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__9154 = 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__9154) : cljs.core.pr_str.call(null, G__9154);
}())].join(""));
}
return function(rf) {
var ia = cljs.core.volatile_BANG_(-1);
return function(ia) {
return function() {
var G__9160 = null;
var G__9160__0 = function() {
return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
};
var G__9160__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__9160__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__9160 = function(result, input) {
switch(arguments.length) {
case 0:
return G__9160__0.call(this);
case 1:
return G__9160__1.call(this, result);
case 2:
return G__9160__2.call(this, result, input);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__9160.cljs$core$IFn$_invoke$arity$0 = G__9160__0;
G__9160.cljs$core$IFn$_invoke$arity$1 = G__9160__1;
G__9160.cljs$core$IFn$_invoke$arity$2 = G__9160__2;
return G__9160;
}();
}(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__9155 = 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__9155) : cljs.core.pr_str.call(null, G__9155);
}())].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 args9162 = [];
var len__5729__auto___9165 = arguments.length;
var i__5730__auto___9166 = 0;
while (true) {
if (i__5730__auto___9166 < len__5729__auto___9165) {
args9162.push(arguments[i__5730__auto___9166]);
var G__9167 = i__5730__auto___9166 + 1;
i__5730__auto___9166 = G__9167;
continue;
} else {
}
break;
}
var G__9164 = args9162.length;
switch(G__9164) {
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(args9162.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__9169 = null;
var G__9169__0 = function() {
return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
};
var G__9169__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__9169__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__9169 = function(result, input) {
switch(arguments.length) {
case 0:
return G__9169__0.call(this);
case 1:
return G__9169__1.call(this, result);
case 2:
return G__9169__2.call(this, result, input);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__9169.cljs$core$IFn$_invoke$arity$0 = G__9169__0;
G__9169.cljs$core$IFn$_invoke$arity$1 = G__9169__1;
G__9169.cljs$core$IFn$_invoke$arity$2 = G__9169__2;
return G__9169;
}();
}(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__9161_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__9161_SHARP_) : f.call(null, p1__9161_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 args9170 = [];
var len__5729__auto___9175 = arguments.length;
var i__5730__auto___9176 = 0;
while (true) {
if (i__5730__auto___9176 < len__5729__auto___9175) {
args9170.push(arguments[i__5730__auto___9176]);
var G__9177 = i__5730__auto___9176 + 1;
i__5730__auto___9176 = G__9177;
continue;
} else {
}
break;
}
var G__9172 = args9170.length;
switch(G__9172) {
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(args9170.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__9173 = init;
var G__9174 = cljs.core.first(s);
return f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__9173, G__9174) : f.call(null, G__9173, G__9174);
}(), 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 args9189 = [];
var len__5729__auto___9196 = arguments.length;
var i__5730__auto___9197 = 0;
while (true) {
if (i__5730__auto___9197 < len__5729__auto___9196) {
args9189.push(arguments[i__5730__auto___9197]);
var G__9198 = i__5730__auto___9197 + 1;
i__5730__auto___9197 = G__9198;
continue;
} else {
}
break;
}
var G__9195 = args9189.length;
switch(G__9195) {
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__5748__auto__ = new cljs.core.IndexedSeq(args9189.slice(3), 0);
return cljs.core.juxt.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], arguments[2], argseq__5748__auto__);
}
};
cljs.core.juxt.cljs$core$IFn$_invoke$arity$1 = function(f) {
return function() {
var G__9200 = null;
var G__9200__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__9200__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__9200__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__9200__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__9200__4 = function() {
var G__9201__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__9201 = function(x, y, z, var_args) {
var args = null;
if (arguments.length > 3) {
var G__9202__i = 0, G__9202__a = new Array(arguments.length - 3);
while (G__9202__i < G__9202__a.length) {
G__9202__a[G__9202__i] = arguments[G__9202__i + 3];
++G__9202__i;
}
args = new cljs.core.IndexedSeq(G__9202__a, 0);
}
return G__9201__delegate.call(this, x, y, z, args);
};
G__9201.cljs$lang$maxFixedArity = 3;
G__9201.cljs$lang$applyTo = function(arglist__9203) {
var x = cljs.core.first(arglist__9203);
arglist__9203 = cljs.core.next(arglist__9203);
var y = cljs.core.first(arglist__9203);
arglist__9203 = cljs.core.next(arglist__9203);
var z = cljs.core.first(arglist__9203);
var args = cljs.core.rest(arglist__9203);
return G__9201__delegate(x, y, z, args);
};
G__9201.cljs$core$IFn$_invoke$arity$variadic = G__9201__delegate;
return G__9201;
}();
G__9200 = function(x, y, z, var_args) {
var args = var_args;
switch(arguments.length) {
case 0:
return G__9200__0.call(this);
case 1:
return G__9200__1.call(this, x);
case 2:
return G__9200__2.call(this, x, y);
case 3:
return G__9200__3.call(this, x, y, z);
default:
var G__9204 = null;
if (arguments.length > 3) {
var G__9205__i = 0, G__9205__a = new Array(arguments.length - 3);
while (G__9205__i < G__9205__a.length) {
G__9205__a[G__9205__i] = arguments[G__9205__i + 3];
++G__9205__i;
}
G__9204 = new cljs.core.IndexedSeq(G__9205__a, 0);
}
return G__9200__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__9204);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__9200.cljs$lang$maxFixedArity = 3;
G__9200.cljs$lang$applyTo = G__9200__4.cljs$lang$applyTo;
G__9200.cljs$core$IFn$_invoke$arity$0 = G__9200__0;
G__9200.cljs$core$IFn$_invoke$arity$1 = G__9200__1;
G__9200.cljs$core$IFn$_invoke$arity$2 = G__9200__2;
G__9200.cljs$core$IFn$_invoke$arity$3 = G__9200__3;
G__9200.cljs$core$IFn$_invoke$arity$variadic = G__9200__4.cljs$core$IFn$_invoke$arity$variadic;
return G__9200;
}();
};
cljs.core.juxt.cljs$core$IFn$_invoke$arity$2 = function(f, g) {
return function() {
var G__9206 = null;
var G__9206__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__9206__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__9206__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__9206__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__9206__4 = function() {
var G__9207__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__9207 = function(x, y, z, var_args) {
var args = null;
if (arguments.length > 3) {
var G__9208__i = 0, G__9208__a = new Array(arguments.length - 3);
while (G__9208__i < G__9208__a.length) {
G__9208__a[G__9208__i] = arguments[G__9208__i + 3];
++G__9208__i;
}
args = new cljs.core.IndexedSeq(G__9208__a, 0);
}
return G__9207__delegate.call(this, x, y, z, args);
};
G__9207.cljs$lang$maxFixedArity = 3;
G__9207.cljs$lang$applyTo = function(arglist__9209) {
var x = cljs.core.first(arglist__9209);
arglist__9209 = cljs.core.next(arglist__9209);
var y = cljs.core.first(arglist__9209);
arglist__9209 = cljs.core.next(arglist__9209);
var z = cljs.core.first(arglist__9209);
var args = cljs.core.rest(arglist__9209);
return G__9207__delegate(x, y, z, args);
};
G__9207.cljs$core$IFn$_invoke$arity$variadic = G__9207__delegate;
return G__9207;
}();
G__9206 = function(x, y, z, var_args) {
var args = var_args;
switch(arguments.length) {
case 0:
return G__9206__0.call(this);
case 1:
return G__9206__1.call(this, x);
case 2:
return G__9206__2.call(this, x, y);
case 3:
return G__9206__3.call(this, x, y, z);
default:
var G__9210 = null;
if (arguments.length > 3) {
var G__9211__i = 0, G__9211__a = new Array(arguments.length - 3);
while (G__9211__i < G__9211__a.length) {
G__9211__a[G__9211__i] = arguments[G__9211__i + 3];
++G__9211__i;
}
G__9210 = new cljs.core.IndexedSeq(G__9211__a, 0);
}
return G__9206__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__9210);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__9206.cljs$lang$maxFixedArity = 3;
G__9206.cljs$lang$applyTo = G__9206__4.cljs$lang$applyTo;
G__9206.cljs$core$IFn$_invoke$arity$0 = G__9206__0;
G__9206.cljs$core$IFn$_invoke$arity$1 = G__9206__1;
G__9206.cljs$core$IFn$_invoke$arity$2 = G__9206__2;
G__9206.cljs$core$IFn$_invoke$arity$3 = G__9206__3;
G__9206.cljs$core$IFn$_invoke$arity$variadic = G__9206__4.cljs$core$IFn$_invoke$arity$variadic;
return G__9206;
}();
};
cljs.core.juxt.cljs$core$IFn$_invoke$arity$3 = function(f, g, h) {
return function() {
var G__9212 = null;
var G__9212__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__9212__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__9212__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__9212__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__9212__4 = function() {
var G__9213__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__9213 = function(x, y, z, var_args) {
var args = null;
if (arguments.length > 3) {
var G__9214__i = 0, G__9214__a = new Array(arguments.length - 3);
while (G__9214__i < G__9214__a.length) {
G__9214__a[G__9214__i] = arguments[G__9214__i + 3];
++G__9214__i;
}
args = new cljs.core.IndexedSeq(G__9214__a, 0);
}
return G__9213__delegate.call(this, x, y, z, args);
};
G__9213.cljs$lang$maxFixedArity = 3;
G__9213.cljs$lang$applyTo = function(arglist__9215) {
var x = cljs.core.first(arglist__9215);
arglist__9215 = cljs.core.next(arglist__9215);
var y = cljs.core.first(arglist__9215);
arglist__9215 = cljs.core.next(arglist__9215);
var z = cljs.core.first(arglist__9215);
var args = cljs.core.rest(arglist__9215);
return G__9213__delegate(x, y, z, args);
};
G__9213.cljs$core$IFn$_invoke$arity$variadic = G__9213__delegate;
return G__9213;
}();
G__9212 = function(x, y, z, var_args) {
var args = var_args;
switch(arguments.length) {
case 0:
return G__9212__0.call(this);
case 1:
return G__9212__1.call(this, x);
case 2:
return G__9212__2.call(this, x, y);
case 3:
return G__9212__3.call(this, x, y, z);
default:
var G__9216 = null;
if (arguments.length > 3) {
var G__9217__i = 0, G__9217__a = new Array(arguments.length - 3);
while (G__9217__i < G__9217__a.length) {
G__9217__a[G__9217__i] = arguments[G__9217__i + 3];
++G__9217__i;
}
G__9216 = new cljs.core.IndexedSeq(G__9217__a, 0);
}
return G__9212__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__9216);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__9212.cljs$lang$maxFixedArity = 3;
G__9212.cljs$lang$applyTo = G__9212__4.cljs$lang$applyTo;
G__9212.cljs$core$IFn$_invoke$arity$0 = G__9212__0;
G__9212.cljs$core$IFn$_invoke$arity$1 = G__9212__1;
G__9212.cljs$core$IFn$_invoke$arity$2 = G__9212__2;
G__9212.cljs$core$IFn$_invoke$arity$3 = G__9212__3;
G__9212.cljs$core$IFn$_invoke$arity$variadic = G__9212__4.cljs$core$IFn$_invoke$arity$variadic;
return G__9212;
}();
};
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__9218 = null;
var G__9218__0 = function() {
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(fs__$1) {
return function(p1__9179_SHARP_, p2__9180_SHARP_) {
return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(p1__9179_SHARP_, p2__9180_SHARP_.cljs$core$IFn$_invoke$arity$0 ? p2__9180_SHARP_.cljs$core$IFn$_invoke$arity$0() : p2__9180_SHARP_.call(null));
};
}(fs__$1), cljs.core.PersistentVector.EMPTY, fs__$1);
};
var G__9218__1 = function(x) {
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(fs__$1) {
return function(p1__9181_SHARP_, p2__9182_SHARP_) {
return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(p1__9181_SHARP_, p2__9182_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p2__9182_SHARP_.cljs$core$IFn$_invoke$arity$1(x) : p2__9182_SHARP_.call(null, x));
};
}(fs__$1), cljs.core.PersistentVector.EMPTY, fs__$1);
};
var G__9218__2 = function(x, y) {
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(fs__$1) {
return function(p1__9183_SHARP_, p2__9184_SHARP_) {
return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(p1__9183_SHARP_, p2__9184_SHARP_.cljs$core$IFn$_invoke$arity$2 ? p2__9184_SHARP_.cljs$core$IFn$_invoke$arity$2(x, y) : p2__9184_SHARP_.call(null, x, y));
};
}(fs__$1), cljs.core.PersistentVector.EMPTY, fs__$1);
};
var G__9218__3 = function(x, y, z) {
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(fs__$1) {
return function(p1__9185_SHARP_, p2__9186_SHARP_) {
return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(p1__9185_SHARP_, p2__9186_SHARP_.cljs$core$IFn$_invoke$arity$3 ? p2__9186_SHARP_.cljs$core$IFn$_invoke$arity$3(x, y, z) : p2__9186_SHARP_.call(null, x, y, z));
};
}(fs__$1), cljs.core.PersistentVector.EMPTY, fs__$1);
};
var G__9218__4 = function() {
var G__9219__delegate = function(x, y, z, args) {
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(fs__$1) {
return function(p1__9187_SHARP_, p2__9188_SHARP_) {
return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(p1__9187_SHARP_, cljs.core.apply.cljs$core$IFn$_invoke$arity$5(p2__9188_SHARP_, x, y, z, args));
};
}(fs__$1), cljs.core.PersistentVector.EMPTY, fs__$1);
};
var G__9219 = function(x, y, z, var_args) {
var args = null;
if (arguments.length > 3) {
var G__9220__i = 0, G__9220__a = new Array(arguments.length - 3);
while (G__9220__i < G__9220__a.length) {
G__9220__a[G__9220__i] = arguments[G__9220__i + 3];
++G__9220__i;
}
args = new cljs.core.IndexedSeq(G__9220__a, 0);
}
return G__9219__delegate.call(this, x, y, z, args);
};
G__9219.cljs$lang$maxFixedArity = 3;
G__9219.cljs$lang$applyTo = function(arglist__9221) {
var x = cljs.core.first(arglist__9221);
arglist__9221 = cljs.core.next(arglist__9221);
var y = cljs.core.first(arglist__9221);
arglist__9221 = cljs.core.next(arglist__9221);
var z = cljs.core.first(arglist__9221);
var args = cljs.core.rest(arglist__9221);
return G__9219__delegate(x, y, z, args);
};
G__9219.cljs$core$IFn$_invoke$arity$variadic = G__9219__delegate;
return G__9219;
}();
G__9218 = function(x, y, z, var_args) {
var args = var_args;
switch(arguments.length) {
case 0:
return G__9218__0.call(this);
case 1:
return G__9218__1.call(this, x);
case 2:
return G__9218__2.call(this, x, y);
case 3:
return G__9218__3.call(this, x, y, z);
default:
var G__9222 = null;
if (arguments.length > 3) {
var G__9223__i = 0, G__9223__a = new Array(arguments.length - 3);
while (G__9223__i < G__9223__a.length) {
G__9223__a[G__9223__i] = arguments[G__9223__i + 3];
++G__9223__i;
}
G__9222 = new cljs.core.IndexedSeq(G__9223__a, 0);
}
return G__9218__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, G__9222);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__9218.cljs$lang$maxFixedArity = 3;
G__9218.cljs$lang$applyTo = G__9218__4.cljs$lang$applyTo;
G__9218.cljs$core$IFn$_invoke$arity$0 = G__9218__0;
G__9218.cljs$core$IFn$_invoke$arity$1 = G__9218__1;
G__9218.cljs$core$IFn$_invoke$arity$2 = G__9218__2;
G__9218.cljs$core$IFn$_invoke$arity$3 = G__9218__3;
G__9218.cljs$core$IFn$_invoke$arity$variadic = G__9218__4.cljs$core$IFn$_invoke$arity$variadic;
return G__9218;
}();
}(fs__$1);
};
cljs.core.juxt.cljs$lang$applyTo = function(seq9190) {
var G__9191 = cljs.core.first(seq9190);
var seq9190__$1 = cljs.core.next(seq9190);
var G__9192 = cljs.core.first(seq9190__$1);
var seq9190__$2 = cljs.core.next(seq9190__$1);
var G__9193 = cljs.core.first(seq9190__$2);
var seq9190__$3 = cljs.core.next(seq9190__$2);
return cljs.core.juxt.cljs$core$IFn$_invoke$arity$variadic(G__9191, G__9192, G__9193, seq9190__$3);
};
cljs.core.juxt.cljs$lang$maxFixedArity = 3;
cljs.core.dorun = function cljs$core$dorun(var_args) {
var args9224 = [];
var len__5729__auto___9227 = arguments.length;
var i__5730__auto___9228 = 0;
while (true) {
if (i__5730__auto___9228 < len__5729__auto___9227) {
args9224.push(arguments[i__5730__auto___9228]);
var G__9229 = i__5730__auto___9228 + 1;
i__5730__auto___9228 = G__9229;
continue;
} else {
}
break;
}
var G__9226 = args9224.length;
switch(G__9226) {
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(args9224.length)].join(""));;
}
};
cljs.core.dorun.cljs$core$IFn$_invoke$arity$1 = function(coll) {
while (true) {
if (cljs.core.seq(coll)) {
var G__9231 = cljs.core.next(coll);
coll = G__9231;
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__9232 = n - 1;
var G__9233 = cljs.core.next(coll);
n = G__9232;
coll = G__9233;
continue;
} else {
return null;
}
break;
}
};
cljs.core.dorun.cljs$lang$maxFixedArity = 2;
cljs.core.doall = function cljs$core$doall(var_args) {
var args9234 = [];
var len__5729__auto___9237 = arguments.length;
var i__5730__auto___9238 = 0;
while (true) {
if (i__5730__auto___9238 < len__5729__auto___9237) {
args9234.push(arguments[i__5730__auto___9238]);
var G__9239 = i__5730__auto___9238 + 1;
i__5730__auto___9238 = G__9239;
continue;
} else {
}
break;
}
var G__9236 = args9234.length;
switch(G__9236) {
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(args9234.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__9242 = cljs.core.re_find(/^\(\?([idmsux]*)\)/, s);
var prefix = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9242, 0, null);
var flags = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9242, 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__4671__auto__ = flags;
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__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_9250 = 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__4671__auto__ = (new cljs.core.Keyword(null, "more-marker", "more-marker", -14717935)).cljs$core$IFn$_invoke$arity$1(opts);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return "...";
}
}());
} else {
}
} else {
if (cljs.core.seq(coll)) {
var G__9251_9257 = cljs.core.first(coll);
var G__9252_9258 = writer;
var G__9253_9259 = opts;
print_one.cljs$core$IFn$_invoke$arity$3 ? print_one.cljs$core$IFn$_invoke$arity$3(G__9251_9257, G__9252_9258, G__9253_9259) : print_one.call(null, G__9251_9257, G__9252_9258, G__9253_9259);
} else {
}
var coll_9260__$1 = cljs.core.next(coll);
var n_9261 = (new cljs.core.Keyword(null, "print-length", "print-length", 1931866356)).cljs$core$IFn$_invoke$arity$1(opts) - 1;
while (true) {
if (coll_9260__$1 && (n_9261 == null || !(n_9261 === 0))) {
cljs.core._write(writer, sep);
var G__9254_9262 = cljs.core.first(coll_9260__$1);
var G__9255_9263 = writer;
var G__9256_9264 = opts;
print_one.cljs$core$IFn$_invoke$arity$3 ? print_one.cljs$core$IFn$_invoke$arity$3(G__9254_9262, G__9255_9263, G__9256_9264) : print_one.call(null, G__9254_9262, G__9255_9263, G__9256_9264);
var G__9265 = cljs.core.next(coll_9260__$1);
var G__9266 = n_9261 - 1;
coll_9260__$1 = G__9265;
n_9261 = G__9266;
continue;
} else {
if (cljs.core.seq(coll_9260__$1) && n_9261 === 0) {
cljs.core._write(writer, sep);
cljs.core._write(writer, function() {
var or__4671__auto__ = (new cljs.core.Keyword(null, "more-marker", "more-marker", -14717935)).cljs$core$IFn$_invoke$arity$1(opts);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return "...";
}
}());
} else {
}
}
break;
}
}
return cljs.core._write(writer, end);
}
} finally {
cljs.core._STAR_print_level_STAR_ = _STAR_print_level_STAR_9250;
}
};
cljs.core.write_all = function cljs$core$write_all(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___9273 = arguments.length;
var i__5730__auto___9274 = 0;
while (true) {
if (i__5730__auto___9274 < len__5729__auto___9273) {
args__5736__auto__.push(arguments[i__5730__auto___9274]);
var G__9275 = i__5730__auto___9274 + 1;
i__5730__auto___9274 = G__9275;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return cljs.core.write_all.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
cljs.core.write_all.cljs$core$IFn$_invoke$arity$variadic = function(writer, ss) {
var seq__9269 = cljs.core.seq(ss);
var chunk__9270 = null;
var count__9271 = 0;
var i__9272 = 0;
while (true) {
if (i__9272 < count__9271) {
var s = chunk__9270.cljs$core$IIndexed$_nth$arity$2(null, i__9272);
cljs.core._write(writer, s);
var G__9276 = seq__9269;
var G__9277 = chunk__9270;
var G__9278 = count__9271;
var G__9279 = i__9272 + 1;
seq__9269 = G__9276;
chunk__9270 = G__9277;
count__9271 = G__9278;
i__9272 = G__9279;
continue;
} else {
var temp__4425__auto__ = cljs.core.seq(seq__9269);
if (temp__4425__auto__) {
var seq__9269__$1 = temp__4425__auto__;
if (cljs.core.chunked_seq_QMARK_(seq__9269__$1)) {
var c__5474__auto__ = cljs.core.chunk_first(seq__9269__$1);
var G__9280 = cljs.core.chunk_rest(seq__9269__$1);
var G__9281 = c__5474__auto__;
var G__9282 = cljs.core.count(c__5474__auto__);
var G__9283 = 0;
seq__9269 = G__9280;
chunk__9270 = G__9281;
count__9271 = G__9282;
i__9272 = G__9283;
continue;
} else {
var s = cljs.core.first(seq__9269__$1);
cljs.core._write(writer, s);
var G__9284 = cljs.core.next(seq__9269__$1);
var G__9285 = null;
var G__9286 = 0;
var G__9287 = 0;
seq__9269 = G__9284;
chunk__9270 = G__9285;
count__9271 = G__9286;
i__9272 = G__9287;
continue;
}
} else {
return null;
}
}
break;
}
};
cljs.core.write_all.cljs$lang$maxFixedArity = 1;
cljs.core.write_all.cljs$lang$applyTo = function(seq9267) {
var G__9268 = cljs.core.first(seq9267);
var seq9267__$1 = cljs.core.next(seq9267);
return cljs.core.write_all.cljs$core$IFn$_invoke$arity$variadic(G__9268, seq9267__$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 obj9289 = {'"':'\\"', "\\":"\\\\", "\b":"\\b", "\f":"\\f", "\n":"\\n", "\r":"\\r", "\t":"\\t"};
return obj9289;
}();
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_map;
cljs.core.print_meta_QMARK_ = function cljs$core$print_meta_QMARK_(opts, obj) {
var and__4659__auto__ = cljs.core.boolean$(cljs.core.get.cljs$core$IFn$_invoke$arity$2(opts, new cljs.core.Keyword(null, "meta", "meta", 1499536964)));
if (and__4659__auto__) {
var and__4659__auto____$1 = !(obj == null) ? obj.cljs$lang$protocol_mask$partition0$ & 131072 || obj.cljs$core$IMeta$ ? true : false : false;
if (and__4659__auto____$1) {
return !(cljs.core.meta(obj) == null);
} else {
return and__4659__auto____$1;
}
} else {
return and__4659__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__9305_9314 = cljs.core.meta(obj);
var G__9306_9315 = writer;
var G__9307_9316 = opts;
cljs.core.pr_writer.cljs$core$IFn$_invoke$arity$3 ? cljs.core.pr_writer.cljs$core$IFn$_invoke$arity$3(G__9305_9314, G__9306_9315, G__9307_9316) : cljs.core.pr_writer.call(null, G__9305_9314, G__9306_9315, G__9307_9316);
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__9309 = 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__9310 = cljs.core.pr_writer;
var G__9311 = writer;
var G__9312 = opts;
return cljs.core.print_map.cljs$core$IFn$_invoke$arity$4 ? cljs.core.print_map.cljs$core$IFn$_invoke$arity$4(G__9309, G__9310, G__9311, G__9312) : cljs.core.print_map.call(null, G__9309, G__9310, G__9311, G__9312);
} 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__4671__auto__ = name == null;
if (or__4671__auto__) {
return or__4671__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__9317 = [cljs.core.str("0"), cljs.core.str(ns)].join("");
ns = G__9317;
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__4671__auto__ = name == null;
if (or__4671__auto__) {
return or__4671__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__9321 = obj;
var G__9322 = writer;
var G__9323 = 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__9321, G__9322, G__9323) : alt_impl.call(null, G__9321, G__9322, G__9323);
} 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__9328 = cljs.core.seq(cljs.core.next(objs));
var chunk__9329 = null;
var count__9330 = 0;
var i__9331 = 0;
while (true) {
if (i__9331 < count__9330) {
var obj = chunk__9329.cljs$core$IIndexed$_nth$arity$2(null, i__9331);
cljs.core._write(writer, " ");
cljs.core.pr_writer(obj, writer, opts);
var G__9332 = seq__9328;
var G__9333 = chunk__9329;
var G__9334 = count__9330;
var G__9335 = i__9331 + 1;
seq__9328 = G__9332;
chunk__9329 = G__9333;
count__9330 = G__9334;
i__9331 = G__9335;
continue;
} else {
var temp__4425__auto__ = cljs.core.seq(seq__9328);
if (temp__4425__auto__) {
var seq__9328__$1 = temp__4425__auto__;
if (cljs.core.chunked_seq_QMARK_(seq__9328__$1)) {
var c__5474__auto__ = cljs.core.chunk_first(seq__9328__$1);
var G__9336 = cljs.core.chunk_rest(seq__9328__$1);
var G__9337 = c__5474__auto__;
var G__9338 = cljs.core.count(c__5474__auto__);
var G__9339 = 0;
seq__9328 = G__9336;
chunk__9329 = G__9337;
count__9330 = G__9338;
i__9331 = G__9339;
continue;
} else {
var obj = cljs.core.first(seq__9328__$1);
cljs.core._write(writer, " ");
cljs.core.pr_writer(obj, writer, opts);
var G__9340 = cljs.core.next(seq__9328__$1);
var G__9341 = null;
var G__9342 = 0;
var G__9343 = 0;
seq__9328 = G__9340;
chunk__9329 = G__9341;
count__9330 = G__9342;
i__9331 = G__9343;
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 args9344 = [];
var len__5729__auto___9347 = arguments.length;
var i__5730__auto___9348 = 0;
while (true) {
if (i__5730__auto___9348 < len__5729__auto___9347) {
args9344.push(arguments[i__5730__auto___9348]);
var G__9349 = i__5730__auto___9348 + 1;
i__5730__auto___9348 = G__9349;
continue;
} else {
}
break;
}
var G__9346 = args9344.length;
switch(G__9346) {
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(args9344.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__5736__auto__ = [];
var len__5729__auto___9352 = arguments.length;
var i__5730__auto___9353 = 0;
while (true) {
if (i__5730__auto___9353 < len__5729__auto___9352) {
args__5736__auto__.push(arguments[i__5730__auto___9353]);
var G__9354 = i__5730__auto___9353 + 1;
i__5730__auto___9353 = G__9354;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 0 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(0), 0) : null;
return cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(argseq__5737__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(seq9351) {
return cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq9351));
};
cljs.core.prn_str = function cljs$core$prn_str(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___9356 = arguments.length;
var i__5730__auto___9357 = 0;
while (true) {
if (i__5730__auto___9357 < len__5729__auto___9356) {
args__5736__auto__.push(arguments[i__5730__auto___9357]);
var G__9358 = i__5730__auto___9357 + 1;
i__5730__auto___9357 = G__9358;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 0 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(0), 0) : null;
return cljs.core.prn_str.cljs$core$IFn$_invoke$arity$variadic(argseq__5737__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(seq9355) {
return cljs.core.prn_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq9355));
};
cljs.core.pr = function cljs$core$pr(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___9360 = arguments.length;
var i__5730__auto___9361 = 0;
while (true) {
if (i__5730__auto___9361 < len__5729__auto___9360) {
args__5736__auto__.push(arguments[i__5730__auto___9361]);
var G__9362 = i__5730__auto___9361 + 1;
i__5730__auto___9361 = G__9362;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 0 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(0), 0) : null;
return cljs.core.pr.cljs$core$IFn$_invoke$arity$variadic(argseq__5737__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(seq9359) {
return cljs.core.pr.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq9359));
};
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__9363__i = 0, G__9363__a = new Array(arguments.length - 0);
while (G__9363__i < G__9363__a.length) {
G__9363__a[G__9363__i] = arguments[G__9363__i + 0];
++G__9363__i;
}
objs = new cljs.core.IndexedSeq(G__9363__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__9364) {
var objs = cljs.core.seq(arglist__9364);
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__5736__auto__ = [];
var len__5729__auto___9366 = arguments.length;
var i__5730__auto___9367 = 0;
while (true) {
if (i__5730__auto___9367 < len__5729__auto___9366) {
args__5736__auto__.push(arguments[i__5730__auto___9367]);
var G__9368 = i__5730__auto___9367 + 1;
i__5730__auto___9367 = G__9368;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 0 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(0), 0) : null;
return cljs.core.print_str.cljs$core$IFn$_invoke$arity$variadic(argseq__5737__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(seq9365) {
return cljs.core.print_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq9365));
};
cljs.core.println = function cljs$core$println(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___9370 = arguments.length;
var i__5730__auto___9371 = 0;
while (true) {
if (i__5730__auto___9371 < len__5729__auto___9370) {
args__5736__auto__.push(arguments[i__5730__auto___9371]);
var G__9372 = i__5730__auto___9371 + 1;
i__5730__auto___9371 = G__9372;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 0 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(0), 0) : null;
return cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(argseq__5737__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(seq9369) {
return cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq9369));
};
cljs.core.println_str = function cljs$core$println_str(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___9374 = arguments.length;
var i__5730__auto___9375 = 0;
while (true) {
if (i__5730__auto___9375 < len__5729__auto___9374) {
args__5736__auto__.push(arguments[i__5730__auto___9375]);
var G__9376 = i__5730__auto___9375 + 1;
i__5730__auto___9375 = G__9376;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 0 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(0), 0) : null;
return cljs.core.println_str.cljs$core$IFn$_invoke$arity$variadic(argseq__5737__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(seq9373) {
return cljs.core.println_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq9373));
};
cljs.core.prn = function cljs$core$prn(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___9378 = arguments.length;
var i__5730__auto___9379 = 0;
while (true) {
if (i__5730__auto___9379 < len__5729__auto___9378) {
args__5736__auto__.push(arguments[i__5730__auto___9379]);
var G__9380 = i__5730__auto___9379 + 1;
i__5730__auto___9379 = G__9380;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 0 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(0), 0) : null;
return cljs.core.prn.cljs$core$IFn$_invoke$arity$variadic(argseq__5737__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(seq9377) {
return cljs.core.prn.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq9377));
};
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__9387_9393 = cljs.core.key(e);
var G__9388_9394 = w;
var G__9389_9395 = opts__$1;
print_one.cljs$core$IFn$_invoke$arity$3 ? print_one.cljs$core$IFn$_invoke$arity$3(G__9387_9393, G__9388_9394, G__9389_9395) : print_one.call(null, G__9387_9393, G__9388_9394, G__9389_9395);
cljs.core._write(w, " ");
var G__9390 = cljs.core.val(e);
var G__9391 = w;
var G__9392 = opts__$1;
return print_one.cljs$core$IFn$_invoke$arity$3 ? print_one.cljs$core$IFn$_invoke$arity$3(G__9390, G__9391, G__9392) : print_one.call(null, G__9390, G__9391, G__9392);
}, "{", ", ", "}", 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__5736__auto__ = [];
var len__5729__auto___9399 = arguments.length;
var i__5730__auto___9400 = 0;
while (true) {
if (i__5730__auto___9400 < len__5729__auto___9399) {
args__5736__auto__.push(arguments[i__5730__auto___9400]);
var G__9401 = i__5730__auto___9400 + 1;
i__5730__auto___9400 = G__9401;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 2 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(2), 0) : null;
return cljs.core.alter_meta_BANG_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5737__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(seq9396) {
var G__9397 = cljs.core.first(seq9396);
var seq9396__$1 = cljs.core.next(seq9396);
var G__9398 = cljs.core.first(seq9396__$1);
var seq9396__$2 = cljs.core.next(seq9396__$1);
return cljs.core.alter_meta_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__9397, G__9398, seq9396__$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 args9402 = [];
var len__5729__auto___9405 = arguments.length;
var i__5730__auto___9406 = 0;
while (true) {
if (i__5730__auto___9406 < len__5729__auto___9405) {
args9402.push(arguments[i__5730__auto___9406]);
var G__9407 = i__5730__auto___9406 + 1;
i__5730__auto___9406 = G__9407;
continue;
} else {
}
break;
}
var G__9404 = args9402.length;
switch(G__9404) {
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(args9402.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(d) {
var self__ = this;
var d__$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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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_(d) {
return cljs.core._realized_QMARK_(d);
};
cljs.core.preserving_reduced = function cljs$core$preserving_reduced(rf) {
return function(p1__9409_SHARP_, p2__9410_SHARP_) {
var ret = rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(p1__9409_SHARP_, p2__9410_SHARP_) : rf.call(null, p1__9409_SHARP_, p2__9410_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__9411 = null;
var G__9411__0 = function() {
return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
};
var G__9411__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__9411__2 = function(result, input) {
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(rf1, result, input);
};
G__9411 = function(result, input) {
switch(arguments.length) {
case 0:
return G__9411__0.call(this);
case 1:
return G__9411__1.call(this, result);
case 2:
return G__9411__2.call(this, result, input);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__9411.cljs$core$IFn$_invoke$arity$0 = G__9411__0;
G__9411.cljs$core$IFn$_invoke$arity$1 = G__9411__1;
G__9411.cljs$core$IFn$_invoke$arity$2 = G__9411__2;
return G__9411;
}();
}(rf1);
};
cljs.core.dedupe = function cljs$core$dedupe(var_args) {
var args9412 = [];
var len__5729__auto___9415 = arguments.length;
var i__5730__auto___9416 = 0;
while (true) {
if (i__5730__auto___9416 < len__5729__auto___9415) {
args9412.push(arguments[i__5730__auto___9416]);
var G__9417 = i__5730__auto___9416 + 1;
i__5730__auto___9416 = G__9417;
continue;
} else {
}
break;
}
var G__9414 = args9412.length;
switch(G__9414) {
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(args9412.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__9419 = null;
var G__9419__0 = function() {
return rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null);
};
var G__9419__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__9419__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__9419 = function(result, input) {
switch(arguments.length) {
case 0:
return G__9419__0.call(this);
case 1:
return G__9419__1.call(this, result);
case 2:
return G__9419__2.call(this, result, input);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__9419.cljs$core$IFn$_invoke$arity$0 = G__9419__0;
G__9419.cljs$core$IFn$_invoke$arity$1 = G__9419__1;
G__9419.cljs$core$IFn$_invoke$arity$2 = G__9419__2;
return G__9419;
}();
}(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.rand;
cljs.core.random_sample = function cljs$core$random_sample(var_args) {
var args9420 = [];
var len__5729__auto___9423 = arguments.length;
var i__5730__auto___9424 = 0;
while (true) {
if (i__5730__auto___9424 < len__5729__auto___9423) {
args9420.push(arguments[i__5730__auto___9424]);
var G__9425 = i__5730__auto___9424 + 1;
i__5730__auto___9424 = G__9425;
continue;
} else {
}
break;
}
var G__9422 = args9420.length;
switch(G__9422) {
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(args9420.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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__5665__auto__ = this;
return cljs.core.es6_iterator(this__5665__auto__);
};
cljs.core.eduction = function cljs$core$eduction(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___9428 = arguments.length;
var i__5730__auto___9429 = 0;
while (true) {
if (i__5730__auto___9429 < len__5729__auto___9428) {
args__5736__auto__.push(arguments[i__5730__auto___9429]);
var G__9430 = i__5730__auto___9429 + 1;
i__5730__auto___9429 = G__9430;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 0 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(0), 0) : null;
return cljs.core.eduction.cljs$core$IFn$_invoke$arity$variadic(argseq__5737__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(seq9427) {
return cljs.core.eduction.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq9427));
};
cljs.core.run_BANG_ = function cljs$core$run_BANG_(proc, coll) {
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(p1__9432_SHARP_, p2__9431_SHARP_) {
return proc.cljs$core$IFn$_invoke$arity$1 ? proc.cljs$core$IFn$_invoke$arity$1(p2__9431_SHARP_) : proc.call(null, p2__9431_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__5326__auto__ = x == null ? null : x;
var m__5327__auto__ = cljs.core._clj__GT_js[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(x) : m__5327__auto__.call(null, x);
} else {
var m__5327__auto____$1 = cljs.core._clj__GT_js["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(x) : m__5327__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__5326__auto__ = x == null ? null : x;
var m__5327__auto__ = cljs.core._key__GT_js[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(x) : m__5327__auto__.call(null, x);
} else {
var m__5327__auto____$1 = cljs.core._key__GT_js["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(x) : m__5327__auto____$1.call(null, x);
} else {
throw cljs.core.missing_protocol("IEncodeJS.-key-\x3ejs", x);
}
}
}
};
cljs.core.clj__GT_js;
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__9451_9461 = cljs.core.seq(x);
var chunk__9452_9462 = null;
var count__9453_9463 = 0;
var i__9454_9464 = 0;
while (true) {
if (i__9454_9464 < count__9453_9463) {
var vec__9455_9465 = chunk__9452_9462.cljs$core$IIndexed$_nth$arity$2(null, i__9454_9464);
var k_9466 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9455_9465, 0, null);
var v_9467 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9455_9465, 1, null);
m[cljs.core.key__GT_js(k_9466)] = cljs$core$clj__GT_js(v_9467);
var G__9468 = seq__9451_9461;
var G__9469 = chunk__9452_9462;
var G__9470 = count__9453_9463;
var G__9471 = i__9454_9464 + 1;
seq__9451_9461 = G__9468;
chunk__9452_9462 = G__9469;
count__9453_9463 = G__9470;
i__9454_9464 = G__9471;
continue;
} else {
var temp__4425__auto___9472 = cljs.core.seq(seq__9451_9461);
if (temp__4425__auto___9472) {
var seq__9451_9473__$1 = temp__4425__auto___9472;
if (cljs.core.chunked_seq_QMARK_(seq__9451_9473__$1)) {
var c__5474__auto___9474 = cljs.core.chunk_first(seq__9451_9473__$1);
var G__9475 = cljs.core.chunk_rest(seq__9451_9473__$1);
var G__9476 = c__5474__auto___9474;
var G__9477 = cljs.core.count(c__5474__auto___9474);
var G__9478 = 0;
seq__9451_9461 = G__9475;
chunk__9452_9462 = G__9476;
count__9453_9463 = G__9477;
i__9454_9464 = G__9478;
continue;
} else {
var vec__9456_9479 = cljs.core.first(seq__9451_9473__$1);
var k_9480 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9456_9479, 0, null);
var v_9481 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9456_9479, 1, null);
m[cljs.core.key__GT_js(k_9480)] = cljs$core$clj__GT_js(v_9481);
var G__9482 = cljs.core.next(seq__9451_9473__$1);
var G__9483 = null;
var G__9484 = 0;
var G__9485 = 0;
seq__9451_9461 = G__9482;
chunk__9452_9462 = G__9483;
count__9453_9463 = G__9484;
i__9454_9464 = G__9485;
continue;
}
} else {
}
}
break;
}
return m;
} else {
if (cljs.core.coll_QMARK_(x)) {
var arr = [];
var seq__9457_9486 = cljs.core.seq(cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs$core$clj__GT_js, x));
var chunk__9458_9487 = null;
var count__9459_9488 = 0;
var i__9460_9489 = 0;
while (true) {
if (i__9460_9489 < count__9459_9488) {
var x_9490__$1 = chunk__9458_9487.cljs$core$IIndexed$_nth$arity$2(null, i__9460_9489);
arr.push(x_9490__$1);
var G__9491 = seq__9457_9486;
var G__9492 = chunk__9458_9487;
var G__9493 = count__9459_9488;
var G__9494 = i__9460_9489 + 1;
seq__9457_9486 = G__9491;
chunk__9458_9487 = G__9492;
count__9459_9488 = G__9493;
i__9460_9489 = G__9494;
continue;
} else {
var temp__4425__auto___9495 = cljs.core.seq(seq__9457_9486);
if (temp__4425__auto___9495) {
var seq__9457_9496__$1 = temp__4425__auto___9495;
if (cljs.core.chunked_seq_QMARK_(seq__9457_9496__$1)) {
var c__5474__auto___9497 = cljs.core.chunk_first(seq__9457_9496__$1);
var G__9498 = cljs.core.chunk_rest(seq__9457_9496__$1);
var G__9499 = c__5474__auto___9497;
var G__9500 = cljs.core.count(c__5474__auto___9497);
var G__9501 = 0;
seq__9457_9486 = G__9498;
chunk__9458_9487 = G__9499;
count__9459_9488 = G__9500;
i__9460_9489 = G__9501;
continue;
} else {
var x_9502__$1 = cljs.core.first(seq__9457_9496__$1);
arr.push(x_9502__$1);
var G__9503 = cljs.core.next(seq__9457_9496__$1);
var G__9504 = null;
var G__9505 = 0;
var G__9506 = 0;
seq__9457_9486 = G__9503;
chunk__9458_9487 = G__9504;
count__9459_9488 = G__9505;
i__9460_9489 = G__9506;
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__5326__auto__ = x == null ? null : x;
var m__5327__auto__ = cljs.core._js__GT_clj[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(x, options) : m__5327__auto__.call(null, x, options);
} else {
var m__5327__auto____$1 = cljs.core._js__GT_clj["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(x, options) : m__5327__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 args9507 = [];
var len__5729__auto___9532 = arguments.length;
var i__5730__auto___9533 = 0;
while (true) {
if (i__5730__auto___9533 < len__5729__auto___9532) {
args9507.push(arguments[i__5730__auto___9533]);
var G__9534 = i__5730__auto___9533 + 1;
i__5730__auto___9533 = G__9534;
continue;
} else {
}
break;
}
var G__9511 = args9507.length;
switch(G__9511) {
case 1:
return cljs.core.js__GT_clj.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
default:
var argseq__5748__auto__ = new cljs.core.IndexedSeq(args9507.slice(1), 0);
return cljs.core.js__GT_clj.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5748__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__9512 = opts;
var map__9512__$1 = (!(map__9512 == null) ? map__9512.cljs$lang$protocol_mask$partition0$ & 64 || map__9512.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map, map__9512) : map__9512;
var keywordize_keys = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__9512__$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__9512, map__9512__$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__5443__auto__ = function(map__9512, map__9512__$1, keywordize_keys, keyfn) {
return function cljs$core$thisfn_$_iter__9526(s__9527) {
return new cljs.core.LazySeq(null, function(map__9512, map__9512__$1, keywordize_keys, keyfn) {
return function() {
var s__9527__$1 = s__9527;
while (true) {
var temp__4425__auto__ = cljs.core.seq(s__9527__$1);
if (temp__4425__auto__) {
var s__9527__$2 = temp__4425__auto__;
if (cljs.core.chunked_seq_QMARK_(s__9527__$2)) {
var c__5441__auto__ = cljs.core.chunk_first(s__9527__$2);
var size__5442__auto__ = cljs.core.count(c__5441__auto__);
var b__9529 = cljs.core.chunk_buffer(size__5442__auto__);
if (function() {
var i__9528 = 0;
while (true) {
if (i__9528 < size__5442__auto__) {
var k = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(c__5441__auto__, i__9528);
cljs.core.chunk_append(b__9529, 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__9536 = i__9528 + 1;
i__9528 = G__9536;
continue;
} else {
return true;
}
break;
}
}()) {
return cljs.core.chunk_cons(cljs.core.chunk(b__9529), cljs$core$thisfn_$_iter__9526(cljs.core.chunk_rest(s__9527__$2)));
} else {
return cljs.core.chunk_cons(cljs.core.chunk(b__9529), null);
}
} else {
var k = cljs.core.first(s__9527__$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__9526(cljs.core.rest(s__9527__$2)));
}
} else {
return null;
}
break;
}
};
}(map__9512, map__9512__$1, keywordize_keys, keyfn), null, null);
};
}(map__9512, map__9512__$1, keywordize_keys, keyfn);
return iter__5443__auto__(cljs.core.js_keys(x__$1));
}());
} else {
return x__$1;
}
}
}
}
}
};
}(map__9512, map__9512__$1, keywordize_keys, keyfn);
return f(x);
};
cljs.core.js__GT_clj.cljs$lang$applyTo = function(seq9508) {
var G__9509 = cljs.core.first(seq9508);
var seq9508__$1 = cljs.core.next(seq9508);
return cljs.core.js__GT_clj.cljs$core$IFn$_invoke$arity$variadic(G__9509, seq9508__$1);
};
cljs.core.js__GT_clj.cljs$lang$maxFixedArity = 1;
cljs.core.memoize = function cljs$core$memoize(f) {
var mem = function() {
var G__9538 = cljs.core.PersistentArrayMap.EMPTY;
return cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__9538) : cljs.core.atom.call(null, G__9538);
}();
return function(mem) {
return function() {
var G__9539__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__9539 = function(var_args) {
var args = null;
if (arguments.length > 0) {
var G__9540__i = 0, G__9540__a = new Array(arguments.length - 0);
while (G__9540__i < G__9540__a.length) {
G__9540__a[G__9540__i] = arguments[G__9540__i + 0];
++G__9540__i;
}
args = new cljs.core.IndexedSeq(G__9540__a, 0);
}
return G__9539__delegate.call(this, args);
};
G__9539.cljs$lang$maxFixedArity = 0;
G__9539.cljs$lang$applyTo = function(arglist__9541) {
var args = cljs.core.seq(arglist__9541);
return G__9539__delegate(args);
};
G__9539.cljs$core$IFn$_invoke$arity$variadic = G__9539__delegate;
return G__9539;
}();
}(mem);
};
cljs.core.trampoline = function cljs$core$trampoline(var_args) {
var args9542 = [];
var len__5729__auto___9547 = arguments.length;
var i__5730__auto___9548 = 0;
while (true) {
if (i__5730__auto___9548 < len__5729__auto___9547) {
args9542.push(arguments[i__5730__auto___9548]);
var G__9549 = i__5730__auto___9548 + 1;
i__5730__auto___9548 = G__9549;
continue;
} else {
}
break;
}
var G__9546 = args9542.length;
switch(G__9546) {
case 1:
return cljs.core.trampoline.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
default:
var argseq__5748__auto__ = new cljs.core.IndexedSeq(args9542.slice(1), 0);
return cljs.core.trampoline.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5748__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__9551 = ret;
f = G__9551;
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(seq9543) {
var G__9544 = cljs.core.first(seq9543);
var seq9543__$1 = cljs.core.next(seq9543);
return cljs.core.trampoline.cljs$core$IFn$_invoke$arity$variadic(G__9544, seq9543__$1);
};
cljs.core.trampoline.cljs$lang$maxFixedArity = 1;
cljs.core.rand = function cljs$core$rand(var_args) {
var args9552 = [];
var len__5729__auto___9555 = arguments.length;
var i__5730__auto___9556 = 0;
while (true) {
if (i__5730__auto___9556 < len__5729__auto___9555) {
args9552.push(arguments[i__5730__auto___9556]);
var G__9557 = i__5730__auto___9556 + 1;
i__5730__auto___9556 = G__9557;
continue;
} else {
}
break;
}
var G__9554 = args9552.length;
switch(G__9554) {
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(args9552.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__9560 = Math.random() * n;
return Math.floor(G__9560);
};
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__9562 = cljs.core.make_hierarchy();
return cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__9562) : cljs.core.atom.call(null, G__9562);
}();
} else {
}
return cljs.core._global_hierarchy;
};
cljs.core.swap_global_hierarchy_BANG_ = function cljs$core$swap_global_hierarchy_BANG_(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___9565 = arguments.length;
var i__5730__auto___9566 = 0;
while (true) {
if (i__5730__auto___9566 < len__5729__auto___9565) {
args__5736__auto__.push(arguments[i__5730__auto___9566]);
var G__9567 = i__5730__auto___9566 + 1;
i__5730__auto___9566 = G__9567;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return cljs.core.swap_global_hierarchy_BANG_.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__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(seq9563) {
var G__9564 = cljs.core.first(seq9563);
var seq9563__$1 = cljs.core.next(seq9563);
return cljs.core.swap_global_hierarchy_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__9564, seq9563__$1);
};
cljs.core.isa_QMARK_ = function cljs$core$isa_QMARK_(var_args) {
var args9568 = [];
var len__5729__auto___9572 = arguments.length;
var i__5730__auto___9573 = 0;
while (true) {
if (i__5730__auto___9573 < len__5729__auto___9572) {
args9568.push(arguments[i__5730__auto___9573]);
var G__9574 = i__5730__auto___9573 + 1;
i__5730__auto___9573 = G__9574;
continue;
} else {
}
break;
}
var G__9570 = args9568.length;
switch(G__9570) {
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(args9568.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__9571 = 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__9571) : cljs.core.deref.call(null, G__9571);
}(), child, parent);
};
cljs.core.isa_QMARK_.cljs$core$IFn$_invoke$arity$3 = function(h, child, parent) {
var or__4671__auto__ = cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(child, parent);
if (or__4671__auto__) {
return or__4671__auto__;
} else {
var or__4671__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__4671__auto____$1) {
return or__4671__auto____$1;
} else {
var and__4659__auto__ = cljs.core.vector_QMARK_(parent);
if (and__4659__auto__) {
var and__4659__auto____$1 = cljs.core.vector_QMARK_(child);
if (and__4659__auto____$1) {
var and__4659__auto____$2 = cljs.core.count(parent) === cljs.core.count(child);
if (and__4659__auto____$2) {
var ret = true;
var i = 0;
while (true) {
if (!ret || i === cljs.core.count(parent)) {
return ret;
} else {
var G__9576 = 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__9577 = i + 1;
ret = G__9576;
i = G__9577;
continue;
}
break;
}
} else {
return and__4659__auto____$2;
}
} else {
return and__4659__auto____$1;
}
} else {
return and__4659__auto__;
}
}
}
};
cljs.core.isa_QMARK_.cljs$lang$maxFixedArity = 3;
cljs.core.parents = function cljs$core$parents(var_args) {
var args9578 = [];
var len__5729__auto___9582 = arguments.length;
var i__5730__auto___9583 = 0;
while (true) {
if (i__5730__auto___9583 < len__5729__auto___9582) {
args9578.push(arguments[i__5730__auto___9583]);
var G__9584 = i__5730__auto___9583 + 1;
i__5730__auto___9583 = G__9584;
continue;
} else {
}
break;
}
var G__9580 = args9578.length;
switch(G__9580) {
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(args9578.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__9581 = 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__9581) : cljs.core.deref.call(null, G__9581);
}(), 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 args9586 = [];
var len__5729__auto___9590 = arguments.length;
var i__5730__auto___9591 = 0;
while (true) {
if (i__5730__auto___9591 < len__5729__auto___9590) {
args9586.push(arguments[i__5730__auto___9591]);
var G__9592 = i__5730__auto___9591 + 1;
i__5730__auto___9591 = G__9592;
continue;
} else {
}
break;
}
var G__9588 = args9586.length;
switch(G__9588) {
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(args9586.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__9589 = 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__9589) : cljs.core.deref.call(null, G__9589);
}(), 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 args9594 = [];
var len__5729__auto___9598 = arguments.length;
var i__5730__auto___9599 = 0;
while (true) {
if (i__5730__auto___9599 < len__5729__auto___9598) {
args9594.push(arguments[i__5730__auto___9599]);
var G__9600 = i__5730__auto___9599 + 1;
i__5730__auto___9599 = G__9600;
continue;
} else {
}
break;
}
var G__9596 = args9594.length;
switch(G__9596) {
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(args9594.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__9597 = 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__9597) : cljs.core.deref.call(null, G__9597);
}(), 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 args9602 = [];
var len__5729__auto___9605 = arguments.length;
var i__5730__auto___9606 = 0;
while (true) {
if (i__5730__auto___9606 < len__5729__auto___9605) {
args9602.push(arguments[i__5730__auto___9606]);
var G__9607 = i__5730__auto___9606 + 1;
i__5730__auto___9606 = G__9607;
continue;
} else {
}
break;
}
var G__9604 = args9602.length;
switch(G__9604) {
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(args9602.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__4671__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__4671__auto__)) {
return or__4671__auto__;
} else {
return h;
}
};
cljs.core.derive.cljs$lang$maxFixedArity = 3;
cljs.core.underive = function cljs$core$underive(var_args) {
var args9612 = [];
var len__5729__auto___9615 = arguments.length;
var i__5730__auto___9616 = 0;
while (true) {
if (i__5730__auto___9616 < len__5729__auto___9615) {
args9612.push(arguments[i__5730__auto___9616]);
var G__9617 = i__5730__auto___9616 + 1;
i__5730__auto___9616 = G__9617;
continue;
} else {
}
break;
}
var G__9614 = args9612.length;
switch(G__9614) {
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(args9612.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__9609_SHARP_) {
return cljs.core.cons(cljs.core.first(p1__9609_SHARP_), cljs.core.interpose.cljs$core$IFn$_invoke$arity$2(cljs.core.first(p1__9609_SHARP_), cljs.core.second(p1__9609_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__9610_SHARP_, p2__9611_SHARP_) {
return cljs.core.apply.cljs$core$IFn$_invoke$arity$3(cljs.core.derive, p1__9610_SHARP_, p2__9611_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__4671__auto__ = cljs.core.truth_(function() {
var and__4659__auto__ = xprefs;
if (cljs.core.truth_(and__4659__auto__)) {
return xprefs.cljs$core$IFn$_invoke$arity$1 ? xprefs.cljs$core$IFn$_invoke$arity$1(y) : xprefs.call(null, y);
} else {
return and__4659__auto__;
}
}()) ? true : null;
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
var or__4671__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__9631 = cljs.core.rest(ps);
ps = G__9631;
continue;
} else {
return null;
}
break;
}
}();
if (cljs.core.truth_(or__4671__auto____$1)) {
return or__4671__auto____$1;
} else {
var or__4671__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__9632 = cljs.core.rest(ps);
ps = G__9632;
continue;
} else {
return null;
}
break;
}
}();
if (cljs.core.truth_(or__4671__auto____$2)) {
return or__4671__auto____$2;
} else {
return false;
}
}
}
};
cljs.core.dominates = function cljs$core$dominates(x, y, prefer_table) {
var or__4671__auto__ = cljs.core.prefers_STAR_(x, y, prefer_table);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__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__9635) {
var vec__9636 = p__9635;
var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9636, 0, null);
var _ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9636, 1, null);
var e = vec__9636;
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__4671__auto__ = be == null;
if (or__4671__auto__) {
return or__4671__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__5326__auto__ = mf == null ? null : mf;
var m__5327__auto__ = cljs.core._reset[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(mf) : m__5327__auto__.call(null, mf);
} else {
var m__5327__auto____$1 = cljs.core._reset["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(mf) : m__5327__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__5326__auto__ = mf == null ? null : mf;
var m__5327__auto__ = cljs.core._add_method[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$3(mf, dispatch_val, method) : m__5327__auto__.call(null, mf, dispatch_val, method);
} else {
var m__5327__auto____$1 = cljs.core._add_method["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3(mf, dispatch_val, method) : m__5327__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__5326__auto__ = mf == null ? null : mf;
var m__5327__auto__ = cljs.core._remove_method[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(mf, dispatch_val) : m__5327__auto__.call(null, mf, dispatch_val);
} else {
var m__5327__auto____$1 = cljs.core._remove_method["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(mf, dispatch_val) : m__5327__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__5326__auto__ = mf == null ? null : mf;
var m__5327__auto__ = cljs.core._prefer_method[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$3(mf, dispatch_val, dispatch_val_y) : m__5327__auto__.call(null, mf, dispatch_val, dispatch_val_y);
} else {
var m__5327__auto____$1 = cljs.core._prefer_method["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$3(mf, dispatch_val, dispatch_val_y) : m__5327__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__5326__auto__ = mf == null ? null : mf;
var m__5327__auto__ = cljs.core._get_method[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$2(mf, dispatch_val) : m__5327__auto__.call(null, mf, dispatch_val);
} else {
var m__5327__auto____$1 = cljs.core._get_method["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$2(mf, dispatch_val) : m__5327__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__5326__auto__ = mf == null ? null : mf;
var m__5327__auto__ = cljs.core._methods[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(mf) : m__5327__auto__.call(null, mf);
} else {
var m__5327__auto____$1 = cljs.core._methods["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(mf) : m__5327__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__5326__auto__ = mf == null ? null : mf;
var m__5327__auto__ = cljs.core._prefers[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(mf) : m__5327__auto__.call(null, mf);
} else {
var m__5327__auto____$1 = cljs.core._prefers["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(mf) : m__5327__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__5326__auto__ = mf == null ? null : mf;
var m__5327__auto__ = cljs.core._default_dispatch_val[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(mf) : m__5327__auto__.call(null, mf);
} else {
var m__5327__auto____$1 = cljs.core._default_dispatch_val["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(mf) : m__5327__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__5326__auto__ = mf == null ? null : mf;
var m__5327__auto__ = cljs.core._dispatch_fn[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto__.cljs$core$IFn$_invoke$arity$1(mf) : m__5327__auto__.call(null, mf);
} else {
var m__5327__auto____$1 = cljs.core._dispatch_fn["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__5327__auto____$1.cljs$core$IFn$_invoke$arity$1(mf) : m__5327__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__9638 = null;
var G__9638__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__9638__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__9638__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__9638__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__9638__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__9638__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__9638__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__9638__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__9638__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__9638__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__9638__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__9638__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__9638__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__9638__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__9638__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__9638__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__9638__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__9638__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__9638__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__9638__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__9638__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__9638__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__9638 = 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__9638__1.call(this, self__);
case 2:
return G__9638__2.call(this, self__, a);
case 3:
return G__9638__3.call(this, self__, a, b);
case 4:
return G__9638__4.call(this, self__, a, b, c);
case 5:
return G__9638__5.call(this, self__, a, b, c, d);
case 6:
return G__9638__6.call(this, self__, a, b, c, d, e);
case 7:
return G__9638__7.call(this, self__, a, b, c, d, e, f);
case 8:
return G__9638__8.call(this, self__, a, b, c, d, e, f, g);
case 9:
return G__9638__9.call(this, self__, a, b, c, d, e, f, g, h);
case 10:
return G__9638__10.call(this, self__, a, b, c, d, e, f, g, h, i);
case 11:
return G__9638__11.call(this, self__, a, b, c, d, e, f, g, h, i, j);
case 12:
return G__9638__12.call(this, self__, a, b, c, d, e, f, g, h, i, j, k);
case 13:
return G__9638__13.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l);
case 14:
return G__9638__14.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m);
case 15:
return G__9638__15.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n);
case 16:
return G__9638__16.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
case 17:
return G__9638__17.call(this, self__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
case 18:
return G__9638__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__9638__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__9638__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__9638__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__9638__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__9638.cljs$core$IFn$_invoke$arity$1 = G__9638__1;
G__9638.cljs$core$IFn$_invoke$arity$2 = G__9638__2;
G__9638.cljs$core$IFn$_invoke$arity$3 = G__9638__3;
G__9638.cljs$core$IFn$_invoke$arity$4 = G__9638__4;
G__9638.cljs$core$IFn$_invoke$arity$5 = G__9638__5;
G__9638.cljs$core$IFn$_invoke$arity$6 = G__9638__6;
G__9638.cljs$core$IFn$_invoke$arity$7 = G__9638__7;
G__9638.cljs$core$IFn$_invoke$arity$8 = G__9638__8;
G__9638.cljs$core$IFn$_invoke$arity$9 = G__9638__9;
G__9638.cljs$core$IFn$_invoke$arity$10 = G__9638__10;
G__9638.cljs$core$IFn$_invoke$arity$11 = G__9638__11;
G__9638.cljs$core$IFn$_invoke$arity$12 = G__9638__12;
G__9638.cljs$core$IFn$_invoke$arity$13 = G__9638__13;
G__9638.cljs$core$IFn$_invoke$arity$14 = G__9638__14;
G__9638.cljs$core$IFn$_invoke$arity$15 = G__9638__15;
G__9638.cljs$core$IFn$_invoke$arity$16 = G__9638__16;
G__9638.cljs$core$IFn$_invoke$arity$17 = G__9638__17;
G__9638.cljs$core$IFn$_invoke$arity$18 = G__9638__18;
G__9638.cljs$core$IFn$_invoke$arity$19 = G__9638__19;
G__9638.cljs$core$IFn$_invoke$arity$20 = G__9638__20;
G__9638.cljs$core$IFn$_invoke$arity$21 = G__9638__21;
G__9638.cljs$core$IFn$_invoke$arity$22 = G__9638__22;
return G__9638;
}();
cljs.core.MultiFn.prototype.apply = function(self__, args9637) {
var self__ = this;
var self____$1 = this;
return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone(args9637)));
};
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__9639 = self__.uuid;
var G__9640 = other.uuid;
return goog.array.defaultCompare(G__9639, G__9640);
};
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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 args9641 = [];
var len__5729__auto___9644 = arguments.length;
var i__5730__auto___9645 = 0;
while (true) {
if (i__5730__auto___9645 < len__5729__auto___9644) {
args9641.push(arguments[i__5730__auto___9645]);
var G__9646 = i__5730__auto___9645 + 1;
i__5730__auto___9645 = G__9646;
continue;
} else {
}
break;
}
var G__9643 = args9641.length;
switch(G__9643) {
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(args9641.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__9648 = v instanceof cljs.core.Keyword ? v.fqn : null;
switch(G__9648) {
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__9650_SHARP_, p2__9651_SHARP_) {
goog.object.set(p1__9650_SHARP_, p2__9651_SHARP_, true);
return p1__9650_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__9654 = cljs.core.next(ks__$1);
var G__9655 = [cljs.core.str(function() {
var G__9653 = ret;
var G__9653__$1 = !(ret === "") ? [cljs.core.str(G__9653), cljs.core.str("|")].join("") : G__9653;
return G__9653__$1;
}()), cljs.core.str(cljs.core.first(ks__$1))].join("");
ks__$1 = G__9654;
ret = G__9655;
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_9656 = 0;
while (true) {
if (i_9656 < name.length) {
var c_9657 = name.charAt(i_9656);
var sub_9658 = goog.object.get(cljs.core.CHAR_MAP, c_9657);
if (!(sub_9658 == null)) {
sb.append(sub_9658);
} else {
sb.append(c_9657);
}
var G__9659 = i_9656 + 1;
i_9656 = G__9659;
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__9661 = match;
var x = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__9661, 0, null);
var G__9662 = [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__9663 = r.lastIndex;
ret = G__9662;
last_match_end = G__9663;
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write(writer__5270__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__9668 = function() {
var G__9666 = ctxt;
var G__9667 = cljs.core.first(xs);
return goog.object.get(G__9666, G__9667);
}();
var G__9669 = cljs.core.next(xs);
ctxt = G__9668;
xs = G__9669;
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__9673 = cljs.core._STAR_target_STAR_;
switch(G__9673) {
case "nodejs":
if (COMPILED) {
return cljs.core.find_ns_obj_STAR_(function() {
try {
var G__9675 = cljs.core.first(segs);
return eval(G__9675);
} catch (e9674) {
if (e9674 instanceof ReferenceError) {
var e = e9674;
return null;
} else {
throw e9674;
}
}
}(), 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 args9677 = [];
var len__5729__auto___9680 = arguments.length;
var i__5730__auto___9681 = 0;
while (true) {
if (i__5730__auto___9681 < len__5729__auto___9680) {
args9677.push(arguments[i__5730__auto___9681]);
var G__9682 = i__5730__auto___9681 + 1;
i__5730__auto___9681 = G__9682;
continue;
} else {
}
break;
}
var G__9679 = args9677.length;
switch(G__9679) {
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(args9677.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__9685 = cljs.core.PersistentArrayMap.EMPTY;
return cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__9685) : cljs.core.atom.call(null, G__9685);
}();
} 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__9687 = cljs.core.PersistentArrayMap.EMPTY;
return cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__9687) : cljs.core.atom.call(null, G__9687);
}();
} 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("goog.html.SafeScript");
goog.require("goog.asserts");
goog.require("goog.string.Const");
goog.require("goog.string.TypedString");
goog.html.SafeScript = function() {
this.privateDoNotAccessOrElseSafeScriptWrappedValue_ = "";
this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
};
goog.html.SafeScript.prototype.implementsGoogStringTypedString = true;
goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
goog.html.SafeScript.fromConstant = function(script) {
var scriptString = goog.string.Const.unwrap(script);
if (scriptString.length === 0) {
return goog.html.SafeScript.EMPTY;
}
return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(scriptString);
};
goog.html.SafeScript.prototype.getTypedStringValue = function() {
return this.privateDoNotAccessOrElseSafeScriptWrappedValue_;
};
if (goog.DEBUG) {
goog.html.SafeScript.prototype.toString = function() {
return "SafeScript{" + this.privateDoNotAccessOrElseSafeScriptWrappedValue_ + "}";
};
}
goog.html.SafeScript.unwrap = function(safeScript) {
if (safeScript instanceof goog.html.SafeScript && safeScript.constructor === goog.html.SafeScript && safeScript.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
return safeScript.privateDoNotAccessOrElseSafeScriptWrappedValue_;
} else {
goog.asserts.fail("expected object of type SafeScript, got '" + safeScript + "'");
return "type_error:SafeScript";
}
};
goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse = function(script) {
return (new goog.html.SafeScript).initSecurityPrivateDoNotAccessOrElse_(script);
};
goog.html.SafeScript.prototype.initSecurityPrivateDoNotAccessOrElse_ = function(script) {
this.privateDoNotAccessOrElseSafeScriptWrappedValue_ = script;
return this;
};
goog.html.SafeScript.EMPTY = goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse("");
goog.provide("goog.html.uncheckedconversions");
goog.require("goog.asserts");
goog.require("goog.html.SafeHtml");
goog.require("goog.html.SafeScript");
goog.require("goog.html.SafeStyle");
goog.require("goog.html.SafeStyleSheet");
goog.require("goog.html.SafeUrl");
goog.require("goog.html.TrustedResourceUrl");
goog.require("goog.string");
goog.require("goog.string.Const");
goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract = function(justification, html, opt_dir) {
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(html, opt_dir || null);
};
goog.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract = function(justification, script) {
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
goog.asserts.assert(!goog.string.isEmpty(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(script);
};
goog.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract = function(justification, style) {
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(style);
};
goog.html.uncheckedconversions.safeStyleSheetFromStringKnownToSatisfyTypeContract = function(justification, styleSheet) {
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(styleSheet);
};
goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract = function(justification, url) {
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(url);
};
goog.html.uncheckedconversions.trustedResourceUrlFromStringKnownToSatisfyTypeContract = function(justification, url) {
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(url);
};
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.structs.Collection");
goog.structs.Collection = function() {
};
goog.structs.Collection.prototype.add;
goog.structs.Collection.prototype.remove;
goog.structs.Collection.prototype.contains;
goog.structs.Collection.prototype.getCount;
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.structs.Set");
goog.require("goog.structs");
goog.require("goog.structs.Collection");
goog.require("goog.structs.Map");
goog.structs.Set = function(opt_values) {
this.map_ = new goog.structs.Map;
if (opt_values) {
this.addAll(opt_values);
}
};
goog.structs.Set.getKey_ = function(val) {
var type = typeof val;
if (type == "object" && val || type == "function") {
return "o" + goog.getUid((val));
} else {
return type.substr(0, 1) + val;
}
};
goog.structs.Set.prototype.getCount = function() {
return this.map_.getCount();
};
goog.structs.Set.prototype.add = function(element) {
this.map_.set(goog.structs.Set.getKey_(element), element);
};
goog.structs.Set.prototype.addAll = function(col) {
var values = goog.structs.getValues(col);
var l = values.length;
for (var i = 0;i < l;i++) {
this.add(values[i]);
}
};
goog.structs.Set.prototype.removeAll = function(col) {
var values = goog.structs.getValues(col);
var l = values.length;
for (var i = 0;i < l;i++) {
this.remove(values[i]);
}
};
goog.structs.Set.prototype.remove = function(element) {
return this.map_.remove(goog.structs.Set.getKey_(element));
};
goog.structs.Set.prototype.clear = function() {
this.map_.clear();
};
goog.structs.Set.prototype.isEmpty = function() {
return this.map_.isEmpty();
};
goog.structs.Set.prototype.contains = function(element) {
return this.map_.containsKey(goog.structs.Set.getKey_(element));
};
goog.structs.Set.prototype.containsAll = function(col) {
return goog.structs.every(col, this.contains, this);
};
goog.structs.Set.prototype.intersection = function(col) {
var result = new goog.structs.Set;
var values = goog.structs.getValues(col);
for (var i = 0;i < values.length;i++) {
var value = values[i];
if (this.contains(value)) {
result.add(value);
}
}
return result;
};
goog.structs.Set.prototype.difference = function(col) {
var result = this.clone();
result.removeAll(col);
return result;
};
goog.structs.Set.prototype.getValues = function() {
return this.map_.getValues();
};
goog.structs.Set.prototype.clone = function() {
return new goog.structs.Set(this);
};
goog.structs.Set.prototype.equals = function(col) {
return this.getCount() == goog.structs.getCount(col) && this.isSubsetOf(col);
};
goog.structs.Set.prototype.isSubsetOf = function(col) {
var colCount = goog.structs.getCount(col);
if (this.getCount() > colCount) {
return false;
}
if (!(col instanceof goog.structs.Set) && colCount > 5) {
col = new goog.structs.Set(col);
}
return goog.structs.every(this, function(value) {
return goog.structs.contains(col, value);
});
};
goog.structs.Set.prototype.__iterator__ = function(opt_keys) {
return this.map_.__iterator__(false);
};
goog.provide("goog.debug");
goog.require("goog.array");
goog.require("goog.html.SafeHtml");
goog.require("goog.html.SafeUrl");
goog.require("goog.html.uncheckedconversions");
goog.require("goog.string.Const");
goog.require("goog.structs.Set");
goog.require("goog.userAgent");
goog.define("goog.debug.LOGGING_ENABLED", goog.DEBUG);
goog.debug.catchErrors = function(logFunc, opt_cancel, opt_target) {
var target = opt_target || goog.global;
var oldErrorHandler = target.onerror;
var retVal = !!opt_cancel;
if (goog.userAgent.WEBKIT && !goog.userAgent.isVersionOrHigher("535.3")) {
retVal = !retVal;
}
target.onerror = function(message, url, line, opt_col, opt_error) {
if (oldErrorHandler) {
oldErrorHandler(message, url, line, opt_col, opt_error);
}
logFunc({message:message, fileName:url, line:line, col:opt_col, error:opt_error});
return retVal;
};
};
goog.debug.expose = function(obj, opt_showFn) {
if (typeof obj == "undefined") {
return "undefined";
}
if (obj == null) {
return "NULL";
}
var str = [];
for (var x in obj) {
if (!opt_showFn && goog.isFunction(obj[x])) {
continue;
}
var s = x + " \x3d ";
try {
s += obj[x];
} catch (e) {
s += "*** " + e + " ***";
}
str.push(s);
}
return str.join("\n");
};
goog.debug.deepExpose = function(obj, opt_showFn) {
var str = [];
var helper = function(obj, space, parentSeen) {
var nestspace = space + " ";
var seen = new goog.structs.Set(parentSeen);
var indentMultiline = function(str) {
return str.replace(/\n/g, "\n" + space);
};
try {
if (!goog.isDef(obj)) {
str.push("undefined");
} else {
if (goog.isNull(obj)) {
str.push("NULL");
} else {
if (goog.isString(obj)) {
str.push('"' + indentMultiline(obj) + '"');
} else {
if (goog.isFunction(obj)) {
str.push(indentMultiline(String(obj)));
} else {
if (goog.isObject(obj)) {
if (seen.contains(obj)) {
str.push("*** reference loop detected ***");
} else {
seen.add(obj);
str.push("{");
for (var x in obj) {
if (!opt_showFn && goog.isFunction(obj[x])) {
continue;
}
str.push("\n");
str.push(nestspace);
str.push(x + " \x3d ");
helper(obj[x], nestspace, seen);
}
str.push("\n" + space + "}");
}
} else {
str.push(obj);
}
}
}
}
}
} catch (e) {
str.push("*** " + e + " ***");
}
};
helper(obj, "", new goog.structs.Set);
return str.join("");
};
goog.debug.exposeArray = function(arr) {
var str = [];
for (var i = 0;i < arr.length;i++) {
if (goog.isArray(arr[i])) {
str.push(goog.debug.exposeArray(arr[i]));
} else {
str.push(arr[i]);
}
}
return "[ " + str.join(", ") + " ]";
};
goog.debug.exposeException = function(err, opt_fn) {
var html = goog.debug.exposeExceptionAsHtml(err, opt_fn);
return goog.html.SafeHtml.unwrap(html);
};
goog.debug.exposeExceptionAsHtml = function(err, opt_fn) {
try {
var e = goog.debug.normalizeErrorObject(err);
var viewSourceUrl = goog.debug.createViewSourceUrl_(e.fileName);
var error = goog.html.SafeHtml.concat(goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces("Message: " + e.message + "\nUrl: "), goog.html.SafeHtml.create("a", {href:viewSourceUrl, target:"_new"}, e.fileName), goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces("\nLine: " + e.lineNumber + "\n\nBrowser stack:\n" + e.stack + "-\x3e " + "[end]\n\nJS stack traversal:\n" + goog.debug.getStacktrace(opt_fn) + "-\x3e "));
return error;
} catch (e2) {
return goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces("Exception trying to expose exception! You win, we lose. " + e2);
}
};
goog.debug.createViewSourceUrl_ = function(opt_fileName) {
if (!goog.isDefAndNotNull(opt_fileName)) {
opt_fileName = "";
}
if (!/^https?:\/\//i.test(opt_fileName)) {
return goog.html.SafeUrl.fromConstant(goog.string.Const.from("sanitizedviewsrc"));
}
var sanitizedFileName = goog.html.SafeUrl.sanitize(opt_fileName);
return goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("view-source scheme plus HTTP/HTTPS URL"), "view-source:" + goog.html.SafeUrl.unwrap(sanitizedFileName));
};
goog.debug.normalizeErrorObject = function(err) {
var href = goog.getObjectByName("window.location.href");
if (goog.isString(err)) {
return {"message":err, "name":"Unknown error", "lineNumber":"Not available", "fileName":href, "stack":"Not available"};
}
var lineNumber, fileName;
var threwError = false;
try {
lineNumber = err.lineNumber || err.line || "Not available";
} catch (e) {
lineNumber = "Not available";
threwError = true;
}
try {
fileName = err.fileName || err.filename || err.sourceURL || goog.global["$googDebugFname"] || href;
} catch (e) {
fileName = "Not available";
threwError = true;
}
if (threwError || !err.lineNumber || !err.fileName || !err.stack || !err.message || !err.name) {
return {"message":err.message || "Not available", "name":err.name || "UnknownError", "lineNumber":lineNumber, "fileName":fileName, "stack":err.stack || "Not available"};
}
return err;
};
goog.debug.enhanceError = function(err, opt_message) {
var error;
if (typeof err == "string") {
error = Error(err);
if (Error.captureStackTrace) {
Error.captureStackTrace(error, goog.debug.enhanceError);
}
} else {
error = err;
}
if (!error.stack) {
error.stack = goog.debug.getStacktrace(goog.debug.enhanceError);
}
if (opt_message) {
var x = 0;
while (error["message" + x]) {
++x;
}
error["message" + x] = String(opt_message);
}
return error;
};
goog.debug.getStacktraceSimple = function(opt_depth) {
if (goog.STRICT_MODE_COMPATIBLE) {
var stack = goog.debug.getNativeStackTrace_(goog.debug.getStacktraceSimple);
if (stack) {
return stack;
}
}
var sb = [];
var fn = arguments.callee.caller;
var depth = 0;
while (fn && (!opt_depth || depth < opt_depth)) {
sb.push(goog.debug.getFunctionName(fn));
sb.push("()\n");
try {
fn = fn.caller;
} catch (e) {
sb.push("[exception trying to get caller]\n");
break;
}
depth++;
if (depth >= goog.debug.MAX_STACK_DEPTH) {
sb.push("[...long stack...]");
break;
}
}
if (opt_depth && depth >= opt_depth) {
sb.push("[...reached max depth limit...]");
} else {
sb.push("[end]");
}
return sb.join("");
};
goog.debug.MAX_STACK_DEPTH = 50;
goog.debug.getNativeStackTrace_ = function(fn) {
var tempErr = new Error;
if (Error.captureStackTrace) {
Error.captureStackTrace(tempErr, fn);
return String(tempErr.stack);
} else {
try {
throw tempErr;
} catch (e) {
tempErr = e;
}
var stack = tempErr.stack;
if (stack) {
return String(stack);
}
}
return null;
};
goog.debug.getStacktrace = function(opt_fn) {
var stack;
if (goog.STRICT_MODE_COMPATIBLE) {
var contextFn = opt_fn || goog.debug.getStacktrace;
stack = goog.debug.getNativeStackTrace_(contextFn);
}
if (!stack) {
stack = goog.debug.getStacktraceHelper_(opt_fn || arguments.callee.caller, []);
}
return stack;
};
goog.debug.getStacktraceHelper_ = function(fn, visited) {
var sb = [];
if (goog.array.contains(visited, fn)) {
sb.push("[...circular reference...]");
} else {
if (fn && visited.length < goog.debug.MAX_STACK_DEPTH) {
sb.push(goog.debug.getFunctionName(fn) + "(");
var args = fn.arguments;
for (var i = 0;args && i < args.length;i++) {
if (i > 0) {
sb.push(", ");
}
var argDesc;
var arg = args[i];
switch(typeof arg) {
case "object":
argDesc = arg ? "object" : "null";
break;
case "string":
argDesc = arg;
break;
case "number":
argDesc = String(arg);
break;
case "boolean":
argDesc = arg ? "true" : "false";
break;
case "function":
argDesc = goog.debug.getFunctionName(arg);
argDesc = argDesc ? argDesc : "[fn]";
break;
case "undefined":
;
default:
argDesc = typeof arg;
break;
}
if (argDesc.length > 40) {
argDesc = argDesc.substr(0, 40) + "...";
}
sb.push(argDesc);
}
visited.push(fn);
sb.push(")\n");
try {
sb.push(goog.debug.getStacktraceHelper_(fn.caller, visited));
} catch (e) {
sb.push("[exception trying to get caller]\n");
}
} else {
if (fn) {
sb.push("[...long stack...]");
} else {
sb.push("[end]");
}
}
}
return sb.join("");
};
goog.debug.setFunctionResolver = function(resolver) {
goog.debug.fnNameResolver_ = resolver;
};
goog.debug.getFunctionName = function(fn) {
if (goog.debug.fnNameCache_[fn]) {
return goog.debug.fnNameCache_[fn];
}
if (goog.debug.fnNameResolver_) {
var name = goog.debug.fnNameResolver_(fn);
if (name) {
goog.debug.fnNameCache_[fn] = name;
return name;
}
}
var functionSource = String(fn);
if (!goog.debug.fnNameCache_[functionSource]) {
var matches = /function ([^\(]+)/.exec(functionSource);
if (matches) {
var method = matches[1];
goog.debug.fnNameCache_[functionSource] = method;
} else {
goog.debug.fnNameCache_[functionSource] = "[Anonymous]";
}
}
return goog.debug.fnNameCache_[functionSource];
};
goog.debug.makeWhitespaceVisible = function(string) {
return string.replace(/ /g, "[_]").replace(/\f/g, "[f]").replace(/\n/g, "[n]\n").replace(/\r/g, "[r]").replace(/\t/g, "[t]");
};
goog.debug.runtimeType = 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.debug.fnNameCache_ = {};
goog.debug.fnNameResolver_;
goog.provide("goog.debug.LogRecord");
goog.debug.LogRecord = function(level, msg, loggerName, opt_time, opt_sequenceNumber) {
this.reset(level, msg, loggerName, opt_time, opt_sequenceNumber);
};
goog.debug.LogRecord.prototype.time_;
goog.debug.LogRecord.prototype.level_;
goog.debug.LogRecord.prototype.msg_;
goog.debug.LogRecord.prototype.loggerName_;
goog.debug.LogRecord.prototype.sequenceNumber_ = 0;
goog.debug.LogRecord.prototype.exception_ = null;
goog.define("goog.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS", true);
goog.debug.LogRecord.nextSequenceNumber_ = 0;
goog.debug.LogRecord.prototype.reset = function(level, msg, loggerName, opt_time, opt_sequenceNumber) {
if (goog.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS) {
this.sequenceNumber_ = typeof opt_sequenceNumber == "number" ? opt_sequenceNumber : goog.debug.LogRecord.nextSequenceNumber_++;
}
this.time_ = opt_time || goog.now();
this.level_ = level;
this.msg_ = msg;
this.loggerName_ = loggerName;
delete this.exception_;
};
goog.debug.LogRecord.prototype.getLoggerName = function() {
return this.loggerName_;
};
goog.debug.LogRecord.prototype.getException = function() {
return this.exception_;
};
goog.debug.LogRecord.prototype.setException = function(exception) {
this.exception_ = exception;
};
goog.debug.LogRecord.prototype.setLoggerName = function(loggerName) {
this.loggerName_ = loggerName;
};
goog.debug.LogRecord.prototype.getLevel = function() {
return this.level_;
};
goog.debug.LogRecord.prototype.setLevel = function(level) {
this.level_ = level;
};
goog.debug.LogRecord.prototype.getMessage = function() {
return this.msg_;
};
goog.debug.LogRecord.prototype.setMessage = function(msg) {
this.msg_ = msg;
};
goog.debug.LogRecord.prototype.getMillis = function() {
return this.time_;
};
goog.debug.LogRecord.prototype.setMillis = function(time) {
this.time_ = time;
};
goog.debug.LogRecord.prototype.getSequenceNumber = function() {
return this.sequenceNumber_;
};
goog.provide("goog.debug.LogBuffer");
goog.require("goog.asserts");
goog.require("goog.debug.LogRecord");
goog.debug.LogBuffer = function() {
goog.asserts.assert(goog.debug.LogBuffer.isBufferingEnabled(), "Cannot use goog.debug.LogBuffer without defining " + "goog.debug.LogBuffer.CAPACITY.");
this.clear();
};
goog.debug.LogBuffer.getInstance = function() {
if (!goog.debug.LogBuffer.instance_) {
goog.debug.LogBuffer.instance_ = new goog.debug.LogBuffer;
}
return goog.debug.LogBuffer.instance_;
};
goog.define("goog.debug.LogBuffer.CAPACITY", 0);
goog.debug.LogBuffer.prototype.buffer_;
goog.debug.LogBuffer.prototype.curIndex_;
goog.debug.LogBuffer.prototype.isFull_;
goog.debug.LogBuffer.prototype.addRecord = function(level, msg, loggerName) {
var curIndex = (this.curIndex_ + 1) % goog.debug.LogBuffer.CAPACITY;
this.curIndex_ = curIndex;
if (this.isFull_) {
var ret = this.buffer_[curIndex];
ret.reset(level, msg, loggerName);
return ret;
}
this.isFull_ = curIndex == goog.debug.LogBuffer.CAPACITY - 1;
return this.buffer_[curIndex] = new goog.debug.LogRecord(level, msg, loggerName);
};
goog.debug.LogBuffer.isBufferingEnabled = function() {
return goog.debug.LogBuffer.CAPACITY > 0;
};
goog.debug.LogBuffer.prototype.clear = function() {
this.buffer_ = new Array(goog.debug.LogBuffer.CAPACITY);
this.curIndex_ = -1;
this.isFull_ = false;
};
goog.debug.LogBuffer.prototype.forEachRecord = function(func) {
var buffer = this.buffer_;
if (!buffer[0]) {
return;
}
var curIndex = this.curIndex_;
var i = this.isFull_ ? curIndex : -1;
do {
i = (i + 1) % goog.debug.LogBuffer.CAPACITY;
func((buffer[i]));
} while (i != curIndex);
};
goog.provide("goog.debug.LogManager");
goog.provide("goog.debug.Loggable");
goog.provide("goog.debug.Logger");
goog.provide("goog.debug.Logger.Level");
goog.require("goog.array");
goog.require("goog.asserts");
goog.require("goog.debug");
goog.require("goog.debug.LogBuffer");
goog.require("goog.debug.LogRecord");
goog.debug.Loggable;
goog.debug.Logger = function(name) {
this.name_ = name;
this.parent_ = null;
this.level_ = null;
this.children_ = null;
this.handlers_ = null;
};
goog.debug.Logger.ROOT_LOGGER_NAME = "";
goog.define("goog.debug.Logger.ENABLE_HIERARCHY", true);
if (!goog.debug.Logger.ENABLE_HIERARCHY) {
goog.debug.Logger.rootHandlers_ = [];
goog.debug.Logger.rootLevel_;
}
goog.debug.Logger.Level = function(name, value) {
this.name = name;
this.value = value;
};
goog.debug.Logger.Level.prototype.toString = function() {
return this.name;
};
goog.debug.Logger.Level.OFF = new goog.debug.Logger.Level("OFF", Infinity);
goog.debug.Logger.Level.SHOUT = new goog.debug.Logger.Level("SHOUT", 1200);
goog.debug.Logger.Level.SEVERE = new goog.debug.Logger.Level("SEVERE", 1E3);
goog.debug.Logger.Level.WARNING = new goog.debug.Logger.Level("WARNING", 900);
goog.debug.Logger.Level.INFO = new goog.debug.Logger.Level("INFO", 800);
goog.debug.Logger.Level.CONFIG = new goog.debug.Logger.Level("CONFIG", 700);
goog.debug.Logger.Level.FINE = new goog.debug.Logger.Level("FINE", 500);
goog.debug.Logger.Level.FINER = new goog.debug.Logger.Level("FINER", 400);
goog.debug.Logger.Level.FINEST = new goog.debug.Logger.Level("FINEST", 300);
goog.debug.Logger.Level.ALL = new goog.debug.Logger.Level("ALL", 0);
goog.debug.Logger.Level.PREDEFINED_LEVELS = [goog.debug.Logger.Level.OFF, goog.debug.Logger.Level.SHOUT, goog.debug.Logger.Level.SEVERE, goog.debug.Logger.Level.WARNING, goog.debug.Logger.Level.INFO, goog.debug.Logger.Level.CONFIG, goog.debug.Logger.Level.FINE, goog.debug.Logger.Level.FINER, goog.debug.Logger.Level.FINEST, goog.debug.Logger.Level.ALL];
goog.debug.Logger.Level.predefinedLevelsCache_ = null;
goog.debug.Logger.Level.createPredefinedLevelsCache_ = function() {
goog.debug.Logger.Level.predefinedLevelsCache_ = {};
for (var i = 0, level;level = goog.debug.Logger.Level.PREDEFINED_LEVELS[i];i++) {
goog.debug.Logger.Level.predefinedLevelsCache_[level.value] = level;
goog.debug.Logger.Level.predefinedLevelsCache_[level.name] = level;
}
};
goog.debug.Logger.Level.getPredefinedLevel = function(name) {
if (!goog.debug.Logger.Level.predefinedLevelsCache_) {
goog.debug.Logger.Level.createPredefinedLevelsCache_();
}
return goog.debug.Logger.Level.predefinedLevelsCache_[name] || null;
};
goog.debug.Logger.Level.getPredefinedLevelByValue = function(value) {
if (!goog.debug.Logger.Level.predefinedLevelsCache_) {
goog.debug.Logger.Level.createPredefinedLevelsCache_();
}
if (value in goog.debug.Logger.Level.predefinedLevelsCache_) {
return goog.debug.Logger.Level.predefinedLevelsCache_[value];
}
for (var i = 0;i < goog.debug.Logger.Level.PREDEFINED_LEVELS.length;++i) {
var level = goog.debug.Logger.Level.PREDEFINED_LEVELS[i];
if (level.value <= value) {
return level;
}
}
return null;
};
goog.debug.Logger.getLogger = function(name) {
return goog.debug.LogManager.getLogger(name);
};
goog.debug.Logger.logToProfilers = function(msg) {
if (goog.global["console"]) {
if (goog.global["console"]["timeStamp"]) {
goog.global["console"]["timeStamp"](msg);
} else {
if (goog.global["console"]["markTimeline"]) {
goog.global["console"]["markTimeline"](msg);
}
}
}
if (goog.global["msWriteProfilerMark"]) {
goog.global["msWriteProfilerMark"](msg);
}
};
goog.debug.Logger.prototype.getName = function() {
return this.name_;
};
goog.debug.Logger.prototype.addHandler = function(handler) {
if (goog.debug.LOGGING_ENABLED) {
if (goog.debug.Logger.ENABLE_HIERARCHY) {
if (!this.handlers_) {
this.handlers_ = [];
}
this.handlers_.push(handler);
} else {
goog.asserts.assert(!this.name_, "Cannot call addHandler on a non-root logger when " + "goog.debug.Logger.ENABLE_HIERARCHY is false.");
goog.debug.Logger.rootHandlers_.push(handler);
}
}
};
goog.debug.Logger.prototype.removeHandler = function(handler) {
if (goog.debug.LOGGING_ENABLED) {
var handlers = goog.debug.Logger.ENABLE_HIERARCHY ? this.handlers_ : goog.debug.Logger.rootHandlers_;
return !!handlers && goog.array.remove(handlers, handler);
} else {
return false;
}
};
goog.debug.Logger.prototype.getParent = function() {
return this.parent_;
};
goog.debug.Logger.prototype.getChildren = function() {
if (!this.children_) {
this.children_ = {};
}
return this.children_;
};
goog.debug.Logger.prototype.setLevel = function(level) {
if (goog.debug.LOGGING_ENABLED) {
if (goog.debug.Logger.ENABLE_HIERARCHY) {
this.level_ = level;
} else {
goog.asserts.assert(!this.name_, "Cannot call setLevel() on a non-root logger when " + "goog.debug.Logger.ENABLE_HIERARCHY is false.");
goog.debug.Logger.rootLevel_ = level;
}
}
};
goog.debug.Logger.prototype.getLevel = function() {
return goog.debug.LOGGING_ENABLED ? this.level_ : goog.debug.Logger.Level.OFF;
};
goog.debug.Logger.prototype.getEffectiveLevel = function() {
if (!goog.debug.LOGGING_ENABLED) {
return goog.debug.Logger.Level.OFF;
}
if (!goog.debug.Logger.ENABLE_HIERARCHY) {
return goog.debug.Logger.rootLevel_;
}
if (this.level_) {
return this.level_;
}
if (this.parent_) {
return this.parent_.getEffectiveLevel();
}
goog.asserts.fail("Root logger has no level set.");
return null;
};
goog.debug.Logger.prototype.isLoggable = function(level) {
return goog.debug.LOGGING_ENABLED && level.value >= this.getEffectiveLevel().value;
};
goog.debug.Logger.prototype.log = function(level, msg, opt_exception) {
if (goog.debug.LOGGING_ENABLED && this.isLoggable(level)) {
if (goog.isFunction(msg)) {
msg = msg();
}
this.doLogRecord_(this.getLogRecord(level, msg, opt_exception));
}
};
goog.debug.Logger.prototype.getLogRecord = function(level, msg, opt_exception) {
if (goog.debug.LogBuffer.isBufferingEnabled()) {
var logRecord = goog.debug.LogBuffer.getInstance().addRecord(level, msg, this.name_)
} else {
logRecord = new goog.debug.LogRecord(level, String(msg), this.name_);
}
if (opt_exception) {
logRecord.setException(opt_exception);
}
return logRecord;
};
goog.debug.Logger.prototype.shout = function(msg, opt_exception) {
if (goog.debug.LOGGING_ENABLED) {
this.log(goog.debug.Logger.Level.SHOUT, msg, opt_exception);
}
};
goog.debug.Logger.prototype.severe = function(msg, opt_exception) {
if (goog.debug.LOGGING_ENABLED) {
this.log(goog.debug.Logger.Level.SEVERE, msg, opt_exception);
}
};
goog.debug.Logger.prototype.warning = function(msg, opt_exception) {
if (goog.debug.LOGGING_ENABLED) {
this.log(goog.debug.Logger.Level.WARNING, msg, opt_exception);
}
};
goog.debug.Logger.prototype.info = function(msg, opt_exception) {
if (goog.debug.LOGGING_ENABLED) {
this.log(goog.debug.Logger.Level.INFO, msg, opt_exception);
}
};
goog.debug.Logger.prototype.config = function(msg, opt_exception) {
if (goog.debug.LOGGING_ENABLED) {
this.log(goog.debug.Logger.Level.CONFIG, msg, opt_exception);
}
};
goog.debug.Logger.prototype.fine = function(msg, opt_exception) {
if (goog.debug.LOGGING_ENABLED) {
this.log(goog.debug.Logger.Level.FINE, msg, opt_exception);
}
};
goog.debug.Logger.prototype.finer = function(msg, opt_exception) {
if (goog.debug.LOGGING_ENABLED) {
this.log(goog.debug.Logger.Level.FINER, msg, opt_exception);
}
};
goog.debug.Logger.prototype.finest = function(msg, opt_exception) {
if (goog.debug.LOGGING_ENABLED) {
this.log(goog.debug.Logger.Level.FINEST, msg, opt_exception);
}
};
goog.debug.Logger.prototype.logRecord = function(logRecord) {
if (goog.debug.LOGGING_ENABLED && this.isLoggable(logRecord.getLevel())) {
this.doLogRecord_(logRecord);
}
};
goog.debug.Logger.prototype.doLogRecord_ = function(logRecord) {
goog.debug.Logger.logToProfilers("log:" + logRecord.getMessage());
if (goog.debug.Logger.ENABLE_HIERARCHY) {
var target = this;
while (target) {
target.callPublish_(logRecord);
target = target.getParent();
}
} else {
for (var i = 0, handler;handler = goog.debug.Logger.rootHandlers_[i++];) {
handler(logRecord);
}
}
};
goog.debug.Logger.prototype.callPublish_ = function(logRecord) {
if (this.handlers_) {
for (var i = 0, handler;handler = this.handlers_[i];i++) {
handler(logRecord);
}
}
};
goog.debug.Logger.prototype.setParent_ = function(parent) {
this.parent_ = parent;
};
goog.debug.Logger.prototype.addChild_ = function(name, logger) {
this.getChildren()[name] = logger;
};
goog.debug.LogManager = {};
goog.debug.LogManager.loggers_ = {};
goog.debug.LogManager.rootLogger_ = null;
goog.debug.LogManager.initialize = function() {
if (!goog.debug.LogManager.rootLogger_) {
goog.debug.LogManager.rootLogger_ = new goog.debug.Logger(goog.debug.Logger.ROOT_LOGGER_NAME);
goog.debug.LogManager.loggers_[goog.debug.Logger.ROOT_LOGGER_NAME] = goog.debug.LogManager.rootLogger_;
goog.debug.LogManager.rootLogger_.setLevel(goog.debug.Logger.Level.CONFIG);
}
};
goog.debug.LogManager.getLoggers = function() {
return goog.debug.LogManager.loggers_;
};
goog.debug.LogManager.getRoot = function() {
goog.debug.LogManager.initialize();
return (goog.debug.LogManager.rootLogger_);
};
goog.debug.LogManager.getLogger = function(name) {
goog.debug.LogManager.initialize();
var ret = goog.debug.LogManager.loggers_[name];
return ret || goog.debug.LogManager.createLogger_(name);
};
goog.debug.LogManager.createFunctionForCatchErrors = function(opt_logger) {
return function(info) {
var logger = opt_logger || goog.debug.LogManager.getRoot();
logger.severe("Error: " + info.message + " (" + info.fileName + " @ Line: " + info.line + ")");
};
};
goog.debug.LogManager.createLogger_ = function(name) {
var logger = new goog.debug.Logger(name);
if (goog.debug.Logger.ENABLE_HIERARCHY) {
var lastDotIndex = name.lastIndexOf(".");
var parentName = name.substr(0, lastDotIndex);
var leafName = name.substr(lastDotIndex + 1);
var parentLogger = goog.debug.LogManager.getLogger(parentName);
parentLogger.addChild_(leafName, logger);
logger.setParent_(parentLogger);
}
goog.debug.LogManager.loggers_[name] = logger;
return logger;
};
goog.provide("goog.log");
goog.provide("goog.log.Level");
goog.provide("goog.log.LogRecord");
goog.provide("goog.log.Logger");
goog.require("goog.debug");
goog.require("goog.debug.LogManager");
goog.require("goog.debug.LogRecord");
goog.require("goog.debug.Logger");
goog.define("goog.log.ENABLED", goog.debug.LOGGING_ENABLED);
goog.log.ROOT_LOGGER_NAME = goog.debug.Logger.ROOT_LOGGER_NAME;
goog.log.Logger = goog.debug.Logger;
goog.log.Level = goog.debug.Logger.Level;
goog.log.LogRecord = goog.debug.LogRecord;
goog.log.getLogger = function(name, opt_level) {
if (goog.log.ENABLED) {
var logger = goog.debug.LogManager.getLogger(name);
if (opt_level && logger) {
logger.setLevel(opt_level);
}
return logger;
} else {
return null;
}
};
goog.log.addHandler = function(logger, handler) {
if (goog.log.ENABLED && logger) {
logger.addHandler(handler);
}
};
goog.log.removeHandler = function(logger, handler) {
if (goog.log.ENABLED && logger) {
return logger.removeHandler(handler);
} else {
return false;
}
};
goog.log.log = function(logger, level, msg, opt_exception) {
if (goog.log.ENABLED && logger) {
logger.log(level, msg, opt_exception);
}
};
goog.log.error = function(logger, msg, opt_exception) {
if (goog.log.ENABLED && logger) {
logger.severe(msg, opt_exception);
}
};
goog.log.warning = function(logger, msg, opt_exception) {
if (goog.log.ENABLED && logger) {
logger.warning(msg, opt_exception);
}
};
goog.log.info = function(logger, msg, opt_exception) {
if (goog.log.ENABLED && logger) {
logger.info(msg, opt_exception);
}
};
goog.log.fine = function(logger, msg, opt_exception) {
if (goog.log.ENABLED && logger) {
logger.fine(msg, opt_exception);
}
};
goog.provide("goog.net.xpc");
goog.provide("goog.net.xpc.CfgFields");
goog.provide("goog.net.xpc.ChannelStates");
goog.provide("goog.net.xpc.TransportNames");
goog.provide("goog.net.xpc.TransportTypes");
goog.provide("goog.net.xpc.UriCfgFields");
goog.require("goog.log");
goog.net.xpc.TransportTypes = {NATIVE_MESSAGING:1, FRAME_ELEMENT_METHOD:2, IFRAME_RELAY:3, IFRAME_POLLING:4, FLASH:5, NIX:6, DIRECT:7};
goog.net.xpc.TransportNames = {1:"NativeMessagingTransport", 2:"FrameElementMethodTransport", 3:"IframeRelayTransport", 4:"IframePollingTransport", 5:"FlashTransport", 6:"NixTransport", 7:"DirectTransport"};
goog.net.xpc.CfgFields = {CHANNEL_NAME:"cn", AUTH_TOKEN:"at", REMOTE_AUTH_TOKEN:"rat", PEER_URI:"pu", IFRAME_ID:"ifrid", TRANSPORT:"tp", LOCAL_RELAY_URI:"lru", PEER_RELAY_URI:"pru", LOCAL_POLL_URI:"lpu", PEER_POLL_URI:"ppu", PEER_HOSTNAME:"ph", ONE_SIDED_HANDSHAKE:"osh", ROLE:"role", NATIVE_TRANSPORT_PROTOCOL_VERSION:"nativeProtocolVersion", DIRECT_TRANSPORT_SYNC_MODE:"directSyncMode"};
goog.net.xpc.UriCfgFields = [goog.net.xpc.CfgFields.PEER_URI, goog.net.xpc.CfgFields.LOCAL_RELAY_URI, goog.net.xpc.CfgFields.PEER_RELAY_URI, goog.net.xpc.CfgFields.LOCAL_POLL_URI, goog.net.xpc.CfgFields.PEER_POLL_URI];
goog.net.xpc.ChannelStates = {NOT_CONNECTED:1, CONNECTED:2, CLOSED:3};
goog.net.xpc.TRANSPORT_SERVICE_ = "tp";
goog.net.xpc.SETUP = "SETUP";
goog.net.xpc.SETUP_NTPV2 = "SETUP_NTPV2";
goog.net.xpc.SETUP_ACK_ = "SETUP_ACK";
goog.net.xpc.SETUP_ACK_NTPV2 = "SETUP_ACK_NTPV2";
goog.net.xpc.channels = {};
goog.net.xpc.getRandomString = function(length, opt_characters) {
var chars = opt_characters || goog.net.xpc.randomStringCharacters_;
var charsLength = chars.length;
var s = "";
while (length-- > 0) {
s += chars.charAt(Math.floor(Math.random() * charsLength));
}
return s;
};
goog.net.xpc.randomStringCharacters_ = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
goog.net.xpc.logger = goog.log.getLogger("goog.net.xpc");
goog.provide("goog.Thenable");
goog.Thenable = function() {
};
goog.Thenable.prototype.then = function(opt_onFulfilled, opt_onRejected, opt_context) {
};
goog.Thenable.IMPLEMENTED_BY_PROP = "$goog_Thenable";
goog.Thenable.addImplementation = function(ctor) {
goog.exportProperty(ctor.prototype, "then", ctor.prototype.then);
if (COMPILED) {
ctor.prototype[goog.Thenable.IMPLEMENTED_BY_PROP] = true;
} else {
ctor.prototype.$goog_Thenable = true;
}
};
goog.Thenable.isImplementedBy = function(object) {
if (!object) {
return false;
}
try {
if (COMPILED) {
return !!object[goog.Thenable.IMPLEMENTED_BY_PROP];
}
return !!object.$goog_Thenable;
} catch (e) {
return false;
}
};
goog.provide("goog.async.FreeList");
goog.async.FreeList = goog.defineClass(null, {constructor:function(create, reset, limit) {
this.limit_ = limit;
this.create_ = create;
this.reset_ = reset;
this.occupants_ = 0;
this.head_ = null;
}, get:function() {
var item;
if (this.occupants_ > 0) {
this.occupants_--;
item = this.head_;
this.head_ = item.next;
item.next = null;
} else {
item = this.create_();
}
return item;
}, put:function(item) {
this.reset_(item);
if (this.occupants_ < this.limit_) {
this.occupants_++;
item.next = this.head_;
this.head_ = item;
}
}, occupants:function() {
return this.occupants_;
}});
goog.provide("goog.async.WorkItem");
goog.provide("goog.async.WorkQueue");
goog.require("goog.asserts");
goog.require("goog.async.FreeList");
goog.async.WorkQueue = function() {
this.workHead_ = null;
this.workTail_ = null;
};
goog.define("goog.async.WorkQueue.DEFAULT_MAX_UNUSED", 100);
goog.async.WorkQueue.freelist_ = new goog.async.FreeList(function() {
return new goog.async.WorkItem;
}, function(item) {
item.reset();
}, goog.async.WorkQueue.DEFAULT_MAX_UNUSED);
goog.async.WorkQueue.prototype.add = function(fn, scope) {
var item = this.getUnusedItem_();
item.set(fn, scope);
if (this.workTail_) {
this.workTail_.next = item;
this.workTail_ = item;
} else {
goog.asserts.assert(!this.workHead_);
this.workHead_ = item;
this.workTail_ = item;
}
};
goog.async.WorkQueue.prototype.remove = function() {
var item = null;
if (this.workHead_) {
item = this.workHead_;
this.workHead_ = this.workHead_.next;
if (!this.workHead_) {
this.workTail_ = null;
}
item.next = null;
}
return item;
};
goog.async.WorkQueue.prototype.returnUnused = function(item) {
goog.async.WorkQueue.freelist_.put(item);
};
goog.async.WorkQueue.prototype.getUnusedItem_ = function() {
return goog.async.WorkQueue.freelist_.get();
};
goog.async.WorkItem = function() {
this.fn = null;
this.scope = null;
this.next = null;
};
goog.async.WorkItem.prototype.set = function(fn, scope) {
this.fn = fn;
this.scope = scope;
this.next = null;
};
goog.async.WorkItem.prototype.reset = function() {
this.fn = null;
this.scope = null;
this.next = null;
};
goog.provide("goog.debug.EntryPointMonitor");
goog.provide("goog.debug.entryPointRegistry");
goog.require("goog.asserts");
goog.debug.EntryPointMonitor = function() {
};
goog.debug.EntryPointMonitor.prototype.wrap;
goog.debug.EntryPointMonitor.prototype.unwrap;
goog.debug.entryPointRegistry.refList_ = [];
goog.debug.entryPointRegistry.monitors_ = [];
goog.debug.entryPointRegistry.monitorsMayExist_ = false;
goog.debug.entryPointRegistry.register = function(callback) {
goog.debug.entryPointRegistry.refList_[goog.debug.entryPointRegistry.refList_.length] = callback;
if (goog.debug.entryPointRegistry.monitorsMayExist_) {
var monitors = goog.debug.entryPointRegistry.monitors_;
for (var i = 0;i < monitors.length;i++) {
callback(goog.bind(monitors[i].wrap, monitors[i]));
}
}
};
goog.debug.entryPointRegistry.monitorAll = function(monitor) {
goog.debug.entryPointRegistry.monitorsMayExist_ = true;
var transformer = goog.bind(monitor.wrap, monitor);
for (var i = 0;i < goog.debug.entryPointRegistry.refList_.length;i++) {
goog.debug.entryPointRegistry.refList_[i](transformer);
}
goog.debug.entryPointRegistry.monitors_.push(monitor);
};
goog.debug.entryPointRegistry.unmonitorAllIfPossible = function(monitor) {
var monitors = goog.debug.entryPointRegistry.monitors_;
goog.asserts.assert(monitor == monitors[monitors.length - 1], "Only the most recent monitor can be unwrapped.");
var transformer = goog.bind(monitor.unwrap, monitor);
for (var i = 0;i < goog.debug.entryPointRegistry.refList_.length;i++) {
goog.debug.entryPointRegistry.refList_[i](transformer);
}
monitors.length--;
};
goog.provide("goog.async.nextTick");
goog.provide("goog.async.throwException");
goog.require("goog.debug.entryPointRegistry");
goog.require("goog.dom.TagName");
goog.require("goog.functions");
goog.require("goog.labs.userAgent.browser");
goog.require("goog.labs.userAgent.engine");
goog.async.throwException = function(exception) {
goog.global.setTimeout(function() {
throw exception;
}, 0);
};
goog.async.nextTick = function(callback, opt_context, opt_useSetImmediate) {
var cb = callback;
if (opt_context) {
cb = goog.bind(callback, opt_context);
}
cb = goog.async.nextTick.wrapCallback_(cb);
if (goog.isFunction(goog.global.setImmediate) && (opt_useSetImmediate || !goog.global.Window || !goog.global.Window.prototype || goog.global.Window.prototype.setImmediate != goog.global.setImmediate)) {
goog.global.setImmediate(cb);
return;
}
if (!goog.async.nextTick.setImmediate_) {
goog.async.nextTick.setImmediate_ = goog.async.nextTick.getSetImmediateEmulator_();
}
goog.async.nextTick.setImmediate_(cb);
};
goog.async.nextTick.setImmediate_;
goog.async.nextTick.getSetImmediateEmulator_ = function() {
var Channel = goog.global["MessageChannel"];
if (typeof Channel === "undefined" && typeof window !== "undefined" && window.postMessage && window.addEventListener && !goog.labs.userAgent.engine.isPresto()) {
Channel = function() {
var iframe = document.createElement(goog.dom.TagName.IFRAME);
iframe.style.display = "none";
iframe.src = "";
document.documentElement.appendChild(iframe);
var win = iframe.contentWindow;
var doc = win.document;
doc.open();
doc.write("");
doc.close();
var message = "callImmediate" + Math.random();
var origin = win.location.protocol == "file:" ? "*" : win.location.protocol + "//" + win.location.host;
var onmessage = goog.bind(function(e) {
if (origin != "*" && e.origin != origin || e.data != message) {
return;
}
this["port1"].onmessage();
}, this);
win.addEventListener("message", onmessage, false);
this["port1"] = {};
this["port2"] = {postMessage:function() {
win.postMessage(message, origin);
}};
};
}
if (typeof Channel !== "undefined" && !goog.labs.userAgent.browser.isIE()) {
var channel = new Channel;
var head = {};
var tail = head;
channel["port1"].onmessage = function() {
if (goog.isDef(head.next)) {
head = head.next;
var cb = head.cb;
head.cb = null;
cb();
}
};
return function(cb) {
tail.next = {cb:cb};
tail = tail.next;
channel["port2"].postMessage(0);
};
}
if (typeof document !== "undefined" && "onreadystatechange" in document.createElement(goog.dom.TagName.SCRIPT)) {
return function(cb) {
var script = document.createElement(goog.dom.TagName.SCRIPT);
script.onreadystatechange = function() {
script.onreadystatechange = null;
script.parentNode.removeChild(script);
script = null;
cb();
cb = null;
};
document.documentElement.appendChild(script);
};
}
return function(cb) {
goog.global.setTimeout(cb, 0);
};
};
goog.async.nextTick.wrapCallback_ = goog.functions.identity;
goog.debug.entryPointRegistry.register(function(transformer) {
goog.async.nextTick.wrapCallback_ = transformer;
});
goog.provide("goog.async.run");
goog.require("goog.async.WorkQueue");
goog.require("goog.async.nextTick");
goog.require("goog.async.throwException");
goog.async.run = function(callback, opt_context) {
if (!goog.async.run.schedule_) {
goog.async.run.initializeRunner_();
}
if (!goog.async.run.workQueueScheduled_) {
goog.async.run.schedule_();
goog.async.run.workQueueScheduled_ = true;
}
goog.async.run.workQueue_.add(callback, opt_context);
};
goog.async.run.initializeRunner_ = function() {
if (goog.global.Promise && goog.global.Promise.resolve) {
var promise = goog.global.Promise.resolve(undefined);
goog.async.run.schedule_ = function() {
promise.then(goog.async.run.processWorkQueue);
};
} else {
goog.async.run.schedule_ = function() {
goog.async.nextTick(goog.async.run.processWorkQueue);
};
}
};
goog.async.run.forceNextTick = function(opt_realSetTimeout) {
goog.async.run.schedule_ = function() {
goog.async.nextTick(goog.async.run.processWorkQueue);
if (opt_realSetTimeout) {
opt_realSetTimeout(goog.async.run.processWorkQueue);
}
};
};
goog.async.run.schedule_;
goog.async.run.workQueueScheduled_ = false;
goog.async.run.workQueue_ = new goog.async.WorkQueue;
if (goog.DEBUG) {
goog.async.run.resetQueue = function() {
goog.async.run.workQueueScheduled_ = false;
goog.async.run.workQueue_ = new goog.async.WorkQueue;
};
}
goog.async.run.processWorkQueue = function() {
var item = null;
while (item = goog.async.run.workQueue_.remove()) {
try {
item.fn.call(item.scope);
} catch (e) {
goog.async.throwException(e);
}
goog.async.run.workQueue_.returnUnused(item);
}
goog.async.run.workQueueScheduled_ = false;
};
goog.provide("goog.promise.Resolver");
goog.promise.Resolver = function() {
};
goog.promise.Resolver.prototype.promise;
goog.promise.Resolver.prototype.resolve;
goog.promise.Resolver.prototype.reject;
goog.provide("goog.Promise");
goog.require("goog.Thenable");
goog.require("goog.asserts");
goog.require("goog.async.FreeList");
goog.require("goog.async.run");
goog.require("goog.async.throwException");
goog.require("goog.debug.Error");
goog.require("goog.promise.Resolver");
goog.Promise = function(resolver, opt_context) {
this.state_ = goog.Promise.State_.PENDING;
this.result_ = undefined;
this.parent_ = null;
this.callbackEntries_ = null;
this.callbackEntriesTail_ = null;
this.executing_ = false;
if (goog.Promise.UNHANDLED_REJECTION_DELAY > 0) {
this.unhandledRejectionId_ = 0;
} else {
if (goog.Promise.UNHANDLED_REJECTION_DELAY == 0) {
this.hadUnhandledRejection_ = false;
}
}
if (goog.Promise.LONG_STACK_TRACES) {
this.stack_ = [];
this.addStackTrace_(new Error("created"));
this.currentStep_ = 0;
}
if (resolver != goog.nullFunction) {
try {
var self = this;
resolver.call(opt_context, function(value) {
self.resolve_(goog.Promise.State_.FULFILLED, value);
}, function(reason) {
if (goog.DEBUG && !(reason instanceof goog.Promise.CancellationError)) {
try {
if (reason instanceof Error) {
throw reason;
} else {
throw new Error("Promise rejected.");
}
} catch (e) {
}
}
self.resolve_(goog.Promise.State_.REJECTED, reason);
});
} catch (e) {
this.resolve_(goog.Promise.State_.REJECTED, e);
}
}
};
goog.define("goog.Promise.LONG_STACK_TRACES", false);
goog.define("goog.Promise.UNHANDLED_REJECTION_DELAY", 0);
goog.Promise.State_ = {PENDING:0, BLOCKED:1, FULFILLED:2, REJECTED:3};
goog.Promise.CallbackEntry_ = function() {
this.child = null;
this.onFulfilled = null;
this.onRejected = null;
this.context = null;
this.next = null;
this.always = false;
};
goog.Promise.CallbackEntry_.prototype.reset = function() {
this.child = null;
this.onFulfilled = null;
this.onRejected = null;
this.context = null;
this.always = false;
};
goog.define("goog.Promise.DEFAULT_MAX_UNUSED", 100);
goog.Promise.freelist_ = new goog.async.FreeList(function() {
return new goog.Promise.CallbackEntry_;
}, function(item) {
item.reset();
}, goog.Promise.DEFAULT_MAX_UNUSED);
goog.Promise.getCallbackEntry_ = function(onFulfilled, onRejected, context) {
var entry = goog.Promise.freelist_.get();
entry.onFulfilled = onFulfilled;
entry.onRejected = onRejected;
entry.context = context;
return entry;
};
goog.Promise.returnEntry_ = function(entry) {
goog.Promise.freelist_.put(entry);
};
goog.Promise.resolve = function(opt_value) {
if (opt_value instanceof goog.Promise) {
return opt_value;
}
var promise = new goog.Promise(goog.nullFunction);
promise.resolve_(goog.Promise.State_.FULFILLED, opt_value);
return promise;
};
goog.Promise.reject = function(opt_reason) {
return new goog.Promise(function(resolve, reject) {
reject(opt_reason);
});
};
goog.Promise.resolveThen_ = function(value, onFulfilled, onRejected) {
var isThenable = goog.Promise.maybeThen_(value, onFulfilled, onRejected, null);
if (!isThenable) {
goog.async.run(goog.partial(onFulfilled, value));
}
};
goog.Promise.race = function(promises) {
return new goog.Promise(function(resolve, reject) {
if (!promises.length) {
resolve(undefined);
}
for (var i = 0, promise;i < promises.length;i++) {
promise = promises[i];
goog.Promise.resolveThen_(promise, resolve, reject);
}
});
};
goog.Promise.all = function(promises) {
return new goog.Promise(function(resolve, reject) {
var toFulfill = promises.length;
var values = [];
if (!toFulfill) {
resolve(values);
return;
}
var onFulfill = function(index, value) {
toFulfill--;
values[index] = value;
if (toFulfill == 0) {
resolve(values);
}
};
var onReject = function(reason) {
reject(reason);
};
for (var i = 0, promise;i < promises.length;i++) {
promise = promises[i];
goog.Promise.resolveThen_(promise, goog.partial(onFulfill, i), onReject);
}
});
};
goog.Promise.allSettled = function(promises) {
return new goog.Promise(function(resolve, reject) {
var toSettle = promises.length;
var results = [];
if (!toSettle) {
resolve(results);
return;
}
var onSettled = function(index, fulfilled, result) {
toSettle--;
results[index] = fulfilled ? {fulfilled:true, value:result} : {fulfilled:false, reason:result};
if (toSettle == 0) {
resolve(results);
}
};
for (var i = 0, promise;i < promises.length;i++) {
promise = promises[i];
goog.Promise.resolveThen_(promise, goog.partial(onSettled, i, true), goog.partial(onSettled, i, false));
}
});
};
goog.Promise.firstFulfilled = function(promises) {
return new goog.Promise(function(resolve, reject) {
var toReject = promises.length;
var reasons = [];
if (!toReject) {
resolve(undefined);
return;
}
var onFulfill = function(value) {
resolve(value);
};
var onReject = function(index, reason) {
toReject--;
reasons[index] = reason;
if (toReject == 0) {
reject(reasons);
}
};
for (var i = 0, promise;i < promises.length;i++) {
promise = promises[i];
goog.Promise.resolveThen_(promise, onFulfill, goog.partial(onReject, i));
}
});
};
goog.Promise.withResolver = function() {
var resolve, reject;
var promise = new goog.Promise(function(rs, rj) {
resolve = rs;
reject = rj;
});
return new goog.Promise.Resolver_(promise, resolve, reject);
};
goog.Promise.prototype.then = function(opt_onFulfilled, opt_onRejected, opt_context) {
if (opt_onFulfilled != null) {
goog.asserts.assertFunction(opt_onFulfilled, "opt_onFulfilled should be a function.");
}
if (opt_onRejected != null) {
goog.asserts.assertFunction(opt_onRejected, "opt_onRejected should be a function. Did you pass opt_context " + "as the second argument instead of the third?");
}
if (goog.Promise.LONG_STACK_TRACES) {
this.addStackTrace_(new Error("then"));
}
return this.addChildPromise_(goog.isFunction(opt_onFulfilled) ? opt_onFulfilled : null, goog.isFunction(opt_onRejected) ? opt_onRejected : null, opt_context);
};
goog.Thenable.addImplementation(goog.Promise);
goog.Promise.prototype.thenVoid = function(opt_onFulfilled, opt_onRejected, opt_context) {
if (opt_onFulfilled != null) {
goog.asserts.assertFunction(opt_onFulfilled, "opt_onFulfilled should be a function.");
}
if (opt_onRejected != null) {
goog.asserts.assertFunction(opt_onRejected, "opt_onRejected should be a function. Did you pass opt_context " + "as the second argument instead of the third?");
}
if (goog.Promise.LONG_STACK_TRACES) {
this.addStackTrace_(new Error("then"));
}
this.addCallbackEntry_(goog.Promise.getCallbackEntry_(opt_onFulfilled || goog.nullFunction, opt_onRejected || null, opt_context));
};
goog.Promise.prototype.thenAlways = function(onSettled, opt_context) {
if (goog.Promise.LONG_STACK_TRACES) {
this.addStackTrace_(new Error("thenAlways"));
}
var entry = goog.Promise.getCallbackEntry_(onSettled, onSettled, opt_context);
entry.always = true;
this.addCallbackEntry_(entry);
return this;
};
goog.Promise.prototype.thenCatch = function(onRejected, opt_context) {
if (goog.Promise.LONG_STACK_TRACES) {
this.addStackTrace_(new Error("thenCatch"));
}
return this.addChildPromise_(null, onRejected, opt_context);
};
goog.Promise.prototype.cancel = function(opt_message) {
if (this.state_ == goog.Promise.State_.PENDING) {
goog.async.run(function() {
var err = new goog.Promise.CancellationError(opt_message);
this.cancelInternal_(err);
}, this);
}
};
goog.Promise.prototype.cancelInternal_ = function(err) {
if (this.state_ == goog.Promise.State_.PENDING) {
if (this.parent_) {
this.parent_.cancelChild_(this, err);
this.parent_ = null;
} else {
this.resolve_(goog.Promise.State_.REJECTED, err);
}
}
};
goog.Promise.prototype.cancelChild_ = function(childPromise, err) {
if (!this.callbackEntries_) {
return;
}
var childCount = 0;
var childEntry = null;
var beforeChildEntry = null;
for (var entry = this.callbackEntries_;entry;entry = entry.next) {
if (!entry.always) {
childCount++;
if (entry.child == childPromise) {
childEntry = entry;
}
if (childEntry && childCount > 1) {
break;
}
}
if (!childEntry) {
beforeChildEntry = entry;
}
}
if (childEntry) {
if (this.state_ == goog.Promise.State_.PENDING && childCount == 1) {
this.cancelInternal_(err);
} else {
if (beforeChildEntry) {
this.removeEntryAfter_(beforeChildEntry);
} else {
this.popEntry_();
}
this.executeCallback_(childEntry, goog.Promise.State_.REJECTED, err);
}
}
};
goog.Promise.prototype.addCallbackEntry_ = function(callbackEntry) {
if (!this.hasEntry_() && (this.state_ == goog.Promise.State_.FULFILLED || this.state_ == goog.Promise.State_.REJECTED)) {
this.scheduleCallbacks_();
}
this.queueEntry_(callbackEntry);
};
goog.Promise.prototype.addChildPromise_ = function(onFulfilled, onRejected, opt_context) {
var callbackEntry = goog.Promise.getCallbackEntry_(null, null, null);
callbackEntry.child = new goog.Promise(function(resolve, reject) {
callbackEntry.onFulfilled = onFulfilled ? function(value) {
try {
var result = onFulfilled.call(opt_context, value);
resolve(result);
} catch (err) {
reject(err);
}
} : resolve;
callbackEntry.onRejected = onRejected ? function(reason) {
try {
var result = onRejected.call(opt_context, reason);
if (!goog.isDef(result) && reason instanceof goog.Promise.CancellationError) {
reject(reason);
} else {
resolve(result);
}
} catch (err) {
reject(err);
}
} : reject;
});
callbackEntry.child.parent_ = this;
this.addCallbackEntry_(callbackEntry);
return callbackEntry.child;
};
goog.Promise.prototype.unblockAndFulfill_ = function(value) {
goog.asserts.assert(this.state_ == goog.Promise.State_.BLOCKED);
this.state_ = goog.Promise.State_.PENDING;
this.resolve_(goog.Promise.State_.FULFILLED, value);
};
goog.Promise.prototype.unblockAndReject_ = function(reason) {
goog.asserts.assert(this.state_ == goog.Promise.State_.BLOCKED);
this.state_ = goog.Promise.State_.PENDING;
this.resolve_(goog.Promise.State_.REJECTED, reason);
};
goog.Promise.prototype.resolve_ = function(state, x) {
if (this.state_ != goog.Promise.State_.PENDING) {
return;
}
if (this == x) {
state = goog.Promise.State_.REJECTED;
x = new TypeError("Promise cannot resolve to itself");
}
this.state_ = goog.Promise.State_.BLOCKED;
var isThenable = goog.Promise.maybeThen_(x, this.unblockAndFulfill_, this.unblockAndReject_, this);
if (isThenable) {
return;
}
this.result_ = x;
this.state_ = state;
this.parent_ = null;
this.scheduleCallbacks_();
if (state == goog.Promise.State_.REJECTED && !(x instanceof goog.Promise.CancellationError)) {
goog.Promise.addUnhandledRejection_(this, x);
}
};
goog.Promise.maybeThen_ = function(value, onFulfilled, onRejected, context) {
if (value instanceof goog.Promise) {
value.thenVoid(onFulfilled, onRejected, context);
return true;
} else {
if (goog.Thenable.isImplementedBy(value)) {
value = (value);
value.then(onFulfilled, onRejected, context);
return true;
} else {
if (goog.isObject(value)) {
try {
var then = value["then"];
if (goog.isFunction(then)) {
goog.Promise.tryThen_(value, then, onFulfilled, onRejected, context);
return true;
}
} catch (e) {
onRejected.call(context, e);
return true;
}
}
}
}
return false;
};
goog.Promise.tryThen_ = function(thenable, then, onFulfilled, onRejected, context) {
var called = false;
var resolve = function(value) {
if (!called) {
called = true;
onFulfilled.call(context, value);
}
};
var reject = function(reason) {
if (!called) {
called = true;
onRejected.call(context, reason);
}
};
try {
then.call(thenable, resolve, reject);
} catch (e) {
reject(e);
}
};
goog.Promise.prototype.scheduleCallbacks_ = function() {
if (!this.executing_) {
this.executing_ = true;
goog.async.run(this.executeCallbacks_, this);
}
};
goog.Promise.prototype.hasEntry_ = function() {
return !!this.callbackEntries_;
};
goog.Promise.prototype.queueEntry_ = function(entry) {
goog.asserts.assert(entry.onFulfilled != null);
if (this.callbackEntriesTail_) {
this.callbackEntriesTail_.next = entry;
this.callbackEntriesTail_ = entry;
} else {
this.callbackEntries_ = entry;
this.callbackEntriesTail_ = entry;
}
};
goog.Promise.prototype.popEntry_ = function() {
var entry = null;
if (this.callbackEntries_) {
entry = this.callbackEntries_;
this.callbackEntries_ = entry.next;
entry.next = null;
}
if (!this.callbackEntries_) {
this.callbackEntriesTail_ = null;
}
if (entry != null) {
goog.asserts.assert(entry.onFulfilled != null);
}
return entry;
};
goog.Promise.prototype.removeEntryAfter_ = function(previous) {
goog.asserts.assert(this.callbackEntries_);
goog.asserts.assert(previous != null);
if (previous.next == this.callbackEntriesTail_) {
this.callbackEntriesTail_ = previous;
}
previous.next = previous.next.next;
};
goog.Promise.prototype.executeCallbacks_ = function() {
var entry = null;
while (entry = this.popEntry_()) {
if (goog.Promise.LONG_STACK_TRACES) {
this.currentStep_++;
}
this.executeCallback_(entry, this.state_, this.result_);
}
this.executing_ = false;
};
goog.Promise.prototype.executeCallback_ = function(callbackEntry, state, result) {
if (state == goog.Promise.State_.REJECTED && callbackEntry.onRejected && !callbackEntry.always) {
this.removeUnhandledRejection_();
}
if (callbackEntry.child) {
callbackEntry.child.parent_ = null;
goog.Promise.invokeCallback_(callbackEntry, state, result);
} else {
try {
callbackEntry.always ? callbackEntry.onFulfilled.call(callbackEntry.context) : goog.Promise.invokeCallback_(callbackEntry, state, result);
} catch (err) {
goog.Promise.handleRejection_.call(null, err);
}
}
goog.Promise.returnEntry_(callbackEntry);
};
goog.Promise.invokeCallback_ = function(callbackEntry, state, result) {
if (state == goog.Promise.State_.FULFILLED) {
callbackEntry.onFulfilled.call(callbackEntry.context, result);
} else {
if (callbackEntry.onRejected) {
callbackEntry.onRejected.call(callbackEntry.context, result);
}
}
};
goog.Promise.prototype.addStackTrace_ = function(err) {
if (goog.Promise.LONG_STACK_TRACES && goog.isString(err.stack)) {
var trace = err.stack.split("\n", 4)[3];
var message = err.message;
message += Array(11 - message.length).join(" ");
this.stack_.push(message + trace);
}
};
goog.Promise.prototype.appendLongStack_ = function(err) {
if (goog.Promise.LONG_STACK_TRACES && err && goog.isString(err.stack) && this.stack_.length) {
var longTrace = ["Promise trace:"];
for (var promise = this;promise;promise = promise.parent_) {
for (var i = this.currentStep_;i >= 0;i--) {
longTrace.push(promise.stack_[i]);
}
longTrace.push("Value: " + "[" + (promise.state_ == goog.Promise.State_.REJECTED ? "REJECTED" : "FULFILLED") + "] " + "\x3c" + String(promise.result_) + "\x3e");
}
err.stack += "\n\n" + longTrace.join("\n");
}
};
goog.Promise.prototype.removeUnhandledRejection_ = function() {
if (goog.Promise.UNHANDLED_REJECTION_DELAY > 0) {
for (var p = this;p && p.unhandledRejectionId_;p = p.parent_) {
goog.global.clearTimeout(p.unhandledRejectionId_);
p.unhandledRejectionId_ = 0;
}
} else {
if (goog.Promise.UNHANDLED_REJECTION_DELAY == 0) {
for (var p = this;p && p.hadUnhandledRejection_;p = p.parent_) {
p.hadUnhandledRejection_ = false;
}
}
}
};
goog.Promise.addUnhandledRejection_ = function(promise, reason) {
if (goog.Promise.UNHANDLED_REJECTION_DELAY > 0) {
promise.unhandledRejectionId_ = goog.global.setTimeout(function() {
promise.appendLongStack_(reason);
goog.Promise.handleRejection_.call(null, reason);
}, goog.Promise.UNHANDLED_REJECTION_DELAY);
} else {
if (goog.Promise.UNHANDLED_REJECTION_DELAY == 0) {
promise.hadUnhandledRejection_ = true;
goog.async.run(function() {
if (promise.hadUnhandledRejection_) {
promise.appendLongStack_(reason);
goog.Promise.handleRejection_.call(null, reason);
}
});
}
}
};
goog.Promise.handleRejection_ = goog.async.throwException;
goog.Promise.setUnhandledRejectionHandler = function(handler) {
goog.Promise.handleRejection_ = handler;
};
goog.Promise.CancellationError = function(opt_message) {
goog.Promise.CancellationError.base(this, "constructor", opt_message);
};
goog.inherits(goog.Promise.CancellationError, goog.debug.Error);
goog.Promise.CancellationError.prototype.name = "cancel";
goog.Promise.Resolver_ = function(promise, resolve, reject) {
this.promise = promise;
this.resolve = resolve;
this.reject = reject;
};
goog.provide("goog.disposable.IDisposable");
goog.disposable.IDisposable = function() {
};
goog.disposable.IDisposable.prototype.dispose = goog.abstractMethod;
goog.disposable.IDisposable.prototype.isDisposed = goog.abstractMethod;
goog.provide("goog.Disposable");
goog.provide("goog.dispose");
goog.provide("goog.disposeAll");
goog.require("goog.disposable.IDisposable");
goog.Disposable = function() {
if (goog.Disposable.MONITORING_MODE != goog.Disposable.MonitoringMode.OFF) {
if (goog.Disposable.INCLUDE_STACK_ON_CREATION) {
this.creationStack = (new Error).stack;
}
goog.Disposable.instances_[goog.getUid(this)] = this;
}
this.disposed_ = this.disposed_;
this.onDisposeCallbacks_ = this.onDisposeCallbacks_;
};
goog.Disposable.MonitoringMode = {OFF:0, PERMANENT:1, INTERACTIVE:2};
goog.define("goog.Disposable.MONITORING_MODE", 0);
goog.define("goog.Disposable.INCLUDE_STACK_ON_CREATION", true);
goog.Disposable.instances_ = {};
goog.Disposable.getUndisposedObjects = function() {
var ret = [];
for (var id in goog.Disposable.instances_) {
if (goog.Disposable.instances_.hasOwnProperty(id)) {
ret.push(goog.Disposable.instances_[Number(id)]);
}
}
return ret;
};
goog.Disposable.clearUndisposedObjects = function() {
goog.Disposable.instances_ = {};
};
goog.Disposable.prototype.disposed_ = false;
goog.Disposable.prototype.onDisposeCallbacks_;
goog.Disposable.prototype.creationStack;
goog.Disposable.prototype.isDisposed = function() {
return this.disposed_;
};
goog.Disposable.prototype.getDisposed = goog.Disposable.prototype.isDisposed;
goog.Disposable.prototype.dispose = function() {
if (!this.disposed_) {
this.disposed_ = true;
this.disposeInternal();
if (goog.Disposable.MONITORING_MODE != goog.Disposable.MonitoringMode.OFF) {
var uid = goog.getUid(this);
if (goog.Disposable.MONITORING_MODE == goog.Disposable.MonitoringMode.PERMANENT && !goog.Disposable.instances_.hasOwnProperty(uid)) {
throw Error(this + " did not call the goog.Disposable base " + "constructor or was disposed of after a clearUndisposedObjects " + "call");
}
delete goog.Disposable.instances_[uid];
}
}
};
goog.Disposable.prototype.registerDisposable = function(disposable) {
this.addOnDisposeCallback(goog.partial(goog.dispose, disposable));
};
goog.Disposable.prototype.addOnDisposeCallback = function(callback, opt_scope) {
if (this.disposed_) {
callback.call(opt_scope);
return;
}
if (!this.onDisposeCallbacks_) {
this.onDisposeCallbacks_ = [];
}
this.onDisposeCallbacks_.push(goog.isDef(opt_scope) ? goog.bind(callback, opt_scope) : callback);
};
goog.Disposable.prototype.disposeInternal = function() {
if (this.onDisposeCallbacks_) {
while (this.onDisposeCallbacks_.length) {
this.onDisposeCallbacks_.shift()();
}
}
};
goog.Disposable.isDisposed = function(obj) {
if (obj && typeof obj.isDisposed == "function") {
return obj.isDisposed();
}
return false;
};
goog.dispose = function(obj) {
if (obj && typeof obj.dispose == "function") {
obj.dispose();
}
};
goog.disposeAll = function(var_args) {
for (var i = 0, len = arguments.length;i < len;++i) {
var disposable = arguments[i];
if (goog.isArrayLike(disposable)) {
goog.disposeAll.apply(null, disposable);
} else {
goog.dispose(disposable);
}
}
};
goog.provide("goog.events.BrowserFeature");
goog.require("goog.userAgent");
goog.events.BrowserFeature = {HAS_W3C_BUTTON:!goog.userAgent.IE || goog.userAgent.isDocumentModeOrHigher(9), HAS_W3C_EVENT_SUPPORT:!goog.userAgent.IE || goog.userAgent.isDocumentModeOrHigher(9), SET_KEY_CODE_TO_PREVENT_DEFAULT:goog.userAgent.IE && !goog.userAgent.isVersionOrHigher("9"), HAS_NAVIGATOR_ONLINE_PROPERTY:!goog.userAgent.WEBKIT || goog.userAgent.isVersionOrHigher("528"), HAS_HTML5_NETWORK_EVENT_SUPPORT:goog.userAgent.GECKO && goog.userAgent.isVersionOrHigher("1.9b") || goog.userAgent.IE &&
goog.userAgent.isVersionOrHigher("8") || goog.userAgent.OPERA && goog.userAgent.isVersionOrHigher("9.5") || goog.userAgent.WEBKIT && goog.userAgent.isVersionOrHigher("528"), HTML5_NETWORK_EVENTS_FIRE_ON_BODY:goog.userAgent.GECKO && !goog.userAgent.isVersionOrHigher("8") || goog.userAgent.IE && !goog.userAgent.isVersionOrHigher("9"), TOUCH_ENABLED:"ontouchstart" in goog.global || !!(goog.global["document"] && document.documentElement && "ontouchstart" in document.documentElement) || !!(goog.global["navigator"] &&
goog.global["navigator"]["msMaxTouchPoints"])};
goog.provide("goog.events.EventId");
goog.events.EventId = function(eventId) {
this.id = eventId;
};
goog.events.EventId.prototype.toString = function() {
return this.id;
};
goog.provide("goog.events.Event");
goog.provide("goog.events.EventLike");
goog.require("goog.Disposable");
goog.require("goog.events.EventId");
goog.events.EventLike;
goog.events.Event = function(type, opt_target) {
this.type = type instanceof goog.events.EventId ? String(type) : type;
this.target = opt_target;
this.currentTarget = this.target;
this.propagationStopped_ = false;
this.defaultPrevented = false;
this.returnValue_ = true;
};
goog.events.Event.prototype.stopPropagation = function() {
this.propagationStopped_ = true;
};
goog.events.Event.prototype.preventDefault = function() {
this.defaultPrevented = true;
this.returnValue_ = false;
};
goog.events.Event.stopPropagation = function(e) {
e.stopPropagation();
};
goog.events.Event.preventDefault = function(e) {
e.preventDefault();
};
goog.provide("goog.events.EventType");
goog.require("goog.userAgent");
goog.events.getVendorPrefixedName_ = function(eventName) {
return goog.userAgent.WEBKIT ? "webkit" + eventName : goog.userAgent.OPERA ? "o" + eventName.toLowerCase() : eventName.toLowerCase();
};
goog.events.EventType = {CLICK:"click", RIGHTCLICK:"rightclick", DBLCLICK:"dblclick", MOUSEDOWN:"mousedown", MOUSEUP:"mouseup", MOUSEOVER:"mouseover", MOUSEOUT:"mouseout", MOUSEMOVE:"mousemove", MOUSEENTER:"mouseenter", MOUSELEAVE:"mouseleave", SELECTSTART:"selectstart", WHEEL:"wheel", KEYPRESS:"keypress", KEYDOWN:"keydown", KEYUP:"keyup", BLUR:"blur", FOCUS:"focus", DEACTIVATE:"deactivate", FOCUSIN:goog.userAgent.IE ? "focusin" : "DOMFocusIn", FOCUSOUT:goog.userAgent.IE ? "focusout" : "DOMFocusOut",
CHANGE:"change", RESET:"reset", SELECT:"select", SUBMIT:"submit", INPUT:"input", PROPERTYCHANGE:"propertychange", DRAGSTART:"dragstart", DRAG:"drag", DRAGENTER:"dragenter", DRAGOVER:"dragover", DRAGLEAVE:"dragleave", DROP:"drop", DRAGEND:"dragend", TOUCHSTART:"touchstart", TOUCHMOVE:"touchmove", TOUCHEND:"touchend", TOUCHCANCEL:"touchcancel", BEFOREUNLOAD:"beforeunload", CONSOLEMESSAGE:"consolemessage", CONTEXTMENU:"contextmenu", DOMCONTENTLOADED:"DOMContentLoaded", ERROR:"error", HELP:"help", LOAD:"load",
LOSECAPTURE:"losecapture", ORIENTATIONCHANGE:"orientationchange", READYSTATECHANGE:"readystatechange", RESIZE:"resize", SCROLL:"scroll", UNLOAD:"unload", HASHCHANGE:"hashchange", PAGEHIDE:"pagehide", PAGESHOW:"pageshow", POPSTATE:"popstate", COPY:"copy", PASTE:"paste", CUT:"cut", BEFORECOPY:"beforecopy", BEFORECUT:"beforecut", BEFOREPASTE:"beforepaste", ONLINE:"online", OFFLINE:"offline", MESSAGE:"message", CONNECT:"connect", ANIMATIONSTART:goog.events.getVendorPrefixedName_("AnimationStart"), ANIMATIONEND:goog.events.getVendorPrefixedName_("AnimationEnd"),
ANIMATIONITERATION:goog.events.getVendorPrefixedName_("AnimationIteration"), TRANSITIONEND:goog.events.getVendorPrefixedName_("TransitionEnd"), POINTERDOWN:"pointerdown", POINTERUP:"pointerup", POINTERCANCEL:"pointercancel", POINTERMOVE:"pointermove", POINTEROVER:"pointerover", POINTEROUT:"pointerout", POINTERENTER:"pointerenter", POINTERLEAVE:"pointerleave", GOTPOINTERCAPTURE:"gotpointercapture", LOSTPOINTERCAPTURE:"lostpointercapture", MSGESTURECHANGE:"MSGestureChange", MSGESTUREEND:"MSGestureEnd",
MSGESTUREHOLD:"MSGestureHold", MSGESTURESTART:"MSGestureStart", MSGESTURETAP:"MSGestureTap", MSGOTPOINTERCAPTURE:"MSGotPointerCapture", MSINERTIASTART:"MSInertiaStart", MSLOSTPOINTERCAPTURE:"MSLostPointerCapture", MSPOINTERCANCEL:"MSPointerCancel", MSPOINTERDOWN:"MSPointerDown", MSPOINTERENTER:"MSPointerEnter", MSPOINTERHOVER:"MSPointerHover", MSPOINTERLEAVE:"MSPointerLeave", MSPOINTERMOVE:"MSPointerMove", MSPOINTEROUT:"MSPointerOut", MSPOINTEROVER:"MSPointerOver", MSPOINTERUP:"MSPointerUp", TEXT:"text",
TEXTINPUT:"textInput", COMPOSITIONSTART:"compositionstart", COMPOSITIONUPDATE:"compositionupdate", COMPOSITIONEND:"compositionend", EXIT:"exit", LOADABORT:"loadabort", LOADCOMMIT:"loadcommit", LOADREDIRECT:"loadredirect", LOADSTART:"loadstart", LOADSTOP:"loadstop", RESPONSIVE:"responsive", SIZECHANGED:"sizechanged", UNRESPONSIVE:"unresponsive", VISIBILITYCHANGE:"visibilitychange", STORAGE:"storage", DOMSUBTREEMODIFIED:"DOMSubtreeModified", DOMNODEINSERTED:"DOMNodeInserted", DOMNODEREMOVED:"DOMNodeRemoved",
DOMNODEREMOVEDFROMDOCUMENT:"DOMNodeRemovedFromDocument", DOMNODEINSERTEDINTODOCUMENT:"DOMNodeInsertedIntoDocument", DOMATTRMODIFIED:"DOMAttrModified", DOMCHARACTERDATAMODIFIED:"DOMCharacterDataModified", BEFOREPRINT:"beforeprint", AFTERPRINT:"afterprint"};
goog.provide("goog.reflect");
goog.reflect.object = function(type, object) {
return object;
};
goog.reflect.sinkValue = function(x) {
goog.reflect.sinkValue[" "](x);
return x;
};
goog.reflect.sinkValue[" "] = goog.nullFunction;
goog.reflect.canAccessProperty = function(obj, prop) {
try {
goog.reflect.sinkValue(obj[prop]);
return true;
} catch (e) {
}
return false;
};
goog.provide("goog.events.BrowserEvent");
goog.provide("goog.events.BrowserEvent.MouseButton");
goog.require("goog.events.BrowserFeature");
goog.require("goog.events.Event");
goog.require("goog.events.EventType");
goog.require("goog.reflect");
goog.require("goog.userAgent");
goog.events.BrowserEvent = function(opt_e, opt_currentTarget) {
goog.events.BrowserEvent.base(this, "constructor", opt_e ? opt_e.type : "");
this.target = null;
this.currentTarget = null;
this.relatedTarget = null;
this.offsetX = 0;
this.offsetY = 0;
this.clientX = 0;
this.clientY = 0;
this.screenX = 0;
this.screenY = 0;
this.button = 0;
this.keyCode = 0;
this.charCode = 0;
this.ctrlKey = false;
this.altKey = false;
this.shiftKey = false;
this.metaKey = false;
this.state = null;
this.platformModifierKey = false;
this.event_ = null;
if (opt_e) {
this.init(opt_e, opt_currentTarget);
}
};
goog.inherits(goog.events.BrowserEvent, goog.events.Event);
goog.events.BrowserEvent.MouseButton = {LEFT:0, MIDDLE:1, RIGHT:2};
goog.events.BrowserEvent.IEButtonMap = [1, 4, 2];
goog.events.BrowserEvent.prototype.init = function(e, opt_currentTarget) {
var type = this.type = e.type;
var relevantTouch = e.changedTouches ? e.changedTouches[0] : null;
this.target = (e.target) || e.srcElement;
this.currentTarget = (opt_currentTarget);
var relatedTarget = (e.relatedTarget);
if (relatedTarget) {
if (goog.userAgent.GECKO) {
if (!goog.reflect.canAccessProperty(relatedTarget, "nodeName")) {
relatedTarget = null;
}
}
} else {
if (type == goog.events.EventType.MOUSEOVER) {
relatedTarget = e.fromElement;
} else {
if (type == goog.events.EventType.MOUSEOUT) {
relatedTarget = e.toElement;
}
}
}
this.relatedTarget = relatedTarget;
if (!goog.isNull(relevantTouch)) {
this.clientX = relevantTouch.clientX !== undefined ? relevantTouch.clientX : relevantTouch.pageX;
this.clientY = relevantTouch.clientY !== undefined ? relevantTouch.clientY : relevantTouch.pageY;
this.screenX = relevantTouch.screenX || 0;
this.screenY = relevantTouch.screenY || 0;
} else {
this.offsetX = goog.userAgent.WEBKIT || e.offsetX !== undefined ? e.offsetX : e.layerX;
this.offsetY = goog.userAgent.WEBKIT || e.offsetY !== undefined ? e.offsetY : e.layerY;
this.clientX = e.clientX !== undefined ? e.clientX : e.pageX;
this.clientY = e.clientY !== undefined ? e.clientY : e.pageY;
this.screenX = e.screenX || 0;
this.screenY = e.screenY || 0;
}
this.button = e.button;
this.keyCode = e.keyCode || 0;
this.charCode = e.charCode || (type == "keypress" ? e.keyCode : 0);
this.ctrlKey = e.ctrlKey;
this.altKey = e.altKey;
this.shiftKey = e.shiftKey;
this.metaKey = e.metaKey;
this.platformModifierKey = goog.userAgent.MAC ? e.metaKey : e.ctrlKey;
this.state = e.state;
this.event_ = e;
if (e.defaultPrevented) {
this.preventDefault();
}
};
goog.events.BrowserEvent.prototype.isButton = function(button) {
if (!goog.events.BrowserFeature.HAS_W3C_BUTTON) {
if (this.type == "click") {
return button == goog.events.BrowserEvent.MouseButton.LEFT;
} else {
return !!(this.event_.button & goog.events.BrowserEvent.IEButtonMap[button]);
}
} else {
return this.event_.button == button;
}
};
goog.events.BrowserEvent.prototype.isMouseActionButton = function() {
return this.isButton(goog.events.BrowserEvent.MouseButton.LEFT) && !(goog.userAgent.WEBKIT && goog.userAgent.MAC && this.ctrlKey);
};
goog.events.BrowserEvent.prototype.stopPropagation = function() {
goog.events.BrowserEvent.superClass_.stopPropagation.call(this);
if (this.event_.stopPropagation) {
this.event_.stopPropagation();
} else {
this.event_.cancelBubble = true;
}
};
goog.events.BrowserEvent.prototype.preventDefault = function() {
goog.events.BrowserEvent.superClass_.preventDefault.call(this);
var be = this.event_;
if (!be.preventDefault) {
be.returnValue = false;
if (goog.events.BrowserFeature.SET_KEY_CODE_TO_PREVENT_DEFAULT) {
try {
var VK_F1 = 112;
var VK_F12 = 123;
if (be.ctrlKey || be.keyCode >= VK_F1 && be.keyCode <= VK_F12) {
be.keyCode = -1;
}
} catch (ex) {
}
}
} else {
be.preventDefault();
}
};
goog.events.BrowserEvent.prototype.getBrowserEvent = function() {
return this.event_;
};
goog.provide("goog.events.Listenable");
goog.provide("goog.events.ListenableKey");
goog.require("goog.events.EventId");
goog.events.Listenable = function() {
};
goog.events.Listenable.IMPLEMENTED_BY_PROP = "closure_listenable_" + (Math.random() * 1E6 | 0);
goog.events.Listenable.addImplementation = function(cls) {
cls.prototype[goog.events.Listenable.IMPLEMENTED_BY_PROP] = true;
};
goog.events.Listenable.isImplementedBy = function(obj) {
return !!(obj && obj[goog.events.Listenable.IMPLEMENTED_BY_PROP]);
};
goog.events.Listenable.prototype.listen;
goog.events.Listenable.prototype.listenOnce;
goog.events.Listenable.prototype.unlisten;
goog.events.Listenable.prototype.unlistenByKey;
goog.events.Listenable.prototype.dispatchEvent;
goog.events.Listenable.prototype.removeAllListeners;
goog.events.Listenable.prototype.getParentEventTarget;
goog.events.Listenable.prototype.fireListeners;
goog.events.Listenable.prototype.getListeners;
goog.events.Listenable.prototype.getListener;
goog.events.Listenable.prototype.hasListener;
goog.events.ListenableKey = function() {
};
goog.events.ListenableKey.counter_ = 0;
goog.events.ListenableKey.reserveKey = function() {
return ++goog.events.ListenableKey.counter_;
};
goog.events.ListenableKey.prototype.src;
goog.events.ListenableKey.prototype.type;
goog.events.ListenableKey.prototype.listener;
goog.events.ListenableKey.prototype.capture;
goog.events.ListenableKey.prototype.handler;
goog.events.ListenableKey.prototype.key;
goog.provide("goog.events.Listener");
goog.require("goog.events.ListenableKey");
goog.events.Listener = function(listener, proxy, src, type, capture, opt_handler) {
if (goog.events.Listener.ENABLE_MONITORING) {
this.creationStack = (new Error).stack;
}
this.listener = listener;
this.proxy = proxy;
this.src = src;
this.type = type;
this.capture = !!capture;
this.handler = opt_handler;
this.key = goog.events.ListenableKey.reserveKey();
this.callOnce = false;
this.removed = false;
};
goog.define("goog.events.Listener.ENABLE_MONITORING", false);
goog.events.Listener.prototype.creationStack;
goog.events.Listener.prototype.markAsRemoved = function() {
this.removed = true;
this.listener = null;
this.proxy = null;
this.src = null;
this.handler = null;
};
goog.provide("goog.events.ListenerMap");
goog.require("goog.array");
goog.require("goog.events.Listener");
goog.require("goog.object");
goog.events.ListenerMap = function(src) {
this.src = src;
this.listeners = {};
this.typeCount_ = 0;
};
goog.events.ListenerMap.prototype.getTypeCount = function() {
return this.typeCount_;
};
goog.events.ListenerMap.prototype.getListenerCount = function() {
var count = 0;
for (var type in this.listeners) {
count += this.listeners[type].length;
}
return count;
};
goog.events.ListenerMap.prototype.add = function(type, listener, callOnce, opt_useCapture, opt_listenerScope) {
var typeStr = type.toString();
var listenerArray = this.listeners[typeStr];
if (!listenerArray) {
listenerArray = this.listeners[typeStr] = [];
this.typeCount_++;
}
var listenerObj;
var index = goog.events.ListenerMap.findListenerIndex_(listenerArray, listener, opt_useCapture, opt_listenerScope);
if (index > -1) {
listenerObj = listenerArray[index];
if (!callOnce) {
listenerObj.callOnce = false;
}
} else {
listenerObj = new goog.events.Listener(listener, null, this.src, typeStr, !!opt_useCapture, opt_listenerScope);
listenerObj.callOnce = callOnce;
listenerArray.push(listenerObj);
}
return listenerObj;
};
goog.events.ListenerMap.prototype.remove = function(type, listener, opt_useCapture, opt_listenerScope) {
var typeStr = type.toString();
if (!(typeStr in this.listeners)) {
return false;
}
var listenerArray = this.listeners[typeStr];
var index = goog.events.ListenerMap.findListenerIndex_(listenerArray, listener, opt_useCapture, opt_listenerScope);
if (index > -1) {
var listenerObj = listenerArray[index];
listenerObj.markAsRemoved();
goog.array.removeAt(listenerArray, index);
if (listenerArray.length == 0) {
delete this.listeners[typeStr];
this.typeCount_--;
}
return true;
}
return false;
};
goog.events.ListenerMap.prototype.removeByKey = function(listener) {
var type = listener.type;
if (!(type in this.listeners)) {
return false;
}
var removed = goog.array.remove(this.listeners[type], listener);
if (removed) {
listener.markAsRemoved();
if (this.listeners[type].length == 0) {
delete this.listeners[type];
this.typeCount_--;
}
}
return removed;
};
goog.events.ListenerMap.prototype.removeAll = function(opt_type) {
var typeStr = opt_type && opt_type.toString();
var count = 0;
for (var type in this.listeners) {
if (!typeStr || type == typeStr) {
var listenerArray = this.listeners[type];
for (var i = 0;i < listenerArray.length;i++) {
++count;
listenerArray[i].markAsRemoved();
}
delete this.listeners[type];
this.typeCount_--;
}
}
return count;
};
goog.events.ListenerMap.prototype.getListeners = function(type, capture) {
var listenerArray = this.listeners[type.toString()];
var rv = [];
if (listenerArray) {
for (var i = 0;i < listenerArray.length;++i) {
var listenerObj = listenerArray[i];
if (listenerObj.capture == capture) {
rv.push(listenerObj);
}
}
}
return rv;
};
goog.events.ListenerMap.prototype.getListener = function(type, listener, capture, opt_listenerScope) {
var listenerArray = this.listeners[type.toString()];
var i = -1;
if (listenerArray) {
i = goog.events.ListenerMap.findListenerIndex_(listenerArray, listener, capture, opt_listenerScope);
}
return i > -1 ? listenerArray[i] : null;
};
goog.events.ListenerMap.prototype.hasListener = function(opt_type, opt_capture) {
var hasType = goog.isDef(opt_type);
var typeStr = hasType ? opt_type.toString() : "";
var hasCapture = goog.isDef(opt_capture);
return goog.object.some(this.listeners, function(listenerArray, type) {
for (var i = 0;i < listenerArray.length;++i) {
if ((!hasType || listenerArray[i].type == typeStr) && (!hasCapture || listenerArray[i].capture == opt_capture)) {
return true;
}
}
return false;
});
};
goog.events.ListenerMap.findListenerIndex_ = function(listenerArray, listener, opt_useCapture, opt_listenerScope) {
for (var i = 0;i < listenerArray.length;++i) {
var listenerObj = listenerArray[i];
if (!listenerObj.removed && listenerObj.listener == listener && listenerObj.capture == !!opt_useCapture && listenerObj.handler == opt_listenerScope) {
return i;
}
}
return -1;
};
goog.provide("goog.events");
goog.provide("goog.events.CaptureSimulationMode");
goog.provide("goog.events.Key");
goog.provide("goog.events.ListenableType");
goog.require("goog.asserts");
goog.require("goog.debug.entryPointRegistry");
goog.require("goog.events.BrowserEvent");
goog.require("goog.events.BrowserFeature");
goog.require("goog.events.Listenable");
goog.require("goog.events.ListenerMap");
goog.forwardDeclare("goog.debug.ErrorHandler");
goog.forwardDeclare("goog.events.EventWrapper");
goog.events.Key;
goog.events.ListenableType;
goog.events.LISTENER_MAP_PROP_ = "closure_lm_" + (Math.random() * 1E6 | 0);
goog.events.onString_ = "on";
goog.events.onStringMap_ = {};
goog.events.CaptureSimulationMode = {OFF_AND_FAIL:0, OFF_AND_SILENT:1, ON:2};
goog.define("goog.events.CAPTURE_SIMULATION_MODE", 2);
goog.events.listenerCountEstimate_ = 0;
goog.events.listen = function(src, type, listener, opt_capt, opt_handler) {
if (goog.isArray(type)) {
for (var i = 0;i < type.length;i++) {
goog.events.listen(src, type[i], listener, opt_capt, opt_handler);
}
return null;
}
listener = goog.events.wrapListener(listener);
if (goog.events.Listenable.isImplementedBy(src)) {
return src.listen((type), listener, opt_capt, opt_handler);
} else {
return goog.events.listen_((src), (type), listener, false, opt_capt, opt_handler);
}
};
goog.events.listen_ = function(src, type, listener, callOnce, opt_capt, opt_handler) {
if (!type) {
throw Error("Invalid event type");
}
var capture = !!opt_capt;
if (capture && !goog.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT) {
if (goog.events.CAPTURE_SIMULATION_MODE == goog.events.CaptureSimulationMode.OFF_AND_FAIL) {
goog.asserts.fail("Can not register capture listener in IE8-.");
return null;
} else {
if (goog.events.CAPTURE_SIMULATION_MODE == goog.events.CaptureSimulationMode.OFF_AND_SILENT) {
return null;
}
}
}
var listenerMap = goog.events.getListenerMap_(src);
if (!listenerMap) {
src[goog.events.LISTENER_MAP_PROP_] = listenerMap = new goog.events.ListenerMap(src);
}
var listenerObj = listenerMap.add(type, listener, callOnce, opt_capt, opt_handler);
if (listenerObj.proxy) {
return listenerObj;
}
var proxy = goog.events.getProxy();
listenerObj.proxy = proxy;
proxy.src = src;
proxy.listener = listenerObj;
if (src.addEventListener) {
src.addEventListener(type.toString(), proxy, capture);
} else {
if (src.attachEvent) {
src.attachEvent(goog.events.getOnString_(type.toString()), proxy);
} else {
throw Error("addEventListener and attachEvent are unavailable.");
}
}
goog.events.listenerCountEstimate_++;
return listenerObj;
};
goog.events.getProxy = function() {
var proxyCallbackFunction = goog.events.handleBrowserEvent_;
var f = goog.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT ? function(eventObject) {
return proxyCallbackFunction.call(f.src, f.listener, eventObject);
} : function(eventObject) {
var v = proxyCallbackFunction.call(f.src, f.listener, eventObject);
if (!v) {
return v;
}
};
return f;
};
goog.events.listenOnce = function(src, type, listener, opt_capt, opt_handler) {
if (goog.isArray(type)) {
for (var i = 0;i < type.length;i++) {
goog.events.listenOnce(src, type[i], listener, opt_capt, opt_handler);
}
return null;
}
listener = goog.events.wrapListener(listener);
if (goog.events.Listenable.isImplementedBy(src)) {
return src.listenOnce((type), listener, opt_capt, opt_handler);
} else {
return goog.events.listen_((src), (type), listener, true, opt_capt, opt_handler);
}
};
goog.events.listenWithWrapper = function(src, wrapper, listener, opt_capt, opt_handler) {
wrapper.listen(src, listener, opt_capt, opt_handler);
};
goog.events.unlisten = function(src, type, listener, opt_capt, opt_handler) {
if (goog.isArray(type)) {
for (var i = 0;i < type.length;i++) {
goog.events.unlisten(src, type[i], listener, opt_capt, opt_handler);
}
return null;
}
listener = goog.events.wrapListener(listener);
if (goog.events.Listenable.isImplementedBy(src)) {
return src.unlisten((type), listener, opt_capt, opt_handler);
}
if (!src) {
return false;
}
var capture = !!opt_capt;
var listenerMap = goog.events.getListenerMap_((src));
if (listenerMap) {
var listenerObj = listenerMap.getListener((type), listener, capture, opt_handler);
if (listenerObj) {
return goog.events.unlistenByKey(listenerObj);
}
}
return false;
};
goog.events.unlistenByKey = function(key) {
if (goog.isNumber(key)) {
return false;
}
var listener = key;
if (!listener || listener.removed) {
return false;
}
var src = listener.src;
if (goog.events.Listenable.isImplementedBy(src)) {
return src.unlistenByKey(listener);
}
var type = listener.type;
var proxy = listener.proxy;
if (src.removeEventListener) {
src.removeEventListener(type, proxy, listener.capture);
} else {
if (src.detachEvent) {
src.detachEvent(goog.events.getOnString_(type), proxy);
}
}
goog.events.listenerCountEstimate_--;
var listenerMap = goog.events.getListenerMap_((src));
if (listenerMap) {
listenerMap.removeByKey(listener);
if (listenerMap.getTypeCount() == 0) {
listenerMap.src = null;
src[goog.events.LISTENER_MAP_PROP_] = null;
}
} else {
listener.markAsRemoved();
}
return true;
};
goog.events.unlistenWithWrapper = function(src, wrapper, listener, opt_capt, opt_handler) {
wrapper.unlisten(src, listener, opt_capt, opt_handler);
};
goog.events.removeAll = function(obj, opt_type) {
if (!obj) {
return 0;
}
if (goog.events.Listenable.isImplementedBy(obj)) {
return obj.removeAllListeners(opt_type);
}
var listenerMap = goog.events.getListenerMap_((obj));
if (!listenerMap) {
return 0;
}
var count = 0;
var typeStr = opt_type && opt_type.toString();
for (var type in listenerMap.listeners) {
if (!typeStr || type == typeStr) {
var listeners = listenerMap.listeners[type].concat();
for (var i = 0;i < listeners.length;++i) {
if (goog.events.unlistenByKey(listeners[i])) {
++count;
}
}
}
}
return count;
};
goog.events.getListeners = function(obj, type, capture) {
if (goog.events.Listenable.isImplementedBy(obj)) {
return obj.getListeners(type, capture);
} else {
if (!obj) {
return [];
}
var listenerMap = goog.events.getListenerMap_((obj));
return listenerMap ? listenerMap.getListeners(type, capture) : [];
}
};
goog.events.getListener = function(src, type, listener, opt_capt, opt_handler) {
type = (type);
listener = goog.events.wrapListener(listener);
var capture = !!opt_capt;
if (goog.events.Listenable.isImplementedBy(src)) {
return src.getListener(type, listener, capture, opt_handler);
}
if (!src) {
return null;
}
var listenerMap = goog.events.getListenerMap_((src));
if (listenerMap) {
return listenerMap.getListener(type, listener, capture, opt_handler);
}
return null;
};
goog.events.hasListener = function(obj, opt_type, opt_capture) {
if (goog.events.Listenable.isImplementedBy(obj)) {
return obj.hasListener(opt_type, opt_capture);
}
var listenerMap = goog.events.getListenerMap_((obj));
return !!listenerMap && listenerMap.hasListener(opt_type, opt_capture);
};
goog.events.expose = function(e) {
var str = [];
for (var key in e) {
if (e[key] && e[key].id) {
str.push(key + " \x3d " + e[key] + " (" + e[key].id + ")");
} else {
str.push(key + " \x3d " + e[key]);
}
}
return str.join("\n");
};
goog.events.getOnString_ = function(type) {
if (type in goog.events.onStringMap_) {
return goog.events.onStringMap_[type];
}
return goog.events.onStringMap_[type] = goog.events.onString_ + type;
};
goog.events.fireListeners = function(obj, type, capture, eventObject) {
if (goog.events.Listenable.isImplementedBy(obj)) {
return obj.fireListeners(type, capture, eventObject);
}
return goog.events.fireListeners_(obj, type, capture, eventObject);
};
goog.events.fireListeners_ = function(obj, type, capture, eventObject) {
var retval = true;
var listenerMap = goog.events.getListenerMap_((obj));
if (listenerMap) {
var listenerArray = listenerMap.listeners[type.toString()];
if (listenerArray) {
listenerArray = listenerArray.concat();
for (var i = 0;i < listenerArray.length;i++) {
var listener = listenerArray[i];
if (listener && listener.capture == capture && !listener.removed) {
var result = goog.events.fireListener(listener, eventObject);
retval = retval && result !== false;
}
}
}
}
return retval;
};
goog.events.fireListener = function(listener, eventObject) {
var listenerFn = listener.listener;
var listenerHandler = listener.handler || listener.src;
if (listener.callOnce) {
goog.events.unlistenByKey(listener);
}
return listenerFn.call(listenerHandler, eventObject);
};
goog.events.getTotalListenerCount = function() {
return goog.events.listenerCountEstimate_;
};
goog.events.dispatchEvent = function(src, e) {
goog.asserts.assert(goog.events.Listenable.isImplementedBy(src), "Can not use goog.events.dispatchEvent with " + "non-goog.events.Listenable instance.");
return src.dispatchEvent(e);
};
goog.events.protectBrowserEventEntryPoint = function(errorHandler) {
goog.events.handleBrowserEvent_ = errorHandler.protectEntryPoint(goog.events.handleBrowserEvent_);
};
goog.events.handleBrowserEvent_ = function(listener, opt_evt) {
if (listener.removed) {
return true;
}
if (!goog.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT) {
var ieEvent = opt_evt || (goog.getObjectByName("window.event"));
var evt = new goog.events.BrowserEvent(ieEvent, this);
var retval = true;
if (goog.events.CAPTURE_SIMULATION_MODE == goog.events.CaptureSimulationMode.ON) {
if (!goog.events.isMarkedIeEvent_(ieEvent)) {
goog.events.markIeEvent_(ieEvent);
var ancestors = [];
for (var parent = evt.currentTarget;parent;parent = parent.parentNode) {
ancestors.push(parent);
}
var type = listener.type;
for (var i = ancestors.length - 1;!evt.propagationStopped_ && i >= 0;i--) {
evt.currentTarget = ancestors[i];
var result = goog.events.fireListeners_(ancestors[i], type, true, evt);
retval = retval && result;
}
for (var i = 0;!evt.propagationStopped_ && i < ancestors.length;i++) {
evt.currentTarget = ancestors[i];
var result = goog.events.fireListeners_(ancestors[i], type, false, evt);
retval = retval && result;
}
}
} else {
retval = goog.events.fireListener(listener, evt);
}
return retval;
}
return goog.events.fireListener(listener, new goog.events.BrowserEvent(opt_evt, this));
};
goog.events.markIeEvent_ = function(e) {
var useReturnValue = false;
if (e.keyCode == 0) {
try {
e.keyCode = -1;
return;
} catch (ex) {
useReturnValue = true;
}
}
if (useReturnValue || (e.returnValue) == undefined) {
e.returnValue = true;
}
};
goog.events.isMarkedIeEvent_ = function(e) {
return e.keyCode < 0 || e.returnValue != undefined;
};
goog.events.uniqueIdCounter_ = 0;
goog.events.getUniqueId = function(identifier) {
return identifier + "_" + goog.events.uniqueIdCounter_++;
};
goog.events.getListenerMap_ = function(src) {
var listenerMap = src[goog.events.LISTENER_MAP_PROP_];
return listenerMap instanceof goog.events.ListenerMap ? listenerMap : null;
};
goog.events.LISTENER_WRAPPER_PROP_ = "__closure_events_fn_" + (Math.random() * 1E9 >>> 0);
goog.events.wrapListener = function(listener) {
goog.asserts.assert(listener, "Listener can not be null.");
if (goog.isFunction(listener)) {
return listener;
}
goog.asserts.assert(listener.handleEvent, "An object listener must have handleEvent method.");
if (!listener[goog.events.LISTENER_WRAPPER_PROP_]) {
listener[goog.events.LISTENER_WRAPPER_PROP_] = function(e) {
return listener.handleEvent(e);
};
}
return listener[goog.events.LISTENER_WRAPPER_PROP_];
};
goog.debug.entryPointRegistry.register(function(transformer) {
goog.events.handleBrowserEvent_ = transformer(goog.events.handleBrowserEvent_);
});
goog.provide("goog.events.EventTarget");
goog.require("goog.Disposable");
goog.require("goog.asserts");
goog.require("goog.events");
goog.require("goog.events.Event");
goog.require("goog.events.Listenable");
goog.require("goog.events.ListenerMap");
goog.require("goog.object");
goog.events.EventTarget = function() {
goog.Disposable.call(this);
this.eventTargetListeners_ = new goog.events.ListenerMap(this);
this.actualEventTarget_ = this;
this.parentEventTarget_ = null;
};
goog.inherits(goog.events.EventTarget, goog.Disposable);
goog.events.Listenable.addImplementation(goog.events.EventTarget);
goog.events.EventTarget.MAX_ANCESTORS_ = 1E3;
goog.events.EventTarget.prototype.getParentEventTarget = function() {
return this.parentEventTarget_;
};
goog.events.EventTarget.prototype.setParentEventTarget = function(parent) {
this.parentEventTarget_ = parent;
};
goog.events.EventTarget.prototype.addEventListener = function(type, handler, opt_capture, opt_handlerScope) {
goog.events.listen(this, type, handler, opt_capture, opt_handlerScope);
};
goog.events.EventTarget.prototype.removeEventListener = function(type, handler, opt_capture, opt_handlerScope) {
goog.events.unlisten(this, type, handler, opt_capture, opt_handlerScope);
};
goog.events.EventTarget.prototype.dispatchEvent = function(e) {
this.assertInitialized_();
var ancestorsTree, ancestor = this.getParentEventTarget();
if (ancestor) {
ancestorsTree = [];
var ancestorCount = 1;
for (;ancestor;ancestor = ancestor.getParentEventTarget()) {
ancestorsTree.push(ancestor);
goog.asserts.assert(++ancestorCount < goog.events.EventTarget.MAX_ANCESTORS_, "infinite loop");
}
}
return goog.events.EventTarget.dispatchEventInternal_(this.actualEventTarget_, e, ancestorsTree);
};
goog.events.EventTarget.prototype.disposeInternal = function() {
goog.events.EventTarget.superClass_.disposeInternal.call(this);
this.removeAllListeners();
this.parentEventTarget_ = null;
};
goog.events.EventTarget.prototype.listen = function(type, listener, opt_useCapture, opt_listenerScope) {
this.assertInitialized_();
return this.eventTargetListeners_.add(String(type), listener, false, opt_useCapture, opt_listenerScope);
};
goog.events.EventTarget.prototype.listenOnce = function(type, listener, opt_useCapture, opt_listenerScope) {
return this.eventTargetListeners_.add(String(type), listener, true, opt_useCapture, opt_listenerScope);
};
goog.events.EventTarget.prototype.unlisten = function(type, listener, opt_useCapture, opt_listenerScope) {
return this.eventTargetListeners_.remove(String(type), listener, opt_useCapture, opt_listenerScope);
};
goog.events.EventTarget.prototype.unlistenByKey = function(key) {
return this.eventTargetListeners_.removeByKey(key);
};
goog.events.EventTarget.prototype.removeAllListeners = function(opt_type) {
if (!this.eventTargetListeners_) {
return 0;
}
return this.eventTargetListeners_.removeAll(opt_type);
};
goog.events.EventTarget.prototype.fireListeners = function(type, capture, eventObject) {
var listenerArray = this.eventTargetListeners_.listeners[String(type)];
if (!listenerArray) {
return true;
}
listenerArray = listenerArray.concat();
var rv = true;
for (var i = 0;i < listenerArray.length;++i) {
var listener = listenerArray[i];
if (listener && !listener.removed && listener.capture == capture) {
var listenerFn = listener.listener;
var listenerHandler = listener.handler || listener.src;
if (listener.callOnce) {
this.unlistenByKey(listener);
}
rv = listenerFn.call(listenerHandler, eventObject) !== false && rv;
}
}
return rv && eventObject.returnValue_ != false;
};
goog.events.EventTarget.prototype.getListeners = function(type, capture) {
return this.eventTargetListeners_.getListeners(String(type), capture);
};
goog.events.EventTarget.prototype.getListener = function(type, listener, capture, opt_listenerScope) {
return this.eventTargetListeners_.getListener(String(type), listener, capture, opt_listenerScope);
};
goog.events.EventTarget.prototype.hasListener = function(opt_type, opt_capture) {
var id = goog.isDef(opt_type) ? String(opt_type) : undefined;
return this.eventTargetListeners_.hasListener(id, opt_capture);
};
goog.events.EventTarget.prototype.setTargetForTesting = function(target) {
this.actualEventTarget_ = target;
};
goog.events.EventTarget.prototype.assertInitialized_ = function() {
goog.asserts.assert(this.eventTargetListeners_, "Event target is not initialized. Did you call the superclass " + "(goog.events.EventTarget) constructor?");
};
goog.events.EventTarget.dispatchEventInternal_ = function(target, e, opt_ancestorsTree) {
var type = e.type || (e);
if (goog.isString(e)) {
e = new goog.events.Event(e, target);
} else {
if (!(e instanceof goog.events.Event)) {
var oldEvent = e;
e = new goog.events.Event(type, target);
goog.object.extend(e, oldEvent);
} else {
e.target = e.target || target;
}
}
var rv = true, currentTarget;
if (opt_ancestorsTree) {
for (var i = opt_ancestorsTree.length - 1;!e.propagationStopped_ && i >= 0;i--) {
currentTarget = e.currentTarget = opt_ancestorsTree[i];
rv = currentTarget.fireListeners(type, true, e) && rv;
}
}
if (!e.propagationStopped_) {
currentTarget = e.currentTarget = target;
rv = currentTarget.fireListeners(type, true, e) && rv;
if (!e.propagationStopped_) {
rv = currentTarget.fireListeners(type, false, e) && rv;
}
}
if (opt_ancestorsTree) {
for (i = 0;!e.propagationStopped_ && i < opt_ancestorsTree.length;i++) {
currentTarget = e.currentTarget = opt_ancestorsTree[i];
rv = currentTarget.fireListeners(type, false, e) && rv;
}
}
return rv;
};
goog.provide("goog.Timer");
goog.require("goog.Promise");
goog.require("goog.events.EventTarget");
goog.Timer = function(opt_interval, opt_timerObject) {
goog.events.EventTarget.call(this);
this.interval_ = opt_interval || 1;
this.timerObject_ = opt_timerObject || goog.Timer.defaultTimerObject;
this.boundTick_ = goog.bind(this.tick_, this);
this.last_ = goog.now();
};
goog.inherits(goog.Timer, goog.events.EventTarget);
goog.Timer.MAX_TIMEOUT_ = 2147483647;
goog.Timer.INVALID_TIMEOUT_ID_ = -1;
goog.Timer.prototype.enabled = false;
goog.Timer.defaultTimerObject = goog.global;
goog.Timer.intervalScale = .8;
goog.Timer.prototype.timer_ = null;
goog.Timer.prototype.getInterval = function() {
return this.interval_;
};
goog.Timer.prototype.setInterval = function(interval) {
this.interval_ = interval;
if (this.timer_ && this.enabled) {
this.stop();
this.start();
} else {
if (this.timer_) {
this.stop();
}
}
};
goog.Timer.prototype.tick_ = function() {
if (this.enabled) {
var elapsed = goog.now() - this.last_;
if (elapsed > 0 && elapsed < this.interval_ * goog.Timer.intervalScale) {
this.timer_ = this.timerObject_.setTimeout(this.boundTick_, this.interval_ - elapsed);
return;
}
if (this.timer_) {
this.timerObject_.clearTimeout(this.timer_);
this.timer_ = null;
}
this.dispatchTick();
if (this.enabled) {
this.timer_ = this.timerObject_.setTimeout(this.boundTick_, this.interval_);
this.last_ = goog.now();
}
}
};
goog.Timer.prototype.dispatchTick = function() {
this.dispatchEvent(goog.Timer.TICK);
};
goog.Timer.prototype.start = function() {
this.enabled = true;
if (!this.timer_) {
this.timer_ = this.timerObject_.setTimeout(this.boundTick_, this.interval_);
this.last_ = goog.now();
}
};
goog.Timer.prototype.stop = function() {
this.enabled = false;
if (this.timer_) {
this.timerObject_.clearTimeout(this.timer_);
this.timer_ = null;
}
};
goog.Timer.prototype.disposeInternal = function() {
goog.Timer.superClass_.disposeInternal.call(this);
this.stop();
delete this.timerObject_;
};
goog.Timer.TICK = "tick";
goog.Timer.callOnce = function(listener, opt_delay, opt_handler) {
if (goog.isFunction(listener)) {
if (opt_handler) {
listener = goog.bind(listener, opt_handler);
}
} else {
if (listener && typeof listener.handleEvent == "function") {
listener = goog.bind(listener.handleEvent, listener);
} else {
throw Error("Invalid listener argument");
}
}
if (opt_delay > goog.Timer.MAX_TIMEOUT_) {
return goog.Timer.INVALID_TIMEOUT_ID_;
} else {
return goog.Timer.defaultTimerObject.setTimeout(listener, opt_delay || 0);
}
};
goog.Timer.clear = function(timerId) {
goog.Timer.defaultTimerObject.clearTimeout(timerId);
};
goog.Timer.promise = function(delay, opt_result) {
var timerKey = null;
return (new goog.Promise(function(resolve, reject) {
timerKey = goog.Timer.callOnce(function() {
resolve(opt_result);
}, delay);
if (timerKey == goog.Timer.INVALID_TIMEOUT_ID_) {
reject(new Error("Failed to schedule timer."));
}
})).thenCatch(function(error) {
goog.Timer.clear(timerKey);
throw error;
});
};
goog.provide("goog.json");
goog.provide("goog.json.Replacer");
goog.provide("goog.json.Reviver");
goog.provide("goog.json.Serializer");
goog.define("goog.json.USE_NATIVE_JSON", false);
goog.json.isValid = function(s) {
if (/^\s*$/.test(s)) {
return false;
}
var backslashesRe = /\\["\\\/bfnrtu]/g;
var simpleValuesRe = /"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g;
var openBracketsRe = /(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g;
var remainderRe = /^[\],:{}\s\u2028\u2029]*$/;
return remainderRe.test(s.replace(backslashesRe, "@").replace(simpleValuesRe, "]").replace(openBracketsRe, ""));
};
goog.json.parse = goog.json.USE_NATIVE_JSON ? (goog.global["JSON"]["parse"]) : function(s) {
var o = String(s);
if (goog.json.isValid(o)) {
try {
return (eval("(" + o + ")"));
} catch (ex) {
}
}
throw Error("Invalid JSON string: " + o);
};
goog.json.unsafeParse = goog.json.USE_NATIVE_JSON ? (goog.global["JSON"]["parse"]) : function(s) {
return (eval("(" + s + ")"));
};
goog.json.Replacer;
goog.json.Reviver;
goog.json.serialize = goog.json.USE_NATIVE_JSON ? (goog.global["JSON"]["stringify"]) : function(object, opt_replacer) {
return (new goog.json.Serializer(opt_replacer)).serialize(object);
};
goog.json.Serializer = function(opt_replacer) {
this.replacer_ = opt_replacer;
};
goog.json.Serializer.prototype.serialize = function(object) {
var sb = [];
this.serializeInternal(object, sb);
return sb.join("");
};
goog.json.Serializer.prototype.serializeInternal = function(object, sb) {
if (object == null) {
sb.push("null");
return;
}
if (typeof object == "object") {
if (goog.isArray(object)) {
this.serializeArray(object, sb);
return;
} else {
if (object instanceof String || object instanceof Number || object instanceof Boolean) {
object = object.valueOf();
} else {
this.serializeObject_((object), sb);
return;
}
}
}
switch(typeof object) {
case "string":
this.serializeString_(object, sb);
break;
case "number":
this.serializeNumber_(object, sb);
break;
case "boolean":
sb.push(String(object));
break;
case "function":
sb.push("null");
break;
default:
throw Error("Unknown type: " + typeof object);;
}
};
goog.json.Serializer.charToJsonCharCache_ = {'"':'\\"', "\\":"\\\\", "/":"\\/", "\b":"\\b", "\f":"\\f", "\n":"\\n", "\r":"\\r", "\t":"\\t", "\x0B":"\\u000b"};
goog.json.Serializer.charsToReplace_ = /\uffff/.test("\uffff") ? /[\\\"\x00-\x1f\x7f-\uffff]/g : /[\\\"\x00-\x1f\x7f-\xff]/g;
goog.json.Serializer.prototype.serializeString_ = function(s, sb) {
sb.push('"', s.replace(goog.json.Serializer.charsToReplace_, function(c) {
var rv = goog.json.Serializer.charToJsonCharCache_[c];
if (!rv) {
rv = "\\u" + (c.charCodeAt(0) | 65536).toString(16).substr(1);
goog.json.Serializer.charToJsonCharCache_[c] = rv;
}
return rv;
}), '"');
};
goog.json.Serializer.prototype.serializeNumber_ = function(n, sb) {
sb.push(isFinite(n) && !isNaN(n) ? String(n) : "null");
};
goog.json.Serializer.prototype.serializeArray = function(arr, sb) {
var l = arr.length;
sb.push("[");
var sep = "";
for (var i = 0;i < l;i++) {
sb.push(sep);
var value = arr[i];
this.serializeInternal(this.replacer_ ? this.replacer_.call(arr, String(i), value) : value, sb);
sep = ",";
}
sb.push("]");
};
goog.json.Serializer.prototype.serializeObject_ = function(obj, sb) {
sb.push("{");
var sep = "";
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
var value = obj[key];
if (typeof value != "function") {
sb.push(sep);
this.serializeString_(key, sb);
sb.push(":");
this.serializeInternal(this.replacer_ ? this.replacer_.call(obj, key, value) : value, sb);
sep = ",";
}
}
}
sb.push("}");
};
goog.provide("goog.net.ErrorCode");
goog.net.ErrorCode = {NO_ERROR:0, ACCESS_DENIED:1, FILE_NOT_FOUND:2, FF_SILENT_ERROR:3, CUSTOM_ERROR:4, EXCEPTION:5, HTTP_ERROR:6, ABORT:7, TIMEOUT:8, OFFLINE:9};
goog.net.ErrorCode.getDebugMessage = function(errorCode) {
switch(errorCode) {
case goog.net.ErrorCode.NO_ERROR:
return "No Error";
case goog.net.ErrorCode.ACCESS_DENIED:
return "Access denied to content document";
case goog.net.ErrorCode.FILE_NOT_FOUND:
return "File not found";
case goog.net.ErrorCode.FF_SILENT_ERROR:
return "Firefox silently errored";
case goog.net.ErrorCode.CUSTOM_ERROR:
return "Application custom error";
case goog.net.ErrorCode.EXCEPTION:
return "An exception occurred";
case goog.net.ErrorCode.HTTP_ERROR:
return "Http response at 400 or 500 level";
case goog.net.ErrorCode.ABORT:
return "Request was aborted";
case goog.net.ErrorCode.TIMEOUT:
return "Request timed out";
case goog.net.ErrorCode.OFFLINE:
return "The resource is not available offline";
default:
return "Unrecognized error code";
}
};
goog.provide("goog.net.EventType");
goog.net.EventType = {COMPLETE:"complete", SUCCESS:"success", ERROR:"error", ABORT:"abort", READY:"ready", READY_STATE_CHANGE:"readystatechange", TIMEOUT:"timeout", INCREMENTAL_DATA:"incrementaldata", PROGRESS:"progress", DOWNLOAD_PROGRESS:"downloadprogress", UPLOAD_PROGRESS:"uploadprogress"};
goog.provide("goog.net.HttpStatus");
goog.net.HttpStatus = {CONTINUE:100, SWITCHING_PROTOCOLS:101, OK:200, CREATED:201, ACCEPTED:202, NON_AUTHORITATIVE_INFORMATION:203, NO_CONTENT:204, RESET_CONTENT:205, PARTIAL_CONTENT:206, MULTIPLE_CHOICES:300, MOVED_PERMANENTLY:301, FOUND:302, SEE_OTHER:303, NOT_MODIFIED:304, USE_PROXY:305, TEMPORARY_REDIRECT:307, BAD_REQUEST:400, UNAUTHORIZED:401, PAYMENT_REQUIRED:402, FORBIDDEN:403, NOT_FOUND:404, METHOD_NOT_ALLOWED:405, NOT_ACCEPTABLE:406, PROXY_AUTHENTICATION_REQUIRED:407, REQUEST_TIMEOUT:408,
CONFLICT:409, GONE:410, LENGTH_REQUIRED:411, PRECONDITION_FAILED:412, REQUEST_ENTITY_TOO_LARGE:413, REQUEST_URI_TOO_LONG:414, UNSUPPORTED_MEDIA_TYPE:415, REQUEST_RANGE_NOT_SATISFIABLE:416, EXPECTATION_FAILED:417, PRECONDITION_REQUIRED:428, TOO_MANY_REQUESTS:429, REQUEST_HEADER_FIELDS_TOO_LARGE:431, INTERNAL_SERVER_ERROR:500, NOT_IMPLEMENTED:501, BAD_GATEWAY:502, SERVICE_UNAVAILABLE:503, GATEWAY_TIMEOUT:504, HTTP_VERSION_NOT_SUPPORTED:505, NETWORK_AUTHENTICATION_REQUIRED:511, QUIRK_IE_NO_CONTENT:1223};
goog.net.HttpStatus.isSuccess = function(status) {
switch(status) {
case goog.net.HttpStatus.OK:
;
case goog.net.HttpStatus.CREATED:
;
case goog.net.HttpStatus.ACCEPTED:
;
case goog.net.HttpStatus.NO_CONTENT:
;
case goog.net.HttpStatus.PARTIAL_CONTENT:
;
case goog.net.HttpStatus.NOT_MODIFIED:
;
case goog.net.HttpStatus.QUIRK_IE_NO_CONTENT:
return true;
default:
return false;
}
};
goog.provide("goog.net.XhrLike");
goog.net.XhrLike = function() {
};
goog.net.XhrLike.OrNative;
goog.net.XhrLike.prototype.onreadystatechange;
goog.net.XhrLike.prototype.responseText;
goog.net.XhrLike.prototype.responseXML;
goog.net.XhrLike.prototype.readyState;
goog.net.XhrLike.prototype.status;
goog.net.XhrLike.prototype.statusText;
goog.net.XhrLike.prototype.open = function(method, url, opt_async, opt_user, opt_password) {
};
goog.net.XhrLike.prototype.send = function(opt_data) {
};
goog.net.XhrLike.prototype.abort = function() {
};
goog.net.XhrLike.prototype.setRequestHeader = function(header, value) {
};
goog.net.XhrLike.prototype.getResponseHeader = function(header) {
};
goog.net.XhrLike.prototype.getAllResponseHeaders = function() {
};
goog.provide("goog.net.XmlHttpFactory");
goog.require("goog.net.XhrLike");
goog.net.XmlHttpFactory = function() {
};
goog.net.XmlHttpFactory.prototype.cachedOptions_ = null;
goog.net.XmlHttpFactory.prototype.createInstance = goog.abstractMethod;
goog.net.XmlHttpFactory.prototype.getOptions = function() {
return this.cachedOptions_ || (this.cachedOptions_ = this.internalGetOptions());
};
goog.net.XmlHttpFactory.prototype.internalGetOptions = goog.abstractMethod;
goog.provide("goog.net.WrapperXmlHttpFactory");
goog.require("goog.net.XhrLike");
goog.require("goog.net.XmlHttpFactory");
goog.net.WrapperXmlHttpFactory = function(xhrFactory, optionsFactory) {
goog.net.XmlHttpFactory.call(this);
this.xhrFactory_ = xhrFactory;
this.optionsFactory_ = optionsFactory;
};
goog.inherits(goog.net.WrapperXmlHttpFactory, goog.net.XmlHttpFactory);
goog.net.WrapperXmlHttpFactory.prototype.createInstance = function() {
return this.xhrFactory_();
};
goog.net.WrapperXmlHttpFactory.prototype.getOptions = function() {
return this.optionsFactory_();
};
goog.provide("goog.net.DefaultXmlHttpFactory");
goog.provide("goog.net.XmlHttp");
goog.provide("goog.net.XmlHttp.OptionType");
goog.provide("goog.net.XmlHttp.ReadyState");
goog.provide("goog.net.XmlHttpDefines");
goog.require("goog.asserts");
goog.require("goog.net.WrapperXmlHttpFactory");
goog.require("goog.net.XmlHttpFactory");
goog.net.XmlHttp = function() {
return goog.net.XmlHttp.factory_.createInstance();
};
goog.define("goog.net.XmlHttp.ASSUME_NATIVE_XHR", false);
goog.net.XmlHttpDefines = {};
goog.define("goog.net.XmlHttpDefines.ASSUME_NATIVE_XHR", false);
goog.net.XmlHttp.getOptions = function() {
return goog.net.XmlHttp.factory_.getOptions();
};
goog.net.XmlHttp.OptionType = {USE_NULL_FUNCTION:0, LOCAL_REQUEST_ERROR:1};
goog.net.XmlHttp.ReadyState = {UNINITIALIZED:0, LOADING:1, LOADED:2, INTERACTIVE:3, COMPLETE:4};
goog.net.XmlHttp.factory_;
goog.net.XmlHttp.setFactory = function(factory, optionsFactory) {
goog.net.XmlHttp.setGlobalFactory(new goog.net.WrapperXmlHttpFactory(goog.asserts.assert(factory), goog.asserts.assert(optionsFactory)));
};
goog.net.XmlHttp.setGlobalFactory = function(factory) {
goog.net.XmlHttp.factory_ = factory;
};
goog.net.DefaultXmlHttpFactory = function() {
goog.net.XmlHttpFactory.call(this);
};
goog.inherits(goog.net.DefaultXmlHttpFactory, goog.net.XmlHttpFactory);
goog.net.DefaultXmlHttpFactory.prototype.createInstance = function() {
var progId = this.getProgId_();
if (progId) {
return new ActiveXObject(progId);
} else {
return new XMLHttpRequest;
}
};
goog.net.DefaultXmlHttpFactory.prototype.internalGetOptions = function() {
var progId = this.getProgId_();
var options = {};
if (progId) {
options[goog.net.XmlHttp.OptionType.USE_NULL_FUNCTION] = true;
options[goog.net.XmlHttp.OptionType.LOCAL_REQUEST_ERROR] = true;
}
return options;
};
goog.net.DefaultXmlHttpFactory.prototype.ieProgId_;
goog.net.DefaultXmlHttpFactory.prototype.getProgId_ = function() {
if (goog.net.XmlHttp.ASSUME_NATIVE_XHR || goog.net.XmlHttpDefines.ASSUME_NATIVE_XHR) {
return "";
}
if (!this.ieProgId_ && typeof XMLHttpRequest == "undefined" && typeof ActiveXObject != "undefined") {
var ACTIVE_X_IDENTS = ["MSXML2.XMLHTTP.6.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"];
for (var i = 0;i < ACTIVE_X_IDENTS.length;i++) {
var candidate = ACTIVE_X_IDENTS[i];
try {
new ActiveXObject(candidate);
this.ieProgId_ = candidate;
return candidate;
} catch (e) {
}
}
throw Error("Could not create ActiveXObject. ActiveX might be disabled," + " or MSXML might not be installed");
}
return (this.ieProgId_);
};
goog.net.XmlHttp.setGlobalFactory(new goog.net.DefaultXmlHttpFactory);
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.net.XhrIo");
goog.provide("goog.net.XhrIo.ResponseType");
goog.require("goog.Timer");
goog.require("goog.array");
goog.require("goog.asserts");
goog.require("goog.debug.entryPointRegistry");
goog.require("goog.events.EventTarget");
goog.require("goog.json");
goog.require("goog.log");
goog.require("goog.net.ErrorCode");
goog.require("goog.net.EventType");
goog.require("goog.net.HttpStatus");
goog.require("goog.net.XmlHttp");
goog.require("goog.object");
goog.require("goog.string");
goog.require("goog.structs");
goog.require("goog.structs.Map");
goog.require("goog.uri.utils");
goog.require("goog.userAgent");
goog.forwardDeclare("goog.Uri");
goog.net.XhrIo = function(opt_xmlHttpFactory) {
goog.net.XhrIo.base(this, "constructor");
this.headers = new goog.structs.Map;
this.xmlHttpFactory_ = opt_xmlHttpFactory || null;
this.active_ = false;
this.xhr_ = null;
this.xhrOptions_ = null;
this.lastUri_ = "";
this.lastMethod_ = "";
this.lastErrorCode_ = goog.net.ErrorCode.NO_ERROR;
this.lastError_ = "";
this.errorDispatched_ = false;
this.inSend_ = false;
this.inOpen_ = false;
this.inAbort_ = false;
this.timeoutInterval_ = 0;
this.timeoutId_ = null;
this.responseType_ = goog.net.XhrIo.ResponseType.DEFAULT;
this.withCredentials_ = false;
this.progressEventsEnabled_ = false;
this.useXhr2Timeout_ = false;
};
goog.inherits(goog.net.XhrIo, goog.events.EventTarget);
goog.net.XhrIo.ResponseType = {DEFAULT:"", TEXT:"text", DOCUMENT:"document", BLOB:"blob", ARRAY_BUFFER:"arraybuffer"};
goog.net.XhrIo.prototype.logger_ = goog.log.getLogger("goog.net.XhrIo");
goog.net.XhrIo.CONTENT_TYPE_HEADER = "Content-Type";
goog.net.XhrIo.HTTP_SCHEME_PATTERN = /^https?$/i;
goog.net.XhrIo.METHODS_WITH_FORM_DATA = ["POST", "PUT"];
goog.net.XhrIo.FORM_CONTENT_TYPE = "application/x-www-form-urlencoded;charset\x3dutf-8";
goog.net.XhrIo.XHR2_TIMEOUT_ = "timeout";
goog.net.XhrIo.XHR2_ON_TIMEOUT_ = "ontimeout";
goog.net.XhrIo.sendInstances_ = [];
goog.net.XhrIo.send = function(url, opt_callback, opt_method, opt_content, opt_headers, opt_timeoutInterval, opt_withCredentials) {
var x = new goog.net.XhrIo;
goog.net.XhrIo.sendInstances_.push(x);
if (opt_callback) {
x.listen(goog.net.EventType.COMPLETE, opt_callback);
}
x.listenOnce(goog.net.EventType.READY, x.cleanupSend_);
if (opt_timeoutInterval) {
x.setTimeoutInterval(opt_timeoutInterval);
}
if (opt_withCredentials) {
x.setWithCredentials(opt_withCredentials);
}
x.send(url, opt_method, opt_content, opt_headers);
return x;
};
goog.net.XhrIo.cleanup = function() {
var instances = goog.net.XhrIo.sendInstances_;
while (instances.length) {
instances.pop().dispose();
}
};
goog.net.XhrIo.protectEntryPoints = function(errorHandler) {
goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_ = errorHandler.protectEntryPoint(goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_);
};
goog.net.XhrIo.prototype.cleanupSend_ = function() {
this.dispose();
goog.array.remove(goog.net.XhrIo.sendInstances_, this);
};
goog.net.XhrIo.prototype.getTimeoutInterval = function() {
return this.timeoutInterval_;
};
goog.net.XhrIo.prototype.setTimeoutInterval = function(ms) {
this.timeoutInterval_ = Math.max(0, ms);
};
goog.net.XhrIo.prototype.setResponseType = function(type) {
this.responseType_ = type;
};
goog.net.XhrIo.prototype.getResponseType = function() {
return this.responseType_;
};
goog.net.XhrIo.prototype.setWithCredentials = function(withCredentials) {
this.withCredentials_ = withCredentials;
};
goog.net.XhrIo.prototype.getWithCredentials = function() {
return this.withCredentials_;
};
goog.net.XhrIo.prototype.setProgressEventsEnabled = function(enabled) {
this.progressEventsEnabled_ = enabled;
};
goog.net.XhrIo.prototype.getProgressEventsEnabled = function() {
return this.progressEventsEnabled_;
};
goog.net.XhrIo.prototype.send = function(url, opt_method, opt_content, opt_headers) {
if (this.xhr_) {
throw Error("[goog.net.XhrIo] Object is active with another request\x3d" + this.lastUri_ + "; newUri\x3d" + url);
}
var method = opt_method ? opt_method.toUpperCase() : "GET";
this.lastUri_ = url;
this.lastError_ = "";
this.lastErrorCode_ = goog.net.ErrorCode.NO_ERROR;
this.lastMethod_ = method;
this.errorDispatched_ = false;
this.active_ = true;
this.xhr_ = this.createXhr();
this.xhrOptions_ = this.xmlHttpFactory_ ? this.xmlHttpFactory_.getOptions() : goog.net.XmlHttp.getOptions();
this.xhr_.onreadystatechange = goog.bind(this.onReadyStateChange_, this);
if (this.getProgressEventsEnabled() && "onprogress" in this.xhr_) {
this.xhr_.onprogress = goog.bind(function(e) {
this.onProgressHandler_(e, true);
}, this);
if (this.xhr_.upload) {
this.xhr_.upload.onprogress = goog.bind(this.onProgressHandler_, this);
}
}
try {
goog.log.fine(this.logger_, this.formatMsg_("Opening Xhr"));
this.inOpen_ = true;
this.xhr_.open(method, String(url), true);
this.inOpen_ = false;
} catch (err) {
goog.log.fine(this.logger_, this.formatMsg_("Error opening Xhr: " + err.message));
this.error_(goog.net.ErrorCode.EXCEPTION, err);
return;
}
var content = opt_content || "";
var headers = this.headers.clone();
if (opt_headers) {
goog.structs.forEach(opt_headers, function(value, key) {
headers.set(key, value);
});
}
var contentTypeKey = goog.array.find(headers.getKeys(), goog.net.XhrIo.isContentTypeHeader_);
var contentIsFormData = goog.global["FormData"] && content instanceof goog.global["FormData"];
if (goog.array.contains(goog.net.XhrIo.METHODS_WITH_FORM_DATA, method) && !contentTypeKey && !contentIsFormData) {
headers.set(goog.net.XhrIo.CONTENT_TYPE_HEADER, goog.net.XhrIo.FORM_CONTENT_TYPE);
}
headers.forEach(function(value, key) {
this.xhr_.setRequestHeader(key, value);
}, this);
if (this.responseType_) {
this.xhr_.responseType = this.responseType_;
}
if (goog.object.containsKey(this.xhr_, "withCredentials")) {
this.xhr_.withCredentials = this.withCredentials_;
}
try {
this.cleanUpTimeoutTimer_();
if (this.timeoutInterval_ > 0) {
this.useXhr2Timeout_ = goog.net.XhrIo.shouldUseXhr2Timeout_(this.xhr_);
goog.log.fine(this.logger_, this.formatMsg_("Will abort after " + this.timeoutInterval_ + "ms if incomplete, xhr2 " + this.useXhr2Timeout_));
if (this.useXhr2Timeout_) {
this.xhr_[goog.net.XhrIo.XHR2_TIMEOUT_] = this.timeoutInterval_;
this.xhr_[goog.net.XhrIo.XHR2_ON_TIMEOUT_] = goog.bind(this.timeout_, this);
} else {
this.timeoutId_ = goog.Timer.callOnce(this.timeout_, this.timeoutInterval_, this);
}
}
goog.log.fine(this.logger_, this.formatMsg_("Sending request"));
this.inSend_ = true;
this.xhr_.send(content);
this.inSend_ = false;
} catch (err) {
goog.log.fine(this.logger_, this.formatMsg_("Send error: " + err.message));
this.error_(goog.net.ErrorCode.EXCEPTION, err);
}
};
goog.net.XhrIo.shouldUseXhr2Timeout_ = function(xhr) {
return goog.userAgent.IE && goog.userAgent.isVersionOrHigher(9) && goog.isNumber(xhr[goog.net.XhrIo.XHR2_TIMEOUT_]) && goog.isDef(xhr[goog.net.XhrIo.XHR2_ON_TIMEOUT_]);
};
goog.net.XhrIo.isContentTypeHeader_ = function(header) {
return goog.string.caseInsensitiveEquals(goog.net.XhrIo.CONTENT_TYPE_HEADER, header);
};
goog.net.XhrIo.prototype.createXhr = function() {
return this.xmlHttpFactory_ ? this.xmlHttpFactory_.createInstance() : goog.net.XmlHttp();
};
goog.net.XhrIo.prototype.timeout_ = function() {
if (typeof goog == "undefined") {
} else {
if (this.xhr_) {
this.lastError_ = "Timed out after " + this.timeoutInterval_ + "ms, aborting";
this.lastErrorCode_ = goog.net.ErrorCode.TIMEOUT;
goog.log.fine(this.logger_, this.formatMsg_(this.lastError_));
this.dispatchEvent(goog.net.EventType.TIMEOUT);
this.abort(goog.net.ErrorCode.TIMEOUT);
}
}
};
goog.net.XhrIo.prototype.error_ = function(errorCode, err) {
this.active_ = false;
if (this.xhr_) {
this.inAbort_ = true;
this.xhr_.abort();
this.inAbort_ = false;
}
this.lastError_ = err;
this.lastErrorCode_ = errorCode;
this.dispatchErrors_();
this.cleanUpXhr_();
};
goog.net.XhrIo.prototype.dispatchErrors_ = function() {
if (!this.errorDispatched_) {
this.errorDispatched_ = true;
this.dispatchEvent(goog.net.EventType.COMPLETE);
this.dispatchEvent(goog.net.EventType.ERROR);
}
};
goog.net.XhrIo.prototype.abort = function(opt_failureCode) {
if (this.xhr_ && this.active_) {
goog.log.fine(this.logger_, this.formatMsg_("Aborting"));
this.active_ = false;
this.inAbort_ = true;
this.xhr_.abort();
this.inAbort_ = false;
this.lastErrorCode_ = opt_failureCode || goog.net.ErrorCode.ABORT;
this.dispatchEvent(goog.net.EventType.COMPLETE);
this.dispatchEvent(goog.net.EventType.ABORT);
this.cleanUpXhr_();
}
};
goog.net.XhrIo.prototype.disposeInternal = function() {
if (this.xhr_) {
if (this.active_) {
this.active_ = false;
this.inAbort_ = true;
this.xhr_.abort();
this.inAbort_ = false;
}
this.cleanUpXhr_(true);
}
goog.net.XhrIo.base(this, "disposeInternal");
};
goog.net.XhrIo.prototype.onReadyStateChange_ = function() {
if (this.isDisposed()) {
return;
}
if (!this.inOpen_ && !this.inSend_ && !this.inAbort_) {
this.onReadyStateChangeEntryPoint_();
} else {
this.onReadyStateChangeHelper_();
}
};
goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_ = function() {
this.onReadyStateChangeHelper_();
};
goog.net.XhrIo.prototype.onReadyStateChangeHelper_ = function() {
if (!this.active_) {
return;
}
if (typeof goog == "undefined") {
} else {
if (this.xhrOptions_[goog.net.XmlHttp.OptionType.LOCAL_REQUEST_ERROR] && this.getReadyState() == goog.net.XmlHttp.ReadyState.COMPLETE && this.getStatus() == 2) {
goog.log.fine(this.logger_, this.formatMsg_("Local request error detected and ignored"));
} else {
if (this.inSend_ && this.getReadyState() == goog.net.XmlHttp.ReadyState.COMPLETE) {
goog.Timer.callOnce(this.onReadyStateChange_, 0, this);
return;
}
this.dispatchEvent(goog.net.EventType.READY_STATE_CHANGE);
if (this.isComplete()) {
goog.log.fine(this.logger_, this.formatMsg_("Request complete"));
this.active_ = false;
try {
if (this.isSuccess()) {
this.dispatchEvent(goog.net.EventType.COMPLETE);
this.dispatchEvent(goog.net.EventType.SUCCESS);
} else {
this.lastErrorCode_ = goog.net.ErrorCode.HTTP_ERROR;
this.lastError_ = this.getStatusText() + " [" + this.getStatus() + "]";
this.dispatchErrors_();
}
} finally {
this.cleanUpXhr_();
}
}
}
}
};
goog.net.XhrIo.prototype.onProgressHandler_ = function(e, opt_isDownload) {
goog.asserts.assert(e.type === goog.net.EventType.PROGRESS, "goog.net.EventType.PROGRESS is of the same type as raw XHR progress.");
this.dispatchEvent(goog.net.XhrIo.buildProgressEvent_(e, goog.net.EventType.PROGRESS));
this.dispatchEvent(goog.net.XhrIo.buildProgressEvent_(e, opt_isDownload ? goog.net.EventType.DOWNLOAD_PROGRESS : goog.net.EventType.UPLOAD_PROGRESS));
};
goog.net.XhrIo.buildProgressEvent_ = function(e, eventType) {
return ({type:eventType, lengthComputable:e.lengthComputable, loaded:e.loaded, total:e.total});
};
goog.net.XhrIo.prototype.cleanUpXhr_ = function(opt_fromDispose) {
if (this.xhr_) {
this.cleanUpTimeoutTimer_();
var xhr = this.xhr_;
var clearedOnReadyStateChange = this.xhrOptions_[goog.net.XmlHttp.OptionType.USE_NULL_FUNCTION] ? goog.nullFunction : null;
this.xhr_ = null;
this.xhrOptions_ = null;
if (!opt_fromDispose) {
this.dispatchEvent(goog.net.EventType.READY);
}
try {
xhr.onreadystatechange = clearedOnReadyStateChange;
} catch (e) {
goog.log.error(this.logger_, "Problem encountered resetting onreadystatechange: " + e.message);
}
}
};
goog.net.XhrIo.prototype.cleanUpTimeoutTimer_ = function() {
if (this.xhr_ && this.useXhr2Timeout_) {
this.xhr_[goog.net.XhrIo.XHR2_ON_TIMEOUT_] = null;
}
if (goog.isNumber(this.timeoutId_)) {
goog.Timer.clear(this.timeoutId_);
this.timeoutId_ = null;
}
};
goog.net.XhrIo.prototype.isActive = function() {
return !!this.xhr_;
};
goog.net.XhrIo.prototype.isComplete = function() {
return this.getReadyState() == goog.net.XmlHttp.ReadyState.COMPLETE;
};
goog.net.XhrIo.prototype.isSuccess = function() {
var status = this.getStatus();
return goog.net.HttpStatus.isSuccess(status) || status === 0 && !this.isLastUriEffectiveSchemeHttp_();
};
goog.net.XhrIo.prototype.isLastUriEffectiveSchemeHttp_ = function() {
var scheme = goog.uri.utils.getEffectiveScheme(String(this.lastUri_));
return goog.net.XhrIo.HTTP_SCHEME_PATTERN.test(scheme);
};
goog.net.XhrIo.prototype.getReadyState = function() {
return this.xhr_ ? (this.xhr_.readyState) : goog.net.XmlHttp.ReadyState.UNINITIALIZED;
};
goog.net.XhrIo.prototype.getStatus = function() {
try {
return this.getReadyState() > goog.net.XmlHttp.ReadyState.LOADED ? this.xhr_.status : -1;
} catch (e) {
return -1;
}
};
goog.net.XhrIo.prototype.getStatusText = function() {
try {
return this.getReadyState() > goog.net.XmlHttp.ReadyState.LOADED ? this.xhr_.statusText : "";
} catch (e) {
goog.log.fine(this.logger_, "Can not get status: " + e.message);
return "";
}
};
goog.net.XhrIo.prototype.getLastUri = function() {
return String(this.lastUri_);
};
goog.net.XhrIo.prototype.getResponseText = function() {
try {
return this.xhr_ ? this.xhr_.responseText : "";
} catch (e) {
goog.log.fine(this.logger_, "Can not get responseText: " + e.message);
return "";
}
};
goog.net.XhrIo.prototype.getResponseBody = function() {
try {
if (this.xhr_ && "responseBody" in this.xhr_) {
return this.xhr_["responseBody"];
}
} catch (e) {
goog.log.fine(this.logger_, "Can not get responseBody: " + e.message);
}
return null;
};
goog.net.XhrIo.prototype.getResponseXml = function() {
try {
return this.xhr_ ? this.xhr_.responseXML : null;
} catch (e) {
goog.log.fine(this.logger_, "Can not get responseXML: " + e.message);
return null;
}
};
goog.net.XhrIo.prototype.getResponseJson = function(opt_xssiPrefix) {
if (!this.xhr_) {
return undefined;
}
var responseText = this.xhr_.responseText;
if (opt_xssiPrefix && responseText.indexOf(opt_xssiPrefix) == 0) {
responseText = responseText.substring(opt_xssiPrefix.length);
}
return goog.json.parse(responseText);
};
goog.net.XhrIo.prototype.getResponse = function() {
try {
if (!this.xhr_) {
return null;
}
if ("response" in this.xhr_) {
return this.xhr_.response;
}
switch(this.responseType_) {
case goog.net.XhrIo.ResponseType.DEFAULT:
;
case goog.net.XhrIo.ResponseType.TEXT:
return this.xhr_.responseText;
case goog.net.XhrIo.ResponseType.ARRAY_BUFFER:
if ("mozResponseArrayBuffer" in this.xhr_) {
return this.xhr_.mozResponseArrayBuffer;
}
;
}
goog.log.error(this.logger_, "Response type " + this.responseType_ + " is not " + "supported on this browser");
return null;
} catch (e) {
goog.log.fine(this.logger_, "Can not get response: " + e.message);
return null;
}
};
goog.net.XhrIo.prototype.getResponseHeader = function(key) {
return this.xhr_ && this.isComplete() ? this.xhr_.getResponseHeader(key) : undefined;
};
goog.net.XhrIo.prototype.getAllResponseHeaders = function() {
return this.xhr_ && this.isComplete() ? this.xhr_.getAllResponseHeaders() : "";
};
goog.net.XhrIo.prototype.getResponseHeaders = function() {
var headersObject = {};
var headersArray = this.getAllResponseHeaders().split("\r\n");
for (var i = 0;i < headersArray.length;i++) {
if (goog.string.isEmptyOrWhitespace(headersArray[i])) {
continue;
}
var keyValue = goog.string.splitLimit(headersArray[i], ": ", 2);
if (headersObject[keyValue[0]]) {
headersObject[keyValue[0]] += ", " + keyValue[1];
} else {
headersObject[keyValue[0]] = keyValue[1];
}
}
return headersObject;
};
goog.net.XhrIo.prototype.getLastErrorCode = function() {
return this.lastErrorCode_;
};
goog.net.XhrIo.prototype.getLastError = function() {
return goog.isString(this.lastError_) ? this.lastError_ : String(this.lastError_);
};
goog.net.XhrIo.prototype.formatMsg_ = function(msg) {
return msg + " [" + this.lastMethod_ + " " + this.lastUri_ + " " + this.getStatus() + "]";
};
goog.debug.entryPointRegistry.register(function(transformer) {
goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_ = transformer(goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_);
});
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);
}
};
/*
Portions of this code are from MochiKit, received by
The Closure Authors under the MIT license. All other code is Copyright
2005-2009 The Closure Authors. All Rights Reserved.
*/
goog.provide("goog.async.Deferred");
goog.provide("goog.async.Deferred.AlreadyCalledError");
goog.provide("goog.async.Deferred.CanceledError");
goog.require("goog.Promise");
goog.require("goog.Thenable");
goog.require("goog.array");
goog.require("goog.asserts");
goog.require("goog.debug.Error");
goog.async.Deferred = function(opt_onCancelFunction, opt_defaultScope) {
this.sequence_ = [];
this.onCancelFunction_ = opt_onCancelFunction;
this.defaultScope_ = opt_defaultScope || null;
this.fired_ = false;
this.hadError_ = false;
this.result_ = undefined;
this.blocked_ = false;
this.blocking_ = false;
this.silentlyCanceled_ = false;
this.unhandledErrorId_ = 0;
this.parent_ = null;
this.branches_ = 0;
if (goog.async.Deferred.LONG_STACK_TRACES) {
this.constructorStack_ = null;
if (Error.captureStackTrace) {
var target = {stack:""};
Error.captureStackTrace(target, goog.async.Deferred);
if (typeof target.stack == "string") {
this.constructorStack_ = target.stack.replace(/^[^\n]*\n/, "");
}
}
}
};
goog.define("goog.async.Deferred.STRICT_ERRORS", false);
goog.define("goog.async.Deferred.LONG_STACK_TRACES", false);
goog.async.Deferred.prototype.cancel = function(opt_deepCancel) {
if (!this.hasFired()) {
if (this.parent_) {
var parent = this.parent_;
delete this.parent_;
if (opt_deepCancel) {
parent.cancel(opt_deepCancel);
} else {
parent.branchCancel_();
}
}
if (this.onCancelFunction_) {
this.onCancelFunction_.call(this.defaultScope_, this);
} else {
this.silentlyCanceled_ = true;
}
if (!this.hasFired()) {
this.errback(new goog.async.Deferred.CanceledError(this));
}
} else {
if (this.result_ instanceof goog.async.Deferred) {
this.result_.cancel();
}
}
};
goog.async.Deferred.prototype.branchCancel_ = function() {
this.branches_--;
if (this.branches_ <= 0) {
this.cancel();
}
};
goog.async.Deferred.prototype.continue_ = function(isSuccess, res) {
this.blocked_ = false;
this.updateResult_(isSuccess, res);
};
goog.async.Deferred.prototype.updateResult_ = function(isSuccess, res) {
this.fired_ = true;
this.result_ = res;
this.hadError_ = !isSuccess;
this.fire_();
};
goog.async.Deferred.prototype.check_ = function() {
if (this.hasFired()) {
if (!this.silentlyCanceled_) {
throw new goog.async.Deferred.AlreadyCalledError(this);
}
this.silentlyCanceled_ = false;
}
};
goog.async.Deferred.prototype.callback = function(opt_result) {
this.check_();
this.assertNotDeferred_(opt_result);
this.updateResult_(true, opt_result);
};
goog.async.Deferred.prototype.errback = function(opt_result) {
this.check_();
this.assertNotDeferred_(opt_result);
this.makeStackTraceLong_(opt_result);
this.updateResult_(false, opt_result);
};
goog.async.Deferred.prototype.makeStackTraceLong_ = function(error) {
if (!goog.async.Deferred.LONG_STACK_TRACES) {
return;
}
if (this.constructorStack_ && goog.isObject(error) && error.stack && /^[^\n]+(\n [^\n]+)+/.test(error.stack)) {
error.stack = error.stack + "\nDEFERRED OPERATION:\n" + this.constructorStack_;
}
};
goog.async.Deferred.prototype.assertNotDeferred_ = function(obj) {
goog.asserts.assert(!(obj instanceof goog.async.Deferred), "An execution sequence may not be initiated with a blocking Deferred.");
};
goog.async.Deferred.prototype.addCallback = function(cb, opt_scope) {
return this.addCallbacks(cb, null, opt_scope);
};
goog.async.Deferred.prototype.addErrback = function(eb, opt_scope) {
return this.addCallbacks(null, eb, opt_scope);
};
goog.async.Deferred.prototype.addBoth = function(f, opt_scope) {
return this.addCallbacks(f, f, opt_scope);
};
goog.async.Deferred.prototype.addFinally = function(f, opt_scope) {
var self = this;
return this.addCallbacks(f, function(err) {
var result = f.call(self, err);
if (!goog.isDef(result)) {
throw err;
}
return result;
}, opt_scope);
};
goog.async.Deferred.prototype.addCallbacks = function(cb, eb, opt_scope) {
goog.asserts.assert(!this.blocking_, "Blocking Deferreds can not be re-used");
this.sequence_.push([cb, eb, opt_scope]);
if (this.hasFired()) {
this.fire_();
}
return this;
};
goog.async.Deferred.prototype.then = function(opt_onFulfilled, opt_onRejected, opt_context) {
var resolve, reject;
var promise = new goog.Promise(function(res, rej) {
resolve = res;
reject = rej;
});
this.addCallbacks(resolve, function(reason) {
if (reason instanceof goog.async.Deferred.CanceledError) {
promise.cancel();
} else {
reject(reason);
}
});
return promise.then(opt_onFulfilled, opt_onRejected, opt_context);
};
goog.Thenable.addImplementation(goog.async.Deferred);
goog.async.Deferred.prototype.chainDeferred = function(otherDeferred) {
this.addCallbacks(otherDeferred.callback, otherDeferred.errback, otherDeferred);
return this;
};
goog.async.Deferred.prototype.awaitDeferred = function(otherDeferred) {
if (!(otherDeferred instanceof goog.async.Deferred)) {
return this.addCallback(function() {
return otherDeferred;
});
}
return this.addCallback(goog.bind(otherDeferred.branch, otherDeferred));
};
goog.async.Deferred.prototype.branch = function(opt_propagateCancel) {
var d = new goog.async.Deferred;
this.chainDeferred(d);
if (opt_propagateCancel) {
d.parent_ = this;
this.branches_++;
}
return d;
};
goog.async.Deferred.prototype.hasFired = function() {
return this.fired_;
};
goog.async.Deferred.prototype.isError = function(res) {
return res instanceof Error;
};
goog.async.Deferred.prototype.hasErrback_ = function() {
return goog.array.some(this.sequence_, function(sequenceRow) {
return goog.isFunction(sequenceRow[1]);
});
};
goog.async.Deferred.prototype.fire_ = function() {
if (this.unhandledErrorId_ && this.hasFired() && this.hasErrback_()) {
goog.async.Deferred.unscheduleError_(this.unhandledErrorId_);
this.unhandledErrorId_ = 0;
}
if (this.parent_) {
this.parent_.branches_--;
delete this.parent_;
}
var res = this.result_;
var unhandledException = false;
var isNewlyBlocked = false;
while (this.sequence_.length && !this.blocked_) {
var sequenceEntry = this.sequence_.shift();
var callback = sequenceEntry[0];
var errback = sequenceEntry[1];
var scope = sequenceEntry[2];
var f = this.hadError_ ? errback : callback;
if (f) {
try {
var ret = f.call(scope || this.defaultScope_, res);
if (goog.isDef(ret)) {
this.hadError_ = this.hadError_ && (ret == res || this.isError(ret));
this.result_ = res = ret;
}
if (goog.Thenable.isImplementedBy(res) || typeof goog.global["Promise"] === "function" && res instanceof goog.global["Promise"]) {
isNewlyBlocked = true;
this.blocked_ = true;
}
} catch (ex) {
res = ex;
this.hadError_ = true;
this.makeStackTraceLong_(res);
if (!this.hasErrback_()) {
unhandledException = true;
}
}
}
}
this.result_ = res;
if (isNewlyBlocked) {
var onCallback = goog.bind(this.continue_, this, true);
var onErrback = goog.bind(this.continue_, this, false);
if (res instanceof goog.async.Deferred) {
res.addCallbacks(onCallback, onErrback);
res.blocking_ = true;
} else {
res.then(onCallback, onErrback);
}
} else {
if (goog.async.Deferred.STRICT_ERRORS && this.isError(res) && !(res instanceof goog.async.Deferred.CanceledError)) {
this.hadError_ = true;
unhandledException = true;
}
}
if (unhandledException) {
this.unhandledErrorId_ = goog.async.Deferred.scheduleError_(res);
}
};
goog.async.Deferred.succeed = function(opt_result) {
var d = new goog.async.Deferred;
d.callback(opt_result);
return d;
};
goog.async.Deferred.fromPromise = function(promise) {
var d = new goog.async.Deferred;
d.callback();
d.addCallback(function() {
return promise;
});
return d;
};
goog.async.Deferred.fail = function(res) {
var d = new goog.async.Deferred;
d.errback(res);
return d;
};
goog.async.Deferred.canceled = function() {
var d = new goog.async.Deferred;
d.cancel();
return d;
};
goog.async.Deferred.when = function(value, callback, opt_scope) {
if (value instanceof goog.async.Deferred) {
return value.branch(true).addCallback(callback, opt_scope);
} else {
return goog.async.Deferred.succeed(value).addCallback(callback, opt_scope);
}
};
goog.async.Deferred.AlreadyCalledError = function(deferred) {
goog.debug.Error.call(this);
this.deferred = deferred;
};
goog.inherits(goog.async.Deferred.AlreadyCalledError, goog.debug.Error);
goog.async.Deferred.AlreadyCalledError.prototype.message = "Deferred has already fired";
goog.async.Deferred.AlreadyCalledError.prototype.name = "AlreadyCalledError";
goog.async.Deferred.CanceledError = function(deferred) {
goog.debug.Error.call(this);
this.deferred = deferred;
};
goog.inherits(goog.async.Deferred.CanceledError, goog.debug.Error);
goog.async.Deferred.CanceledError.prototype.message = "Deferred was canceled";
goog.async.Deferred.CanceledError.prototype.name = "CanceledError";
goog.async.Deferred.Error_ = function(error) {
this.id_ = goog.global.setTimeout(goog.bind(this.throwError, this), 0);
this.error_ = error;
};
goog.async.Deferred.Error_.prototype.throwError = function() {
goog.asserts.assert(goog.async.Deferred.errorMap_[this.id_], "Cannot throw an error that is not scheduled.");
delete goog.async.Deferred.errorMap_[this.id_];
throw this.error_;
};
goog.async.Deferred.Error_.prototype.resetTimer = function() {
goog.global.clearTimeout(this.id_);
};
goog.async.Deferred.errorMap_ = {};
goog.async.Deferred.scheduleError_ = function(error) {
var deferredError = new goog.async.Deferred.Error_(error);
goog.async.Deferred.errorMap_[deferredError.id_] = deferredError;
return deferredError.id_;
};
goog.async.Deferred.unscheduleError_ = function(id) {
var error = goog.async.Deferred.errorMap_[id];
if (error) {
error.resetTimer();
delete goog.async.Deferred.errorMap_[id];
}
};
goog.async.Deferred.assertNoErrors = function() {
var map = goog.async.Deferred.errorMap_;
for (var key in map) {
var error = map[key];
error.resetTimer();
error.throwError();
}
};
goog.provide("goog.Delay");
goog.provide("goog.async.Delay");
goog.require("goog.Disposable");
goog.require("goog.Timer");
goog.async.Delay = function(listener, opt_interval, opt_handler) {
goog.async.Delay.base(this, "constructor");
this.listener_ = listener;
this.interval_ = opt_interval || 0;
this.handler_ = opt_handler;
this.callback_ = goog.bind(this.doAction_, this);
};
goog.inherits(goog.async.Delay, goog.Disposable);
goog.Delay = goog.async.Delay;
goog.async.Delay.prototype.id_ = 0;
goog.async.Delay.prototype.disposeInternal = function() {
goog.async.Delay.base(this, "disposeInternal");
this.stop();
delete this.listener_;
delete this.handler_;
};
goog.async.Delay.prototype.start = function(opt_interval) {
this.stop();
this.id_ = goog.Timer.callOnce(this.callback_, goog.isDef(opt_interval) ? opt_interval : this.interval_);
};
goog.async.Delay.prototype.startIfNotActive = function(opt_interval) {
if (!this.isActive()) {
this.start(opt_interval);
}
};
goog.async.Delay.prototype.stop = function() {
if (this.isActive()) {
goog.Timer.clear(this.id_);
}
this.id_ = 0;
};
goog.async.Delay.prototype.fire = function() {
this.stop();
this.doAction_();
};
goog.async.Delay.prototype.fireIfActive = function() {
if (this.isActive()) {
this.fire();
}
};
goog.async.Delay.prototype.isActive = function() {
return this.id_ != 0;
};
goog.async.Delay.prototype.doAction_ = function() {
this.id_ = 0;
if (this.listener_) {
this.listener_.call(this.handler_);
}
};
goog.provide("goog.events.EventHandler");
goog.require("goog.Disposable");
goog.require("goog.events");
goog.require("goog.object");
goog.forwardDeclare("goog.events.EventWrapper");
goog.events.EventHandler = function(opt_scope) {
goog.Disposable.call(this);
this.handler_ = opt_scope;
this.keys_ = {};
};
goog.inherits(goog.events.EventHandler, goog.Disposable);
goog.events.EventHandler.typeArray_ = [];
goog.events.EventHandler.prototype.listen = function(src, type, opt_fn, opt_capture) {
return this.listen_(src, type, opt_fn, opt_capture);
};
goog.events.EventHandler.prototype.listenWithScope = function(src, type, fn, capture, scope) {
return this.listen_(src, type, fn, capture, scope);
};
goog.events.EventHandler.prototype.listen_ = function(src, type, opt_fn, opt_capture, opt_scope) {
if (!goog.isArray(type)) {
if (type) {
goog.events.EventHandler.typeArray_[0] = type.toString();
}
type = goog.events.EventHandler.typeArray_;
}
for (var i = 0;i < type.length;i++) {
var listenerObj = goog.events.listen(src, type[i], opt_fn || this.handleEvent, opt_capture || false, opt_scope || this.handler_ || this);
if (!listenerObj) {
return this;
}
var key = listenerObj.key;
this.keys_[key] = listenerObj;
}
return this;
};
goog.events.EventHandler.prototype.listenOnce = function(src, type, opt_fn, opt_capture) {
return this.listenOnce_(src, type, opt_fn, opt_capture);
};
goog.events.EventHandler.prototype.listenOnceWithScope = function(src, type, fn, capture, scope) {
return this.listenOnce_(src, type, fn, capture, scope);
};
goog.events.EventHandler.prototype.listenOnce_ = function(src, type, opt_fn, opt_capture, opt_scope) {
if (goog.isArray(type)) {
for (var i = 0;i < type.length;i++) {
this.listenOnce_(src, type[i], opt_fn, opt_capture, opt_scope);
}
} else {
var listenerObj = goog.events.listenOnce(src, type, opt_fn || this.handleEvent, opt_capture, opt_scope || this.handler_ || this);
if (!listenerObj) {
return this;
}
var key = listenerObj.key;
this.keys_[key] = listenerObj;
}
return this;
};
goog.events.EventHandler.prototype.listenWithWrapper = function(src, wrapper, listener, opt_capt) {
return this.listenWithWrapper_(src, wrapper, listener, opt_capt);
};
goog.events.EventHandler.prototype.listenWithWrapperAndScope = function(src, wrapper, listener, capture, scope) {
return this.listenWithWrapper_(src, wrapper, listener, capture, scope);
};
goog.events.EventHandler.prototype.listenWithWrapper_ = function(src, wrapper, listener, opt_capt, opt_scope) {
wrapper.listen(src, listener, opt_capt, opt_scope || this.handler_ || this, this);
return this;
};
goog.events.EventHandler.prototype.getListenerCount = function() {
var count = 0;
for (var key in this.keys_) {
if (Object.prototype.hasOwnProperty.call(this.keys_, key)) {
count++;
}
}
return count;
};
goog.events.EventHandler.prototype.unlisten = function(src, type, opt_fn, opt_capture, opt_scope) {
if (goog.isArray(type)) {
for (var i = 0;i < type.length;i++) {
this.unlisten(src, type[i], opt_fn, opt_capture, opt_scope);
}
} else {
var listener = goog.events.getListener(src, type, opt_fn || this.handleEvent, opt_capture, opt_scope || this.handler_ || this);
if (listener) {
goog.events.unlistenByKey(listener);
delete this.keys_[listener.key];
}
}
return this;
};
goog.events.EventHandler.prototype.unlistenWithWrapper = function(src, wrapper, listener, opt_capt, opt_scope) {
wrapper.unlisten(src, listener, opt_capt, opt_scope || this.handler_ || this, this);
return this;
};
goog.events.EventHandler.prototype.removeAll = function() {
goog.object.forEach(this.keys_, function(listenerObj, key) {
if (this.keys_.hasOwnProperty(key)) {
goog.events.unlistenByKey(listenerObj);
}
}, this);
this.keys_ = {};
};
goog.events.EventHandler.prototype.disposeInternal = function() {
goog.events.EventHandler.superClass_.disposeInternal.call(this);
this.removeAll();
};
goog.events.EventHandler.prototype.handleEvent = function(e) {
throw Error("EventHandler.handleEvent not implemented");
};
goog.provide("goog.messaging.MessageChannel");
goog.messaging.MessageChannel = function() {
};
goog.messaging.MessageChannel.prototype.connect = function(opt_connectCb) {
};
goog.messaging.MessageChannel.prototype.isConnected = function() {
};
goog.messaging.MessageChannel.prototype.registerService = function(serviceName, callback, opt_objectPayload) {
};
goog.messaging.MessageChannel.prototype.registerDefaultService = function(callback) {
};
goog.messaging.MessageChannel.prototype.send = function(serviceName, payload) {
};
goog.provide("goog.messaging.AbstractChannel");
goog.require("goog.Disposable");
goog.require("goog.json");
goog.require("goog.log");
goog.require("goog.messaging.MessageChannel");
goog.messaging.AbstractChannel = function() {
goog.messaging.AbstractChannel.base(this, "constructor");
this.services_ = {};
};
goog.inherits(goog.messaging.AbstractChannel, goog.Disposable);
goog.messaging.AbstractChannel.prototype.defaultService_;
goog.messaging.AbstractChannel.prototype.logger = goog.log.getLogger("goog.messaging.AbstractChannel");
goog.messaging.AbstractChannel.prototype.connect = function(opt_connectCb) {
if (opt_connectCb) {
opt_connectCb();
}
};
goog.messaging.AbstractChannel.prototype.isConnected = function() {
return true;
};
goog.messaging.AbstractChannel.prototype.registerService = function(serviceName, callback, opt_objectPayload) {
this.services_[serviceName] = {callback:callback, objectPayload:!!opt_objectPayload};
};
goog.messaging.AbstractChannel.prototype.registerDefaultService = function(callback) {
this.defaultService_ = callback;
};
goog.messaging.AbstractChannel.prototype.send = goog.abstractMethod;
goog.messaging.AbstractChannel.prototype.deliver = function(serviceName, payload) {
var service = this.getService(serviceName, payload);
if (!service) {
return;
}
var decodedPayload = this.decodePayload(serviceName, payload, service.objectPayload);
if (goog.isDefAndNotNull(decodedPayload)) {
service.callback(decodedPayload);
}
};
goog.messaging.AbstractChannel.prototype.getService = function(serviceName, payload) {
var service = this.services_[serviceName];
if (service) {
return service;
} else {
if (this.defaultService_) {
var callback = goog.partial(this.defaultService_, serviceName);
var objectPayload = goog.isObject(payload);
return {callback:callback, objectPayload:objectPayload};
}
}
goog.log.warning(this.logger, 'Unknown service name "' + serviceName + '"');
return null;
};
goog.messaging.AbstractChannel.prototype.decodePayload = function(serviceName, payload, objectPayload) {
if (objectPayload && goog.isString(payload)) {
try {
return goog.json.parse(payload);
} catch (err) {
goog.log.warning(this.logger, "Expected JSON payload for " + serviceName + ', was "' + payload + '"');
return null;
}
} else {
if (!objectPayload && !goog.isString(payload)) {
return goog.json.serialize(payload);
}
}
return payload;
};
goog.messaging.AbstractChannel.prototype.disposeInternal = function() {
goog.messaging.AbstractChannel.base(this, "disposeInternal");
delete this.logger;
delete this.services_;
delete this.defaultService_;
};
goog.provide("goog.net.xpc.CrossPageChannelRole");
goog.net.xpc.CrossPageChannelRole = {OUTER:0, INNER:1};
goog.provide("goog.net.xpc.Transport");
goog.require("goog.Disposable");
goog.require("goog.dom");
goog.require("goog.net.xpc.TransportNames");
goog.net.xpc.Transport = function(opt_domHelper) {
goog.Disposable.call(this);
this.domHelper_ = opt_domHelper || goog.dom.getDomHelper();
};
goog.inherits(goog.net.xpc.Transport, goog.Disposable);
goog.net.xpc.Transport.prototype.transportType = 0;
goog.net.xpc.Transport.prototype.getType = function() {
return this.transportType;
};
goog.net.xpc.Transport.prototype.getWindow = function() {
return this.domHelper_.getWindow();
};
goog.net.xpc.Transport.prototype.getName = function() {
return goog.net.xpc.TransportNames[String(this.transportType)] || "";
};
goog.net.xpc.Transport.prototype.transportServiceHandler = goog.abstractMethod;
goog.net.xpc.Transport.prototype.connect = goog.abstractMethod;
goog.net.xpc.Transport.prototype.send = goog.abstractMethod;
goog.provide("goog.net.xpc.DirectTransport");
goog.require("goog.Timer");
goog.require("goog.async.Deferred");
goog.require("goog.events.EventHandler");
goog.require("goog.log");
goog.require("goog.net.xpc");
goog.require("goog.net.xpc.CfgFields");
goog.require("goog.net.xpc.CrossPageChannelRole");
goog.require("goog.net.xpc.Transport");
goog.require("goog.net.xpc.TransportTypes");
goog.require("goog.object");
goog.scope(function() {
var CfgFields = goog.net.xpc.CfgFields;
var CrossPageChannelRole = goog.net.xpc.CrossPageChannelRole;
var Deferred = goog.async.Deferred;
var EventHandler = goog.events.EventHandler;
var Timer = goog.Timer;
var Transport = goog.net.xpc.Transport;
goog.net.xpc.DirectTransport = function(channel, opt_domHelper) {
goog.net.xpc.DirectTransport.base(this, "constructor", opt_domHelper);
this.channel_ = channel;
this.eventHandler_ = new EventHandler(this);
this.registerDisposable(this.eventHandler_);
this.maybeAttemptToConnectTimer_ = new Timer(DirectTransport.CONNECTION_ATTEMPT_INTERVAL_MS_, this.getWindow());
this.registerDisposable(this.maybeAttemptToConnectTimer_);
this.setupAckReceived_ = new Deferred;
this.setupAckSent_ = new Deferred;
this.connected_ = new Deferred;
this.endpointId_ = goog.net.xpc.getRandomString(10);
this.peerEndpointId_ = null;
this.asyncSendsMap_ = {};
this.originalChannelName_ = this.channel_.name;
this.channel_.updateChannelNameAndCatalog(DirectTransport.getRoledChannelName_(this.channel_.name, this.channel_.getRole()));
this.initialized_ = false;
this.connected_.awaitDeferred(this.setupAckReceived_);
this.connected_.awaitDeferred(this.setupAckSent_);
this.connected_.addCallback(this.notifyConnected_, this);
this.connected_.callback(true);
this.eventHandler_.listen(this.maybeAttemptToConnectTimer_, Timer.TICK, this.maybeAttemptToConnect_);
goog.log.info(goog.net.xpc.logger, "DirectTransport created. role\x3d" + this.channel_.getRole());
};
goog.inherits(goog.net.xpc.DirectTransport, Transport);
var DirectTransport = goog.net.xpc.DirectTransport;
DirectTransport.CONNECTION_ATTEMPT_INTERVAL_MS_ = 100;
DirectTransport.CONNECTION_DELAY_INTERVAL_MS_ = 0;
DirectTransport.isSupported = function(peerWindow) {
try {
return window.document.domain == peerWindow.document.domain;
} catch (e) {
return false;
}
};
DirectTransport.activeCount_ = {};
DirectTransport.GLOBAL_TRANPORT_PATH_ = "crosswindowmessaging.channel";
DirectTransport.MESSAGE_DELIMITER_ = ",";
DirectTransport.initialize_ = function(listenWindow) {
var uid = goog.getUid(listenWindow);
var value = DirectTransport.activeCount_[uid] || 0;
if (value == 0) {
var globalProxy = goog.getObjectByName(DirectTransport.GLOBAL_TRANPORT_PATH_, listenWindow);
if (globalProxy == null) {
goog.exportSymbol(DirectTransport.GLOBAL_TRANPORT_PATH_, DirectTransport.messageReceivedHandler_, listenWindow);
}
}
DirectTransport.activeCount_[uid]++;
};
DirectTransport.getRoledChannelName_ = function(channelName, role) {
return channelName + "_" + role;
};
DirectTransport.messageReceivedHandler_ = function(literal) {
var msg = DirectTransport.Message_.fromLiteral(literal);
var channelName = msg.channelName;
var service = msg.service;
var payload = msg.payload;
goog.log.fine(goog.net.xpc.logger, "messageReceived: channel\x3d" + channelName + ", service\x3d" + service + ", payload\x3d" + payload);
var channel = goog.net.xpc.channels[channelName];
if (channel) {
channel.xpcDeliver(service, payload);
return true;
}
var transportMessageType = DirectTransport.parseTransportPayload_(payload)[0];
for (var staleChannelName in goog.net.xpc.channels) {
var staleChannel = goog.net.xpc.channels[staleChannelName];
if (staleChannel.getRole() == CrossPageChannelRole.INNER && !staleChannel.isConnected() && service == goog.net.xpc.TRANSPORT_SERVICE_ && transportMessageType == goog.net.xpc.SETUP) {
staleChannel.updateChannelNameAndCatalog(channelName);
staleChannel.xpcDeliver(service, payload);
return true;
}
}
goog.log.info(goog.net.xpc.logger, "channel name mismatch; message ignored.");
return false;
};
DirectTransport.prototype.transportType = goog.net.xpc.TransportTypes.DIRECT;
DirectTransport.prototype.transportServiceHandler = function(payload) {
var transportParts = DirectTransport.parseTransportPayload_(payload);
var transportMessageType = transportParts[0];
var peerEndpointId = transportParts[1];
switch(transportMessageType) {
case goog.net.xpc.SETUP_ACK_:
if (!this.setupAckReceived_.hasFired()) {
this.setupAckReceived_.callback(true);
}
break;
case goog.net.xpc.SETUP:
this.sendSetupAckMessage_();
if (this.peerEndpointId_ != null && this.peerEndpointId_ != peerEndpointId) {
goog.log.info(goog.net.xpc.logger, "Sending SETUP and changing peer ID to: " + peerEndpointId);
this.sendSetupMessage_();
}
this.peerEndpointId_ = peerEndpointId;
break;
}
};
DirectTransport.prototype.sendSetupMessage_ = function() {
var payload = goog.net.xpc.SETUP;
payload += DirectTransport.MESSAGE_DELIMITER_;
payload += this.endpointId_;
this.send(goog.net.xpc.TRANSPORT_SERVICE_, payload);
};
DirectTransport.prototype.sendSetupAckMessage_ = function() {
this.send(goog.net.xpc.TRANSPORT_SERVICE_, goog.net.xpc.SETUP_ACK_);
if (!this.setupAckSent_.hasFired()) {
this.setupAckSent_.callback(true);
}
};
DirectTransport.prototype.connect = function() {
var win = this.getWindow();
if (win) {
DirectTransport.initialize_(win);
this.initialized_ = true;
this.maybeAttemptToConnect_();
} else {
goog.log.fine(goog.net.xpc.logger, "connect(): no window to initialize.");
}
};
DirectTransport.prototype.maybeAttemptToConnect_ = function() {
var outerRole = this.channel_.getRole() == CrossPageChannelRole.OUTER;
if (this.channel_.isConnected()) {
this.maybeAttemptToConnectTimer_.stop();
return;
}
this.maybeAttemptToConnectTimer_.start();
this.sendSetupMessage_();
};
DirectTransport.prototype.send = function(service, payload) {
if (!this.channel_.getPeerWindowObject()) {
goog.log.fine(goog.net.xpc.logger, "send(): window not ready");
return;
}
var channelName = DirectTransport.getRoledChannelName_(this.originalChannelName_, this.getPeerRole_());
var message = new DirectTransport.Message_(channelName, service, payload);
if (this.channel_.getConfig()[CfgFields.DIRECT_TRANSPORT_SYNC_MODE]) {
this.executeScheduledSend_(message);
} else {
this.asyncSendsMap_[goog.getUid(message)] = Timer.callOnce(goog.bind(this.executeScheduledSend_, this, message), 0);
}
};
DirectTransport.prototype.executeScheduledSend_ = function(message) {
var messageId = goog.getUid(message);
if (this.asyncSendsMap_[messageId]) {
delete this.asyncSendsMap_[messageId];
}
try {
var peerProxy = goog.getObjectByName(DirectTransport.GLOBAL_TRANPORT_PATH_, this.channel_.getPeerWindowObject());
} catch (error) {
goog.log.warning(goog.net.xpc.logger, "Can't access other window, ignoring.", error);
return;
}
if (goog.isNull(peerProxy)) {
goog.log.warning(goog.net.xpc.logger, "Peer window had no global function.");
return;
}
try {
peerProxy(message.toLiteral());
goog.log.info(goog.net.xpc.logger, "send(): channelName\x3d" + message.channelName + " service\x3d" + message.service + " payload\x3d" + message.payload);
} catch (error) {
goog.log.warning(goog.net.xpc.logger, "Error performing call, ignoring.", error);
}
};
DirectTransport.prototype.getPeerRole_ = function() {
var role = this.channel_.getRole();
return role == goog.net.xpc.CrossPageChannelRole.OUTER ? goog.net.xpc.CrossPageChannelRole.INNER : goog.net.xpc.CrossPageChannelRole.OUTER;
};
DirectTransport.prototype.notifyConnected_ = function() {
this.channel_.notifyConnected(this.channel_.getConfig()[CfgFields.DIRECT_TRANSPORT_SYNC_MODE] ? DirectTransport.CONNECTION_DELAY_INTERVAL_MS_ : 0);
};
DirectTransport.prototype.disposeInternal = function() {
if (this.initialized_) {
var listenWindow = this.getWindow();
var uid = goog.getUid(listenWindow);
var value = --DirectTransport.activeCount_[uid];
if (value == 1) {
goog.exportSymbol(DirectTransport.GLOBAL_TRANPORT_PATH_, null, listenWindow);
}
}
if (this.asyncSendsMap_) {
goog.object.forEach(this.asyncSendsMap_, function(timerId) {
Timer.clear(timerId);
});
this.asyncSendsMap_ = null;
}
if (this.setupAckReceived_) {
this.setupAckReceived_.cancel();
delete this.setupAckReceived_;
}
if (this.setupAckSent_) {
this.setupAckSent_.cancel();
delete this.setupAckSent_;
}
if (this.connected_) {
this.connected_.cancel();
delete this.connected_;
}
DirectTransport.base(this, "disposeInternal");
};
DirectTransport.parseTransportPayload_ = function(payload) {
var transportParts = (payload.split(DirectTransport.MESSAGE_DELIMITER_));
transportParts[1] = transportParts[1] || null;
return transportParts;
};
DirectTransport.Message_ = function(channelName, service, payload) {
this.channelName = channelName;
this.service = service;
this.payload = payload;
};
DirectTransport.Message_.prototype.toLiteral = function() {
return {"channelName":this.channelName, "service":this.service, "payload":this.payload};
};
DirectTransport.Message_.fromLiteral = function(literal) {
return new DirectTransport.Message_(literal["channelName"], literal["service"], literal["payload"]);
};
});
goog.provide("goog.net.xpc.FrameElementMethodTransport");
goog.require("goog.log");
goog.require("goog.net.xpc");
goog.require("goog.net.xpc.CrossPageChannelRole");
goog.require("goog.net.xpc.Transport");
goog.require("goog.net.xpc.TransportTypes");
goog.net.xpc.FrameElementMethodTransport = function(channel, opt_domHelper) {
goog.net.xpc.FrameElementMethodTransport.base(this, "constructor", opt_domHelper);
this.channel_ = channel;
this.queue_ = [];
this.deliverQueuedCb_ = goog.bind(this.deliverQueued_, this);
};
goog.inherits(goog.net.xpc.FrameElementMethodTransport, goog.net.xpc.Transport);
goog.net.xpc.FrameElementMethodTransport.prototype.transportType = goog.net.xpc.TransportTypes.FRAME_ELEMENT_METHOD;
goog.net.xpc.FrameElementMethodTransport.prototype.attemptSetupCb_;
goog.net.xpc.FrameElementMethodTransport.prototype.outgoing_;
goog.net.xpc.FrameElementMethodTransport.prototype.iframeElm_;
goog.net.xpc.FrameElementMethodTransport.prototype.recursive_ = false;
goog.net.xpc.FrameElementMethodTransport.prototype.timer_ = 0;
goog.net.xpc.FrameElementMethodTransport.outgoing_ = null;
goog.net.xpc.FrameElementMethodTransport.prototype.connect = function() {
if (this.channel_.getRole() == goog.net.xpc.CrossPageChannelRole.OUTER) {
this.iframeElm_ = this.channel_.getIframeElement();
this.iframeElm_["XPC_toOuter"] = goog.bind(this.incoming_, this);
} else {
this.attemptSetup_();
}
};
goog.net.xpc.FrameElementMethodTransport.prototype.attemptSetup_ = function() {
var retry = true;
try {
if (!this.iframeElm_) {
this.iframeElm_ = this.getWindow().frameElement;
}
if (this.iframeElm_ && this.iframeElm_["XPC_toOuter"]) {
this.outgoing_ = this.iframeElm_["XPC_toOuter"];
this.iframeElm_["XPC_toOuter"]["XPC_toInner"] = goog.bind(this.incoming_, this);
retry = false;
this.send(goog.net.xpc.TRANSPORT_SERVICE_, goog.net.xpc.SETUP_ACK_);
this.channel_.notifyConnected();
}
} catch (e) {
goog.log.error(goog.net.xpc.logger, "exception caught while attempting setup: " + e);
}
if (retry) {
if (!this.attemptSetupCb_) {
this.attemptSetupCb_ = goog.bind(this.attemptSetup_, this);
}
this.getWindow().setTimeout(this.attemptSetupCb_, 100);
}
};
goog.net.xpc.FrameElementMethodTransport.prototype.transportServiceHandler = function(payload) {
if (this.channel_.getRole() == goog.net.xpc.CrossPageChannelRole.OUTER && !this.channel_.isConnected() && payload == goog.net.xpc.SETUP_ACK_) {
this.outgoing_ = this.iframeElm_["XPC_toOuter"]["XPC_toInner"];
this.channel_.notifyConnected();
} else {
throw Error("Got unexpected transport message.");
}
};
goog.net.xpc.FrameElementMethodTransport.prototype.incoming_ = function(serviceName, payload) {
if (!this.recursive_ && this.queue_.length == 0) {
this.channel_.xpcDeliver(serviceName, payload);
} else {
this.queue_.push({serviceName:serviceName, payload:payload});
if (this.queue_.length == 1) {
this.timer_ = this.getWindow().setTimeout(this.deliverQueuedCb_, 1);
}
}
};
goog.net.xpc.FrameElementMethodTransport.prototype.deliverQueued_ = function() {
while (this.queue_.length) {
var msg = this.queue_.shift();
this.channel_.xpcDeliver(msg.serviceName, msg.payload);
}
};
goog.net.xpc.FrameElementMethodTransport.prototype.send = function(service, payload) {
this.recursive_ = true;
this.outgoing_(service, payload);
this.recursive_ = false;
};
goog.net.xpc.FrameElementMethodTransport.prototype.disposeInternal = function() {
goog.net.xpc.FrameElementMethodTransport.superClass_.disposeInternal.call(this);
this.outgoing_ = null;
this.iframeElm_ = null;
};
goog.provide("goog.net.xpc.IframePollingTransport");
goog.provide("goog.net.xpc.IframePollingTransport.Receiver");
goog.provide("goog.net.xpc.IframePollingTransport.Sender");
goog.require("goog.array");
goog.require("goog.dom");
goog.require("goog.dom.TagName");
goog.require("goog.log");
goog.require("goog.log.Level");
goog.require("goog.net.xpc");
goog.require("goog.net.xpc.CfgFields");
goog.require("goog.net.xpc.CrossPageChannelRole");
goog.require("goog.net.xpc.Transport");
goog.require("goog.net.xpc.TransportTypes");
goog.require("goog.userAgent");
goog.net.xpc.IframePollingTransport = function(channel, opt_domHelper) {
goog.net.xpc.IframePollingTransport.base(this, "constructor", opt_domHelper);
this.channel_ = channel;
this.sendUri_ = this.channel_.getConfig()[goog.net.xpc.CfgFields.PEER_POLL_URI];
this.rcvUri_ = this.channel_.getConfig()[goog.net.xpc.CfgFields.LOCAL_POLL_URI];
this.sendQueue_ = [];
};
goog.inherits(goog.net.xpc.IframePollingTransport, goog.net.xpc.Transport);
goog.net.xpc.IframePollingTransport.prototype.pollsBeforeReconnect_ = 5;
goog.net.xpc.IframePollingTransport.prototype.transportType = goog.net.xpc.TransportTypes.IFRAME_POLLING;
goog.net.xpc.IframePollingTransport.prototype.sequence_ = 0;
goog.net.xpc.IframePollingTransport.prototype.waitForAck_ = false;
goog.net.xpc.IframePollingTransport.prototype.initialized_ = false;
goog.net.xpc.IframePollingTransport.prototype.reconnectFrame_ = null;
goog.net.xpc.IframePollingTransport.prototype.ackReceiver_;
goog.net.xpc.IframePollingTransport.prototype.ackSender_;
goog.net.xpc.IframePollingTransport.prototype.ackIframeElm_;
goog.net.xpc.IframePollingTransport.prototype.ackWinObj_;
goog.net.xpc.IframePollingTransport.prototype.checkLocalFramesPresentCb_;
goog.net.xpc.IframePollingTransport.prototype.deliveryQueue_;
goog.net.xpc.IframePollingTransport.prototype.msgIframeElm_;
goog.net.xpc.IframePollingTransport.prototype.msgReceiver_;
goog.net.xpc.IframePollingTransport.prototype.msgSender_;
goog.net.xpc.IframePollingTransport.prototype.msgWinObj_;
goog.net.xpc.IframePollingTransport.prototype.rcvdConnectionSetupAck_;
goog.net.xpc.IframePollingTransport.prototype.sentConnectionSetupAck_;
goog.net.xpc.IframePollingTransport.prototype.sentConnectionSetup_;
goog.net.xpc.IframePollingTransport.prototype.parts_;
goog.net.xpc.IframePollingTransport.IFRAME_PREFIX = "googlexpc";
goog.net.xpc.IframePollingTransport.prototype.getMsgFrameName_ = function() {
return goog.net.xpc.IframePollingTransport.IFRAME_PREFIX + "_" + this.channel_.name + "_msg";
};
goog.net.xpc.IframePollingTransport.prototype.getAckFrameName_ = function() {
return goog.net.xpc.IframePollingTransport.IFRAME_PREFIX + "_" + this.channel_.name + "_ack";
};
goog.net.xpc.IframePollingTransport.prototype.isChannelAvailable = function() {
return !this.isDisposed() && this.channel_.isPeerAvailable();
};
goog.net.xpc.IframePollingTransport.prototype.getPeerFrames_ = function() {
try {
if (this.isChannelAvailable()) {
return this.channel_.getPeerWindowObject().frames || {};
}
} catch (e) {
goog.log.fine(goog.net.xpc.logger, "error retrieving peer frames");
}
return {};
};
goog.net.xpc.IframePollingTransport.prototype.getPeerFrame_ = function(frameName) {
return this.getPeerFrames_()[frameName];
};
goog.net.xpc.IframePollingTransport.prototype.connect = function() {
if (!this.isChannelAvailable()) {
return;
}
goog.log.fine(goog.net.xpc.logger, "transport connect called");
if (!this.initialized_) {
goog.log.fine(goog.net.xpc.logger, "initializing...");
this.constructSenderFrames_();
this.initialized_ = true;
}
this.checkForeignFramesReady_();
};
goog.net.xpc.IframePollingTransport.prototype.constructSenderFrames_ = function() {
var name = this.getMsgFrameName_();
this.msgIframeElm_ = this.constructSenderFrame_(name);
this.msgWinObj_ = this.getWindow().frames[name];
name = this.getAckFrameName_();
this.ackIframeElm_ = this.constructSenderFrame_(name);
this.ackWinObj_ = this.getWindow().frames[name];
};
goog.net.xpc.IframePollingTransport.prototype.constructSenderFrame_ = function(id) {
goog.log.log(goog.net.xpc.logger, goog.log.Level.FINEST, "constructing sender frame: " + id);
var ifr = goog.dom.createElement(goog.dom.TagName.IFRAME);
var s = ifr.style;
s.position = "absolute";
s.top = "-10px";
s.left = "10px";
s.width = "1px";
s.height = "1px";
ifr.id = ifr.name = id;
ifr.src = this.sendUri_ + "#INITIAL";
this.getWindow().document.body.appendChild(ifr);
return ifr;
};
goog.net.xpc.IframePollingTransport.prototype.maybeInnerPeerReconnect_ = function() {
if (this.reconnectFrame_ || this.pollsBeforeReconnect_-- > 0) {
return;
}
goog.log.log(goog.net.xpc.logger, goog.log.Level.FINEST, "Inner peer reconnect triggered.");
this.channel_.updateChannelNameAndCatalog(goog.net.xpc.getRandomString(10));
goog.log.log(goog.net.xpc.logger, goog.log.Level.FINEST, "switching channels: " + this.channel_.name);
this.deconstructSenderFrames_();
this.initialized_ = false;
this.reconnectFrame_ = this.constructSenderFrame_(goog.net.xpc.IframePollingTransport.IFRAME_PREFIX + "_reconnect_" + this.channel_.name);
};
goog.net.xpc.IframePollingTransport.prototype.outerPeerReconnect_ = function() {
goog.log.log(goog.net.xpc.logger, goog.log.Level.FINEST, "outerPeerReconnect called");
var frames = this.getPeerFrames_();
var length = frames.length;
for (var i = 0;i < length;i++) {
var frameName;
try {
if (frames[i] && frames[i].name) {
frameName = frames[i].name;
}
} catch (e) {
}
if (!frameName) {
continue;
}
var message = frameName.split("_");
if (message.length == 3 && message[0] == goog.net.xpc.IframePollingTransport.IFRAME_PREFIX && message[1] == "reconnect") {
this.channel_.name = message[2];
this.deconstructSenderFrames_();
this.initialized_ = false;
break;
}
}
};
goog.net.xpc.IframePollingTransport.prototype.deconstructSenderFrames_ = function() {
goog.log.log(goog.net.xpc.logger, goog.log.Level.FINEST, "deconstructSenderFrames called");
if (this.msgIframeElm_) {
this.msgIframeElm_.parentNode.removeChild(this.msgIframeElm_);
this.msgIframeElm_ = null;
this.msgWinObj_ = null;
}
if (this.ackIframeElm_) {
this.ackIframeElm_.parentNode.removeChild(this.ackIframeElm_);
this.ackIframeElm_ = null;
this.ackWinObj_ = null;
}
};
goog.net.xpc.IframePollingTransport.prototype.checkForeignFramesReady_ = function() {
if (!(this.isRcvFrameReady_(this.getMsgFrameName_()) && this.isRcvFrameReady_(this.getAckFrameName_()))) {
goog.log.log(goog.net.xpc.logger, goog.log.Level.FINEST, "foreign frames not (yet) present");
if (this.channel_.getRole() == goog.net.xpc.CrossPageChannelRole.INNER) {
this.maybeInnerPeerReconnect_();
} else {
if (this.channel_.getRole() == goog.net.xpc.CrossPageChannelRole.OUTER) {
this.outerPeerReconnect_();
}
}
this.getWindow().setTimeout(goog.bind(this.connect, this), 100);
} else {
goog.log.fine(goog.net.xpc.logger, "foreign frames present");
this.msgReceiver_ = new goog.net.xpc.IframePollingTransport.Receiver(this, this.getPeerFrame_(this.getMsgFrameName_()), goog.bind(this.processIncomingMsg, this));
this.ackReceiver_ = new goog.net.xpc.IframePollingTransport.Receiver(this, this.getPeerFrame_(this.getAckFrameName_()), goog.bind(this.processIncomingAck, this));
this.checkLocalFramesPresent_();
}
};
goog.net.xpc.IframePollingTransport.prototype.isRcvFrameReady_ = function(frameName) {
goog.log.log(goog.net.xpc.logger, goog.log.Level.FINEST, "checking for receive frame: " + frameName);
try {
var winObj = this.getPeerFrame_(frameName);
if (!winObj || winObj.location.href.indexOf(this.rcvUri_) != 0) {
return false;
}
} catch (e) {
return false;
}
return true;
};
goog.net.xpc.IframePollingTransport.prototype.checkLocalFramesPresent_ = function() {
var frames = this.getPeerFrames_();
if (!(frames[this.getAckFrameName_()] && frames[this.getMsgFrameName_()])) {
if (!this.checkLocalFramesPresentCb_) {
this.checkLocalFramesPresentCb_ = goog.bind(this.checkLocalFramesPresent_, this);
}
this.getWindow().setTimeout(this.checkLocalFramesPresentCb_, 100);
goog.log.fine(goog.net.xpc.logger, "local frames not (yet) present");
} else {
this.msgSender_ = new goog.net.xpc.IframePollingTransport.Sender(this.sendUri_, this.msgWinObj_);
this.ackSender_ = new goog.net.xpc.IframePollingTransport.Sender(this.sendUri_, this.ackWinObj_);
goog.log.fine(goog.net.xpc.logger, "local frames ready");
this.getWindow().setTimeout(goog.bind(function() {
this.msgSender_.send(goog.net.xpc.SETUP);
this.sentConnectionSetup_ = true;
this.waitForAck_ = true;
goog.log.fine(goog.net.xpc.logger, "SETUP sent");
}, this), 100);
}
};
goog.net.xpc.IframePollingTransport.prototype.checkIfConnected_ = function() {
if (this.sentConnectionSetupAck_ && this.rcvdConnectionSetupAck_) {
this.channel_.notifyConnected();
if (this.deliveryQueue_) {
goog.log.fine(goog.net.xpc.logger, "delivering queued messages " + "(" + this.deliveryQueue_.length + ")");
for (var i = 0, m;i < this.deliveryQueue_.length;i++) {
m = this.deliveryQueue_[i];
this.channel_.xpcDeliver(m.service, m.payload);
}
delete this.deliveryQueue_;
}
} else {
goog.log.log(goog.net.xpc.logger, goog.log.Level.FINEST, "checking if connected: " + "ack sent:" + this.sentConnectionSetupAck_ + ", ack rcvd: " + this.rcvdConnectionSetupAck_);
}
};
goog.net.xpc.IframePollingTransport.prototype.processIncomingMsg = function(raw) {
goog.log.log(goog.net.xpc.logger, goog.log.Level.FINEST, "msg received: " + raw);
if (raw == goog.net.xpc.SETUP) {
if (!this.ackSender_) {
return;
}
this.ackSender_.send(goog.net.xpc.SETUP_ACK_);
goog.log.log(goog.net.xpc.logger, goog.log.Level.FINEST, "SETUP_ACK sent");
this.sentConnectionSetupAck_ = true;
this.checkIfConnected_();
} else {
if (this.channel_.isConnected() || this.sentConnectionSetupAck_) {
var pos = raw.indexOf("|");
var head = raw.substring(0, pos);
var frame = raw.substring(pos + 1);
pos = head.indexOf(",");
if (pos == -1) {
var seq = head;
this.ackSender_.send("ACK:" + seq);
this.deliverPayload_(frame);
} else {
var seq = head.substring(0, pos);
this.ackSender_.send("ACK:" + seq);
var partInfo = head.substring(pos + 1).split("/");
var part0 = parseInt(partInfo[0], 10);
var part1 = parseInt(partInfo[1], 10);
if (part0 == 1) {
this.parts_ = [];
}
this.parts_.push(frame);
if (part0 == part1) {
this.deliverPayload_(this.parts_.join(""));
delete this.parts_;
}
}
} else {
goog.log.warning(goog.net.xpc.logger, "received msg, but channel is not connected");
}
}
};
goog.net.xpc.IframePollingTransport.prototype.processIncomingAck = function(msgStr) {
goog.log.log(goog.net.xpc.logger, goog.log.Level.FINEST, "ack received: " + msgStr);
if (msgStr == goog.net.xpc.SETUP_ACK_) {
this.waitForAck_ = false;
this.rcvdConnectionSetupAck_ = true;
this.checkIfConnected_();
} else {
if (this.channel_.isConnected()) {
if (!this.waitForAck_) {
goog.log.warning(goog.net.xpc.logger, "got unexpected ack");
return;
}
var seq = parseInt(msgStr.split(":")[1], 10);
if (seq == this.sequence_) {
this.waitForAck_ = false;
this.sendNextFrame_();
} else {
goog.log.warning(goog.net.xpc.logger, "got ack with wrong sequence");
}
} else {
goog.log.warning(goog.net.xpc.logger, "received ack, but channel not connected");
}
}
};
goog.net.xpc.IframePollingTransport.prototype.sendNextFrame_ = function() {
if (this.waitForAck_ || !this.sendQueue_.length) {
return;
}
var s = this.sendQueue_.shift();
++this.sequence_;
this.msgSender_.send(this.sequence_ + s);
goog.log.log(goog.net.xpc.logger, goog.log.Level.FINEST, "msg sent: " + this.sequence_ + s);
this.waitForAck_ = true;
};
goog.net.xpc.IframePollingTransport.prototype.deliverPayload_ = function(s) {
var pos = s.indexOf(":");
var service = s.substr(0, pos);
var payload = s.substring(pos + 1);
if (!this.channel_.isConnected()) {
(this.deliveryQueue_ || (this.deliveryQueue_ = [])).push({service:service, payload:payload});
goog.log.log(goog.net.xpc.logger, goog.log.Level.FINEST, "queued delivery");
} else {
this.channel_.xpcDeliver(service, payload);
}
};
goog.net.xpc.IframePollingTransport.prototype.MAX_FRAME_LENGTH_ = 3800;
goog.net.xpc.IframePollingTransport.prototype.send = function(service, payload) {
var frame = service + ":" + payload;
if (!goog.userAgent.IE || payload.length <= this.MAX_FRAME_LENGTH_) {
this.sendQueue_.push("|" + frame);
} else {
var l = payload.length;
var num = Math.ceil(l / this.MAX_FRAME_LENGTH_);
var pos = 0;
var i = 1;
while (pos < l) {
this.sendQueue_.push("," + i + "/" + num + "|" + frame.substr(pos, this.MAX_FRAME_LENGTH_));
i++;
pos += this.MAX_FRAME_LENGTH_;
}
}
this.sendNextFrame_();
};
goog.net.xpc.IframePollingTransport.prototype.disposeInternal = function() {
goog.net.xpc.IframePollingTransport.base(this, "disposeInternal");
var receivers = goog.net.xpc.IframePollingTransport.receivers_;
goog.array.remove(receivers, this.msgReceiver_);
goog.array.remove(receivers, this.ackReceiver_);
this.msgReceiver_ = this.ackReceiver_ = null;
goog.dom.removeNode(this.msgIframeElm_);
goog.dom.removeNode(this.ackIframeElm_);
this.msgIframeElm_ = this.ackIframeElm_ = null;
this.msgWinObj_ = this.ackWinObj_ = null;
};
goog.net.xpc.IframePollingTransport.receivers_ = [];
goog.net.xpc.IframePollingTransport.TIME_POLL_SHORT_ = 10;
goog.net.xpc.IframePollingTransport.TIME_POLL_LONG_ = 100;
goog.net.xpc.IframePollingTransport.TIME_SHORT_POLL_AFTER_ACTIVITY_ = 1E3;
goog.net.xpc.IframePollingTransport.receive_ = function() {
var receivers = goog.net.xpc.IframePollingTransport.receivers_;
var receiver;
var rcvd = false;
try {
for (var i = 0;receiver = receivers[i];i++) {
rcvd = rcvd || receiver.receive();
}
} catch (e) {
goog.log.info(goog.net.xpc.logger, "receive_() failed: " + e);
receiver.transport_.channel_.notifyTransportError();
if (!receivers.length) {
return;
}
}
var now = goog.now();
if (rcvd) {
goog.net.xpc.IframePollingTransport.lastActivity_ = now;
}
var t = now - goog.net.xpc.IframePollingTransport.lastActivity_ < goog.net.xpc.IframePollingTransport.TIME_SHORT_POLL_AFTER_ACTIVITY_ ? goog.net.xpc.IframePollingTransport.TIME_POLL_SHORT_ : goog.net.xpc.IframePollingTransport.TIME_POLL_LONG_;
goog.net.xpc.IframePollingTransport.rcvTimer_ = window.setTimeout(goog.net.xpc.IframePollingTransport.receiveCb_, t);
};
goog.net.xpc.IframePollingTransport.receiveCb_ = goog.bind(goog.net.xpc.IframePollingTransport.receive_, goog.net.xpc.IframePollingTransport);
goog.net.xpc.IframePollingTransport.startRcvTimer_ = function() {
goog.log.fine(goog.net.xpc.logger, "starting receive-timer");
goog.net.xpc.IframePollingTransport.lastActivity_ = goog.now();
if (goog.net.xpc.IframePollingTransport.rcvTimer_) {
window.clearTimeout(goog.net.xpc.IframePollingTransport.rcvTimer_);
}
goog.net.xpc.IframePollingTransport.rcvTimer_ = window.setTimeout(goog.net.xpc.IframePollingTransport.receiveCb_, goog.net.xpc.IframePollingTransport.TIME_POLL_SHORT_);
};
goog.net.xpc.IframePollingTransport.Sender = function(url, windowObj) {
if (!/^https?:\/\//.test(url)) {
throw Error("URL " + url + " is invalid");
}
this.sanitizedSendUri_ = url;
this.sendFrame_ = (windowObj);
this.cycle_ = 0;
};
goog.net.xpc.IframePollingTransport.Sender.prototype.send = function(payload) {
this.cycle_ = ++this.cycle_ % 2;
var url = this.sanitizedSendUri_ + "#" + this.cycle_ + encodeURIComponent(payload);
try {
if (goog.userAgent.WEBKIT) {
this.sendFrame_.location.href = url;
} else {
this.sendFrame_.location.replace(url);
}
} catch (e) {
goog.log.error(goog.net.xpc.logger, "sending failed", e);
}
goog.net.xpc.IframePollingTransport.startRcvTimer_();
};
goog.net.xpc.IframePollingTransport.Receiver = function(transport, windowObj, callback) {
this.transport_ = transport;
this.rcvFrame_ = windowObj;
this.cb_ = callback;
this.currentLoc_ = this.rcvFrame_.location.href.split("#")[0] + "#INITIAL";
goog.net.xpc.IframePollingTransport.receivers_.push(this);
goog.net.xpc.IframePollingTransport.startRcvTimer_();
};
goog.net.xpc.IframePollingTransport.Receiver.prototype.receive = function() {
var loc = this.rcvFrame_.location.href;
if (loc != this.currentLoc_) {
this.currentLoc_ = loc;
var payload = loc.split("#")[1];
if (payload) {
payload = payload.substr(1);
this.cb_(decodeURIComponent(payload));
}
return true;
} else {
return false;
}
};
goog.provide("goog.net.xpc.IframeRelayTransport");
goog.require("goog.dom");
goog.require("goog.dom.TagName");
goog.require("goog.dom.safe");
goog.require("goog.events");
goog.require("goog.html.SafeHtml");
goog.require("goog.log");
goog.require("goog.log.Level");
goog.require("goog.net.xpc");
goog.require("goog.net.xpc.CfgFields");
goog.require("goog.net.xpc.Transport");
goog.require("goog.net.xpc.TransportTypes");
goog.require("goog.string");
goog.require("goog.string.Const");
goog.require("goog.userAgent");
goog.net.xpc.IframeRelayTransport = function(channel, opt_domHelper) {
goog.net.xpc.IframeRelayTransport.base(this, "constructor", opt_domHelper);
this.channel_ = channel;
this.peerRelayUri_ = this.channel_.getConfig()[goog.net.xpc.CfgFields.PEER_RELAY_URI];
this.peerIframeId_ = this.channel_.getConfig()[goog.net.xpc.CfgFields.IFRAME_ID];
if (goog.userAgent.WEBKIT) {
goog.net.xpc.IframeRelayTransport.startCleanupTimer_();
}
};
goog.inherits(goog.net.xpc.IframeRelayTransport, goog.net.xpc.Transport);
if (goog.userAgent.WEBKIT) {
goog.net.xpc.IframeRelayTransport.iframeRefs_ = [];
goog.net.xpc.IframeRelayTransport.CLEANUP_INTERVAL_ = 1E3;
goog.net.xpc.IframeRelayTransport.IFRAME_MAX_AGE_ = 3E3;
goog.net.xpc.IframeRelayTransport.cleanupTimer_ = 0;
goog.net.xpc.IframeRelayTransport.startCleanupTimer_ = function() {
if (!goog.net.xpc.IframeRelayTransport.cleanupTimer_) {
goog.net.xpc.IframeRelayTransport.cleanupTimer_ = window.setTimeout(function() {
goog.net.xpc.IframeRelayTransport.cleanup_();
}, goog.net.xpc.IframeRelayTransport.CLEANUP_INTERVAL_);
}
};
goog.net.xpc.IframeRelayTransport.cleanup_ = function(opt_maxAge) {
var now = goog.now();
var maxAge = opt_maxAge || goog.net.xpc.IframeRelayTransport.IFRAME_MAX_AGE_;
while (goog.net.xpc.IframeRelayTransport.iframeRefs_.length && now - goog.net.xpc.IframeRelayTransport.iframeRefs_[0].timestamp >= maxAge) {
var ifr = goog.net.xpc.IframeRelayTransport.iframeRefs_.shift().iframeElement;
goog.dom.removeNode(ifr);
goog.log.log(goog.net.xpc.logger, goog.log.Level.FINEST, "iframe removed");
}
goog.net.xpc.IframeRelayTransport.cleanupTimer_ = window.setTimeout(goog.net.xpc.IframeRelayTransport.cleanupCb_, goog.net.xpc.IframeRelayTransport.CLEANUP_INTERVAL_);
};
goog.net.xpc.IframeRelayTransport.cleanupCb_ = function() {
goog.net.xpc.IframeRelayTransport.cleanup_();
};
}
goog.net.xpc.IframeRelayTransport.IE_PAYLOAD_MAX_SIZE_ = 1800;
goog.net.xpc.IframeRelayTransport.FragmentInfo;
goog.net.xpc.IframeRelayTransport.fragmentMap_ = {};
goog.net.xpc.IframeRelayTransport.prototype.transportType = goog.net.xpc.TransportTypes.IFRAME_RELAY;
goog.net.xpc.IframeRelayTransport.prototype.connect = function() {
if (!this.getWindow()["xpcRelay"]) {
this.getWindow()["xpcRelay"] = goog.net.xpc.IframeRelayTransport.receiveMessage_;
}
this.send(goog.net.xpc.TRANSPORT_SERVICE_, goog.net.xpc.SETUP);
};
goog.net.xpc.IframeRelayTransport.receiveMessage_ = function(channelName, frame) {
var pos = frame.indexOf(":");
var header = frame.substr(0, pos);
var payload = frame.substr(pos + 1);
if (!goog.userAgent.IE || (pos = header.indexOf("|")) == -1) {
var service = header
} else {
var service = header.substr(0, pos);
var fragmentIdStr = header.substr(pos + 1);
pos = fragmentIdStr.indexOf("+");
var messageIdStr = fragmentIdStr.substr(0, pos);
var fragmentNum = parseInt(fragmentIdStr.substr(pos + 1), 10);
var fragmentInfo = goog.net.xpc.IframeRelayTransport.fragmentMap_[messageIdStr];
if (!fragmentInfo) {
fragmentInfo = goog.net.xpc.IframeRelayTransport.fragmentMap_[messageIdStr] = {fragments:[], received:0, expected:0};
}
if (goog.string.contains(fragmentIdStr, "++")) {
fragmentInfo.expected = fragmentNum + 1;
}
fragmentInfo.fragments[fragmentNum] = payload;
fragmentInfo.received++;
if (fragmentInfo.received != fragmentInfo.expected) {
return;
}
payload = fragmentInfo.fragments.join("");
delete goog.net.xpc.IframeRelayTransport.fragmentMap_[messageIdStr];
}
goog.net.xpc.channels[channelName].xpcDeliver(service, decodeURIComponent(payload));
};
goog.net.xpc.IframeRelayTransport.prototype.transportServiceHandler = function(payload) {
if (payload == goog.net.xpc.SETUP) {
this.send(goog.net.xpc.TRANSPORT_SERVICE_, goog.net.xpc.SETUP_ACK_);
this.channel_.notifyConnected();
} else {
if (payload == goog.net.xpc.SETUP_ACK_) {
this.channel_.notifyConnected();
}
}
};
goog.net.xpc.IframeRelayTransport.prototype.send = function(service, payload) {
var encodedPayload = encodeURIComponent(payload);
var encodedLen = encodedPayload.length;
var maxSize = goog.net.xpc.IframeRelayTransport.IE_PAYLOAD_MAX_SIZE_;
if (goog.userAgent.IE && encodedLen > maxSize) {
var messageIdStr = goog.string.getRandomString();
for (var startIndex = 0, fragmentNum = 0;startIndex < encodedLen;fragmentNum++) {
var payloadFragment = encodedPayload.substr(startIndex, maxSize);
startIndex += maxSize;
var fragmentIdStr = messageIdStr + (startIndex >= encodedLen ? "++" : "+") + fragmentNum;
this.send_(service, payloadFragment, fragmentIdStr);
}
} else {
this.send_(service, encodedPayload);
}
};
goog.net.xpc.IframeRelayTransport.prototype.send_ = function(service, encodedPayload, opt_fragmentIdStr) {
if (goog.userAgent.IE) {
var div = this.getWindow().document.createElement(goog.dom.TagName.DIV);
goog.dom.safe.setInnerHtml(div, goog.html.SafeHtml.createIframe(null, null, {"onload":goog.string.Const.from("this.xpcOnload()"), "sandbox":null}));
var ifr = div.childNodes[0];
div = null;
ifr["xpcOnload"] = goog.net.xpc.IframeRelayTransport.iframeLoadHandler_;
} else {
var ifr = this.getWindow().document.createElement(goog.dom.TagName.IFRAME);
if (goog.userAgent.WEBKIT) {
goog.net.xpc.IframeRelayTransport.iframeRefs_.push({timestamp:goog.now(), iframeElement:ifr});
} else {
goog.events.listen(ifr, "load", goog.net.xpc.IframeRelayTransport.iframeLoadHandler_);
}
}
var style = ifr.style;
style.visibility = "hidden";
style.width = ifr.style.height = "0px";
style.position = "absolute";
var url = this.peerRelayUri_;
url += "#" + this.channel_.name;
if (this.peerIframeId_) {
url += "," + this.peerIframeId_;
}
url += "|" + service;
if (opt_fragmentIdStr) {
url += "|" + opt_fragmentIdStr;
}
url += ":" + encodedPayload;
ifr.src = url;
this.getWindow().document.body.appendChild(ifr);
goog.log.log(goog.net.xpc.logger, goog.log.Level.FINEST, "msg sent: " + url);
};
goog.net.xpc.IframeRelayTransport.iframeLoadHandler_ = function() {
goog.log.log(goog.net.xpc.logger, goog.log.Level.FINEST, "iframe-load");
goog.dom.removeNode(this);
this.xpcOnload = null;
};
goog.net.xpc.IframeRelayTransport.prototype.disposeInternal = function() {
goog.net.xpc.IframeRelayTransport.base(this, "disposeInternal");
if (goog.userAgent.WEBKIT) {
goog.net.xpc.IframeRelayTransport.cleanup_(0);
}
};
goog.provide("goog.net.xpc.NativeMessagingTransport");
goog.require("goog.Timer");
goog.require("goog.asserts");
goog.require("goog.async.Deferred");
goog.require("goog.events");
goog.require("goog.events.EventHandler");
goog.require("goog.log");
goog.require("goog.net.xpc");
goog.require("goog.net.xpc.CrossPageChannelRole");
goog.require("goog.net.xpc.Transport");
goog.require("goog.net.xpc.TransportTypes");
goog.net.xpc.NativeMessagingTransport = function(channel, peerHostname, opt_domHelper, opt_oneSidedHandshake, opt_protocolVersion) {
goog.net.xpc.NativeMessagingTransport.base(this, "constructor", opt_domHelper);
this.channel_ = channel;
this.protocolVersion_ = opt_protocolVersion || 2;
goog.asserts.assert(this.protocolVersion_ >= 1);
goog.asserts.assert(this.protocolVersion_ <= 2);
this.peerHostname_ = peerHostname || "*";
this.eventHandler_ = new goog.events.EventHandler(this);
this.maybeAttemptToConnectTimer_ = new goog.Timer(100, this.getWindow());
this.oneSidedHandshake_ = !!opt_oneSidedHandshake;
this.setupAckReceived_ = new goog.async.Deferred;
this.setupAckSent_ = new goog.async.Deferred;
this.connected_ = new goog.async.Deferred;
this.endpointId_ = goog.net.xpc.getRandomString(10);
this.peerEndpointId_ = null;
if (this.oneSidedHandshake_) {
if (this.channel_.getRole() == goog.net.xpc.CrossPageChannelRole.INNER) {
this.connected_.awaitDeferred(this.setupAckReceived_);
} else {
this.connected_.awaitDeferred(this.setupAckSent_);
}
} else {
this.connected_.awaitDeferred(this.setupAckReceived_);
if (this.protocolVersion_ == 2) {
this.connected_.awaitDeferred(this.setupAckSent_);
}
}
this.connected_.addCallback(this.notifyConnected_, this);
this.connected_.callback(true);
this.eventHandler_.listen(this.maybeAttemptToConnectTimer_, goog.Timer.TICK, this.maybeAttemptToConnect_);
goog.log.info(goog.net.xpc.logger, "NativeMessagingTransport created. " + "protocolVersion\x3d" + this.protocolVersion_ + ", oneSidedHandshake\x3d" + this.oneSidedHandshake_ + ", role\x3d" + this.channel_.getRole());
};
goog.inherits(goog.net.xpc.NativeMessagingTransport, goog.net.xpc.Transport);
goog.net.xpc.NativeMessagingTransport.CONNECTION_DELAY_MS_ = 200;
goog.net.xpc.NativeMessagingTransport.prototype.peerProtocolVersion_ = null;
goog.net.xpc.NativeMessagingTransport.prototype.initialized_ = false;
goog.net.xpc.NativeMessagingTransport.prototype.transportType = goog.net.xpc.TransportTypes.NATIVE_MESSAGING;
goog.net.xpc.NativeMessagingTransport.MESSAGE_DELIMITER_ = ",";
goog.net.xpc.NativeMessagingTransport.activeCount_ = {};
goog.net.xpc.NativeMessagingTransport.prototype.sendTimerId_ = 0;
goog.net.xpc.NativeMessagingTransport.prototype.couldPeerVersionBe_ = function(version) {
return this.peerProtocolVersion_ == null || this.peerProtocolVersion_ == version;
};
goog.net.xpc.NativeMessagingTransport.initialize_ = function(listenWindow) {
var uid = goog.getUid(listenWindow);
var value = goog.net.xpc.NativeMessagingTransport.activeCount_[uid];
if (!goog.isNumber(value)) {
value = 0;
}
if (value == 0) {
goog.events.listen(listenWindow.postMessage ? listenWindow : listenWindow.document, "message", goog.net.xpc.NativeMessagingTransport.messageReceived_, false, goog.net.xpc.NativeMessagingTransport);
}
goog.net.xpc.NativeMessagingTransport.activeCount_[uid] = value + 1;
};
goog.net.xpc.NativeMessagingTransport.messageReceived_ = function(msgEvt) {
var data = msgEvt.getBrowserEvent().data;
if (!goog.isString(data)) {
return false;
}
var headDelim = data.indexOf("|");
var serviceDelim = data.indexOf(":");
if (headDelim == -1 || serviceDelim == -1) {
return false;
}
var channelName = data.substring(0, headDelim);
var service = data.substring(headDelim + 1, serviceDelim);
var payload = data.substring(serviceDelim + 1);
goog.log.fine(goog.net.xpc.logger, "messageReceived: channel\x3d" + channelName + ", service\x3d" + service + ", payload\x3d" + payload);
var channel = goog.net.xpc.channels[channelName];
if (channel) {
channel.xpcDeliver(service, payload, (msgEvt.getBrowserEvent()).origin);
return true;
}
var transportMessageType = goog.net.xpc.NativeMessagingTransport.parseTransportPayload_(payload)[0];
for (var staleChannelName in goog.net.xpc.channels) {
var staleChannel = goog.net.xpc.channels[staleChannelName];
if (staleChannel.getRole() == goog.net.xpc.CrossPageChannelRole.INNER && !staleChannel.isConnected() && service == goog.net.xpc.TRANSPORT_SERVICE_ && (transportMessageType == goog.net.xpc.SETUP || transportMessageType == goog.net.xpc.SETUP_NTPV2)) {
staleChannel.updateChannelNameAndCatalog(channelName);
staleChannel.xpcDeliver(service, payload);
return true;
}
}
goog.log.info(goog.net.xpc.logger, 'channel name mismatch; message ignored"');
return false;
};
goog.net.xpc.NativeMessagingTransport.prototype.transportServiceHandler = function(payload) {
var transportParts = goog.net.xpc.NativeMessagingTransport.parseTransportPayload_(payload);
var transportMessageType = transportParts[0];
var peerEndpointId = transportParts[1];
switch(transportMessageType) {
case goog.net.xpc.SETUP_ACK_:
this.setPeerProtocolVersion_(1);
if (!this.setupAckReceived_.hasFired()) {
this.setupAckReceived_.callback(true);
}
break;
case goog.net.xpc.SETUP_ACK_NTPV2:
if (this.protocolVersion_ == 2) {
this.setPeerProtocolVersion_(2);
if (!this.setupAckReceived_.hasFired()) {
this.setupAckReceived_.callback(true);
}
}
break;
case goog.net.xpc.SETUP:
this.setPeerProtocolVersion_(1);
this.sendSetupAckMessage_(1);
break;
case goog.net.xpc.SETUP_NTPV2:
if (this.protocolVersion_ == 2) {
var prevPeerProtocolVersion = this.peerProtocolVersion_;
this.setPeerProtocolVersion_(2);
this.sendSetupAckMessage_(2);
if ((prevPeerProtocolVersion == 1 || this.peerEndpointId_ != null) && this.peerEndpointId_ != peerEndpointId) {
goog.log.info(goog.net.xpc.logger, "Sending SETUP and changing peer ID to: " + peerEndpointId);
this.sendSetupMessage_();
}
this.peerEndpointId_ = peerEndpointId;
}
break;
}
};
goog.net.xpc.NativeMessagingTransport.prototype.sendSetupMessage_ = function() {
goog.asserts.assert(!(this.protocolVersion_ == 1 && this.peerProtocolVersion_ == 2));
if (this.protocolVersion_ == 2 && this.couldPeerVersionBe_(2)) {
var payload = goog.net.xpc.SETUP_NTPV2;
payload += goog.net.xpc.NativeMessagingTransport.MESSAGE_DELIMITER_;
payload += this.endpointId_;
this.send(goog.net.xpc.TRANSPORT_SERVICE_, payload);
}
if (this.couldPeerVersionBe_(1)) {
this.send(goog.net.xpc.TRANSPORT_SERVICE_, goog.net.xpc.SETUP);
}
};
goog.net.xpc.NativeMessagingTransport.prototype.sendSetupAckMessage_ = function(protocolVersion) {
goog.asserts.assert(this.protocolVersion_ != 1 || protocolVersion != 2, "Shouldn't try to send a v2 setup ack in v1 mode.");
if (this.protocolVersion_ == 2 && this.couldPeerVersionBe_(2) && protocolVersion == 2) {
this.send(goog.net.xpc.TRANSPORT_SERVICE_, goog.net.xpc.SETUP_ACK_NTPV2);
} else {
if (this.couldPeerVersionBe_(1) && protocolVersion == 1) {
this.send(goog.net.xpc.TRANSPORT_SERVICE_, goog.net.xpc.SETUP_ACK_);
} else {
return;
}
}
if (!this.setupAckSent_.hasFired()) {
this.setupAckSent_.callback(true);
}
};
goog.net.xpc.NativeMessagingTransport.prototype.setPeerProtocolVersion_ = function(version) {
if (version > this.peerProtocolVersion_) {
this.peerProtocolVersion_ = version;
}
if (this.peerProtocolVersion_ == 1) {
if (!this.setupAckSent_.hasFired() && !this.oneSidedHandshake_) {
this.setupAckSent_.callback(true);
}
this.peerEndpointId_ = null;
}
};
goog.net.xpc.NativeMessagingTransport.prototype.connect = function() {
goog.net.xpc.NativeMessagingTransport.initialize_(this.getWindow());
this.initialized_ = true;
this.maybeAttemptToConnect_();
};
goog.net.xpc.NativeMessagingTransport.prototype.maybeAttemptToConnect_ = function() {
var outerFrame = this.channel_.getRole() == goog.net.xpc.CrossPageChannelRole.OUTER;
if (this.oneSidedHandshake_ && outerFrame || this.channel_.isConnected() || this.isDisposed()) {
this.maybeAttemptToConnectTimer_.stop();
return;
}
this.maybeAttemptToConnectTimer_.start();
this.sendSetupMessage_();
};
goog.net.xpc.NativeMessagingTransport.prototype.send = function(service, payload) {
var win = this.channel_.getPeerWindowObject();
if (!win) {
goog.log.fine(goog.net.xpc.logger, "send(): window not ready");
return;
}
this.send = function(service, payload) {
var transport = this;
var channelName = this.channel_.name;
var sendFunctor = function() {
transport.sendTimerId_ = 0;
try {
var obj = win.postMessage ? win : win.document;
if (!obj.postMessage) {
goog.log.warning(goog.net.xpc.logger, "Peer window had no postMessage function.");
return;
}
obj.postMessage(channelName + "|" + service + ":" + payload, transport.peerHostname_);
goog.log.fine(goog.net.xpc.logger, "send(): service\x3d" + service + " payload\x3d" + payload + " to hostname\x3d" + transport.peerHostname_);
} catch (error) {
goog.log.warning(goog.net.xpc.logger, "Error performing postMessage, ignoring.", error);
}
};
this.sendTimerId_ = goog.Timer.callOnce(sendFunctor, 0);
};
this.send(service, payload);
};
goog.net.xpc.NativeMessagingTransport.prototype.notifyConnected_ = function() {
var delay = this.protocolVersion_ == 1 || this.peerProtocolVersion_ == 1 ? goog.net.xpc.NativeMessagingTransport.CONNECTION_DELAY_MS_ : undefined;
this.channel_.notifyConnected(delay);
};
goog.net.xpc.NativeMessagingTransport.prototype.disposeInternal = function() {
if (this.initialized_) {
var listenWindow = this.getWindow();
var uid = goog.getUid(listenWindow);
var value = goog.net.xpc.NativeMessagingTransport.activeCount_[uid];
goog.net.xpc.NativeMessagingTransport.activeCount_[uid] = value - 1;
if (value == 1) {
goog.events.unlisten(listenWindow.postMessage ? listenWindow : listenWindow.document, "message", goog.net.xpc.NativeMessagingTransport.messageReceived_, false, goog.net.xpc.NativeMessagingTransport);
}
}
if (this.sendTimerId_) {
goog.Timer.clear(this.sendTimerId_);
this.sendTimerId_ = 0;
}
goog.dispose(this.eventHandler_);
delete this.eventHandler_;
goog.dispose(this.maybeAttemptToConnectTimer_);
delete this.maybeAttemptToConnectTimer_;
this.setupAckReceived_.cancel();
delete this.setupAckReceived_;
this.setupAckSent_.cancel();
delete this.setupAckSent_;
this.connected_.cancel();
delete this.connected_;
delete this.send;
goog.net.xpc.NativeMessagingTransport.base(this, "disposeInternal");
};
goog.net.xpc.NativeMessagingTransport.parseTransportPayload_ = function(payload) {
var transportParts = (payload.split(goog.net.xpc.NativeMessagingTransport.MESSAGE_DELIMITER_));
transportParts[1] = transportParts[1] || null;
return transportParts;
};
goog.provide("goog.net.xpc.NixTransport");
goog.require("goog.log");
goog.require("goog.net.xpc");
goog.require("goog.net.xpc.CfgFields");
goog.require("goog.net.xpc.CrossPageChannelRole");
goog.require("goog.net.xpc.Transport");
goog.require("goog.net.xpc.TransportTypes");
goog.require("goog.reflect");
goog.net.xpc.NixTransport = function(channel, opt_domHelper) {
goog.net.xpc.NixTransport.base(this, "constructor", opt_domHelper);
this.channel_ = channel;
this.authToken_ = channel[goog.net.xpc.CfgFields.AUTH_TOKEN] || "";
this.remoteAuthToken_ = channel[goog.net.xpc.CfgFields.REMOTE_AUTH_TOKEN] || "";
goog.net.xpc.NixTransport.conductGlobalSetup_(this.getWindow());
this[goog.net.xpc.NixTransport.NIX_HANDLE_MESSAGE] = this.handleMessage_;
this[goog.net.xpc.NixTransport.NIX_CREATE_CHANNEL] = this.createChannel_;
};
goog.inherits(goog.net.xpc.NixTransport, goog.net.xpc.Transport);
goog.net.xpc.NixTransport.NIX_WRAPPER = "GCXPC____NIXVBS_wrapper";
goog.net.xpc.NixTransport.NIX_GET_WRAPPER = "GCXPC____NIXVBS_get_wrapper";
goog.net.xpc.NixTransport.NIX_HANDLE_MESSAGE = "GCXPC____NIXJS_handle_message";
goog.net.xpc.NixTransport.NIX_CREATE_CHANNEL = "GCXPC____NIXJS_create_channel";
goog.net.xpc.NixTransport.NIX_ID_FIELD = "GCXPC____NIXVBS_container";
goog.net.xpc.NixTransport.isNixSupported = function() {
var isSupported = false;
try {
var oldOpener = window.opener;
window.opener = ({});
isSupported = goog.reflect.canAccessProperty(window, "opener");
window.opener = oldOpener;
} catch (e) {
}
return isSupported;
};
goog.net.xpc.NixTransport.conductGlobalSetup_ = function(listenWindow) {
if (listenWindow["nix_setup_complete"]) {
return;
}
var vbscript = "Class " + goog.net.xpc.NixTransport.NIX_WRAPPER + "\n " + "Private m_Transport\n" + "Private m_Auth\n" + "Public Sub SetTransport(transport)\n" + "If isEmpty(m_Transport) Then\n" + "Set m_Transport \x3d transport\n" + "End If\n" + "End Sub\n" + "Public Sub SetAuth(auth)\n" + "If isEmpty(m_Auth) Then\n" + "m_Auth \x3d auth\n" + "End If\n" + "End Sub\n" + "Public Function GetAuthToken()\n " + "GetAuthToken \x3d m_Auth\n" + "End Function\n" + "Public Sub SendMessage(service, payload)\n " +
"Call m_Transport." + goog.net.xpc.NixTransport.NIX_HANDLE_MESSAGE + "(service, payload)\n" + "End Sub\n" + "Public Sub CreateChannel(channel)\n " + "Call m_Transport." + goog.net.xpc.NixTransport.NIX_CREATE_CHANNEL + "(channel)\n" + "End Sub\n" + "Public Sub " + goog.net.xpc.NixTransport.NIX_ID_FIELD + "()\n " + "End Sub\n" + "End Class\n " + "Function " + goog.net.xpc.NixTransport.NIX_GET_WRAPPER + "(transport, auth)\n" + "Dim wrap\n" + "Set wrap \x3d New " + goog.net.xpc.NixTransport.NIX_WRAPPER +
"\n" + "wrap.SetTransport transport\n" + "wrap.SetAuth auth\n" + "Set " + goog.net.xpc.NixTransport.NIX_GET_WRAPPER + " \x3d wrap\n" + "End Function";
try {
listenWindow.execScript(vbscript, "vbscript");
listenWindow["nix_setup_complete"] = true;
} catch (e) {
goog.log.error(goog.net.xpc.logger, "exception caught while attempting global setup: " + e);
}
};
goog.net.xpc.NixTransport.prototype.transportType = goog.net.xpc.TransportTypes.NIX;
goog.net.xpc.NixTransport.prototype.localSetupCompleted_ = false;
goog.net.xpc.NixTransport.prototype.nixChannel_ = null;
goog.net.xpc.NixTransport.prototype.connect = function() {
if (this.channel_.getRole() == goog.net.xpc.CrossPageChannelRole.OUTER) {
this.attemptOuterSetup_();
} else {
this.attemptInnerSetup_();
}
};
goog.net.xpc.NixTransport.prototype.attemptOuterSetup_ = function() {
if (this.localSetupCompleted_) {
return;
}
var innerFrame = this.channel_.getIframeElement();
try {
var theWindow = this.getWindow();
var getWrapper = theWindow[goog.net.xpc.NixTransport.NIX_GET_WRAPPER];
innerFrame.contentWindow.opener = getWrapper(this, this.authToken_);
this.localSetupCompleted_ = true;
} catch (e) {
goog.log.error(goog.net.xpc.logger, "exception caught while attempting setup: " + e);
}
if (!this.localSetupCompleted_) {
this.getWindow().setTimeout(goog.bind(this.attemptOuterSetup_, this), 100);
}
};
goog.net.xpc.NixTransport.prototype.attemptInnerSetup_ = function() {
if (this.localSetupCompleted_) {
return;
}
try {
var opener = this.getWindow().opener;
if (opener && goog.net.xpc.NixTransport.NIX_ID_FIELD in opener) {
this.nixChannel_ = opener;
var remoteAuthToken = this.nixChannel_["GetAuthToken"]();
if (remoteAuthToken != this.remoteAuthToken_) {
goog.log.error(goog.net.xpc.logger, "Invalid auth token from other party");
return;
}
var theWindow = this.getWindow();
var getWrapper = theWindow[goog.net.xpc.NixTransport.NIX_GET_WRAPPER];
this.nixChannel_["CreateChannel"](getWrapper(this, this.authToken_));
this.localSetupCompleted_ = true;
this.channel_.notifyConnected();
}
} catch (e) {
goog.log.error(goog.net.xpc.logger, "exception caught while attempting setup: " + e);
return;
}
if (!this.localSetupCompleted_) {
this.getWindow().setTimeout(goog.bind(this.attemptInnerSetup_, this), 100);
}
};
goog.net.xpc.NixTransport.prototype.createChannel_ = function(channel) {
if (typeof channel != "unknown" || !(goog.net.xpc.NixTransport.NIX_ID_FIELD in channel)) {
goog.log.error(goog.net.xpc.logger, "Invalid NIX channel given to createChannel_");
}
this.nixChannel_ = channel;
var remoteAuthToken = this.nixChannel_["GetAuthToken"]();
if (remoteAuthToken != this.remoteAuthToken_) {
goog.log.error(goog.net.xpc.logger, "Invalid auth token from other party");
return;
}
this.channel_.notifyConnected();
};
goog.net.xpc.NixTransport.prototype.handleMessage_ = function(serviceName, payload) {
var deliveryHandler = function() {
this.channel_.xpcDeliver(serviceName, payload);
};
this.getWindow().setTimeout(goog.bind(deliveryHandler, this), 1);
};
goog.net.xpc.NixTransport.prototype.send = function(service, payload) {
if (typeof this.nixChannel_ !== "unknown") {
goog.log.error(goog.net.xpc.logger, "NIX channel not connected");
}
this.nixChannel_["SendMessage"](service, payload);
};
goog.net.xpc.NixTransport.prototype.disposeInternal = function() {
goog.net.xpc.NixTransport.base(this, "disposeInternal");
this.nixChannel_ = null;
};
goog.provide("goog.net.xpc.CrossPageChannel");
goog.require("goog.Uri");
goog.require("goog.async.Deferred");
goog.require("goog.async.Delay");
goog.require("goog.dispose");
goog.require("goog.dom");
goog.require("goog.dom.TagName");
goog.require("goog.events");
goog.require("goog.events.EventHandler");
goog.require("goog.events.EventType");
goog.require("goog.json");
goog.require("goog.log");
goog.require("goog.messaging.AbstractChannel");
goog.require("goog.net.xpc");
goog.require("goog.net.xpc.CfgFields");
goog.require("goog.net.xpc.ChannelStates");
goog.require("goog.net.xpc.CrossPageChannelRole");
goog.require("goog.net.xpc.DirectTransport");
goog.require("goog.net.xpc.FrameElementMethodTransport");
goog.require("goog.net.xpc.IframePollingTransport");
goog.require("goog.net.xpc.IframeRelayTransport");
goog.require("goog.net.xpc.NativeMessagingTransport");
goog.require("goog.net.xpc.NixTransport");
goog.require("goog.net.xpc.TransportTypes");
goog.require("goog.net.xpc.UriCfgFields");
goog.require("goog.string");
goog.require("goog.uri.utils");
goog.require("goog.userAgent");
goog.net.xpc.CrossPageChannel = function(cfg, opt_domHelper) {
goog.net.xpc.CrossPageChannel.base(this, "constructor");
for (var i = 0, uriField;uriField = goog.net.xpc.UriCfgFields[i];i++) {
if (uriField in cfg && !/^https?:\/\//.test(cfg[uriField])) {
throw Error("URI " + cfg[uriField] + " is invalid for field " + uriField);
}
}
this.cfg_ = cfg;
this.name = this.cfg_[goog.net.xpc.CfgFields.CHANNEL_NAME] || goog.net.xpc.getRandomString(10);
this.domHelper_ = opt_domHelper || goog.dom.getDomHelper();
this.deferredDeliveries_ = [];
this.peerLoadHandler_ = new goog.events.EventHandler(this);
cfg[goog.net.xpc.CfgFields.LOCAL_POLL_URI] = cfg[goog.net.xpc.CfgFields.LOCAL_POLL_URI] || goog.uri.utils.getHost(this.domHelper_.getWindow().location.href) + "/robots.txt";
cfg[goog.net.xpc.CfgFields.PEER_POLL_URI] = cfg[goog.net.xpc.CfgFields.PEER_POLL_URI] || goog.uri.utils.getHost(cfg[goog.net.xpc.CfgFields.PEER_URI] || "") + "/robots.txt";
goog.net.xpc.channels[this.name] = this;
if (!goog.events.getListener(window, goog.events.EventType.UNLOAD, goog.net.xpc.CrossPageChannel.disposeAll_)) {
goog.events.listenOnce(window, goog.events.EventType.UNLOAD, goog.net.xpc.CrossPageChannel.disposeAll_);
}
goog.log.info(goog.net.xpc.logger, "CrossPageChannel created: " + this.name);
};
goog.inherits(goog.net.xpc.CrossPageChannel, goog.messaging.AbstractChannel);
goog.net.xpc.CrossPageChannel.TRANSPORT_SERVICE_ESCAPE_RE_ = new RegExp("^%*" + goog.net.xpc.TRANSPORT_SERVICE_ + "$");
goog.net.xpc.CrossPageChannel.TRANSPORT_SERVICE_UNESCAPE_RE_ = new RegExp("^%+" + goog.net.xpc.TRANSPORT_SERVICE_ + "$");
goog.net.xpc.CrossPageChannel.prototype.connectionDelay_ = null;
goog.net.xpc.CrossPageChannel.prototype.peerWindowDeferred_ = null;
goog.net.xpc.CrossPageChannel.prototype.transport_ = null;
goog.net.xpc.CrossPageChannel.prototype.state_ = goog.net.xpc.ChannelStates.NOT_CONNECTED;
goog.net.xpc.CrossPageChannel.prototype.isConnected = function() {
return this.state_ == goog.net.xpc.ChannelStates.CONNECTED;
};
goog.net.xpc.CrossPageChannel.prototype.peerWindowObject_ = null;
goog.net.xpc.CrossPageChannel.prototype.iframeElement_ = null;
goog.net.xpc.CrossPageChannel.prototype.getConfig = function() {
return this.cfg_;
};
goog.net.xpc.CrossPageChannel.prototype.getIframeElement = function() {
return this.iframeElement_;
};
goog.net.xpc.CrossPageChannel.prototype.setPeerWindowObject = function(peerWindowObject) {
this.peerWindowObject_ = peerWindowObject;
};
goog.net.xpc.CrossPageChannel.prototype.getPeerWindowObject = function() {
return this.peerWindowObject_;
};
goog.net.xpc.CrossPageChannel.prototype.isPeerAvailable = function() {
try {
return !!this.peerWindowObject_ && !Boolean(this.peerWindowObject_.closed);
} catch (e) {
return false;
}
};
goog.net.xpc.CrossPageChannel.prototype.determineTransportType_ = function() {
var transportType;
if (goog.isFunction(document.postMessage) || goog.isFunction(window.postMessage) || goog.userAgent.IE && window.postMessage) {
transportType = goog.net.xpc.TransportTypes.NATIVE_MESSAGING;
} else {
if (goog.userAgent.GECKO) {
transportType = goog.net.xpc.TransportTypes.FRAME_ELEMENT_METHOD;
} else {
if (goog.userAgent.IE && this.cfg_[goog.net.xpc.CfgFields.PEER_RELAY_URI]) {
transportType = goog.net.xpc.TransportTypes.IFRAME_RELAY;
} else {
if (goog.userAgent.IE && goog.net.xpc.NixTransport.isNixSupported()) {
transportType = goog.net.xpc.TransportTypes.NIX;
} else {
transportType = goog.net.xpc.TransportTypes.IFRAME_POLLING;
}
}
}
}
return transportType;
};
goog.net.xpc.CrossPageChannel.prototype.createTransport_ = function() {
if (this.transport_) {
return;
}
var CfgFields = goog.net.xpc.CfgFields;
if (!this.cfg_[CfgFields.TRANSPORT]) {
this.cfg_[CfgFields.TRANSPORT] = this.determineTransportType_();
}
switch(this.cfg_[CfgFields.TRANSPORT]) {
case goog.net.xpc.TransportTypes.NATIVE_MESSAGING:
var protocolVersion = this.cfg_[CfgFields.NATIVE_TRANSPORT_PROTOCOL_VERSION] || 2;
this.transport_ = new goog.net.xpc.NativeMessagingTransport(this, this.cfg_[CfgFields.PEER_HOSTNAME], this.domHelper_, !!this.cfg_[CfgFields.ONE_SIDED_HANDSHAKE], protocolVersion);
break;
case goog.net.xpc.TransportTypes.NIX:
this.transport_ = new goog.net.xpc.NixTransport(this, this.domHelper_);
break;
case goog.net.xpc.TransportTypes.FRAME_ELEMENT_METHOD:
this.transport_ = new goog.net.xpc.FrameElementMethodTransport(this, this.domHelper_);
break;
case goog.net.xpc.TransportTypes.IFRAME_RELAY:
this.transport_ = new goog.net.xpc.IframeRelayTransport(this, this.domHelper_);
break;
case goog.net.xpc.TransportTypes.IFRAME_POLLING:
this.transport_ = new goog.net.xpc.IframePollingTransport(this, this.domHelper_);
break;
case goog.net.xpc.TransportTypes.DIRECT:
if (this.peerWindowObject_ && goog.net.xpc.DirectTransport.isSupported((this.peerWindowObject_))) {
this.transport_ = new goog.net.xpc.DirectTransport(this, this.domHelper_);
} else {
goog.log.info(goog.net.xpc.logger, "DirectTransport not supported for this window, peer window in" + " different security context or not set yet.");
}
break;
}
if (this.transport_) {
goog.log.info(goog.net.xpc.logger, "Transport created: " + this.transport_.getName());
} else {
throw Error("CrossPageChannel: No suitable transport found!");
}
};
goog.net.xpc.CrossPageChannel.prototype.getTransportType = function() {
return this.transport_.getType();
};
goog.net.xpc.CrossPageChannel.prototype.getTransportName = function() {
return this.transport_.getName();
};
goog.net.xpc.CrossPageChannel.prototype.getPeerConfiguration = function() {
var peerCfg = {};
peerCfg[goog.net.xpc.CfgFields.CHANNEL_NAME] = this.name;
peerCfg[goog.net.xpc.CfgFields.TRANSPORT] = this.cfg_[goog.net.xpc.CfgFields.TRANSPORT];
peerCfg[goog.net.xpc.CfgFields.ONE_SIDED_HANDSHAKE] = this.cfg_[goog.net.xpc.CfgFields.ONE_SIDED_HANDSHAKE];
if (this.cfg_[goog.net.xpc.CfgFields.LOCAL_RELAY_URI]) {
peerCfg[goog.net.xpc.CfgFields.PEER_RELAY_URI] = this.cfg_[goog.net.xpc.CfgFields.LOCAL_RELAY_URI];
}
if (this.cfg_[goog.net.xpc.CfgFields.LOCAL_POLL_URI]) {
peerCfg[goog.net.xpc.CfgFields.PEER_POLL_URI] = this.cfg_[goog.net.xpc.CfgFields.LOCAL_POLL_URI];
}
if (this.cfg_[goog.net.xpc.CfgFields.PEER_POLL_URI]) {
peerCfg[goog.net.xpc.CfgFields.LOCAL_POLL_URI] = this.cfg_[goog.net.xpc.CfgFields.PEER_POLL_URI];
}
var role = this.cfg_[goog.net.xpc.CfgFields.ROLE];
if (role) {
peerCfg[goog.net.xpc.CfgFields.ROLE] = role == goog.net.xpc.CrossPageChannelRole.INNER ? goog.net.xpc.CrossPageChannelRole.OUTER : goog.net.xpc.CrossPageChannelRole.INNER;
}
return peerCfg;
};
goog.net.xpc.CrossPageChannel.prototype.createPeerIframe = function(parentElm, opt_configureIframeCb, opt_addCfgParam) {
goog.log.info(goog.net.xpc.logger, "createPeerIframe()");
var iframeId = this.cfg_[goog.net.xpc.CfgFields.IFRAME_ID];
if (!iframeId) {
iframeId = this.cfg_[goog.net.xpc.CfgFields.IFRAME_ID] = "xpcpeer" + goog.net.xpc.getRandomString(4);
}
var iframeElm = goog.dom.getDomHelper(parentElm).createElement(goog.dom.TagName.IFRAME);
iframeElm.id = iframeElm.name = iframeId;
if (opt_configureIframeCb) {
opt_configureIframeCb(iframeElm);
} else {
iframeElm.style.width = iframeElm.style.height = "100%";
}
this.cleanUpIncompleteConnection_();
this.peerWindowDeferred_ = new goog.async.Deferred(undefined, this);
var peerUri = this.getPeerUri(opt_addCfgParam);
this.peerLoadHandler_.listenOnceWithScope(iframeElm, "load", this.peerWindowDeferred_.callback, false, this.peerWindowDeferred_);
if (goog.userAgent.GECKO || goog.userAgent.WEBKIT) {
window.setTimeout(goog.bind(function() {
parentElm.appendChild(iframeElm);
iframeElm.src = peerUri.toString();
goog.log.info(goog.net.xpc.logger, "peer iframe created (" + iframeId + ")");
}, this), 1);
} else {
iframeElm.src = peerUri.toString();
parentElm.appendChild(iframeElm);
goog.log.info(goog.net.xpc.logger, "peer iframe created (" + iframeId + ")");
}
return (iframeElm);
};
goog.net.xpc.CrossPageChannel.prototype.cleanUpIncompleteConnection_ = function() {
if (this.peerWindowDeferred_) {
this.peerWindowDeferred_.cancel();
this.peerWindowDeferred_ = null;
}
this.deferredDeliveries_.length = 0;
this.peerLoadHandler_.removeAll();
};
goog.net.xpc.CrossPageChannel.prototype.getPeerUri = function(opt_addCfgParam) {
var peerUri = this.cfg_[goog.net.xpc.CfgFields.PEER_URI];
if (goog.isString(peerUri)) {
peerUri = this.cfg_[goog.net.xpc.CfgFields.PEER_URI] = new goog.Uri(peerUri);
}
if (opt_addCfgParam !== false) {
peerUri.setParameterValue("xpc", goog.json.serialize(this.getPeerConfiguration()));
}
return peerUri;
};
goog.net.xpc.CrossPageChannel.prototype.connect = function(opt_connectCb) {
this.connectCb_ = opt_connectCb || goog.nullFunction;
if (this.state_ == goog.net.xpc.ChannelStates.CLOSED) {
this.state_ = goog.net.xpc.ChannelStates.NOT_CONNECTED;
}
if (this.peerWindowDeferred_) {
this.peerWindowDeferred_.addCallback(this.continueConnection_);
} else {
this.continueConnection_();
}
};
goog.net.xpc.CrossPageChannel.prototype.continueConnection_ = function() {
goog.log.info(goog.net.xpc.logger, "continueConnection_()");
this.peerWindowDeferred_ = null;
if (this.cfg_[goog.net.xpc.CfgFields.IFRAME_ID]) {
this.iframeElement_ = this.domHelper_.getElement(this.cfg_[goog.net.xpc.CfgFields.IFRAME_ID]);
}
if (this.iframeElement_) {
var winObj = this.iframeElement_.contentWindow;
if (!winObj) {
winObj = window.frames[this.cfg_[goog.net.xpc.CfgFields.IFRAME_ID]];
}
this.setPeerWindowObject(winObj);
}
if (!this.peerWindowObject_) {
if (window == window.top) {
throw Error("CrossPageChannel: Can't connect, peer window-object not set.");
} else {
this.setPeerWindowObject(window.parent);
}
}
this.createTransport_();
this.transport_.connect();
while (this.deferredDeliveries_.length > 0) {
this.deferredDeliveries_.shift()();
}
};
goog.net.xpc.CrossPageChannel.prototype.close = function() {
this.cleanUpIncompleteConnection_();
this.state_ = goog.net.xpc.ChannelStates.CLOSED;
goog.dispose(this.transport_);
this.transport_ = null;
this.connectCb_ = null;
goog.dispose(this.connectionDelay_);
this.connectionDelay_ = null;
goog.log.info(goog.net.xpc.logger, 'Channel "' + this.name + '" closed');
};
goog.net.xpc.CrossPageChannel.prototype.notifyConnected = function(opt_delay) {
if (this.isConnected() || this.connectionDelay_ && this.connectionDelay_.isActive()) {
return;
}
this.state_ = goog.net.xpc.ChannelStates.CONNECTED;
goog.log.info(goog.net.xpc.logger, 'Channel "' + this.name + '" connected');
goog.dispose(this.connectionDelay_);
if (goog.isDef(opt_delay)) {
this.connectionDelay_ = new goog.async.Delay(this.connectCb_, opt_delay);
this.connectionDelay_.start();
} else {
this.connectionDelay_ = null;
this.connectCb_();
}
};
goog.net.xpc.CrossPageChannel.prototype.notifyTransportError = function() {
goog.log.info(goog.net.xpc.logger, "Transport Error");
this.close();
};
goog.net.xpc.CrossPageChannel.prototype.send = function(serviceName, payload) {
if (!this.isConnected()) {
goog.log.error(goog.net.xpc.logger, "Can't send. Channel not connected.");
return;
}
if (!this.isPeerAvailable()) {
goog.log.error(goog.net.xpc.logger, "Peer has disappeared.");
this.close();
return;
}
if (goog.isObject(payload)) {
payload = goog.json.serialize(payload);
}
this.transport_.send(this.escapeServiceName_(serviceName), payload);
};
goog.net.xpc.CrossPageChannel.prototype.xpcDeliver = function(serviceName, payload, opt_origin) {
if (this.peerWindowDeferred_) {
this.deferredDeliveries_.push(goog.bind(this.xpcDeliver, this, serviceName, payload, opt_origin));
return;
}
if (!this.isMessageOriginAcceptable_(opt_origin)) {
goog.log.warning(goog.net.xpc.logger, 'Message received from unapproved origin "' + opt_origin + '" - rejected.');
return;
}
if (this.isDisposed() || this.state_ == goog.net.xpc.ChannelStates.CLOSED) {
goog.log.warning(goog.net.xpc.logger, "CrossPageChannel::xpcDeliver(): Channel closed.");
} else {
if (!serviceName || serviceName == goog.net.xpc.TRANSPORT_SERVICE_) {
this.transport_.transportServiceHandler(payload);
} else {
if (this.isConnected()) {
this.deliver(this.unescapeServiceName_(serviceName), payload);
} else {
goog.log.info(goog.net.xpc.logger, "CrossPageChannel::xpcDeliver(): Not connected.");
}
}
}
};
goog.net.xpc.CrossPageChannel.prototype.escapeServiceName_ = function(name) {
if (goog.net.xpc.CrossPageChannel.TRANSPORT_SERVICE_ESCAPE_RE_.test(name)) {
name = "%" + name;
}
return name.replace(/[%:|]/g, encodeURIComponent);
};
goog.net.xpc.CrossPageChannel.prototype.unescapeServiceName_ = function(name) {
name = name.replace(/%[0-9a-f]{2}/gi, decodeURIComponent);
if (goog.net.xpc.CrossPageChannel.TRANSPORT_SERVICE_UNESCAPE_RE_.test(name)) {
return name.substring(1);
} else {
return name;
}
};
goog.net.xpc.CrossPageChannel.prototype.getRole = function() {
var role = this.cfg_[goog.net.xpc.CfgFields.ROLE];
if (goog.isNumber(role)) {
return role;
} else {
return window.parent == this.peerWindowObject_ ? goog.net.xpc.CrossPageChannelRole.INNER : goog.net.xpc.CrossPageChannelRole.OUTER;
}
};
goog.net.xpc.CrossPageChannel.prototype.updateChannelNameAndCatalog = function(name) {
goog.log.fine(goog.net.xpc.logger, "changing channel name to " + name);
delete goog.net.xpc.channels[this.name];
this.name = name;
goog.net.xpc.channels[name] = this;
};
goog.net.xpc.CrossPageChannel.prototype.isMessageOriginAcceptable_ = function(opt_origin) {
var peerHostname = this.cfg_[goog.net.xpc.CfgFields.PEER_HOSTNAME];
return goog.string.isEmptyOrWhitespace(goog.string.makeSafe(opt_origin)) || goog.string.isEmptyOrWhitespace(goog.string.makeSafe(peerHostname)) || opt_origin == this.cfg_[goog.net.xpc.CfgFields.PEER_HOSTNAME];
};
goog.net.xpc.CrossPageChannel.prototype.disposeInternal = function() {
this.close();
this.peerWindowObject_ = null;
this.iframeElement_ = null;
delete goog.net.xpc.channels[this.name];
goog.dispose(this.peerLoadHandler_);
delete this.peerLoadHandler_;
goog.net.xpc.CrossPageChannel.base(this, "disposeInternal");
};
goog.net.xpc.CrossPageChannel.disposeAll_ = function() {
for (var name in goog.net.xpc.channels) {
goog.dispose(goog.net.xpc.channels[name]);
}
};
goog.provide("goog.net.WebSocket");
goog.provide("goog.net.WebSocket.ErrorEvent");
goog.provide("goog.net.WebSocket.EventType");
goog.provide("goog.net.WebSocket.MessageEvent");
goog.require("goog.Timer");
goog.require("goog.asserts");
goog.require("goog.debug.entryPointRegistry");
goog.require("goog.events");
goog.require("goog.events.Event");
goog.require("goog.events.EventTarget");
goog.require("goog.log");
goog.net.WebSocket = function(opt_autoReconnect, opt_getNextReconnect) {
goog.net.WebSocket.base(this, "constructor");
this.autoReconnect_ = goog.isDef(opt_autoReconnect) ? opt_autoReconnect : true;
this.getNextReconnect_ = opt_getNextReconnect || goog.net.WebSocket.EXPONENTIAL_BACKOFF_;
this.nextReconnect_ = this.getNextReconnect_(this.reconnectAttempt_);
};
goog.inherits(goog.net.WebSocket, goog.events.EventTarget);
goog.net.WebSocket.prototype.webSocket_ = null;
goog.net.WebSocket.prototype.url_ = null;
goog.net.WebSocket.prototype.protocol_ = undefined;
goog.net.WebSocket.prototype.closeExpected_ = false;
goog.net.WebSocket.prototype.reconnectAttempt_ = 0;
goog.net.WebSocket.prototype.reconnectTimer_ = null;
goog.net.WebSocket.prototype.logger_ = goog.log.getLogger("goog.net.WebSocket");
goog.net.WebSocket.EventType = {CLOSED:goog.events.getUniqueId("closed"), ERROR:goog.events.getUniqueId("error"), MESSAGE:goog.events.getUniqueId("message"), OPENED:goog.events.getUniqueId("opened")};
goog.net.WebSocket.ReadyState_ = {CONNECTING:0, OPEN:1, CLOSING:2, CLOSED:3};
goog.net.WebSocket.EXPONENTIAL_BACKOFF_CEILING_ = 60 * 1E3;
goog.net.WebSocket.EXPONENTIAL_BACKOFF_ = function(attempt) {
var time = Math.pow(2, attempt) * 1E3;
return Math.min(time, goog.net.WebSocket.EXPONENTIAL_BACKOFF_CEILING_);
};
goog.net.WebSocket.protectEntryPoints = function(errorHandler) {
goog.net.WebSocket.prototype.onOpen_ = errorHandler.protectEntryPoint(goog.net.WebSocket.prototype.onOpen_);
goog.net.WebSocket.prototype.onClose_ = errorHandler.protectEntryPoint(goog.net.WebSocket.prototype.onClose_);
goog.net.WebSocket.prototype.onMessage_ = errorHandler.protectEntryPoint(goog.net.WebSocket.prototype.onMessage_);
goog.net.WebSocket.prototype.onError_ = errorHandler.protectEntryPoint(goog.net.WebSocket.prototype.onError_);
};
goog.net.WebSocket.prototype.open = function(url, opt_protocol) {
goog.asserts.assert(goog.global["WebSocket"], "This browser does not support WebSocket");
goog.asserts.assert(!this.isOpen(), "The WebSocket is already open");
this.clearReconnectTimer_();
this.url_ = url;
this.protocol_ = opt_protocol;
if (this.protocol_) {
goog.log.info(this.logger_, "Opening the WebSocket on " + this.url_ + " with protocol " + this.protocol_);
this.webSocket_ = new WebSocket(this.url_, this.protocol_);
} else {
goog.log.info(this.logger_, "Opening the WebSocket on " + this.url_);
this.webSocket_ = new WebSocket(this.url_);
}
this.webSocket_.onopen = goog.bind(this.onOpen_, this);
this.webSocket_.onclose = goog.bind(this.onClose_, this);
this.webSocket_.onmessage = goog.bind(this.onMessage_, this);
this.webSocket_.onerror = goog.bind(this.onError_, this);
};
goog.net.WebSocket.prototype.close = function() {
this.clearReconnectTimer_();
if (this.webSocket_) {
goog.log.info(this.logger_, "Closing the WebSocket.");
this.closeExpected_ = true;
this.webSocket_.close();
this.webSocket_ = null;
}
};
goog.net.WebSocket.prototype.send = function(message) {
goog.asserts.assert(this.isOpen(), "Cannot send without an open socket");
this.webSocket_.send(message);
};
goog.net.WebSocket.prototype.isOpen = function() {
return !!this.webSocket_ && this.webSocket_.readyState == goog.net.WebSocket.ReadyState_.OPEN;
};
goog.net.WebSocket.prototype.getBufferedAmount = function() {
return this.webSocket_.bufferedAmount;
};
goog.net.WebSocket.prototype.onOpen_ = function() {
goog.log.info(this.logger_, "WebSocket opened on " + this.url_);
this.dispatchEvent(goog.net.WebSocket.EventType.OPENED);
this.reconnectAttempt_ = 0;
this.nextReconnect_ = this.getNextReconnect_(this.reconnectAttempt_);
};
goog.net.WebSocket.prototype.onClose_ = function(event) {
goog.log.info(this.logger_, "The WebSocket on " + this.url_ + " closed.");
this.dispatchEvent(goog.net.WebSocket.EventType.CLOSED);
this.webSocket_ = null;
if (this.closeExpected_) {
goog.log.info(this.logger_, "The WebSocket closed normally.");
this.url_ = null;
this.protocol_ = undefined;
} else {
goog.log.error(this.logger_, "The WebSocket disconnected unexpectedly: " + event.data);
if (this.autoReconnect_) {
var seconds = Math.floor(this.nextReconnect_ / 1E3);
goog.log.info(this.logger_, "Seconds until next reconnect attempt: " + seconds);
this.reconnectTimer_ = goog.Timer.callOnce(goog.bind(this.open, this, this.url_, this.protocol_), this.nextReconnect_, this);
this.reconnectAttempt_++;
this.nextReconnect_ = this.getNextReconnect_(this.reconnectAttempt_);
}
}
this.closeExpected_ = false;
};
goog.net.WebSocket.prototype.onMessage_ = function(event) {
var message = event.data;
this.dispatchEvent(new goog.net.WebSocket.MessageEvent(message));
};
goog.net.WebSocket.prototype.onError_ = function(event) {
var data = (event.data);
goog.log.error(this.logger_, "An error occurred: " + data);
this.dispatchEvent(new goog.net.WebSocket.ErrorEvent(data));
};
goog.net.WebSocket.prototype.clearReconnectTimer_ = function() {
if (goog.isDefAndNotNull(this.reconnectTimer_)) {
goog.Timer.clear(this.reconnectTimer_);
}
this.reconnectTimer_ = null;
};
goog.net.WebSocket.prototype.disposeInternal = function() {
goog.net.WebSocket.base(this, "disposeInternal");
this.close();
};
goog.net.WebSocket.MessageEvent = function(message) {
goog.net.WebSocket.MessageEvent.base(this, "constructor", goog.net.WebSocket.EventType.MESSAGE);
this.message = message;
};
goog.inherits(goog.net.WebSocket.MessageEvent, goog.events.Event);
goog.net.WebSocket.ErrorEvent = function(data) {
goog.net.WebSocket.ErrorEvent.base(this, "constructor", goog.net.WebSocket.EventType.ERROR);
this.data = data;
};
goog.inherits(goog.net.WebSocket.ErrorEvent, goog.events.Event);
goog.debug.entryPointRegistry.register(function(transformer) {
goog.net.WebSocket.prototype.onOpen_ = transformer(goog.net.WebSocket.prototype.onOpen_);
goog.net.WebSocket.prototype.onClose_ = transformer(goog.net.WebSocket.prototype.onClose_);
goog.net.WebSocket.prototype.onMessage_ = transformer(goog.net.WebSocket.prototype.onMessage_);
goog.net.WebSocket.prototype.onError_ = transformer(goog.net.WebSocket.prototype.onError_);
});
goog.provide("clojure.browser.event");
goog.require("cljs.core");
goog.require("goog.events");
goog.require("goog.events.EventTarget");
goog.require("goog.events.EventType");
clojure.browser.event.IEventType = function() {
};
clojure.browser.event.event_types = function clojure$browser$event$event_types(this$) {
if (!(this$ == null) && !(this$.clojure$browser$event$IEventType$event_types$arity$1 == null)) {
return this$.clojure$browser$event$IEventType$event_types$arity$1(this$);
} else {
var x__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = clojure.browser.event.event_types[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$);
} else {
var m__5327__auto____$1 = clojure.browser.event.event_types["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.call(null, this$);
} else {
throw cljs.core.missing_protocol.call(null, "IEventType.event-types", this$);
}
}
}
};
goog.events.EventTarget.prototype.clojure$browser$event$IEventType$ = true;
goog.events.EventTarget.prototype.clojure$browser$event$IEventType$event_types$arity$1 = function(this$) {
var this$__$1 = this;
return cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, cljs.core.map.call(null, function(this$__$1) {
return function(p__10938) {
var vec__10939 = p__10938;
var k = cljs.core.nth.call(null, vec__10939, 0, null);
var v = cljs.core.nth.call(null, vec__10939, 1, null);
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.call(null, k.toLowerCase()), v], null);
};
}(this$__$1), cljs.core.merge.call(null, cljs.core.js__GT_clj.call(null, goog.events.EventType))));
};
if (typeof Element !== "undefined") {
Element.prototype.clojure$browser$event$IEventType$ = true;
Element.prototype.clojure$browser$event$IEventType$event_types$arity$1 = function(this$) {
var this$__$1 = this;
return cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, cljs.core.map.call(null, function(this$__$1) {
return function(p__10940) {
var vec__10941 = p__10940;
var k = cljs.core.nth.call(null, vec__10941, 0, null);
var v = cljs.core.nth.call(null, vec__10941, 1, null);
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.call(null, k.toLowerCase()), v], null);
};
}(this$__$1), cljs.core.merge.call(null, cljs.core.js__GT_clj.call(null, goog.events.EventType))));
};
} else {
}
clojure.browser.event.listen = function clojure$browser$event$listen(var_args) {
var args10942 = [];
var len__5729__auto___10945 = arguments.length;
var i__5730__auto___10946 = 0;
while (true) {
if (i__5730__auto___10946 < len__5729__auto___10945) {
args10942.push(arguments[i__5730__auto___10946]);
var G__10947 = i__5730__auto___10946 + 1;
i__5730__auto___10946 = G__10947;
continue;
} else {
}
break;
}
var G__10944 = args10942.length;
switch(G__10944) {
case 3:
return clojure.browser.event.listen.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
break;
case 4:
return clojure.browser.event.listen.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(args10942.length)].join(""));;
}
};
clojure.browser.event.listen.cljs$core$IFn$_invoke$arity$3 = function(src, type, fn) {
return clojure.browser.event.listen.call(null, src, type, fn, false);
};
clojure.browser.event.listen.cljs$core$IFn$_invoke$arity$4 = function(src, type, fn, capture_QMARK_) {
return goog.events.listen(src, cljs.core.get.call(null, clojure.browser.event.event_types.call(null, src), type, type), fn, capture_QMARK_);
};
clojure.browser.event.listen.cljs$lang$maxFixedArity = 4;
clojure.browser.event.listen_once = function clojure$browser$event$listen_once(var_args) {
var args10949 = [];
var len__5729__auto___10952 = arguments.length;
var i__5730__auto___10953 = 0;
while (true) {
if (i__5730__auto___10953 < len__5729__auto___10952) {
args10949.push(arguments[i__5730__auto___10953]);
var G__10954 = i__5730__auto___10953 + 1;
i__5730__auto___10953 = G__10954;
continue;
} else {
}
break;
}
var G__10951 = args10949.length;
switch(G__10951) {
case 3:
return clojure.browser.event.listen_once.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
break;
case 4:
return clojure.browser.event.listen_once.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(args10949.length)].join(""));;
}
};
clojure.browser.event.listen_once.cljs$core$IFn$_invoke$arity$3 = function(src, type, fn) {
return clojure.browser.event.listen_once.call(null, src, type, fn, false);
};
clojure.browser.event.listen_once.cljs$core$IFn$_invoke$arity$4 = function(src, type, fn, capture_QMARK_) {
return goog.events.listenOnce(src, cljs.core.get.call(null, clojure.browser.event.event_types.call(null, src), type, type), fn, capture_QMARK_);
};
clojure.browser.event.listen_once.cljs$lang$maxFixedArity = 4;
clojure.browser.event.unlisten = function clojure$browser$event$unlisten(var_args) {
var args10956 = [];
var len__5729__auto___10959 = arguments.length;
var i__5730__auto___10960 = 0;
while (true) {
if (i__5730__auto___10960 < len__5729__auto___10959) {
args10956.push(arguments[i__5730__auto___10960]);
var G__10961 = i__5730__auto___10960 + 1;
i__5730__auto___10960 = G__10961;
continue;
} else {
}
break;
}
var G__10958 = args10956.length;
switch(G__10958) {
case 3:
return clojure.browser.event.unlisten.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
break;
case 4:
return clojure.browser.event.unlisten.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(args10956.length)].join(""));;
}
};
clojure.browser.event.unlisten.cljs$core$IFn$_invoke$arity$3 = function(src, type, fn) {
return clojure.browser.event.unlisten.call(null, src, type, fn, false);
};
clojure.browser.event.unlisten.cljs$core$IFn$_invoke$arity$4 = function(src, type, fn, capture_QMARK_) {
return goog.events.unlisten(src, cljs.core.get.call(null, clojure.browser.event.event_types.call(null, src), type, type), fn, capture_QMARK_);
};
clojure.browser.event.unlisten.cljs$lang$maxFixedArity = 4;
clojure.browser.event.unlisten_by_key = function clojure$browser$event$unlisten_by_key(key) {
return goog.events.unlistenByKey(key);
};
clojure.browser.event.dispatch_event = function clojure$browser$event$dispatch_event(src, event) {
return goog.events.dispatchEvent(src, event);
};
clojure.browser.event.expose = function clojure$browser$event$expose(e) {
return goog.events.expose(e);
};
clojure.browser.event.fire_listeners = function clojure$browser$event$fire_listeners(obj, type, capture, event) {
return null;
};
clojure.browser.event.total_listener_count = function clojure$browser$event$total_listener_count() {
return goog.events.getTotalListenerCount();
};
clojure.browser.event.get_listener = function clojure$browser$event$get_listener(src, type, listener, opt_capt, opt_handler) {
return null;
};
clojure.browser.event.all_listeners = function clojure$browser$event$all_listeners(obj, type, capture) {
return null;
};
clojure.browser.event.unique_event_id = function clojure$browser$event$unique_event_id(event_type) {
return null;
};
clojure.browser.event.has_listener = function clojure$browser$event$has_listener(obj, opt_type, opt_capture) {
return null;
};
clojure.browser.event.remove_all = function clojure$browser$event$remove_all(opt_obj, opt_type, opt_capt) {
return null;
};
goog.provide("clojure.browser.net");
goog.require("cljs.core");
goog.require("goog.Uri");
goog.require("goog.net.WebSocket");
goog.require("goog.net.EventType");
goog.require("goog.json");
goog.require("goog.net.xpc.CfgFields");
goog.require("goog.net.XhrIo");
goog.require("clojure.browser.event");
goog.require("goog.net.xpc.CrossPageChannel");
clojure.browser.net._STAR_timeout_STAR_ = 1E4;
clojure.browser.net.event_types = cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, cljs.core.map.call(null, function(p__10965) {
var vec__10966 = p__10965;
var k = cljs.core.nth.call(null, vec__10966, 0, null);
var v = cljs.core.nth.call(null, vec__10966, 1, null);
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.call(null, k.toLowerCase()), v], null);
}, cljs.core.merge.call(null, cljs.core.js__GT_clj.call(null, goog.net.EventType))));
clojure.browser.net.IConnection = function() {
};
clojure.browser.net.connect = function clojure$browser$net$connect(var_args) {
var args10967 = [];
var len__5729__auto___10973 = arguments.length;
var i__5730__auto___10974 = 0;
while (true) {
if (i__5730__auto___10974 < len__5729__auto___10973) {
args10967.push(arguments[i__5730__auto___10974]);
var G__10975 = i__5730__auto___10974 + 1;
i__5730__auto___10974 = G__10975;
continue;
} else {
}
break;
}
var G__10969 = args10967.length;
switch(G__10969) {
case 1:
return clojure.browser.net.connect.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return clojure.browser.net.connect.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
case 3:
return clojure.browser.net.connect.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
break;
case 4:
return clojure.browser.net.connect.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(args10967.length)].join(""));;
}
};
clojure.browser.net.connect.cljs$core$IFn$_invoke$arity$1 = function(this$) {
if (!(this$ == null) && !(this$.clojure$browser$net$IConnection$connect$arity$1 == null)) {
return this$.clojure$browser$net$IConnection$connect$arity$1(this$);
} else {
var x__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = clojure.browser.net.connect[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$);
} else {
var m__5327__auto____$1 = clojure.browser.net.connect["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.call(null, this$);
} else {
throw cljs.core.missing_protocol.call(null, "IConnection.connect", this$);
}
}
}
};
clojure.browser.net.connect.cljs$core$IFn$_invoke$arity$2 = function(this$, opt1) {
if (!(this$ == null) && !(this$.clojure$browser$net$IConnection$connect$arity$2 == null)) {
return this$.clojure$browser$net$IConnection$connect$arity$2(this$, opt1);
} else {
var x__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = clojure.browser.net.connect[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, opt1);
} else {
var m__5327__auto____$1 = clojure.browser.net.connect["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.call(null, this$, opt1);
} else {
throw cljs.core.missing_protocol.call(null, "IConnection.connect", this$);
}
}
}
};
clojure.browser.net.connect.cljs$core$IFn$_invoke$arity$3 = function(this$, opt1, opt2) {
if (!(this$ == null) && !(this$.clojure$browser$net$IConnection$connect$arity$3 == null)) {
return this$.clojure$browser$net$IConnection$connect$arity$3(this$, opt1, opt2);
} else {
var x__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = clojure.browser.net.connect[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, opt1, opt2);
} else {
var m__5327__auto____$1 = clojure.browser.net.connect["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.call(null, this$, opt1, opt2);
} else {
throw cljs.core.missing_protocol.call(null, "IConnection.connect", this$);
}
}
}
};
clojure.browser.net.connect.cljs$core$IFn$_invoke$arity$4 = function(this$, opt1, opt2, opt3) {
if (!(this$ == null) && !(this$.clojure$browser$net$IConnection$connect$arity$4 == null)) {
return this$.clojure$browser$net$IConnection$connect$arity$4(this$, opt1, opt2, opt3);
} else {
var x__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = clojure.browser.net.connect[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, opt1, opt2, opt3);
} else {
var m__5327__auto____$1 = clojure.browser.net.connect["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.call(null, this$, opt1, opt2, opt3);
} else {
throw cljs.core.missing_protocol.call(null, "IConnection.connect", this$);
}
}
}
};
clojure.browser.net.connect.cljs$lang$maxFixedArity = 4;
clojure.browser.net.transmit = function clojure$browser$net$transmit(var_args) {
var args10970 = [];
var len__5729__auto___10977 = arguments.length;
var i__5730__auto___10978 = 0;
while (true) {
if (i__5730__auto___10978 < len__5729__auto___10977) {
args10970.push(arguments[i__5730__auto___10978]);
var G__10979 = i__5730__auto___10978 + 1;
i__5730__auto___10978 = G__10979;
continue;
} else {
}
break;
}
var G__10972 = args10970.length;
switch(G__10972) {
case 2:
return clojure.browser.net.transmit.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
case 3:
return clojure.browser.net.transmit.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
break;
case 4:
return clojure.browser.net.transmit.cljs$core$IFn$_invoke$arity$4(arguments[0], arguments[1], arguments[2], arguments[3]);
break;
case 5:
return clojure.browser.net.transmit.cljs$core$IFn$_invoke$arity$5(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);
break;
case 6:
return clojure.browser.net.transmit.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(args10970.length)].join(""));;
}
};
clojure.browser.net.transmit.cljs$core$IFn$_invoke$arity$2 = function(this$, opt) {
if (!(this$ == null) && !(this$.clojure$browser$net$IConnection$transmit$arity$2 == null)) {
return this$.clojure$browser$net$IConnection$transmit$arity$2(this$, opt);
} else {
var x__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = clojure.browser.net.transmit[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, opt);
} else {
var m__5327__auto____$1 = clojure.browser.net.transmit["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.call(null, this$, opt);
} else {
throw cljs.core.missing_protocol.call(null, "IConnection.transmit", this$);
}
}
}
};
clojure.browser.net.transmit.cljs$core$IFn$_invoke$arity$3 = function(this$, opt, opt2) {
if (!(this$ == null) && !(this$.clojure$browser$net$IConnection$transmit$arity$3 == null)) {
return this$.clojure$browser$net$IConnection$transmit$arity$3(this$, opt, opt2);
} else {
var x__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = clojure.browser.net.transmit[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, opt, opt2);
} else {
var m__5327__auto____$1 = clojure.browser.net.transmit["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.call(null, this$, opt, opt2);
} else {
throw cljs.core.missing_protocol.call(null, "IConnection.transmit", this$);
}
}
}
};
clojure.browser.net.transmit.cljs$core$IFn$_invoke$arity$4 = function(this$, opt, opt2, opt3) {
if (!(this$ == null) && !(this$.clojure$browser$net$IConnection$transmit$arity$4 == null)) {
return this$.clojure$browser$net$IConnection$transmit$arity$4(this$, opt, opt2, opt3);
} else {
var x__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = clojure.browser.net.transmit[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, opt, opt2, opt3);
} else {
var m__5327__auto____$1 = clojure.browser.net.transmit["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.call(null, this$, opt, opt2, opt3);
} else {
throw cljs.core.missing_protocol.call(null, "IConnection.transmit", this$);
}
}
}
};
clojure.browser.net.transmit.cljs$core$IFn$_invoke$arity$5 = function(this$, opt, opt2, opt3, opt4) {
if (!(this$ == null) && !(this$.clojure$browser$net$IConnection$transmit$arity$5 == null)) {
return this$.clojure$browser$net$IConnection$transmit$arity$5(this$, opt, opt2, opt3, opt4);
} else {
var x__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = clojure.browser.net.transmit[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, opt, opt2, opt3, opt4);
} else {
var m__5327__auto____$1 = clojure.browser.net.transmit["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.call(null, this$, opt, opt2, opt3, opt4);
} else {
throw cljs.core.missing_protocol.call(null, "IConnection.transmit", this$);
}
}
}
};
clojure.browser.net.transmit.cljs$core$IFn$_invoke$arity$6 = function(this$, opt, opt2, opt3, opt4, opt5) {
if (!(this$ == null) && !(this$.clojure$browser$net$IConnection$transmit$arity$6 == null)) {
return this$.clojure$browser$net$IConnection$transmit$arity$6(this$, opt, opt2, opt3, opt4, opt5);
} else {
var x__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = clojure.browser.net.transmit[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, opt, opt2, opt3, opt4, opt5);
} else {
var m__5327__auto____$1 = clojure.browser.net.transmit["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.call(null, this$, opt, opt2, opt3, opt4, opt5);
} else {
throw cljs.core.missing_protocol.call(null, "IConnection.transmit", this$);
}
}
}
};
clojure.browser.net.transmit.cljs$lang$maxFixedArity = 6;
clojure.browser.net.close = function clojure$browser$net$close(this$) {
if (!(this$ == null) && !(this$.clojure$browser$net$IConnection$close$arity$1 == null)) {
return this$.clojure$browser$net$IConnection$close$arity$1(this$);
} else {
var x__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = clojure.browser.net.close[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$);
} else {
var m__5327__auto____$1 = clojure.browser.net.close["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.call(null, this$);
} else {
throw cljs.core.missing_protocol.call(null, "IConnection.close", this$);
}
}
}
};
goog.net.XhrIo.prototype.clojure$browser$net$IConnection$ = true;
goog.net.XhrIo.prototype.clojure$browser$net$IConnection$transmit$arity$2 = function(this$, uri) {
var this$__$1 = this;
return clojure.browser.net.transmit.call(null, this$__$1, uri, "GET", null, null, clojure.browser.net._STAR_timeout_STAR_);
};
goog.net.XhrIo.prototype.clojure$browser$net$IConnection$transmit$arity$3 = function(this$, uri, method) {
var this$__$1 = this;
return clojure.browser.net.transmit.call(null, this$__$1, uri, method, null, null, clojure.browser.net._STAR_timeout_STAR_);
};
goog.net.XhrIo.prototype.clojure$browser$net$IConnection$transmit$arity$4 = function(this$, uri, method, content) {
var this$__$1 = this;
return clojure.browser.net.transmit.call(null, this$__$1, uri, method, content, null, clojure.browser.net._STAR_timeout_STAR_);
};
goog.net.XhrIo.prototype.clojure$browser$net$IConnection$transmit$arity$5 = function(this$, uri, method, content, headers) {
var this$__$1 = this;
return clojure.browser.net.transmit.call(null, this$__$1, uri, method, content, headers, clojure.browser.net._STAR_timeout_STAR_);
};
goog.net.XhrIo.prototype.clojure$browser$net$IConnection$transmit$arity$6 = function(this$, uri, method, content, headers, timeout) {
var this$__$1 = this;
this$__$1.setTimeoutInterval(timeout);
return this$__$1.send(uri, method, content, headers);
};
goog.net.XhrIo.prototype.clojure$browser$event$IEventType$ = true;
goog.net.XhrIo.prototype.clojure$browser$event$IEventType$event_types$arity$1 = function(this$) {
var this$__$1 = this;
return cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, cljs.core.map.call(null, function(this$__$1) {
return function(p__10981) {
var vec__10982 = p__10981;
var k = cljs.core.nth.call(null, vec__10982, 0, null);
var v = cljs.core.nth.call(null, vec__10982, 1, null);
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.call(null, k.toLowerCase()), v], null);
};
}(this$__$1), cljs.core.merge.call(null, cljs.core.js__GT_clj.call(null, goog.net.EventType))));
};
clojure.browser.net.xpc_config_fields = cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, cljs.core.map.call(null, function(p__10983) {
var vec__10984 = p__10983;
var k = cljs.core.nth.call(null, vec__10984, 0, null);
var v = cljs.core.nth.call(null, vec__10984, 1, null);
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.call(null, k.toLowerCase()), v], null);
}, cljs.core.js__GT_clj.call(null, goog.net.xpc.CfgFields)));
clojure.browser.net.xhr_connection = function clojure$browser$net$xhr_connection() {
return new goog.net.XhrIo;
};
clojure.browser.net.ICrossPageChannel = function() {
};
clojure.browser.net.register_service = function clojure$browser$net$register_service(var_args) {
var args10985 = [];
var len__5729__auto___10988 = arguments.length;
var i__5730__auto___10989 = 0;
while (true) {
if (i__5730__auto___10989 < len__5729__auto___10988) {
args10985.push(arguments[i__5730__auto___10989]);
var G__10990 = i__5730__auto___10989 + 1;
i__5730__auto___10989 = G__10990;
continue;
} else {
}
break;
}
var G__10987 = args10985.length;
switch(G__10987) {
case 3:
return clojure.browser.net.register_service.cljs$core$IFn$_invoke$arity$3(arguments[0], arguments[1], arguments[2]);
break;
case 4:
return clojure.browser.net.register_service.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(args10985.length)].join(""));;
}
};
clojure.browser.net.register_service.cljs$core$IFn$_invoke$arity$3 = function(this$, service_name, fn) {
if (!(this$ == null) && !(this$.clojure$browser$net$ICrossPageChannel$register_service$arity$3 == null)) {
return this$.clojure$browser$net$ICrossPageChannel$register_service$arity$3(this$, service_name, fn);
} else {
var x__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = clojure.browser.net.register_service[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, service_name, fn);
} else {
var m__5327__auto____$1 = clojure.browser.net.register_service["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.call(null, this$, service_name, fn);
} else {
throw cljs.core.missing_protocol.call(null, "ICrossPageChannel.register-service", this$);
}
}
}
};
clojure.browser.net.register_service.cljs$core$IFn$_invoke$arity$4 = function(this$, service_name, fn, encode_json_QMARK_) {
if (!(this$ == null) && !(this$.clojure$browser$net$ICrossPageChannel$register_service$arity$4 == null)) {
return this$.clojure$browser$net$ICrossPageChannel$register_service$arity$4(this$, service_name, fn, encode_json_QMARK_);
} else {
var x__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = clojure.browser.net.register_service[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, service_name, fn, encode_json_QMARK_);
} else {
var m__5327__auto____$1 = clojure.browser.net.register_service["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.call(null, this$, service_name, fn, encode_json_QMARK_);
} else {
throw cljs.core.missing_protocol.call(null, "ICrossPageChannel.register-service", this$);
}
}
}
};
clojure.browser.net.register_service.cljs$lang$maxFixedArity = 4;
goog.net.xpc.CrossPageChannel.prototype.clojure$browser$net$ICrossPageChannel$ = true;
goog.net.xpc.CrossPageChannel.prototype.clojure$browser$net$ICrossPageChannel$register_service$arity$3 = function(this$, service_name, fn) {
var this$__$1 = this;
return clojure.browser.net.register_service.call(null, this$__$1, service_name, fn, false);
};
goog.net.xpc.CrossPageChannel.prototype.clojure$browser$net$ICrossPageChannel$register_service$arity$4 = function(this$, service_name, fn, encode_json_QMARK_) {
var this$__$1 = this;
return this$__$1.registerService(cljs.core.name.call(null, service_name), fn, encode_json_QMARK_);
};
goog.net.xpc.CrossPageChannel.prototype.clojure$browser$net$IConnection$ = true;
goog.net.xpc.CrossPageChannel.prototype.clojure$browser$net$IConnection$connect$arity$1 = function(this$) {
var this$__$1 = this;
return clojure.browser.net.connect.call(null, this$__$1, null);
};
goog.net.xpc.CrossPageChannel.prototype.clojure$browser$net$IConnection$connect$arity$2 = function(this$, on_connect_fn) {
var this$__$1 = this;
return this$__$1.connect(on_connect_fn);
};
goog.net.xpc.CrossPageChannel.prototype.clojure$browser$net$IConnection$connect$arity$3 = function(this$, on_connect_fn, config_iframe_fn) {
var this$__$1 = this;
return clojure.browser.net.connect.call(null, this$__$1, on_connect_fn, config_iframe_fn, document.body);
};
goog.net.xpc.CrossPageChannel.prototype.clojure$browser$net$IConnection$connect$arity$4 = function(this$, on_connect_fn, config_iframe_fn, iframe_parent) {
var this$__$1 = this;
this$__$1.createPeerIframe(iframe_parent, config_iframe_fn);
return this$__$1.connect(on_connect_fn);
};
goog.net.xpc.CrossPageChannel.prototype.clojure$browser$net$IConnection$transmit$arity$3 = function(this$, service_name, payload) {
var this$__$1 = this;
return this$__$1.send(cljs.core.name.call(null, service_name), payload);
};
goog.net.xpc.CrossPageChannel.prototype.clojure$browser$net$IConnection$close$arity$1 = function(this$) {
var this$__$1 = this;
return this$__$1.close();
};
clojure.browser.net.xpc_connection = function clojure$browser$net$xpc_connection(var_args) {
var args10992 = [];
var len__5729__auto___11000 = arguments.length;
var i__5730__auto___11001 = 0;
while (true) {
if (i__5730__auto___11001 < len__5729__auto___11000) {
args10992.push(arguments[i__5730__auto___11001]);
var G__11002 = i__5730__auto___11001 + 1;
i__5730__auto___11001 = G__11002;
continue;
} else {
}
break;
}
var G__10994 = args10992.length;
switch(G__10994) {
case 0:
return clojure.browser.net.xpc_connection.cljs$core$IFn$_invoke$arity$0();
break;
case 1:
return clojure.browser.net.xpc_connection.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
default:
throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args10992.length)].join(""));;
}
};
clojure.browser.net.xpc_connection.cljs$core$IFn$_invoke$arity$0 = function() {
var temp__4425__auto__ = (new goog.Uri(window.location.href)).getParameterValue("xpc");
if (cljs.core.truth_(temp__4425__auto__)) {
var config = temp__4425__auto__;
return new goog.net.xpc.CrossPageChannel(goog.json.parse(config));
} else {
return null;
}
};
clojure.browser.net.xpc_connection.cljs$core$IFn$_invoke$arity$1 = function(config) {
return new goog.net.xpc.CrossPageChannel(cljs.core.reduce.call(null, function(sum, p__10995) {
var vec__10996 = p__10995;
var k = cljs.core.nth.call(null, vec__10996, 0, null);
var v = cljs.core.nth.call(null, vec__10996, 1, null);
var temp__4423__auto__ = cljs.core.get.call(null, clojure.browser.net.xpc_config_fields, k);
if (cljs.core.truth_(temp__4423__auto__)) {
var field = temp__4423__auto__;
var G__10997 = sum;
G__10997[field] = v;
return G__10997;
} else {
return sum;
}
}, {}, config));
};
clojure.browser.net.xpc_connection.cljs$lang$maxFixedArity = 1;
clojure.browser.net.IWebSocket = function() {
};
clojure.browser.net.open_QMARK_ = function clojure$browser$net$open_QMARK_(this$) {
if (!(this$ == null) && !(this$.clojure$browser$net$IWebSocket$open_QMARK_$arity$1 == null)) {
return this$.clojure$browser$net$IWebSocket$open_QMARK_$arity$1(this$);
} else {
var x__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = clojure.browser.net.open_QMARK_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$);
} else {
var m__5327__auto____$1 = clojure.browser.net.open_QMARK_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.call(null, this$);
} else {
throw cljs.core.missing_protocol.call(null, "IWebSocket.open?", this$);
}
}
}
};
goog.net.WebSocket.prototype.clojure$browser$net$IWebSocket$ = true;
goog.net.WebSocket.prototype.clojure$browser$net$IWebSocket$open_QMARK_$arity$1 = function(this$) {
var this$__$1 = this;
return this$__$1.isOpen(cljs.core.List.EMPTY);
};
goog.net.WebSocket.prototype.clojure$browser$net$IConnection$ = true;
goog.net.WebSocket.prototype.clojure$browser$net$IConnection$connect$arity$2 = function(this$, url) {
var this$__$1 = this;
return clojure.browser.net.connect.call(null, this$__$1, url, null);
};
goog.net.WebSocket.prototype.clojure$browser$net$IConnection$connect$arity$3 = function(this$, url, protocol) {
var this$__$1 = this;
return this$__$1.open(url, protocol);
};
goog.net.WebSocket.prototype.clojure$browser$net$IConnection$transmit$arity$2 = function(this$, message) {
var this$__$1 = this;
return this$__$1.send(message);
};
goog.net.WebSocket.prototype.clojure$browser$net$IConnection$close$arity$1 = function(this$) {
var this$__$1 = this;
return this$__$1.close(cljs.core.List.EMPTY);
};
goog.net.WebSocket.prototype.clojure$browser$event$IEventType$ = true;
goog.net.WebSocket.prototype.clojure$browser$event$IEventType$event_types$arity$1 = function(this$) {
var this$__$1 = this;
return cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, cljs.core.map.call(null, function(this$__$1) {
return function(p__11004) {
var vec__11005 = p__11004;
var k = cljs.core.nth.call(null, vec__11005, 0, null);
var v = cljs.core.nth.call(null, vec__11005, 1, null);
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.call(null, k.toLowerCase()), v], null);
};
}(this$__$1), cljs.core.merge.call(null, cljs.core.js__GT_clj.call(null, goog.net.WebSocket.EventType))));
};
clojure.browser.net.websocket_connection = function clojure$browser$net$websocket_connection(var_args) {
var args11006 = [];
var len__5729__auto___11009 = arguments.length;
var i__5730__auto___11010 = 0;
while (true) {
if (i__5730__auto___11010 < len__5729__auto___11009) {
args11006.push(arguments[i__5730__auto___11010]);
var G__11011 = i__5730__auto___11010 + 1;
i__5730__auto___11010 = G__11011;
continue;
} else {
}
break;
}
var G__11008 = args11006.length;
switch(G__11008) {
case 0:
return clojure.browser.net.websocket_connection.cljs$core$IFn$_invoke$arity$0();
break;
case 1:
return clojure.browser.net.websocket_connection.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return clojure.browser.net.websocket_connection.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args11006.length)].join(""));;
}
};
clojure.browser.net.websocket_connection.cljs$core$IFn$_invoke$arity$0 = function() {
return clojure.browser.net.websocket_connection.call(null, null, null);
};
clojure.browser.net.websocket_connection.cljs$core$IFn$_invoke$arity$1 = function(auto_reconnect_QMARK_) {
return clojure.browser.net.websocket_connection.call(null, auto_reconnect_QMARK_, null);
};
clojure.browser.net.websocket_connection.cljs$core$IFn$_invoke$arity$2 = function(auto_reconnect_QMARK_, next_reconnect_fn) {
return new goog.net.WebSocket(auto_reconnect_QMARK_, next_reconnect_fn);
};
clojure.browser.net.websocket_connection.cljs$lang$maxFixedArity = 2;
goog.provide("cljs.repl");
goog.require("cljs.core");
cljs.repl.print_doc = function cljs$repl$print_doc(m) {
cljs.core.println.call(null, "-------------------------");
cljs.core.println.call(null, [cljs.core.str(function() {
var temp__4425__auto__ = (new cljs.core.Keyword(null, "ns", "ns", 441598760)).cljs$core$IFn$_invoke$arity$1(m);
if (cljs.core.truth_(temp__4425__auto__)) {
var ns = temp__4425__auto__;
return [cljs.core.str(ns), cljs.core.str("/")].join("");
} else {
return null;
}
}()), cljs.core.str((new cljs.core.Keyword(null, "name", "name", 1843675177)).cljs$core$IFn$_invoke$arity$1(m))].join(""));
if (cljs.core.truth_((new cljs.core.Keyword(null, "protocol", "protocol", 652470118)).cljs$core$IFn$_invoke$arity$1(m))) {
cljs.core.println.call(null, "Protocol");
} else {
}
if (cljs.core.truth_((new cljs.core.Keyword(null, "forms", "forms", 2045992350)).cljs$core$IFn$_invoke$arity$1(m))) {
var seq__11684_11698 = cljs.core.seq.call(null, (new cljs.core.Keyword(null, "forms", "forms", 2045992350)).cljs$core$IFn$_invoke$arity$1(m));
var chunk__11685_11699 = null;
var count__11686_11700 = 0;
var i__11687_11701 = 0;
while (true) {
if (i__11687_11701 < count__11686_11700) {
var f_11702 = cljs.core._nth.call(null, chunk__11685_11699, i__11687_11701);
cljs.core.println.call(null, " ", f_11702);
var G__11703 = seq__11684_11698;
var G__11704 = chunk__11685_11699;
var G__11705 = count__11686_11700;
var G__11706 = i__11687_11701 + 1;
seq__11684_11698 = G__11703;
chunk__11685_11699 = G__11704;
count__11686_11700 = G__11705;
i__11687_11701 = G__11706;
continue;
} else {
var temp__4425__auto___11707 = cljs.core.seq.call(null, seq__11684_11698);
if (temp__4425__auto___11707) {
var seq__11684_11708__$1 = temp__4425__auto___11707;
if (cljs.core.chunked_seq_QMARK_.call(null, seq__11684_11708__$1)) {
var c__5474__auto___11709 = cljs.core.chunk_first.call(null, seq__11684_11708__$1);
var G__11710 = cljs.core.chunk_rest.call(null, seq__11684_11708__$1);
var G__11711 = c__5474__auto___11709;
var G__11712 = cljs.core.count.call(null, c__5474__auto___11709);
var G__11713 = 0;
seq__11684_11698 = G__11710;
chunk__11685_11699 = G__11711;
count__11686_11700 = G__11712;
i__11687_11701 = G__11713;
continue;
} else {
var f_11714 = cljs.core.first.call(null, seq__11684_11708__$1);
cljs.core.println.call(null, " ", f_11714);
var G__11715 = cljs.core.next.call(null, seq__11684_11708__$1);
var G__11716 = null;
var G__11717 = 0;
var G__11718 = 0;
seq__11684_11698 = G__11715;
chunk__11685_11699 = G__11716;
count__11686_11700 = G__11717;
i__11687_11701 = G__11718;
continue;
}
} else {
}
}
break;
}
} else {
if (cljs.core.truth_((new cljs.core.Keyword(null, "arglists", "arglists", 1661989754)).cljs$core$IFn$_invoke$arity$1(m))) {
var arglists_11719 = (new cljs.core.Keyword(null, "arglists", "arglists", 1661989754)).cljs$core$IFn$_invoke$arity$1(m);
if (cljs.core.truth_(function() {
var or__4671__auto__ = (new cljs.core.Keyword(null, "macro", "macro", -867863404)).cljs$core$IFn$_invoke$arity$1(m);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return (new cljs.core.Keyword(null, "repl-special-function", "repl-special-function", 1262603725)).cljs$core$IFn$_invoke$arity$1(m);
}
}())) {
cljs.core.prn.call(null, arglists_11719);
} else {
cljs.core.prn.call(null, cljs.core._EQ_.call(null, new cljs.core.Symbol(null, "quote", "quote", 1377916282, null), cljs.core.first.call(null, arglists_11719)) ? cljs.core.second.call(null, arglists_11719) : arglists_11719);
}
} else {
}
}
if (cljs.core.truth_((new cljs.core.Keyword(null, "special-form", "special-form", -1326536374)).cljs$core$IFn$_invoke$arity$1(m))) {
cljs.core.println.call(null, "Special Form");
cljs.core.println.call(null, " ", (new cljs.core.Keyword(null, "doc", "doc", 1913296891)).cljs$core$IFn$_invoke$arity$1(m));
if (cljs.core.contains_QMARK_.call(null, m, new cljs.core.Keyword(null, "url", "url", 276297046))) {
if (cljs.core.truth_((new cljs.core.Keyword(null, "url", "url", 276297046)).cljs$core$IFn$_invoke$arity$1(m))) {
return cljs.core.println.call(null, [cljs.core.str("\n Please see http://clojure.org/"), cljs.core.str((new cljs.core.Keyword(null, "url", "url", 276297046)).cljs$core$IFn$_invoke$arity$1(m))].join(""));
} else {
return null;
}
} else {
return cljs.core.println.call(null, [cljs.core.str("\n Please see http://clojure.org/special_forms#"), cljs.core.str((new cljs.core.Keyword(null, "name", "name", 1843675177)).cljs$core$IFn$_invoke$arity$1(m))].join(""));
}
} else {
if (cljs.core.truth_((new cljs.core.Keyword(null, "macro", "macro", -867863404)).cljs$core$IFn$_invoke$arity$1(m))) {
cljs.core.println.call(null, "Macro");
} else {
}
if (cljs.core.truth_((new cljs.core.Keyword(null, "repl-special-function", "repl-special-function", 1262603725)).cljs$core$IFn$_invoke$arity$1(m))) {
cljs.core.println.call(null, "REPL Special Function");
} else {
}
cljs.core.println.call(null, " ", (new cljs.core.Keyword(null, "doc", "doc", 1913296891)).cljs$core$IFn$_invoke$arity$1(m));
if (cljs.core.truth_((new cljs.core.Keyword(null, "protocol", "protocol", 652470118)).cljs$core$IFn$_invoke$arity$1(m))) {
var seq__11688 = cljs.core.seq.call(null, (new cljs.core.Keyword(null, "methods", "methods", 453930866)).cljs$core$IFn$_invoke$arity$1(m));
var chunk__11689 = null;
var count__11690 = 0;
var i__11691 = 0;
while (true) {
if (i__11691 < count__11690) {
var vec__11692 = cljs.core._nth.call(null, chunk__11689, i__11691);
var name = cljs.core.nth.call(null, vec__11692, 0, null);
var map__11693 = cljs.core.nth.call(null, vec__11692, 1, null);
var map__11693__$1 = (!(map__11693 == null) ? map__11693.cljs$lang$protocol_mask$partition0$ & 64 || map__11693.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.call(null, cljs.core.hash_map, map__11693) : map__11693;
var doc = cljs.core.get.call(null, map__11693__$1, new cljs.core.Keyword(null, "doc", "doc", 1913296891));
var arglists = cljs.core.get.call(null, map__11693__$1, new cljs.core.Keyword(null, "arglists", "arglists", 1661989754));
cljs.core.println.call(null);
cljs.core.println.call(null, " ", name);
cljs.core.println.call(null, " ", arglists);
if (cljs.core.truth_(doc)) {
cljs.core.println.call(null, " ", doc);
} else {
}
var G__11720 = seq__11688;
var G__11721 = chunk__11689;
var G__11722 = count__11690;
var G__11723 = i__11691 + 1;
seq__11688 = G__11720;
chunk__11689 = G__11721;
count__11690 = G__11722;
i__11691 = G__11723;
continue;
} else {
var temp__4425__auto__ = cljs.core.seq.call(null, seq__11688);
if (temp__4425__auto__) {
var seq__11688__$1 = temp__4425__auto__;
if (cljs.core.chunked_seq_QMARK_.call(null, seq__11688__$1)) {
var c__5474__auto__ = cljs.core.chunk_first.call(null, seq__11688__$1);
var G__11724 = cljs.core.chunk_rest.call(null, seq__11688__$1);
var G__11725 = c__5474__auto__;
var G__11726 = cljs.core.count.call(null, c__5474__auto__);
var G__11727 = 0;
seq__11688 = G__11724;
chunk__11689 = G__11725;
count__11690 = G__11726;
i__11691 = G__11727;
continue;
} else {
var vec__11695 = cljs.core.first.call(null, seq__11688__$1);
var name = cljs.core.nth.call(null, vec__11695, 0, null);
var map__11696 = cljs.core.nth.call(null, vec__11695, 1, null);
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 doc = cljs.core.get.call(null, map__11696__$1, new cljs.core.Keyword(null, "doc", "doc", 1913296891));
var arglists = cljs.core.get.call(null, map__11696__$1, new cljs.core.Keyword(null, "arglists", "arglists", 1661989754));
cljs.core.println.call(null);
cljs.core.println.call(null, " ", name);
cljs.core.println.call(null, " ", arglists);
if (cljs.core.truth_(doc)) {
cljs.core.println.call(null, " ", doc);
} else {
}
var G__11728 = cljs.core.next.call(null, seq__11688__$1);
var G__11729 = null;
var G__11730 = 0;
var G__11731 = 0;
seq__11688 = G__11728;
chunk__11689 = G__11729;
count__11690 = G__11730;
i__11691 = G__11731;
continue;
}
} else {
return null;
}
}
break;
}
} else {
return null;
}
}
};
goog.provide("clojure.browser.repl");
goog.require("cljs.core");
goog.require("goog.dom");
goog.require("goog.userAgent.product");
goog.require("goog.array");
goog.require("goog.object");
goog.require("clojure.browser.net");
goog.require("clojure.browser.event");
goog.require("cljs.repl");
clojure.browser.repl.xpc_connection = cljs.core.atom.call(null, null);
clojure.browser.repl.print_queue = [];
clojure.browser.repl.flush_print_queue_BANG_ = function clojure$browser$repl$flush_print_queue_BANG_(conn) {
var seq__11738_11742 = cljs.core.seq.call(null, clojure.browser.repl.print_queue);
var chunk__11739_11743 = null;
var count__11740_11744 = 0;
var i__11741_11745 = 0;
while (true) {
if (i__11741_11745 < count__11740_11744) {
var str_11746 = cljs.core._nth.call(null, chunk__11739_11743, i__11741_11745);
clojure.browser.net.transmit.call(null, conn, new cljs.core.Keyword(null, "print", "print", 1299562414), str_11746);
var G__11747 = seq__11738_11742;
var G__11748 = chunk__11739_11743;
var G__11749 = count__11740_11744;
var G__11750 = i__11741_11745 + 1;
seq__11738_11742 = G__11747;
chunk__11739_11743 = G__11748;
count__11740_11744 = G__11749;
i__11741_11745 = G__11750;
continue;
} else {
var temp__4425__auto___11751 = cljs.core.seq.call(null, seq__11738_11742);
if (temp__4425__auto___11751) {
var seq__11738_11752__$1 = temp__4425__auto___11751;
if (cljs.core.chunked_seq_QMARK_.call(null, seq__11738_11752__$1)) {
var c__5474__auto___11753 = cljs.core.chunk_first.call(null, seq__11738_11752__$1);
var G__11754 = cljs.core.chunk_rest.call(null, seq__11738_11752__$1);
var G__11755 = c__5474__auto___11753;
var G__11756 = cljs.core.count.call(null, c__5474__auto___11753);
var G__11757 = 0;
seq__11738_11742 = G__11754;
chunk__11739_11743 = G__11755;
count__11740_11744 = G__11756;
i__11741_11745 = G__11757;
continue;
} else {
var str_11758 = cljs.core.first.call(null, seq__11738_11752__$1);
clojure.browser.net.transmit.call(null, conn, new cljs.core.Keyword(null, "print", "print", 1299562414), str_11758);
var G__11759 = cljs.core.next.call(null, seq__11738_11752__$1);
var G__11760 = null;
var G__11761 = 0;
var G__11762 = 0;
seq__11738_11742 = G__11759;
chunk__11739_11743 = G__11760;
count__11740_11744 = G__11761;
i__11741_11745 = G__11762;
continue;
}
} else {
}
}
break;
}
return goog.array.clear(clojure.browser.repl.print_queue);
};
clojure.browser.repl.repl_print = function clojure$browser$repl$repl_print(data) {
clojure.browser.repl.print_queue.push(cljs.core.pr_str.call(null, data));
var temp__4425__auto__ = cljs.core.deref.call(null, clojure.browser.repl.xpc_connection);
if (cljs.core.truth_(temp__4425__auto__)) {
var conn = temp__4425__auto__;
return clojure.browser.repl.flush_print_queue_BANG_.call(null, conn);
} else {
return null;
}
};
cljs.core._STAR_print_fn_STAR_ = clojure.browser.repl.repl_print;
cljs.core._STAR_print_err_fn_STAR_ = clojure.browser.repl.repl_print;
cljs.core._STAR_print_newline_STAR_ = true;
clojure.browser.repl.get_ua_product = function clojure$browser$repl$get_ua_product() {
if (cljs.core.truth_(goog.userAgent.product.SAFARI)) {
return new cljs.core.Keyword(null, "safari", "safari", 497115653);
} else {
if (cljs.core.truth_(goog.userAgent.product.CHROME)) {
return new cljs.core.Keyword(null, "chrome", "chrome", 1718738387);
} else {
if (cljs.core.truth_(goog.userAgent.product.FIREFOX)) {
return new cljs.core.Keyword(null, "firefox", "firefox", 1283768880);
} else {
if (cljs.core.truth_(goog.userAgent.product.IE)) {
return new cljs.core.Keyword(null, "ie", "ie", 2038473780);
} else {
return null;
}
}
}
}
};
clojure.browser.repl.evaluate_javascript = function clojure$browser$repl$evaluate_javascript(conn, block) {
var result = function() {
try {
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "status", "status", -1997798413), new cljs.core.Keyword(null, "success", "success", 1890645906), new cljs.core.Keyword(null, "value", "value", 305978217), [cljs.core.str(eval(block))].join("")], null);
} catch (e11764) {
var e = e11764;
return new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "status", "status", -1997798413), new cljs.core.Keyword(null, "exception", "exception", -335277064), new cljs.core.Keyword(null, "ua-product", "ua-product", 938384227), clojure.browser.repl.get_ua_product.call(null), new cljs.core.Keyword(null, "value", "value", 305978217), [cljs.core.str(e)].join(""), new cljs.core.Keyword(null, "stacktrace", "stacktrace", -95588394), cljs.core.truth_(e.hasOwnProperty("stack")) ?
e.stack : "No stacktrace available."], null);
}
}();
return cljs.core.pr_str.call(null, result);
};
clojure.browser.repl.send_result = function clojure$browser$repl$send_result(connection, url, data) {
return clojure.browser.net.transmit.call(null, connection, url, "POST", data, null, 0);
};
clojure.browser.repl.send_print = function clojure$browser$repl$send_print(var_args) {
var args11765 = [];
var len__5729__auto___11768 = arguments.length;
var i__5730__auto___11769 = 0;
while (true) {
if (i__5730__auto___11769 < len__5729__auto___11768) {
args11765.push(arguments[i__5730__auto___11769]);
var G__11770 = i__5730__auto___11769 + 1;
i__5730__auto___11769 = G__11770;
continue;
} else {
}
break;
}
var G__11767 = args11765.length;
switch(G__11767) {
case 2:
return clojure.browser.repl.send_print.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
case 3:
return clojure.browser.repl.send_print.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(args11765.length)].join(""));;
}
};
clojure.browser.repl.send_print.cljs$core$IFn$_invoke$arity$2 = function(url, data) {
return clojure.browser.repl.send_print.call(null, url, data, 0);
};
clojure.browser.repl.send_print.cljs$core$IFn$_invoke$arity$3 = function(url, data, n) {
var conn = clojure.browser.net.xhr_connection.call(null);
clojure.browser.event.listen.call(null, conn, new cljs.core.Keyword(null, "error", "error", -978969032), function(conn) {
return function(_) {
if (n < 10) {
return clojure.browser.repl.send_print.call(null, url, data, n + 1);
} else {
return console.log([cljs.core.str("Could not send "), cljs.core.str(data), cljs.core.str(" after "), cljs.core.str(n), cljs.core.str(" attempts.")].join(""));
}
};
}(conn));
return clojure.browser.net.transmit.call(null, conn, url, "POST", data, null, 0);
};
clojure.browser.repl.send_print.cljs$lang$maxFixedArity = 3;
clojure.browser.repl.order = cljs.core.atom.call(null, 0);
clojure.browser.repl.wrap_message = function clojure$browser$repl$wrap_message(t, data) {
return cljs.core.pr_str.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "type", "type", 1174270348), t, new cljs.core.Keyword(null, "content", "content", 15833224), data, new cljs.core.Keyword(null, "order", "order", -1254677256), cljs.core.swap_BANG_.call(null, clojure.browser.repl.order, cljs.core.inc)], null));
};
clojure.browser.repl.start_evaluator = function clojure$browser$repl$start_evaluator(url) {
var temp__4423__auto__ = clojure.browser.net.xpc_connection.call(null);
if (cljs.core.truth_(temp__4423__auto__)) {
var repl_connection = temp__4423__auto__;
var connection = clojure.browser.net.xhr_connection.call(null);
clojure.browser.event.listen.call(null, connection, new cljs.core.Keyword(null, "success", "success", 1890645906), function(connection, repl_connection, temp__4423__auto__) {
return function(e) {
return clojure.browser.net.transmit.call(null, repl_connection, new cljs.core.Keyword(null, "evaluate-javascript", "evaluate-javascript", -315749780), e.currentTarget.getResponseText(cljs.core.List.EMPTY));
};
}(connection, repl_connection, temp__4423__auto__));
clojure.browser.net.register_service.call(null, repl_connection, new cljs.core.Keyword(null, "send-result", "send-result", 35388249), function(connection, repl_connection, temp__4423__auto__) {
return function(data) {
return clojure.browser.repl.send_result.call(null, connection, url, clojure.browser.repl.wrap_message.call(null, new cljs.core.Keyword(null, "result", "result", 1415092211), data));
};
}(connection, repl_connection, temp__4423__auto__));
clojure.browser.net.register_service.call(null, repl_connection, new cljs.core.Keyword(null, "print", "print", 1299562414), function(connection, repl_connection, temp__4423__auto__) {
return function(data) {
return clojure.browser.repl.send_print.call(null, url, clojure.browser.repl.wrap_message.call(null, new cljs.core.Keyword(null, "print", "print", 1299562414), data));
};
}(connection, repl_connection, temp__4423__auto__));
clojure.browser.net.connect.call(null, repl_connection, cljs.core.constantly.call(null, null));
return setTimeout(function(connection, repl_connection, temp__4423__auto__) {
return function() {
return clojure.browser.repl.send_result.call(null, connection, url, clojure.browser.repl.wrap_message.call(null, new cljs.core.Keyword(null, "ready", "ready", 1086465795), "ready"));
};
}(connection, repl_connection, temp__4423__auto__), 50);
} else {
return alert("No 'xpc' param provided to child iframe.");
}
};
clojure.browser.repl.load_queue = null;
clojure.browser.repl.bootstrap = function clojure$browser$repl$bootstrap() {
if (cljs.core.truth_(COMPILED)) {
return null;
} else {
goog.require__ = goog.require;
goog.isProvided_ = function(name) {
return false;
};
goog.constructNamespace_("cljs.user");
goog.writeScriptTag__ = function(src, opt_sourceText) {
var loaded = cljs.core.atom.call(null, false);
var onload = function(loaded) {
return function() {
if (cljs.core.truth_(function() {
var and__4659__auto__ = clojure.browser.repl.load_queue;
if (cljs.core.truth_(and__4659__auto__)) {
return cljs.core.deref.call(null, loaded) === false;
} else {
return and__4659__auto__;
}
}())) {
cljs.core.swap_BANG_.call(null, loaded, cljs.core.not);
if (clojure.browser.repl.load_queue.length === 0) {
return clojure.browser.repl.load_queue = null;
} else {
return goog.writeScriptTag__.apply(null, clojure.browser.repl.load_queue.shift());
}
} else {
return null;
}
};
}(loaded);
return document.body.appendChild(function() {
var script = document.createElement("script");
var script__$1 = function() {
var G__11775 = script;
goog.object.set(G__11775, "type", "text/javascript");
goog.object.set(G__11775, "onload", onload);
goog.object.set(G__11775, "onreadystatechange", onload);
return G__11775;
}();
var script__$2 = opt_sourceText == null ? function() {
var G__11776 = script__$1;
goog.object.set(G__11776, "src", src);
return G__11776;
}() : function() {
var G__11777 = script__$1;
goog.dom.setTextContext(G__11777, opt_sourceText);
return G__11777;
}();
return script__$2;
}());
};
goog.writeScriptTag_ = function(src, opt_sourceText) {
if (cljs.core.truth_(clojure.browser.repl.load_queue)) {
return clojure.browser.repl.load_queue.push([src, opt_sourceText]);
} else {
clojure.browser.repl.load_queue = [];
return goog.writeScriptTag__(src, opt_sourceText);
}
};
return goog.require = function(src, reload) {
if (cljs.core._EQ_.call(null, reload, "reload-all")) {
goog.cljsReloadAll_ = true;
} else {
}
var reload_QMARK_ = function() {
var or__4671__auto__ = reload;
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return goog.cljsReloadAll__;
}
}();
if (cljs.core.truth_(reload_QMARK_)) {
var path_11778 = goog.dependencies_.nameToPath[src];
goog.object.remove(goog.dependencies_.visited, path_11778);
goog.object.remove(goog.dependencies_.written, path_11778);
goog.object.remove(goog.dependencies_.written, [cljs.core.str(goog.basePath), cljs.core.str(path_11778)].join(""));
} else {
}
var ret = goog.require__(src);
if (cljs.core._EQ_.call(null, reload, "reload-all")) {
goog.cljsReloadAll_ = false;
} else {
}
return ret;
};
}
};
clojure.browser.repl.connect = function clojure$browser$repl$connect(repl_server_url) {
var repl_connection = clojure.browser.net.xpc_connection.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "peer_uri", "peer_uri", 910305997), repl_server_url], null));
cljs.core.swap_BANG_.call(null, clojure.browser.repl.xpc_connection, cljs.core.constantly.call(null, repl_connection));
clojure.browser.net.register_service.call(null, repl_connection, new cljs.core.Keyword(null, "evaluate-javascript", "evaluate-javascript", -315749780), function(repl_connection) {
return function(js) {
return clojure.browser.net.transmit.call(null, repl_connection, new cljs.core.Keyword(null, "send-result", "send-result", 35388249), clojure.browser.repl.evaluate_javascript.call(null, repl_connection, js));
};
}(repl_connection));
clojure.browser.net.connect.call(null, repl_connection, cljs.core.constantly.call(null, null), function(repl_connection) {
return function(iframe) {
return iframe.style.display = "none";
};
}(repl_connection));
clojure.browser.repl.bootstrap.call(null);
return repl_connection;
};
goog.provide("weasel.impls.websocket");
goog.require("cljs.core");
goog.require("clojure.browser.net");
goog.require("clojure.browser.event");
goog.require("goog.net.WebSocket");
weasel.impls.websocket.IWebSocket = function() {
};
weasel.impls.websocket.open_QMARK_ = function weasel$impls$websocket$open_QMARK_(this$) {
if (!(this$ == null) && !(this$.weasel$impls$websocket$IWebSocket$open_QMARK_$arity$1 == null)) {
return this$.weasel$impls$websocket$IWebSocket$open_QMARK_$arity$1(this$);
} else {
var x__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = weasel.impls.websocket.open_QMARK_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$);
} else {
var m__5327__auto____$1 = weasel.impls.websocket.open_QMARK_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.call(null, this$);
} else {
throw cljs.core.missing_protocol.call(null, "IWebSocket.open?", this$);
}
}
}
};
weasel.impls.websocket.websocket_connection = function weasel$impls$websocket$websocket_connection(var_args) {
var args11781 = [];
var len__5729__auto___11784 = arguments.length;
var i__5730__auto___11785 = 0;
while (true) {
if (i__5730__auto___11785 < len__5729__auto___11784) {
args11781.push(arguments[i__5730__auto___11785]);
var G__11786 = i__5730__auto___11785 + 1;
i__5730__auto___11785 = G__11786;
continue;
} else {
}
break;
}
var G__11783 = args11781.length;
switch(G__11783) {
case 0:
return weasel.impls.websocket.websocket_connection.cljs$core$IFn$_invoke$arity$0();
break;
case 1:
return weasel.impls.websocket.websocket_connection.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return weasel.impls.websocket.websocket_connection.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args11781.length)].join(""));;
}
};
weasel.impls.websocket.websocket_connection.cljs$core$IFn$_invoke$arity$0 = function() {
return weasel.impls.websocket.websocket_connection.call(null, null, null);
};
weasel.impls.websocket.websocket_connection.cljs$core$IFn$_invoke$arity$1 = function(auto_reconnect_QMARK_) {
return weasel.impls.websocket.websocket_connection.call(null, auto_reconnect_QMARK_, null);
};
weasel.impls.websocket.websocket_connection.cljs$core$IFn$_invoke$arity$2 = function(auto_reconnect_QMARK_, next_reconnect_fn) {
return new goog.net.WebSocket(auto_reconnect_QMARK_, next_reconnect_fn);
};
weasel.impls.websocket.websocket_connection.cljs$lang$maxFixedArity = 2;
goog.net.WebSocket.prototype.weasel$impls$websocket$IWebSocket$ = true;
goog.net.WebSocket.prototype.weasel$impls$websocket$IWebSocket$open_QMARK_$arity$1 = function(this$) {
var this$__$1 = this;
return this$__$1.isOpen(cljs.core.List.EMPTY);
};
goog.net.WebSocket.prototype.clojure$browser$net$IConnection$ = true;
goog.net.WebSocket.prototype.clojure$browser$net$IConnection$connect$arity$2 = function(this$, url) {
var this$__$1 = this;
return clojure.browser.net.connect.call(null, this$__$1, url, null);
};
goog.net.WebSocket.prototype.clojure$browser$net$IConnection$connect$arity$3 = function(this$, url, protocol) {
var this$__$1 = this;
return this$__$1.open(url, protocol);
};
goog.net.WebSocket.prototype.clojure$browser$net$IConnection$transmit$arity$2 = function(this$, message) {
var this$__$1 = this;
return this$__$1.send(message);
};
goog.net.WebSocket.prototype.clojure$browser$net$IConnection$close$arity$1 = function(this$) {
var this$__$1 = this;
return this$__$1.close(cljs.core.List.EMPTY);
};
goog.net.WebSocket.prototype.clojure$browser$event$IEventType$ = true;
goog.net.WebSocket.prototype.clojure$browser$event$IEventType$event_types$arity$1 = function(this$) {
var this$__$1 = this;
return cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, cljs.core.map.call(null, function(this$__$1) {
return function(p__11788) {
var vec__11789 = p__11788;
var k = cljs.core.nth.call(null, vec__11789, 0, null);
var v = cljs.core.nth.call(null, vec__11789, 1, null);
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.call(null, k.toLowerCase()), v], null);
};
}(this$__$1), cljs.core.merge.call(null, cljs.core.js__GT_clj.call(null, goog.net.WebSocket.EventType))));
};
goog.provide("cljs.reader");
goog.require("cljs.core");
goog.require("goog.string");
goog.require("goog.string.StringBuffer");
cljs.reader.PushbackReader = function() {
};
cljs.reader.read_char = function cljs$reader$read_char(reader) {
if (!(reader == null) && !(reader.cljs$reader$PushbackReader$read_char$arity$1 == null)) {
return reader.cljs$reader$PushbackReader$read_char$arity$1(reader);
} else {
var x__5326__auto__ = reader == null ? null : reader;
var m__5327__auto__ = cljs.reader.read_char[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, reader);
} else {
var m__5327__auto____$1 = cljs.reader.read_char["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.call(null, reader);
} else {
throw cljs.core.missing_protocol.call(null, "PushbackReader.read-char", reader);
}
}
}
};
cljs.reader.unread = function cljs$reader$unread(reader, ch) {
if (!(reader == null) && !(reader.cljs$reader$PushbackReader$unread$arity$2 == null)) {
return reader.cljs$reader$PushbackReader$unread$arity$2(reader, ch);
} else {
var x__5326__auto__ = reader == null ? null : reader;
var m__5327__auto__ = cljs.reader.unread[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, reader, ch);
} else {
var m__5327__auto____$1 = cljs.reader.unread["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.call(null, reader, ch);
} else {
throw cljs.core.missing_protocol.call(null, "PushbackReader.unread", reader);
}
}
}
};
cljs.reader.StringPushbackReader = function(s, buffer, idx) {
this.s = s;
this.buffer = buffer;
this.idx = idx;
};
cljs.reader.StringPushbackReader.prototype.cljs$reader$PushbackReader$ = true;
cljs.reader.StringPushbackReader.prototype.cljs$reader$PushbackReader$read_char$arity$1 = function(reader) {
var self__ = this;
var reader__$1 = this;
if (self__.buffer.length === 0) {
self__.idx = self__.idx + 1;
return self__.s[self__.idx];
} else {
return self__.buffer.pop();
}
};
cljs.reader.StringPushbackReader.prototype.cljs$reader$PushbackReader$unread$arity$2 = function(reader, ch) {
var self__ = this;
var reader__$1 = this;
return self__.buffer.push(ch);
};
cljs.reader.StringPushbackReader.getBasis = function() {
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null, "s", "s", -948495851, null), new cljs.core.Symbol(null, "buffer", "buffer", -2037140571, null), cljs.core.with_meta(new cljs.core.Symbol(null, "idx", "idx", -1600747296, null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mutable", "mutable", 875778266), true], null))], null);
};
cljs.reader.StringPushbackReader.cljs$lang$type = true;
cljs.reader.StringPushbackReader.cljs$lang$ctorStr = "cljs.reader/StringPushbackReader";
cljs.reader.StringPushbackReader.cljs$lang$ctorPrWriter = function(this__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write.call(null, writer__5270__auto__, "cljs.reader/StringPushbackReader");
};
cljs.reader.__GT_StringPushbackReader = function cljs$reader$__GT_StringPushbackReader(s, buffer, idx) {
return new cljs.reader.StringPushbackReader(s, buffer, idx);
};
cljs.reader.push_back_reader = function cljs$reader$push_back_reader(s) {
return new cljs.reader.StringPushbackReader(s, [], -1);
};
cljs.reader.whitespace_QMARK_ = function cljs$reader$whitespace_QMARK_(ch) {
var or__4671__auto__ = goog.string.isBreakingWhitespace(ch);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return "," === ch;
}
};
cljs.reader.numeric_QMARK_ = function cljs$reader$numeric_QMARK_(ch) {
return goog.string.isNumeric(ch);
};
cljs.reader.comment_prefix_QMARK_ = function cljs$reader$comment_prefix_QMARK_(ch) {
return ";" === ch;
};
cljs.reader.number_literal_QMARK_ = function cljs$reader$number_literal_QMARK_(reader, initch) {
return cljs.reader.numeric_QMARK_.call(null, initch) || ("+" === initch || "-" === initch) && cljs.reader.numeric_QMARK_.call(null, function() {
var next_ch = cljs.reader.read_char.call(null, reader);
cljs.reader.unread.call(null, reader, next_ch);
return next_ch;
}());
};
cljs.reader.read;
cljs.reader.macros;
cljs.reader.dispatch_macros;
cljs.reader.reader_error = function cljs$reader$reader_error(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___11794 = arguments.length;
var i__5730__auto___11795 = 0;
while (true) {
if (i__5730__auto___11795 < len__5729__auto___11794) {
args__5736__auto__.push(arguments[i__5730__auto___11795]);
var G__11796 = i__5730__auto___11795 + 1;
i__5730__auto___11795 = G__11796;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return cljs.reader.reader_error.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
cljs.reader.reader_error.cljs$core$IFn$_invoke$arity$variadic = function(rdr, msg) {
throw new Error(cljs.core.apply.call(null, cljs.core.str, msg));
};
cljs.reader.reader_error.cljs$lang$maxFixedArity = 1;
cljs.reader.reader_error.cljs$lang$applyTo = function(seq11792) {
var G__11793 = cljs.core.first.call(null, seq11792);
var seq11792__$1 = cljs.core.next.call(null, seq11792);
return cljs.reader.reader_error.cljs$core$IFn$_invoke$arity$variadic(G__11793, seq11792__$1);
};
cljs.reader.macro_terminating_QMARK_ = function cljs$reader$macro_terminating_QMARK_(ch) {
var and__4659__auto__ = !(ch === "#");
if (and__4659__auto__) {
var and__4659__auto____$1 = !(ch === "'");
if (and__4659__auto____$1) {
var and__4659__auto____$2 = !(ch === ":");
if (and__4659__auto____$2) {
return cljs.reader.macros.call(null, ch);
} else {
return and__4659__auto____$2;
}
} else {
return and__4659__auto____$1;
}
} else {
return and__4659__auto__;
}
};
cljs.reader.read_token = function cljs$reader$read_token(rdr, initch) {
var sb = new goog.string.StringBuffer(initch);
var ch = cljs.reader.read_char.call(null, rdr);
while (true) {
if (ch == null || cljs.reader.whitespace_QMARK_.call(null, ch) || cljs.reader.macro_terminating_QMARK_.call(null, ch)) {
cljs.reader.unread.call(null, rdr, ch);
return sb.toString();
} else {
var G__11797 = function() {
sb.append(ch);
return sb;
}();
var G__11798 = cljs.reader.read_char.call(null, rdr);
sb = G__11797;
ch = G__11798;
continue;
}
break;
}
};
cljs.reader.skip_line = function cljs$reader$skip_line(reader, _) {
while (true) {
var ch = cljs.reader.read_char.call(null, reader);
if (ch === "\n" || ch === "\r" || ch == null) {
return reader;
} else {
continue;
}
break;
}
};
cljs.reader.int_pattern = cljs.core.re_pattern.call(null, "^([-+]?)(?:(0)|([1-9][0-9]*)|0[xX]([0-9A-Fa-f]+)|0([0-7]+)|([1-9][0-9]?)[rR]([0-9A-Za-z]+))(N)?$");
cljs.reader.ratio_pattern = cljs.core.re_pattern.call(null, "^([-+]?[0-9]+)/([0-9]+)$");
cljs.reader.float_pattern = cljs.core.re_pattern.call(null, "^([-+]?[0-9]+(\\.[0-9]*)?([eE][-+]?[0-9]+)?)(M)?$");
cljs.reader.symbol_pattern = cljs.core.re_pattern.call(null, "^[:]?([^0-9/].*/)?([^0-9/][^/]*)$");
cljs.reader.re_matches_STAR_ = function cljs$reader$re_matches_STAR_(re, s) {
var matches = re.exec(s);
if (!(matches == null) && matches[0] === s) {
if (matches.length === 1) {
return matches[0];
} else {
return matches;
}
} else {
return null;
}
};
cljs.reader.match_int = function cljs$reader$match_int(s) {
var groups = cljs.reader.re_matches_STAR_.call(null, cljs.reader.int_pattern, s);
var ie8_fix = groups[2];
var zero = cljs.core._EQ_.call(null, ie8_fix, "") ? null : ie8_fix;
if (!(zero == null)) {
return 0;
} else {
var a = cljs.core.truth_(groups[3]) ? [groups[3], 10] : cljs.core.truth_(groups[4]) ? [groups[4], 16] : cljs.core.truth_(groups[5]) ? [groups[5], 8] : cljs.core.truth_(groups[6]) ? [groups[7], parseInt(groups[6], 10)] : [null, null];
var n = a[0];
var radix = a[1];
if (n == null) {
return null;
} else {
var parsed = parseInt(n, radix);
if ("-" === groups[1]) {
return -parsed;
} else {
return parsed;
}
}
}
};
cljs.reader.match_ratio = function cljs$reader$match_ratio(s) {
var groups = cljs.reader.re_matches_STAR_.call(null, cljs.reader.ratio_pattern, s);
var numinator = groups[1];
var denominator = groups[2];
return parseInt(numinator, 10) / parseInt(denominator, 10);
};
cljs.reader.match_float = function cljs$reader$match_float(s) {
return parseFloat(s);
};
cljs.reader.match_number = function cljs$reader$match_number(s) {
if (cljs.core.truth_(cljs.reader.re_matches_STAR_.call(null, cljs.reader.int_pattern, s))) {
return cljs.reader.match_int.call(null, s);
} else {
if (cljs.core.truth_(cljs.reader.re_matches_STAR_.call(null, cljs.reader.ratio_pattern, s))) {
return cljs.reader.match_ratio.call(null, s);
} else {
if (cljs.core.truth_(cljs.reader.re_matches_STAR_.call(null, cljs.reader.float_pattern, s))) {
return cljs.reader.match_float.call(null, s);
} else {
return null;
}
}
}
};
cljs.reader.escape_char_map = function cljs$reader$escape_char_map(c) {
if (c === "t") {
return "\t";
} else {
if (c === "r") {
return "\r";
} else {
if (c === "n") {
return "\n";
} else {
if (c === "\\") {
return "\\";
} else {
if (c === '"') {
return '"';
} else {
if (c === "b") {
return "\b";
} else {
if (c === "f") {
return "\f";
} else {
return null;
}
}
}
}
}
}
}
};
cljs.reader.read_2_chars = function cljs$reader$read_2_chars(reader) {
return (new goog.string.StringBuffer(cljs.reader.read_char.call(null, reader), cljs.reader.read_char.call(null, reader))).toString();
};
cljs.reader.read_4_chars = function cljs$reader$read_4_chars(reader) {
return (new goog.string.StringBuffer(cljs.reader.read_char.call(null, reader), cljs.reader.read_char.call(null, reader), cljs.reader.read_char.call(null, reader), cljs.reader.read_char.call(null, reader))).toString();
};
cljs.reader.unicode_2_pattern = cljs.core.re_pattern.call(null, "^[0-9A-Fa-f]{2}$");
cljs.reader.unicode_4_pattern = cljs.core.re_pattern.call(null, "^[0-9A-Fa-f]{4}$");
cljs.reader.validate_unicode_escape = function cljs$reader$validate_unicode_escape(unicode_pattern, reader, escape_char, unicode_str) {
if (cljs.core.truth_(cljs.core.re_matches.call(null, unicode_pattern, unicode_str))) {
return unicode_str;
} else {
return cljs.reader.reader_error.call(null, reader, "Unexpected unicode escape \\", escape_char, unicode_str);
}
};
cljs.reader.make_unicode_char = function cljs$reader$make_unicode_char(code_str) {
var code = parseInt(code_str, 16);
return String.fromCharCode(code);
};
cljs.reader.escape_char = function cljs$reader$escape_char(buffer, reader) {
var ch = cljs.reader.read_char.call(null, reader);
var mapresult = cljs.reader.escape_char_map.call(null, ch);
if (cljs.core.truth_(mapresult)) {
return mapresult;
} else {
if (ch === "x") {
return cljs.reader.make_unicode_char.call(null, cljs.reader.validate_unicode_escape.call(null, cljs.reader.unicode_2_pattern, reader, ch, cljs.reader.read_2_chars.call(null, reader)));
} else {
if (ch === "u") {
return cljs.reader.make_unicode_char.call(null, cljs.reader.validate_unicode_escape.call(null, cljs.reader.unicode_4_pattern, reader, ch, cljs.reader.read_4_chars.call(null, reader)));
} else {
if (cljs.reader.numeric_QMARK_.call(null, ch)) {
return String.fromCharCode(ch);
} else {
return cljs.reader.reader_error.call(null, reader, "Unexpected unicode escape \\", ch);
}
}
}
}
};
cljs.reader.read_past = function cljs$reader$read_past(pred, rdr) {
var ch = cljs.reader.read_char.call(null, rdr);
while (true) {
if (cljs.core.truth_(pred.call(null, ch))) {
var G__11799 = cljs.reader.read_char.call(null, rdr);
ch = G__11799;
continue;
} else {
return ch;
}
break;
}
};
cljs.reader.read_delimited_list = function cljs$reader$read_delimited_list(delim, rdr, recursive_QMARK_) {
var a = cljs.core.transient$.call(null, cljs.core.PersistentVector.EMPTY);
while (true) {
var ch = cljs.reader.read_past.call(null, cljs.reader.whitespace_QMARK_, rdr);
if (cljs.core.truth_(ch)) {
} else {
cljs.reader.reader_error.call(null, rdr, "EOF while reading");
}
if (delim === ch) {
return cljs.core.persistent_BANG_.call(null, a);
} else {
var temp__4423__auto__ = cljs.reader.macros.call(null, ch);
if (cljs.core.truth_(temp__4423__auto__)) {
var macrofn = temp__4423__auto__;
var mret = macrofn.call(null, rdr, ch);
var G__11800 = mret === rdr ? a : cljs.core.conj_BANG_.call(null, a, mret);
a = G__11800;
continue;
} else {
cljs.reader.unread.call(null, rdr, ch);
var o = cljs.reader.read.call(null, rdr, true, null, recursive_QMARK_);
var G__11801 = o === rdr ? a : cljs.core.conj_BANG_.call(null, a, o);
a = G__11801;
continue;
}
}
break;
}
};
cljs.reader.not_implemented = function cljs$reader$not_implemented(rdr, ch) {
return cljs.reader.reader_error.call(null, rdr, "Reader for ", ch, " not implemented yet");
};
cljs.reader.maybe_read_tagged_type;
cljs.reader.read_dispatch = function cljs$reader$read_dispatch(rdr, _) {
var ch = cljs.reader.read_char.call(null, rdr);
var dm = cljs.reader.dispatch_macros.call(null, ch);
if (cljs.core.truth_(dm)) {
return dm.call(null, rdr, _);
} else {
var temp__4423__auto__ = cljs.reader.maybe_read_tagged_type.call(null, rdr, ch);
if (cljs.core.truth_(temp__4423__auto__)) {
var obj = temp__4423__auto__;
return obj;
} else {
return cljs.reader.reader_error.call(null, rdr, "No dispatch macro for ", ch);
}
}
};
cljs.reader.read_unmatched_delimiter = function cljs$reader$read_unmatched_delimiter(rdr, ch) {
return cljs.reader.reader_error.call(null, rdr, "Unmatched delimiter ", ch);
};
cljs.reader.read_list = function cljs$reader$read_list(rdr, _) {
return cljs.core.apply.call(null, cljs.core.list, cljs.reader.read_delimited_list.call(null, ")", rdr, true));
};
cljs.reader.read_comment = cljs.reader.skip_line;
cljs.reader.read_vector = function cljs$reader$read_vector(rdr, _) {
return cljs.reader.read_delimited_list.call(null, "]", rdr, true);
};
cljs.reader.read_map = function cljs$reader$read_map(rdr, _) {
var l = cljs.reader.read_delimited_list.call(null, "}", rdr, true);
if (cljs.core.odd_QMARK_.call(null, cljs.core.count.call(null, l))) {
cljs.reader.reader_error.call(null, rdr, "Map literal must contain an even number of forms");
} else {
}
return cljs.core.apply.call(null, cljs.core.hash_map, l);
};
cljs.reader.read_number = function cljs$reader$read_number(reader, initch) {
var buffer = new goog.string.StringBuffer(initch);
var ch = cljs.reader.read_char.call(null, reader);
while (true) {
if (cljs.core.truth_(function() {
var or__4671__auto__ = ch == null;
if (or__4671__auto__) {
return or__4671__auto__;
} else {
var or__4671__auto____$1 = cljs.reader.whitespace_QMARK_.call(null, ch);
if (or__4671__auto____$1) {
return or__4671__auto____$1;
} else {
return cljs.reader.macros.call(null, ch);
}
}
}())) {
cljs.reader.unread.call(null, reader, ch);
var s = buffer.toString();
var or__4671__auto__ = cljs.reader.match_number.call(null, s);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return cljs.reader.reader_error.call(null, reader, "Invalid number format [", s, "]");
}
} else {
var G__11802 = function() {
buffer.append(ch);
return buffer;
}();
var G__11803 = cljs.reader.read_char.call(null, reader);
buffer = G__11802;
ch = G__11803;
continue;
}
break;
}
};
cljs.reader.read_string_STAR_ = function cljs$reader$read_string_STAR_(reader, _) {
var buffer = new goog.string.StringBuffer;
var ch = cljs.reader.read_char.call(null, reader);
while (true) {
if (ch == null) {
return cljs.reader.reader_error.call(null, reader, "EOF while reading");
} else {
if ("\\" === ch) {
var G__11804 = function() {
buffer.append(cljs.reader.escape_char.call(null, buffer, reader));
return buffer;
}();
var G__11805 = cljs.reader.read_char.call(null, reader);
buffer = G__11804;
ch = G__11805;
continue;
} else {
if ('"' === ch) {
return buffer.toString();
} else {
var G__11806 = function() {
buffer.append(ch);
return buffer;
}();
var G__11807 = cljs.reader.read_char.call(null, reader);
buffer = G__11806;
ch = G__11807;
continue;
}
}
}
break;
}
};
cljs.reader.read_raw_string_STAR_ = function cljs$reader$read_raw_string_STAR_(reader, _) {
var buffer = new goog.string.StringBuffer;
var ch = cljs.reader.read_char.call(null, reader);
while (true) {
if (ch == null) {
return cljs.reader.reader_error.call(null, reader, "EOF while reading");
} else {
if ("\\" === ch) {
buffer.append(ch);
var nch = cljs.reader.read_char.call(null, reader);
if (nch == null) {
return cljs.reader.reader_error.call(null, reader, "EOF while reading");
} else {
var G__11812 = function() {
var G__11810 = buffer;
G__11810.append(nch);
return G__11810;
}();
var G__11813 = cljs.reader.read_char.call(null, reader);
buffer = G__11812;
ch = G__11813;
continue;
}
} else {
if ('"' === ch) {
return buffer.toString();
} else {
var G__11814 = function() {
var G__11811 = buffer;
G__11811.append(ch);
return G__11811;
}();
var G__11815 = cljs.reader.read_char.call(null, reader);
buffer = G__11814;
ch = G__11815;
continue;
}
}
}
break;
}
};
cljs.reader.special_symbols = function cljs$reader$special_symbols(t, not_found) {
if (t === "nil") {
return null;
} else {
if (t === "true") {
return true;
} else {
if (t === "false") {
return false;
} else {
if (t === "/") {
return new cljs.core.Symbol(null, "/", "/", -1371932971, null);
} else {
return not_found;
}
}
}
}
};
cljs.reader.read_symbol = function cljs$reader$read_symbol(reader, initch) {
var token = cljs.reader.read_token.call(null, reader, initch);
if (cljs.core.truth_(function() {
var and__4659__auto__ = goog.string.contains(token, "/");
if (cljs.core.truth_(and__4659__auto__)) {
return !(token.length === 1);
} else {
return and__4659__auto__;
}
}())) {
return cljs.core.symbol.call(null, cljs.core.subs.call(null, token, 0, token.indexOf("/")), cljs.core.subs.call(null, token, token.indexOf("/") + 1, token.length));
} else {
return cljs.reader.special_symbols.call(null, token, cljs.core.symbol.call(null, token));
}
};
cljs.reader.read_literal = function cljs$reader$read_literal(rdr, ch) {
var token = cljs.reader.read_token.call(null, rdr, ch);
var chars = cljs.core.subs.call(null, token, 1);
if (chars.length === 1) {
return chars;
} else {
if (chars === "tab") {
return "\t";
} else {
if (chars === "return") {
return "\r";
} else {
if (chars === "newline") {
return "\n";
} else {
if (chars === "space") {
return " ";
} else {
if (chars === "backspace") {
return "\b";
} else {
if (chars === "formfeed") {
return "\f";
} else {
if (chars.charAt(0) === "u") {
return cljs.reader.make_unicode_char.call(null, cljs.core.subs.call(null, chars, 1));
} else {
if (chars.charAt(0) === "o") {
return cljs.reader.not_implemented.call(null, rdr, token);
} else {
return cljs.reader.reader_error.call(null, rdr, "Unknown character literal: ", token);
}
}
}
}
}
}
}
}
}
};
cljs.reader.read_keyword = function cljs$reader$read_keyword(reader, initch) {
var token = cljs.reader.read_token.call(null, reader, cljs.reader.read_char.call(null, reader));
var a = cljs.reader.re_matches_STAR_.call(null, cljs.reader.symbol_pattern, token);
var token__$1 = a[0];
var ns = a[1];
var name = a[2];
if (!(void 0 === ns) && ns.substring(ns.length - 2, ns.length) === ":/" || name[name.length - 1] === ":" || !(token__$1.indexOf("::", 1) === -1)) {
return cljs.reader.reader_error.call(null, reader, "Invalid token: ", token__$1);
} else {
if (!(ns == null) && ns.length > 0) {
return cljs.core.keyword.call(null, ns.substring(0, ns.indexOf("/")), name);
} else {
return cljs.core.keyword.call(null, token__$1);
}
}
};
cljs.reader.desugar_meta = function cljs$reader$desugar_meta(f) {
if (f instanceof cljs.core.Symbol) {
return new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "tag", "tag", -1290361223), f], null);
} else {
if (typeof f === "string") {
return new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "tag", "tag", -1290361223), f], null);
} else {
if (f instanceof cljs.core.Keyword) {
return cljs.core.PersistentArrayMap.fromArray([f, true], true, false);
} else {
return f;
}
}
}
};
cljs.reader.wrapping_reader = function cljs$reader$wrapping_reader(sym) {
return function(rdr, _) {
return cljs.core._conj.call(null, cljs.core._conj.call(null, cljs.core.List.EMPTY, cljs.reader.read.call(null, rdr, true, null, true)), sym);
};
};
cljs.reader.throwing_reader = function cljs$reader$throwing_reader(msg) {
return function(rdr, _) {
return cljs.reader.reader_error.call(null, rdr, msg);
};
};
cljs.reader.read_meta = function cljs$reader$read_meta(rdr, _) {
var m = cljs.reader.desugar_meta.call(null, cljs.reader.read.call(null, rdr, true, null, true));
if (cljs.core.map_QMARK_.call(null, m)) {
} else {
cljs.reader.reader_error.call(null, rdr, "Metadata must be Symbol,Keyword,String or Map");
}
var o = cljs.reader.read.call(null, rdr, true, null, true);
if (!(o == null) ? o.cljs$lang$protocol_mask$partition0$ & 262144 || o.cljs$core$IWithMeta$ ? true : !o.cljs$lang$protocol_mask$partition0$ ? cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IWithMeta, o) : false : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IWithMeta, o)) {
return cljs.core.with_meta.call(null, o, cljs.core.merge.call(null, cljs.core.meta.call(null, o), m));
} else {
return cljs.reader.reader_error.call(null, rdr, "Metadata can only be applied to IWithMetas");
}
};
cljs.reader.read_set = function cljs$reader$read_set(rdr, _) {
return cljs.core.set.call(null, cljs.reader.read_delimited_list.call(null, "}", rdr, true));
};
cljs.reader.read_regex = function cljs$reader$read_regex(rdr, ch) {
return cljs.core.re_pattern.call(null, cljs.reader.read_raw_string_STAR_.call(null, rdr, ch));
};
cljs.reader.read_discard = function cljs$reader$read_discard(rdr, _) {
cljs.reader.read.call(null, rdr, true, null, true);
return rdr;
};
cljs.reader.macros = function cljs$reader$macros(c) {
if (c === '"') {
return cljs.reader.read_string_STAR_;
} else {
if (c === ":") {
return cljs.reader.read_keyword;
} else {
if (c === ";") {
return cljs.reader.read_comment;
} else {
if (c === "'") {
return cljs.reader.wrapping_reader.call(null, new cljs.core.Symbol(null, "quote", "quote", 1377916282, null));
} else {
if (c === "@") {
return cljs.reader.wrapping_reader.call(null, new cljs.core.Symbol(null, "deref", "deref", 1494944732, null));
} else {
if (c === "^") {
return cljs.reader.read_meta;
} else {
if (c === "`") {
return cljs.reader.not_implemented;
} else {
if (c === "~") {
return cljs.reader.not_implemented;
} else {
if (c === "(") {
return cljs.reader.read_list;
} else {
if (c === ")") {
return cljs.reader.read_unmatched_delimiter;
} else {
if (c === "[") {
return cljs.reader.read_vector;
} else {
if (c === "]") {
return cljs.reader.read_unmatched_delimiter;
} else {
if (c === "{") {
return cljs.reader.read_map;
} else {
if (c === "}") {
return cljs.reader.read_unmatched_delimiter;
} else {
if (c === "\\") {
return cljs.reader.read_literal;
} else {
if (c === "#") {
return cljs.reader.read_dispatch;
} else {
return null;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
};
cljs.reader.dispatch_macros = function cljs$reader$dispatch_macros(s) {
if (s === "{") {
return cljs.reader.read_set;
} else {
if (s === "\x3c") {
return cljs.reader.throwing_reader.call(null, "Unreadable form");
} else {
if (s === '"') {
return cljs.reader.read_regex;
} else {
if (s === "!") {
return cljs.reader.read_comment;
} else {
if (s === "_") {
return cljs.reader.read_discard;
} else {
return null;
}
}
}
}
}
};
cljs.reader.read = function cljs$reader$read(reader, eof_is_error, sentinel, is_recursive) {
while (true) {
var ch = cljs.reader.read_char.call(null, reader);
if (ch == null) {
if (cljs.core.truth_(eof_is_error)) {
return cljs.reader.reader_error.call(null, reader, "EOF while reading");
} else {
return sentinel;
}
} else {
if (cljs.reader.whitespace_QMARK_.call(null, ch)) {
var G__11818 = reader;
var G__11819 = eof_is_error;
var G__11820 = sentinel;
var G__11821 = is_recursive;
reader = G__11818;
eof_is_error = G__11819;
sentinel = G__11820;
is_recursive = G__11821;
continue;
} else {
if (cljs.reader.comment_prefix_QMARK_.call(null, ch)) {
var G__11822 = cljs.reader.read_comment.call(null, reader, ch);
var G__11823 = eof_is_error;
var G__11824 = sentinel;
var G__11825 = is_recursive;
reader = G__11822;
eof_is_error = G__11823;
sentinel = G__11824;
is_recursive = G__11825;
continue;
} else {
var f = cljs.reader.macros.call(null, ch);
var res = cljs.core.truth_(f) ? f.call(null, reader, ch) : cljs.reader.number_literal_QMARK_.call(null, reader, ch) ? cljs.reader.read_number.call(null, reader, ch) : cljs.reader.read_symbol.call(null, reader, ch);
if (res === reader) {
var G__11826 = reader;
var G__11827 = eof_is_error;
var G__11828 = sentinel;
var G__11829 = is_recursive;
reader = G__11826;
eof_is_error = G__11827;
sentinel = G__11828;
is_recursive = G__11829;
continue;
} else {
return res;
}
}
}
}
break;
}
};
cljs.reader.read_string = function cljs$reader$read_string(s) {
if (typeof s === "string") {
} else {
throw new Error("Cannot read from non-string object.");
}
var r = cljs.reader.push_back_reader.call(null, s);
return cljs.reader.read.call(null, r, false, null, false);
};
cljs.reader.zero_fill_right_and_truncate = function cljs$reader$zero_fill_right_and_truncate(s, width) {
if (cljs.core._EQ_.call(null, width, cljs.core.count.call(null, s))) {
return s;
} else {
if (width < cljs.core.count.call(null, s)) {
return cljs.core.subs.call(null, s, 0, width);
} else {
var b = new goog.string.StringBuffer(s);
while (true) {
if (b.getLength() < width) {
var G__11830 = b.append("0");
b = G__11830;
continue;
} else {
return b.toString();
}
break;
}
}
}
};
cljs.reader.divisible_QMARK_ = function cljs$reader$divisible_QMARK_(num, div) {
return cljs.core.mod.call(null, num, div) === 0;
};
cljs.reader.indivisible_QMARK_ = function cljs$reader$indivisible_QMARK_(num, div) {
return cljs.core.not.call(null, cljs.reader.divisible_QMARK_.call(null, num, div));
};
cljs.reader.leap_year_QMARK_ = function cljs$reader$leap_year_QMARK_(year) {
var and__4659__auto__ = cljs.reader.divisible_QMARK_.call(null, year, 4);
if (cljs.core.truth_(and__4659__auto__)) {
var or__4671__auto__ = cljs.reader.indivisible_QMARK_.call(null, year, 100);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return cljs.reader.divisible_QMARK_.call(null, year, 400);
}
} else {
return and__4659__auto__;
}
};
cljs.reader.days_in_month = function() {
var dim_norm = new cljs.core.PersistentVector(null, 13, 5, cljs.core.PersistentVector.EMPTY_NODE, [null, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], null);
var dim_leap = new cljs.core.PersistentVector(null, 13, 5, cljs.core.PersistentVector.EMPTY_NODE, [null, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], null);
return function(dim_norm, dim_leap) {
return function(month, leap_year_QMARK_) {
return cljs.core.get.call(null, cljs.core.truth_(leap_year_QMARK_) ? dim_leap : dim_norm, month);
};
}(dim_norm, dim_leap);
}();
cljs.reader.timestamp_regex = /(\d\d\d\d)(?:-(\d\d)(?:-(\d\d)(?:[T](\d\d)(?::(\d\d)(?::(\d\d)(?:[.](\d+))?)?)?)?)?)?(?:[Z]|([-+])(\d\d):(\d\d))?/;
cljs.reader.parse_int = function cljs$reader$parse_int(s) {
var n = parseInt(s, 10);
if (cljs.core.not.call(null, isNaN(n))) {
return n;
} else {
return null;
}
};
cljs.reader.check = function cljs$reader$check(low, n, high, msg) {
if (low <= n && n <= high) {
} else {
cljs.reader.reader_error.call(null, null, [cljs.core.str(msg), cljs.core.str(" Failed: "), cljs.core.str(low), cljs.core.str("\x3c\x3d"), cljs.core.str(n), cljs.core.str("\x3c\x3d"), cljs.core.str(high)].join(""));
}
return n;
};
cljs.reader.parse_and_validate_timestamp = function cljs$reader$parse_and_validate_timestamp(s) {
var vec__11832 = cljs.core.re_matches.call(null, cljs.reader.timestamp_regex, s);
var _ = cljs.core.nth.call(null, vec__11832, 0, null);
var years = cljs.core.nth.call(null, vec__11832, 1, null);
var months = cljs.core.nth.call(null, vec__11832, 2, null);
var days = cljs.core.nth.call(null, vec__11832, 3, null);
var hours = cljs.core.nth.call(null, vec__11832, 4, null);
var minutes = cljs.core.nth.call(null, vec__11832, 5, null);
var seconds = cljs.core.nth.call(null, vec__11832, 6, null);
var fraction = cljs.core.nth.call(null, vec__11832, 7, null);
var offset_sign = cljs.core.nth.call(null, vec__11832, 8, null);
var offset_hours = cljs.core.nth.call(null, vec__11832, 9, null);
var offset_minutes = cljs.core.nth.call(null, vec__11832, 10, null);
var v = vec__11832;
if (cljs.core.not.call(null, v)) {
return cljs.reader.reader_error.call(null, null, [cljs.core.str("Unrecognized date/time syntax: "), cljs.core.str(s)].join(""));
} else {
var years__$1 = cljs.reader.parse_int.call(null, years);
var months__$1 = function() {
var or__4671__auto__ = cljs.reader.parse_int.call(null, months);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return 1;
}
}();
var days__$1 = function() {
var or__4671__auto__ = cljs.reader.parse_int.call(null, days);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return 1;
}
}();
var hours__$1 = function() {
var or__4671__auto__ = cljs.reader.parse_int.call(null, hours);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return 0;
}
}();
var minutes__$1 = function() {
var or__4671__auto__ = cljs.reader.parse_int.call(null, minutes);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return 0;
}
}();
var seconds__$1 = function() {
var or__4671__auto__ = cljs.reader.parse_int.call(null, seconds);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return 0;
}
}();
var fraction__$1 = function() {
var or__4671__auto__ = cljs.reader.parse_int.call(null, cljs.reader.zero_fill_right_and_truncate.call(null, fraction, 3));
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return 0;
}
}();
var offset_sign__$1 = cljs.core._EQ_.call(null, offset_sign, "-") ? -1 : 1;
var offset_hours__$1 = function() {
var or__4671__auto__ = cljs.reader.parse_int.call(null, offset_hours);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return 0;
}
}();
var offset_minutes__$1 = function() {
var or__4671__auto__ = cljs.reader.parse_int.call(null, offset_minutes);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return 0;
}
}();
var offset = offset_sign__$1 * (offset_hours__$1 * 60 + offset_minutes__$1);
return new cljs.core.PersistentVector(null, 8, 5, cljs.core.PersistentVector.EMPTY_NODE, [years__$1, cljs.reader.check.call(null, 1, months__$1, 12, "timestamp month field must be in range 1..12"), cljs.reader.check.call(null, 1, days__$1, cljs.reader.days_in_month.call(null, months__$1, cljs.reader.leap_year_QMARK_.call(null, years__$1)), "timestamp day field must be in range 1..last day in month"), cljs.reader.check.call(null, 0, hours__$1, 23, "timestamp hour field must be in range 0..23"),
cljs.reader.check.call(null, 0, minutes__$1, 59, "timestamp minute field must be in range 0..59"), cljs.reader.check.call(null, 0, seconds__$1, cljs.core._EQ_.call(null, minutes__$1, 59) ? 60 : 59, "timestamp second field must be in range 0..60"), cljs.reader.check.call(null, 0, fraction__$1, 999, "timestamp millisecond field must be in range 0..999"), offset], null);
}
};
cljs.reader.parse_timestamp = function cljs$reader$parse_timestamp(ts) {
var temp__4423__auto__ = cljs.reader.parse_and_validate_timestamp.call(null, ts);
if (cljs.core.truth_(temp__4423__auto__)) {
var vec__11834 = temp__4423__auto__;
var years = cljs.core.nth.call(null, vec__11834, 0, null);
var months = cljs.core.nth.call(null, vec__11834, 1, null);
var days = cljs.core.nth.call(null, vec__11834, 2, null);
var hours = cljs.core.nth.call(null, vec__11834, 3, null);
var minutes = cljs.core.nth.call(null, vec__11834, 4, null);
var seconds = cljs.core.nth.call(null, vec__11834, 5, null);
var ms = cljs.core.nth.call(null, vec__11834, 6, null);
var offset = cljs.core.nth.call(null, vec__11834, 7, null);
return new Date(Date.UTC(years, months - 1, days, hours, minutes, seconds, ms) - offset * 60 * 1E3);
} else {
return cljs.reader.reader_error.call(null, null, [cljs.core.str("Unrecognized date/time syntax: "), cljs.core.str(ts)].join(""));
}
};
cljs.reader.read_date = function cljs$reader$read_date(s) {
if (typeof s === "string") {
return cljs.reader.parse_timestamp.call(null, s);
} else {
return cljs.reader.reader_error.call(null, null, "Instance literal expects a string for its timestamp.");
}
};
cljs.reader.read_queue = function cljs$reader$read_queue(elems) {
if (cljs.core.vector_QMARK_.call(null, elems)) {
return cljs.core.into.call(null, cljs.core.PersistentQueue.EMPTY, elems);
} else {
return cljs.reader.reader_error.call(null, null, "Queue literal expects a vector for its elements.");
}
};
cljs.reader.read_js = function cljs$reader$read_js(form) {
if (cljs.core.vector_QMARK_.call(null, form)) {
var arr = [];
var seq__11847_11859 = cljs.core.seq.call(null, form);
var chunk__11848_11860 = null;
var count__11849_11861 = 0;
var i__11850_11862 = 0;
while (true) {
if (i__11850_11862 < count__11849_11861) {
var x_11863 = cljs.core._nth.call(null, chunk__11848_11860, i__11850_11862);
arr.push(x_11863);
var G__11864 = seq__11847_11859;
var G__11865 = chunk__11848_11860;
var G__11866 = count__11849_11861;
var G__11867 = i__11850_11862 + 1;
seq__11847_11859 = G__11864;
chunk__11848_11860 = G__11865;
count__11849_11861 = G__11866;
i__11850_11862 = G__11867;
continue;
} else {
var temp__4425__auto___11868 = cljs.core.seq.call(null, seq__11847_11859);
if (temp__4425__auto___11868) {
var seq__11847_11869__$1 = temp__4425__auto___11868;
if (cljs.core.chunked_seq_QMARK_.call(null, seq__11847_11869__$1)) {
var c__5474__auto___11870 = cljs.core.chunk_first.call(null, seq__11847_11869__$1);
var G__11871 = cljs.core.chunk_rest.call(null, seq__11847_11869__$1);
var G__11872 = c__5474__auto___11870;
var G__11873 = cljs.core.count.call(null, c__5474__auto___11870);
var G__11874 = 0;
seq__11847_11859 = G__11871;
chunk__11848_11860 = G__11872;
count__11849_11861 = G__11873;
i__11850_11862 = G__11874;
continue;
} else {
var x_11875 = cljs.core.first.call(null, seq__11847_11869__$1);
arr.push(x_11875);
var G__11876 = cljs.core.next.call(null, seq__11847_11869__$1);
var G__11877 = null;
var G__11878 = 0;
var G__11879 = 0;
seq__11847_11859 = G__11876;
chunk__11848_11860 = G__11877;
count__11849_11861 = G__11878;
i__11850_11862 = G__11879;
continue;
}
} else {
}
}
break;
}
return arr;
} else {
if (cljs.core.map_QMARK_.call(null, form)) {
var obj = {};
var seq__11853_11880 = cljs.core.seq.call(null, form);
var chunk__11854_11881 = null;
var count__11855_11882 = 0;
var i__11856_11883 = 0;
while (true) {
if (i__11856_11883 < count__11855_11882) {
var vec__11857_11884 = cljs.core._nth.call(null, chunk__11854_11881, i__11856_11883);
var k_11885 = cljs.core.nth.call(null, vec__11857_11884, 0, null);
var v_11886 = cljs.core.nth.call(null, vec__11857_11884, 1, null);
obj[cljs.core.name.call(null, k_11885)] = v_11886;
var G__11887 = seq__11853_11880;
var G__11888 = chunk__11854_11881;
var G__11889 = count__11855_11882;
var G__11890 = i__11856_11883 + 1;
seq__11853_11880 = G__11887;
chunk__11854_11881 = G__11888;
count__11855_11882 = G__11889;
i__11856_11883 = G__11890;
continue;
} else {
var temp__4425__auto___11891 = cljs.core.seq.call(null, seq__11853_11880);
if (temp__4425__auto___11891) {
var seq__11853_11892__$1 = temp__4425__auto___11891;
if (cljs.core.chunked_seq_QMARK_.call(null, seq__11853_11892__$1)) {
var c__5474__auto___11893 = cljs.core.chunk_first.call(null, seq__11853_11892__$1);
var G__11894 = cljs.core.chunk_rest.call(null, seq__11853_11892__$1);
var G__11895 = c__5474__auto___11893;
var G__11896 = cljs.core.count.call(null, c__5474__auto___11893);
var G__11897 = 0;
seq__11853_11880 = G__11894;
chunk__11854_11881 = G__11895;
count__11855_11882 = G__11896;
i__11856_11883 = G__11897;
continue;
} else {
var vec__11858_11898 = cljs.core.first.call(null, seq__11853_11892__$1);
var k_11899 = cljs.core.nth.call(null, vec__11858_11898, 0, null);
var v_11900 = cljs.core.nth.call(null, vec__11858_11898, 1, null);
obj[cljs.core.name.call(null, k_11899)] = v_11900;
var G__11901 = cljs.core.next.call(null, seq__11853_11892__$1);
var G__11902 = null;
var G__11903 = 0;
var G__11904 = 0;
seq__11853_11880 = G__11901;
chunk__11854_11881 = G__11902;
count__11855_11882 = G__11903;
i__11856_11883 = G__11904;
continue;
}
} else {
}
}
break;
}
return obj;
} else {
return cljs.reader.reader_error.call(null, null, [cljs.core.str("JS literal expects a vector or map containing "), cljs.core.str("only string or unqualified keyword keys")].join(""));
}
}
};
cljs.reader.read_uuid = function cljs$reader$read_uuid(uuid) {
if (typeof uuid === "string") {
return cljs.core.uuid.call(null, uuid);
} else {
return cljs.reader.reader_error.call(null, null, "UUID literal expects a string as its representation.");
}
};
cljs.reader._STAR_tag_table_STAR_ = cljs.core.atom.call(null, new cljs.core.PersistentArrayMap(null, 4, ["inst", cljs.reader.read_date, "uuid", cljs.reader.read_uuid, "queue", cljs.reader.read_queue, "js", cljs.reader.read_js], null));
cljs.reader._STAR_default_data_reader_fn_STAR_ = cljs.core.atom.call(null, null);
cljs.reader.maybe_read_tagged_type = function cljs$reader$maybe_read_tagged_type(rdr, initch) {
var tag = cljs.reader.read_symbol.call(null, rdr, initch);
var pfn = cljs.core.get.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_), [cljs.core.str(tag)].join(""));
var dfn = cljs.core.deref.call(null, cljs.reader._STAR_default_data_reader_fn_STAR_);
if (cljs.core.truth_(pfn)) {
return pfn.call(null, cljs.reader.read.call(null, rdr, true, null, false));
} else {
if (cljs.core.truth_(dfn)) {
return dfn.call(null, tag, cljs.reader.read.call(null, rdr, true, null, false));
} else {
return cljs.reader.reader_error.call(null, rdr, "Could not find tag parser for ", [cljs.core.str(tag)].join(""), " in ", cljs.core.pr_str.call(null, cljs.core.keys.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_))));
}
}
};
cljs.reader.register_tag_parser_BANG_ = function cljs$reader$register_tag_parser_BANG_(tag, f) {
var tag__$1 = [cljs.core.str(tag)].join("");
var old_parser = cljs.core.get.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_), tag__$1);
cljs.core.swap_BANG_.call(null, cljs.reader._STAR_tag_table_STAR_, cljs.core.assoc, tag__$1, f);
return old_parser;
};
cljs.reader.deregister_tag_parser_BANG_ = function cljs$reader$deregister_tag_parser_BANG_(tag) {
var tag__$1 = [cljs.core.str(tag)].join("");
var old_parser = cljs.core.get.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_), tag__$1);
cljs.core.swap_BANG_.call(null, cljs.reader._STAR_tag_table_STAR_, cljs.core.dissoc, tag__$1);
return old_parser;
};
cljs.reader.register_default_tag_parser_BANG_ = function cljs$reader$register_default_tag_parser_BANG_(f) {
var old_parser = cljs.core.deref.call(null, cljs.reader._STAR_default_data_reader_fn_STAR_);
cljs.core.swap_BANG_.call(null, cljs.reader._STAR_default_data_reader_fn_STAR_, function(old_parser) {
return function(_) {
return f;
};
}(old_parser));
return old_parser;
};
cljs.reader.deregister_default_tag_parser_BANG_ = function cljs$reader$deregister_default_tag_parser_BANG_() {
var old_parser = cljs.core.deref.call(null, cljs.reader._STAR_default_data_reader_fn_STAR_);
cljs.core.swap_BANG_.call(null, cljs.reader._STAR_default_data_reader_fn_STAR_, function(old_parser) {
return function(_) {
return null;
};
}(old_parser));
return old_parser;
};
goog.provide("weasel.repl");
goog.require("cljs.core");
goog.require("goog.dom");
goog.require("clojure.browser.repl");
goog.require("weasel.impls.websocket");
goog.require("clojure.browser.net");
goog.require("clojure.browser.event");
goog.require("cljs.reader");
weasel.repl.ws_connection = cljs.core.atom.call(null, null);
weasel.repl.alive_QMARK_ = function weasel$repl$alive_QMARK_() {
return !(cljs.core.deref.call(null, weasel.repl.ws_connection) == null);
};
if (typeof weasel.repl.process_message !== "undefined") {
} else {
weasel.repl.process_message = function() {
var method_table__5584__auto__ = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
var prefer_table__5585__auto__ = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
var method_cache__5586__auto__ = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
var cached_hierarchy__5587__auto__ = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
var hierarchy__5588__auto__ = cljs.core.get.call(null, cljs.core.PersistentArrayMap.EMPTY, new cljs.core.Keyword(null, "hierarchy", "hierarchy", -1053470341), cljs.core.get_global_hierarchy.call(null));
return new cljs.core.MultiFn(cljs.core.symbol.call(null, "weasel.repl", "process-message"), new cljs.core.Keyword(null, "op", "op", -1882987955), new cljs.core.Keyword(null, "default", "default", -1987822328), hierarchy__5588__auto__, method_table__5584__auto__, prefer_table__5585__auto__, method_cache__5586__auto__, cached_hierarchy__5587__auto__);
}();
}
cljs.core._add_method.call(null, weasel.repl.process_message, new cljs.core.Keyword(null, "error", "error", -978969032), function(message) {
return console.error([cljs.core.str("Websocket REPL error "), cljs.core.str((new cljs.core.Keyword(null, "type", "type", 1174270348)).cljs$core$IFn$_invoke$arity$1(message))].join(""));
});
cljs.core._add_method.call(null, weasel.repl.process_message, new cljs.core.Keyword(null, "eval-js", "eval-js", 760905924), function(message) {
var code = (new cljs.core.Keyword(null, "code", "code", 1586293142)).cljs$core$IFn$_invoke$arity$1(message);
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "op", "op", -1882987955), new cljs.core.Keyword(null, "result", "result", 1415092211), new cljs.core.Keyword(null, "value", "value", 305978217), function() {
try {
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "status", "status", -1997798413), new cljs.core.Keyword(null, "success", "success", 1890645906), new cljs.core.Keyword(null, "value", "value", 305978217), [cljs.core.str(eval(code))].join("")], null);
} catch (e11907) {
if (e11907 instanceof Error) {
var e = e11907;
return new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "status", "status", -1997798413), new cljs.core.Keyword(null, "exception", "exception", -335277064), new cljs.core.Keyword(null, "value", "value", 305978217), cljs.core.pr_str.call(null, e), new cljs.core.Keyword(null, "stacktrace", "stacktrace", -95588394), cljs.core.truth_(e.hasOwnProperty("stack")) ? e.stack : "No stacktrace available."], null);
} else {
var e = e11907;
return new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "status", "status", -1997798413), new cljs.core.Keyword(null, "exception", "exception", -335277064), new cljs.core.Keyword(null, "value", "value", 305978217), cljs.core.pr_str.call(null, e), new cljs.core.Keyword(null, "stacktrace", "stacktrace", -95588394), "No stacktrace available."], null);
}
}
}()], null);
});
weasel.repl.repl_print = function weasel$repl$repl_print(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___11909 = arguments.length;
var i__5730__auto___11910 = 0;
while (true) {
if (i__5730__auto___11910 < len__5729__auto___11909) {
args__5736__auto__.push(arguments[i__5730__auto___11910]);
var G__11911 = i__5730__auto___11910 + 1;
i__5730__auto___11910 = G__11911;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 0 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(0), 0) : null;
return weasel.repl.repl_print.cljs$core$IFn$_invoke$arity$variadic(argseq__5737__auto__);
};
weasel.repl.repl_print.cljs$core$IFn$_invoke$arity$variadic = function(args) {
var temp__4423__auto__ = cljs.core.deref.call(null, weasel.repl.ws_connection);
if (cljs.core.truth_(temp__4423__auto__)) {
var conn = temp__4423__auto__;
return clojure.browser.net.transmit.call(null, cljs.core.deref.call(null, weasel.repl.ws_connection), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "op", "op", -1882987955), new cljs.core.Keyword(null, "print", "print", 1299562414), new cljs.core.Keyword(null, "value", "value", 305978217), cljs.core.apply.call(null, cljs.core.pr_str, args)], null));
} else {
return null;
}
};
weasel.repl.repl_print.cljs$lang$maxFixedArity = 0;
weasel.repl.repl_print.cljs$lang$applyTo = function(seq11908) {
return weasel.repl.repl_print.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq11908));
};
weasel.repl.console_print = function weasel$repl$console_print(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___11913 = arguments.length;
var i__5730__auto___11914 = 0;
while (true) {
if (i__5730__auto___11914 < len__5729__auto___11913) {
args__5736__auto__.push(arguments[i__5730__auto___11914]);
var G__11915 = i__5730__auto___11914 + 1;
i__5730__auto___11914 = G__11915;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 0 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(0), 0) : null;
return weasel.repl.console_print.cljs$core$IFn$_invoke$arity$variadic(argseq__5737__auto__);
};
weasel.repl.console_print.cljs$core$IFn$_invoke$arity$variadic = function(args) {
return console.log.apply(console, cljs.core.into_array.call(null, args));
};
weasel.repl.console_print.cljs$lang$maxFixedArity = 0;
weasel.repl.console_print.cljs$lang$applyTo = function(seq11912) {
return weasel.repl.console_print.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq11912));
};
weasel.repl.print_fns = cljs.core.PersistentArrayMap.fromArray([new cljs.core.Keyword(null, "repl", "repl", -35398667), weasel.repl.repl_print, new cljs.core.Keyword(null, "console", "console", 1228072057), weasel.repl.console_print, new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "repl", "repl", -35398667), null, new cljs.core.Keyword(null, "console", "console", 1228072057), null], null), null), function() {
var G__11916__delegate = function(args) {
cljs.core.apply.call(null, weasel.repl.console_print, args);
return cljs.core.apply.call(null, weasel.repl.repl_print, args);
};
var G__11916 = function(var_args) {
var args = null;
if (arguments.length > 0) {
var G__11917__i = 0, G__11917__a = new Array(arguments.length - 0);
while (G__11917__i < G__11917__a.length) {
G__11917__a[G__11917__i] = arguments[G__11917__i + 0];
++G__11917__i;
}
args = new cljs.core.IndexedSeq(G__11917__a, 0);
}
return G__11916__delegate.call(this, args);
};
G__11916.cljs$lang$maxFixedArity = 0;
G__11916.cljs$lang$applyTo = function(arglist__11918) {
var args = cljs.core.seq(arglist__11918);
return G__11916__delegate(args);
};
G__11916.cljs$core$IFn$_invoke$arity$variadic = G__11916__delegate;
return G__11916;
}()], true, false);
weasel.repl.connect = function weasel$repl$connect(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___11926 = arguments.length;
var i__5730__auto___11927 = 0;
while (true) {
if (i__5730__auto___11927 < len__5729__auto___11926) {
args__5736__auto__.push(arguments[i__5730__auto___11927]);
var G__11928 = i__5730__auto___11927 + 1;
i__5730__auto___11927 = G__11928;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return weasel.repl.connect.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
weasel.repl.connect.cljs$core$IFn$_invoke$arity$variadic = function(repl_server_url, p__11921) {
var map__11922 = p__11921;
var map__11922__$1 = (!(map__11922 == null) ? map__11922.cljs$lang$protocol_mask$partition0$ & 64 || map__11922.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.call(null, cljs.core.hash_map, map__11922) : map__11922;
var verbose = cljs.core.get.call(null, map__11922__$1, new cljs.core.Keyword(null, "verbose", "verbose", 1694226060), true);
var on_open = cljs.core.get.call(null, map__11922__$1, new cljs.core.Keyword(null, "on-open", "on-open", -1391088163));
var on_error = cljs.core.get.call(null, map__11922__$1, new cljs.core.Keyword(null, "on-error", "on-error", 1728533530));
var on_close = cljs.core.get.call(null, map__11922__$1, new cljs.core.Keyword(null, "on-close", "on-close", -761178394));
var print = cljs.core.get.call(null, map__11922__$1, new cljs.core.Keyword(null, "print", "print", 1299562414), new cljs.core.Keyword(null, "repl", "repl", -35398667));
var repl_connection = weasel.impls.websocket.websocket_connection.call(null);
cljs.core.swap_BANG_.call(null, weasel.repl.ws_connection, cljs.core.constantly.call(null, repl_connection));
clojure.browser.event.listen.call(null, repl_connection, new cljs.core.Keyword(null, "opened", "opened", -1451743091), function(repl_connection, map__11922, map__11922__$1, verbose, on_open, on_error, on_close, print) {
return function(evt) {
cljs.core.set_print_fn_BANG_.call(null, cljs.core.fn_QMARK_.call(null, print) ? print : cljs.core.get.call(null, weasel.repl.print_fns, print));
clojure.browser.net.transmit.call(null, repl_connection, cljs.core.pr_str.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "op", "op", -1882987955), new cljs.core.Keyword(null, "ready", "ready", 1086465795)], null)));
if (cljs.core.truth_(verbose)) {
console.info("Opened Websocket REPL connection");
} else {
}
if (cljs.core.fn_QMARK_.call(null, on_open)) {
return on_open.call(null);
} else {
return null;
}
};
}(repl_connection, map__11922, map__11922__$1, verbose, on_open, on_error, on_close, print));
clojure.browser.event.listen.call(null, repl_connection, new cljs.core.Keyword(null, "message", "message", -406056002), function(repl_connection, map__11922, map__11922__$1, verbose, on_open, on_error, on_close, print) {
return function(evt) {
var map__11924 = cljs.reader.read_string.call(null, evt.message);
var map__11924__$1 = (!(map__11924 == null) ? map__11924.cljs$lang$protocol_mask$partition0$ & 64 || map__11924.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.call(null, cljs.core.hash_map, map__11924) : map__11924;
var message = map__11924__$1;
var op = cljs.core.get.call(null, map__11924__$1, new cljs.core.Keyword(null, "op", "op", -1882987955));
var response = cljs.core.pr_str.call(null, weasel.repl.process_message.call(null, message));
return clojure.browser.net.transmit.call(null, repl_connection, response);
};
}(repl_connection, map__11922, map__11922__$1, verbose, on_open, on_error, on_close, print));
clojure.browser.event.listen.call(null, repl_connection, new cljs.core.Keyword(null, "closed", "closed", -919675359), function(repl_connection, map__11922, map__11922__$1, verbose, on_open, on_error, on_close, print) {
return function(evt) {
cljs.core.reset_BANG_.call(null, weasel.repl.ws_connection, null);
if (cljs.core.truth_(verbose)) {
console.info("Closed Websocket REPL connection");
} else {
}
if (cljs.core.fn_QMARK_.call(null, on_close)) {
return on_close.call(null);
} else {
return null;
}
};
}(repl_connection, map__11922, map__11922__$1, verbose, on_open, on_error, on_close, print));
clojure.browser.event.listen.call(null, repl_connection, new cljs.core.Keyword(null, "error", "error", -978969032), function(repl_connection, map__11922, map__11922__$1, verbose, on_open, on_error, on_close, print) {
return function(evt) {
if (cljs.core.truth_(verbose)) {
console.error("WebSocket error", evt);
} else {
}
if (cljs.core.fn_QMARK_.call(null, on_error)) {
return on_error.call(null, evt);
} else {
return null;
}
};
}(repl_connection, map__11922, map__11922__$1, verbose, on_open, on_error, on_close, print));
clojure.browser.repl.bootstrap.call(null);
return clojure.browser.net.connect.call(null, repl_connection, repl_server_url);
};
weasel.repl.connect.cljs$lang$maxFixedArity = 1;
weasel.repl.connect.cljs$lang$applyTo = function(seq11919) {
var G__11920 = cljs.core.first.call(null, seq11919);
var seq11919__$1 = cljs.core.next.call(null, seq11919);
return weasel.repl.connect.cljs$core$IFn$_invoke$arity$variadic(G__11920, seq11919__$1);
};
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__11931_SHARP_) {
return max === p1__11931_SHARP_;
};
}(max), coll));
};
clojure.set.union = function clojure$set$union(var_args) {
var args11932 = [];
var len__5729__auto___11938 = arguments.length;
var i__5730__auto___11939 = 0;
while (true) {
if (i__5730__auto___11939 < len__5729__auto___11938) {
args11932.push(arguments[i__5730__auto___11939]);
var G__11940 = i__5730__auto___11939 + 1;
i__5730__auto___11939 = G__11940;
continue;
} else {
}
break;
}
var G__11937 = args11932.length;
switch(G__11937) {
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__5748__auto__ = new cljs.core.IndexedSeq(args11932.slice(2), 0);
return clojure.set.union.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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(seq11933) {
var G__11934 = cljs.core.first.call(null, seq11933);
var seq11933__$1 = cljs.core.next.call(null, seq11933);
var G__11935 = cljs.core.first.call(null, seq11933__$1);
var seq11933__$2 = cljs.core.next.call(null, seq11933__$1);
return clojure.set.union.cljs$core$IFn$_invoke$arity$variadic(G__11934, G__11935, seq11933__$2);
};
clojure.set.union.cljs$lang$maxFixedArity = 2;
clojure.set.intersection = function clojure$set$intersection(var_args) {
var args11943 = [];
var len__5729__auto___11949 = arguments.length;
var i__5730__auto___11950 = 0;
while (true) {
if (i__5730__auto___11950 < len__5729__auto___11949) {
args11943.push(arguments[i__5730__auto___11950]);
var G__11951 = i__5730__auto___11950 + 1;
i__5730__auto___11950 = G__11951;
continue;
} else {
}
break;
}
var G__11948 = args11943.length;
switch(G__11948) {
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__5748__auto__ = new cljs.core.IndexedSeq(args11943.slice(2), 0);
return clojure.set.intersection.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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__11953 = s2;
var G__11954 = s1;
s1 = G__11953;
s2 = G__11954;
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__11942_SHARP_) {
return -cljs.core.count.call(null, p1__11942_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(seq11944) {
var G__11945 = cljs.core.first.call(null, seq11944);
var seq11944__$1 = cljs.core.next.call(null, seq11944);
var G__11946 = cljs.core.first.call(null, seq11944__$1);
var seq11944__$2 = cljs.core.next.call(null, seq11944__$1);
return clojure.set.intersection.cljs$core$IFn$_invoke$arity$variadic(G__11945, G__11946, seq11944__$2);
};
clojure.set.intersection.cljs$lang$maxFixedArity = 2;
clojure.set.difference = function clojure$set$difference(var_args) {
var args11955 = [];
var len__5729__auto___11961 = arguments.length;
var i__5730__auto___11962 = 0;
while (true) {
if (i__5730__auto___11962 < len__5729__auto___11961) {
args11955.push(arguments[i__5730__auto___11962]);
var G__11963 = i__5730__auto___11962 + 1;
i__5730__auto___11962 = G__11963;
continue;
} else {
}
break;
}
var G__11960 = args11955.length;
switch(G__11960) {
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__5748__auto__ = new cljs.core.IndexedSeq(args11955.slice(2), 0);
return clojure.set.difference.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5748__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(seq11956) {
var G__11957 = cljs.core.first.call(null, seq11956);
var seq11956__$1 = cljs.core.next.call(null, seq11956);
var G__11958 = cljs.core.first.call(null, seq11956__$1);
var seq11956__$2 = cljs.core.next.call(null, seq11956__$1);
return clojure.set.difference.cljs$core$IFn$_invoke$arity$variadic(G__11957, G__11958, seq11956__$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__11965_SHARP_) {
return cljs.core.select_keys.call(null, p1__11965_SHARP_, ks);
}, xrel));
};
clojure.set.rename_keys = function clojure$set$rename_keys(map, kmap) {
return cljs.core.reduce.call(null, function(m, p__11968) {
var vec__11969 = p__11968;
var old = cljs.core.nth.call(null, vec__11969, 0, null);
var new$ = cljs.core.nth.call(null, vec__11969, 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__11970_SHARP_) {
return clojure.set.rename_keys.call(null, p1__11970_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__11973) {
var vec__11974 = p__11973;
var k = cljs.core.nth.call(null, vec__11974, 0, null);
var v = cljs.core.nth.call(null, vec__11974, 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 args11979 = [];
var len__5729__auto___11984 = arguments.length;
var i__5730__auto___11985 = 0;
while (true) {
if (i__5730__auto___11985 < len__5729__auto___11984) {
args11979.push(arguments[i__5730__auto___11985]);
var G__11986 = i__5730__auto___11985 + 1;
i__5730__auto___11985 = G__11986;
continue;
} else {
}
break;
}
var G__11981 = args11979.length;
switch(G__11981) {
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(args11979.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__11982 = 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__11982, 0, null);
var s = cljs.core.nth.call(null, vec__11982, 1, null);
var idx = clojure.set.index.call(null, r, ks);
return cljs.core.reduce.call(null, function(ks, vec__11982, 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__11982, r, s, idx) {
return function(p1__11975_SHARP_, p2__11976_SHARP_) {
return cljs.core.conj.call(null, p1__11975_SHARP_, cljs.core.merge.call(null, p2__11976_SHARP_, x));
};
}(found, ks, vec__11982, r, s, idx), ret, found);
} else {
return ret;
}
};
}(ks, vec__11982, 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__11983 = 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__11983, 0, null);
var s = cljs.core.nth.call(null, vec__11983, 1, null);
var k = cljs.core.nth.call(null, vec__11983, 2, null);
var idx = clojure.set.index.call(null, r, cljs.core.vals.call(null, k));
return cljs.core.reduce.call(null, function(vec__11983, 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__11983, r, s, k, idx) {
return function(p1__11977_SHARP_, p2__11978_SHARP_) {
return cljs.core.conj.call(null, p1__11977_SHARP_, cljs.core.merge.call(null, p2__11978_SHARP_, x));
};
}(found, vec__11983, r, s, k, idx), ret, found);
} else {
return ret;
}
};
}(vec__11983, 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__11988_SHARP_) {
return cljs.core.contains_QMARK_.call(null, set2, p1__11988_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__11989_SHARP_) {
return cljs.core.contains_QMARK_.call(null, set1, p1__11989_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__11992__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__11992 = function(var_args) {
var args = null;
if (arguments.length > 0) {
var G__11993__i = 0, G__11993__a = new Array(arguments.length - 0);
while (G__11993__i < G__11993__a.length) {
G__11993__a[G__11993__i] = arguments[G__11993__i + 0];
++G__11993__i;
}
args = new cljs.core.IndexedSeq(G__11993__a, 0);
}
return G__11992__delegate.call(this, args);
};
G__11992.cljs$lang$maxFixedArity = 0;
G__11992.cljs$lang$applyTo = function(arglist__11994) {
var args = cljs.core.seq(arglist__11994);
return G__11992__delegate(args);
};
G__11992.cljs$core$IFn$_invoke$arity$variadic = G__11992__delegate;
return G__11992;
}();
};
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 args11995 = [];
var len__5729__auto___11998 = arguments.length;
var i__5730__auto___11999 = 0;
while (true) {
if (i__5730__auto___11999 < len__5729__auto___11998) {
args11995.push(arguments[i__5730__auto___11999]);
var G__12000 = i__5730__auto___11999 + 1;
i__5730__auto___11999 = G__12000;
continue;
} else {
}
break;
}
var G__11997 = args11995.length;
switch(G__11997) {
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(args11995.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__12002 = sb.append([cljs.core.str(cljs.core.first.call(null, coll__$1))].join(""));
var G__12003 = cljs.core.next.call(null, coll__$1);
sb = G__12002;
coll__$1 = G__12003;
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__12004 = sb;
var G__12005 = coll__$2;
sb = G__12004;
coll__$1 = G__12005;
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__12006 = cljs.core.pop.call(null, v__$1);
v__$1 = G__12006;
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__12010 = cljs.core._EQ__EQ_;
var expr__12011 = limit;
if (cljs.core.truth_(pred__12010.call(null, 1, expr__12011))) {
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [s], null);
} else {
if (cljs.core.truth_(pred__12010.call(null, 2, expr__12011))) {
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 args12013 = [];
var len__5729__auto___12016 = arguments.length;
var i__5730__auto___12017 = 0;
while (true) {
if (i__5730__auto___12017 < len__5729__auto___12016) {
args12013.push(arguments[i__5730__auto___12017]);
var G__12018 = i__5730__auto___12017 + 1;
i__5730__auto___12017 = G__12018;
continue;
} else {
}
break;
}
var G__12015 = args12013.length;
switch(G__12015) {
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(args12013.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__12020 = s__$1.substring(index + cljs.core.count.call(null, m));
var G__12021 = limit__$1 - 1;
var G__12022 = cljs.core.conj.call(null, parts, s__$1.substring(0, index));
s__$1 = G__12020;
limit__$1 = G__12021;
parts = G__12022;
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__12023 = index - 1;
index = G__12023;
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__12024 = index + 1;
index = G__12024;
continue;
}
break;
}
};
clojure.string.index_of = function clojure$string$index_of(var_args) {
var args12025 = [];
var len__5729__auto___12028 = arguments.length;
var i__5730__auto___12029 = 0;
while (true) {
if (i__5730__auto___12029 < len__5729__auto___12028) {
args12025.push(arguments[i__5730__auto___12029]);
var G__12030 = i__5730__auto___12029 + 1;
i__5730__auto___12029 = G__12030;
continue;
} else {
}
break;
}
var G__12027 = args12025.length;
switch(G__12027) {
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(args12025.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 args12032 = [];
var len__5729__auto___12035 = arguments.length;
var i__5730__auto___12036 = 0;
while (true) {
if (i__5730__auto___12036 < len__5729__auto___12035) {
args12032.push(arguments[i__5730__auto___12036]);
var G__12037 = i__5730__auto___12036 + 1;
i__5730__auto___12036 = G__12037;
continue;
} else {
}
break;
}
var G__12034 = args12032.length;
switch(G__12034) {
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(args12032.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__5326__auto__ = x == null ? null : x;
var m__5327__auto__ = sablono.util.to_str[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, x);
} else {
var m__5327__auto____$1 = sablono.util.to_str["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = x == null ? null : x;
var m__5327__auto__ = sablono.util.to_uri[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, x);
} else {
var m__5327__auto____$1 = sablono.util.to_uri["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5736__auto__ = [];
var len__5729__auto___12042 = arguments.length;
var i__5730__auto___12043 = 0;
while (true) {
if (i__5730__auto___12043 < len__5729__auto___12042) {
args__5736__auto__.push(arguments[i__5730__auto___12043]);
var G__12044 = i__5730__auto___12043 + 1;
i__5730__auto___12043 = G__12044;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 0 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(0), 0) : null;
return sablono.util.as_str.cljs$core$IFn$_invoke$arity$variadic(argseq__5737__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(seq12041) {
return sablono.util.as_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq12041));
};
sablono.util.camel_case = function sablono$util$camel_case(k) {
if (cljs.core.truth_(k)) {
var vec__12046 = clojure.string.split.call(null, cljs.core.name.call(null, k), /-/);
var first_word = cljs.core.nth.call(null, vec__12046, 0, null);
var words = cljs.core.nthnext.call(null, vec__12046, 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__12048 = clojure.set.rename_keys.call(null, m, kmap);
var G__12048__$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__12048, 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__12048;
return G__12048__$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__5736__auto__ = [];
var len__5729__auto___12051 = arguments.length;
var i__5730__auto___12052 = 0;
while (true) {
if (i__5730__auto___12052 < len__5729__auto___12051) {
args__5736__auto__.push(arguments[i__5730__auto___12052]);
var G__12053 = i__5730__auto___12052 + 1;
i__5730__auto___12052 = G__12053;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 0 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(0), 0) : null;
return sablono.util.merge_with_class.cljs$core$IFn$_invoke$arity$variadic(argseq__5737__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__12049_SHARP_) {
if (cljs.core.list_QMARK_.call(null, p1__12049_SHARP_)) {
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [p1__12049_SHARP_], null);
} else {
if (cljs.core.sequential_QMARK_.call(null, p1__12049_SHARP_)) {
return p1__12049_SHARP_;
} else {
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [p1__12049_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(seq12050) {
return sablono.util.merge_with_class.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq12050));
};
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__12057 = 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__12057, 0, null);
var names = cljs.core.nth.call(null, vec__12057, 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__12057, tag_name, names) {
return function(p1__12054_SHARP_) {
return cljs.core._EQ_.call(null, "#", cljs.core.first.call(null, p1__12054_SHARP_));
};
}(matches, vec__12057, 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__12057, tag_name, names) {
return function(p1__12055_SHARP_) {
return cljs.core._EQ_.call(null, ".", cljs.core.first.call(null, p1__12055_SHARP_));
};
}(matches, vec__12057, tag_name, names), names)))], null);
};
sablono.util.normalize_element = function sablono$util$normalize_element(p__12058) {
var vec__12061 = p__12058;
var tag = cljs.core.nth.call(null, vec__12061, 0, null);
var content = cljs.core.nthnext.call(null, vec__12061, 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__12062 = sablono.util.match_tag.call(null, tag);
var tag__$1 = cljs.core.nth.call(null, vec__12062, 0, null);
var id = cljs.core.nth.call(null, vec__12062, 1, null);
var class$ = cljs.core.nth.call(null, vec__12062, 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__4671__auto__ = x__$1.hasDomain();
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = sablono.interpreter.interpret[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$);
} else {
var m__5327__auto____$1 = sablono.interpreter.interpret["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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(cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "getDisplayName", "getDisplayName", 1324429466), function() {
return cljs.core.name.call(null, display_name);
}, new cljs.core.Keyword(null, "getInitialState", "getInitialState", 1541760916), function() {
var this$ = this;
return cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "value", "value", 305978217), this$.props["value"]], null));
}, new cljs.core.Keyword(null, "onChange", "onChange", -312891301), function(e) {
var this$ = this;
var handler = this$.props["onChange"];
if (handler == null) {
return null;
} else {
handler.call(null, e);
return this$.setState(cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "value", "value", 305978217), e.target.value], null)));
}
}, new cljs.core.Keyword(null, "componentWillReceiveProps", "componentWillReceiveProps", 559988974), function(new_props) {
var this$ = this;
return this$.setState(cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "value", "value", 305978217), new_props["value"]], null)));
}, new cljs.core.Keyword(null, "render", "render", -1408033454), function() {
var this$ = this;
var props = cljs.core.clj__GT_js.call(null, cljs.core.PersistentArrayMap.EMPTY);
goog.object.extend(props, this$.props, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "value", "value", 305978217), this$.state["value"], new cljs.core.Keyword(null, "onChange", "onChange", -312891301), this$["onChange"], new cljs.core.Keyword(null, "children", "children", -940561982), this$.props["children"]], null)));
return ctor.call(null, props);
}], null))));
};
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__5736__auto__ = [];
var len__5729__auto___12068 = arguments.length;
var i__5730__auto___12069 = 0;
while (true) {
if (i__5730__auto___12069 < len__5729__auto___12068) {
args__5736__auto__.push(arguments[i__5730__auto___12069]);
var G__12070 = i__5730__auto___12069 + 1;
i__5730__auto___12069 = G__12070;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 2 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(2), 0) : null;
return sablono.interpreter.create_element.cljs$core$IFn$_invoke$arity$variadic(arguments[0], arguments[1], argseq__5737__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(seq12065) {
var G__12066 = cljs.core.first.call(null, seq12065);
var seq12065__$1 = cljs.core.next.call(null, seq12065);
var G__12067 = cljs.core.first.call(null, seq12065__$1);
var seq12065__$2 = cljs.core.next.call(null, seq12065__$1);
return sablono.interpreter.create_element.cljs$core$IFn$_invoke$arity$variadic(G__12066, G__12067, seq12065__$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__12072 = sablono.util.normalize_element.call(null, element__$1);
var type = cljs.core.nth.call(null, vec__12072, 0, null);
var attrs = cljs.core.nth.call(null, vec__12072, 1, null);
var content = cljs.core.nth.call(null, vec__12072, 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("sablono.core");
goog.require("cljs.core");
goog.require("clojure.string");
goog.require("goog.string");
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__12508__delegate = function(args) {
if (cljs.core.map_QMARK_.call(null, cljs.core.first.call(null, args))) {
var vec__12507 = cljs.core.apply.call(null, func, cljs.core.rest.call(null, args));
var tag = cljs.core.nth.call(null, vec__12507, 0, null);
var body = cljs.core.nthnext.call(null, vec__12507, 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__12508 = function(var_args) {
var args = null;
if (arguments.length > 0) {
var G__12509__i = 0, G__12509__a = new Array(arguments.length - 0);
while (G__12509__i < G__12509__a.length) {
G__12509__a[G__12509__i] = arguments[G__12509__i + 0];
++G__12509__i;
}
args = new cljs.core.IndexedSeq(G__12509__a, 0);
}
return G__12508__delegate.call(this, args);
};
G__12508.cljs$lang$maxFixedArity = 0;
G__12508.cljs$lang$applyTo = function(arglist__12510) {
var args = cljs.core.seq(arglist__12510);
return G__12508__delegate(args);
};
G__12508.cljs$core$IFn$_invoke$arity$variadic = G__12508__delegate;
return G__12508;
}();
};
sablono.core.update_arglists = function sablono$core$update_arglists(arglists) {
var iter__5443__auto__ = function sablono$core$update_arglists_$_iter__12515(s__12516) {
return new cljs.core.LazySeq(null, function() {
var s__12516__$1 = s__12516;
while (true) {
var temp__4425__auto__ = cljs.core.seq.call(null, s__12516__$1);
if (temp__4425__auto__) {
var s__12516__$2 = temp__4425__auto__;
if (cljs.core.chunked_seq_QMARK_.call(null, s__12516__$2)) {
var c__5441__auto__ = cljs.core.chunk_first.call(null, s__12516__$2);
var size__5442__auto__ = cljs.core.count.call(null, c__5441__auto__);
var b__12518 = cljs.core.chunk_buffer.call(null, size__5442__auto__);
if (function() {
var i__12517 = 0;
while (true) {
if (i__12517 < size__5442__auto__) {
var args = cljs.core._nth.call(null, c__5441__auto__, i__12517);
cljs.core.chunk_append.call(null, b__12518, cljs.core.vec.call(null, cljs.core.cons.call(null, new cljs.core.Symbol(null, "attr-map?", "attr-map?", 116307443, null), args)));
var G__12519 = i__12517 + 1;
i__12517 = G__12519;
continue;
} else {
return true;
}
break;
}
}()) {
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__12518), sablono$core$update_arglists_$_iter__12515.call(null, cljs.core.chunk_rest.call(null, s__12516__$2)));
} else {
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__12518), null);
}
} else {
var args = cljs.core.first.call(null, s__12516__$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__12515.call(null, cljs.core.rest.call(null, s__12516__$2)));
}
} else {
return null;
}
break;
}
}, null, null);
};
return iter__5443__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__5736__auto__ = [];
var len__5729__auto___12525 = arguments.length;
var i__5730__auto___12526 = 0;
while (true) {
if (i__5730__auto___12526 < len__5729__auto___12525) {
args__5736__auto__.push(arguments[i__5730__auto___12526]);
var G__12527 = i__5730__auto___12526 + 1;
i__5730__auto___12526 = G__12527;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 0 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(0), 0) : null;
return sablono.core.include_css.cljs$core$IFn$_invoke$arity$variadic(argseq__5737__auto__);
};
sablono.core.include_css.cljs$core$IFn$_invoke$arity$variadic = function(styles) {
var iter__5443__auto__ = function sablono$core$iter__12521(s__12522) {
return new cljs.core.LazySeq(null, function() {
var s__12522__$1 = s__12522;
while (true) {
var temp__4425__auto__ = cljs.core.seq.call(null, s__12522__$1);
if (temp__4425__auto__) {
var s__12522__$2 = temp__4425__auto__;
if (cljs.core.chunked_seq_QMARK_.call(null, s__12522__$2)) {
var c__5441__auto__ = cljs.core.chunk_first.call(null, s__12522__$2);
var size__5442__auto__ = cljs.core.count.call(null, c__5441__auto__);
var b__12524 = cljs.core.chunk_buffer.call(null, size__5442__auto__);
if (function() {
var i__12523 = 0;
while (true) {
if (i__12523 < size__5442__auto__) {
var style = cljs.core._nth.call(null, c__5441__auto__, i__12523);
cljs.core.chunk_append.call(null, b__12524, 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__12528 = i__12523 + 1;
i__12523 = G__12528;
continue;
} else {
return true;
}
break;
}
}()) {
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__12524), sablono$core$iter__12521.call(null, cljs.core.chunk_rest.call(null, s__12522__$2)));
} else {
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__12524), null);
}
} else {
var style = cljs.core.first.call(null, s__12522__$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__12521.call(null,
cljs.core.rest.call(null, s__12522__$2)));
}
} else {
return null;
}
break;
}
}, null, null);
};
return iter__5443__auto__.call(null, styles);
};
sablono.core.include_css.cljs$lang$maxFixedArity = 0;
sablono.core.include_css.cljs$lang$applyTo = function(seq12520) {
return sablono.core.include_css.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, seq12520));
};
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_to12529 = function sablono$core$link_to12529(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___12532 = arguments.length;
var i__5730__auto___12533 = 0;
while (true) {
if (i__5730__auto___12533 < len__5729__auto___12532) {
args__5736__auto__.push(arguments[i__5730__auto___12533]);
var G__12534 = i__5730__auto___12533 + 1;
i__5730__auto___12533 = G__12534;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return sablono.core.link_to12529.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
sablono.core.link_to12529.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_to12529.cljs$lang$maxFixedArity = 1;
sablono.core.link_to12529.cljs$lang$applyTo = function(seq12530) {
var G__12531 = cljs.core.first.call(null, seq12530);
var seq12530__$1 = cljs.core.next.call(null, seq12530);
return sablono.core.link_to12529.cljs$core$IFn$_invoke$arity$variadic(G__12531, seq12530__$1);
};
sablono.core.link_to = sablono.core.wrap_attrs.call(null, sablono.core.link_to12529);
sablono.core.mail_to12535 = function sablono$core$mail_to12535(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___12540 = arguments.length;
var i__5730__auto___12541 = 0;
while (true) {
if (i__5730__auto___12541 < len__5729__auto___12540) {
args__5736__auto__.push(arguments[i__5730__auto___12541]);
var G__12542 = i__5730__auto___12541 + 1;
i__5730__auto___12541 = G__12542;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return sablono.core.mail_to12535.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
sablono.core.mail_to12535.cljs$core$IFn$_invoke$arity$variadic = function(e_mail, p__12538) {
var vec__12539 = p__12538;
var content = cljs.core.nth.call(null, vec__12539, 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__4671__auto__ = content;
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return e_mail;
}
}()], null);
};
sablono.core.mail_to12535.cljs$lang$maxFixedArity = 1;
sablono.core.mail_to12535.cljs$lang$applyTo = function(seq12536) {
var G__12537 = cljs.core.first.call(null, seq12536);
var seq12536__$1 = cljs.core.next.call(null, seq12536);
return sablono.core.mail_to12535.cljs$core$IFn$_invoke$arity$variadic(G__12537, seq12536__$1);
};
sablono.core.mail_to = sablono.core.wrap_attrs.call(null, sablono.core.mail_to12535);
sablono.core.unordered_list12543 = function sablono$core$unordered_list12543(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__5443__auto__ = function sablono$core$unordered_list12543_$_iter__12548(s__12549) {
return new cljs.core.LazySeq(null, function() {
var s__12549__$1 = s__12549;
while (true) {
var temp__4425__auto__ = cljs.core.seq.call(null, s__12549__$1);
if (temp__4425__auto__) {
var s__12549__$2 = temp__4425__auto__;
if (cljs.core.chunked_seq_QMARK_.call(null, s__12549__$2)) {
var c__5441__auto__ = cljs.core.chunk_first.call(null, s__12549__$2);
var size__5442__auto__ = cljs.core.count.call(null, c__5441__auto__);
var b__12551 = cljs.core.chunk_buffer.call(null, size__5442__auto__);
if (function() {
var i__12550 = 0;
while (true) {
if (i__12550 < size__5442__auto__) {
var x = cljs.core._nth.call(null, c__5441__auto__, i__12550);
cljs.core.chunk_append.call(null, b__12551, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 723558921), x], null));
var G__12552 = i__12550 + 1;
i__12550 = G__12552;
continue;
} else {
return true;
}
break;
}
}()) {
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__12551), sablono$core$unordered_list12543_$_iter__12548.call(null, cljs.core.chunk_rest.call(null, s__12549__$2)));
} else {
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__12551), null);
}
} else {
var x = cljs.core.first.call(null, s__12549__$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_list12543_$_iter__12548.call(null, cljs.core.rest.call(null, s__12549__$2)));
}
} else {
return null;
}
break;
}
}, null, null);
};
return iter__5443__auto__.call(null, coll);
}()], null);
};
sablono.core.unordered_list = sablono.core.wrap_attrs.call(null, sablono.core.unordered_list12543);
sablono.core.ordered_list12553 = function sablono$core$ordered_list12553(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__5443__auto__ = function sablono$core$ordered_list12553_$_iter__12558(s__12559) {
return new cljs.core.LazySeq(null, function() {
var s__12559__$1 = s__12559;
while (true) {
var temp__4425__auto__ = cljs.core.seq.call(null, s__12559__$1);
if (temp__4425__auto__) {
var s__12559__$2 = temp__4425__auto__;
if (cljs.core.chunked_seq_QMARK_.call(null, s__12559__$2)) {
var c__5441__auto__ = cljs.core.chunk_first.call(null, s__12559__$2);
var size__5442__auto__ = cljs.core.count.call(null, c__5441__auto__);
var b__12561 = cljs.core.chunk_buffer.call(null, size__5442__auto__);
if (function() {
var i__12560 = 0;
while (true) {
if (i__12560 < size__5442__auto__) {
var x = cljs.core._nth.call(null, c__5441__auto__, i__12560);
cljs.core.chunk_append.call(null, b__12561, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 723558921), x], null));
var G__12562 = i__12560 + 1;
i__12560 = G__12562;
continue;
} else {
return true;
}
break;
}
}()) {
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__12561), sablono$core$ordered_list12553_$_iter__12558.call(null, cljs.core.chunk_rest.call(null, s__12559__$2)));
} else {
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__12561), null);
}
} else {
var x = cljs.core.first.call(null, s__12559__$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_list12553_$_iter__12558.call(null, cljs.core.rest.call(null, s__12559__$2)));
}
} else {
return null;
}
break;
}
}, null, null);
};
return iter__5443__auto__.call(null, coll);
}()], null);
};
sablono.core.ordered_list = sablono.core.wrap_attrs.call(null, sablono.core.ordered_list12553);
sablono.core.image12563 = function sablono$core$image12563(var_args) {
var args12564 = [];
var len__5729__auto___12567 = arguments.length;
var i__5730__auto___12568 = 0;
while (true) {
if (i__5730__auto___12568 < len__5729__auto___12567) {
args12564.push(arguments[i__5730__auto___12568]);
var G__12569 = i__5730__auto___12568 + 1;
i__5730__auto___12568 = G__12569;
continue;
} else {
}
break;
}
var G__12566 = args12564.length;
switch(G__12566) {
case 1:
return sablono.core.image12563.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return sablono.core.image12563.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args12564.length)].join(""));;
}
};
sablono.core.image12563.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.image12563.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.image12563.cljs$lang$maxFixedArity = 2;
sablono.core.image = sablono.core.wrap_attrs.call(null, sablono.core.image12563);
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__12571_SHARP_, p2__12572_SHARP_) {
return [cljs.core.str(p1__12571_SHARP_), cljs.core.str("["), cljs.core.str(p2__12572_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__12573_SHARP_, p2__12574_SHARP_) {
return [cljs.core.str(p1__12573_SHARP_), cljs.core.str("-"), cljs.core.str(p2__12574_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_field12575 = function sablono$core$color_field12575(var_args) {
var args12576 = [];
var len__5729__auto___12643 = arguments.length;
var i__5730__auto___12644 = 0;
while (true) {
if (i__5730__auto___12644 < len__5729__auto___12643) {
args12576.push(arguments[i__5730__auto___12644]);
var G__12645 = i__5730__auto___12644 + 1;
i__5730__auto___12644 = G__12645;
continue;
} else {
}
break;
}
var G__12578 = args12576.length;
switch(G__12578) {
case 1:
return sablono.core.color_field12575.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return sablono.core.color_field12575.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args12576.length)].join(""));;
}
};
sablono.core.color_field12575.cljs$core$IFn$_invoke$arity$1 = function(name__12496__auto__) {
return sablono.core.color_field12575.call(null, name__12496__auto__, null);
};
sablono.core.color_field12575.cljs$core$IFn$_invoke$arity$2 = function(name__12496__auto__, value__12497__auto__) {
return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "color", "color", -1642760596, null))].join(""), name__12496__auto__, value__12497__auto__);
};
sablono.core.color_field12575.cljs$lang$maxFixedArity = 2;
sablono.core.color_field = sablono.core.wrap_attrs.call(null, sablono.core.color_field12575);
sablono.core.date_field12579 = function sablono$core$date_field12579(var_args) {
var args12580 = [];
var len__5729__auto___12647 = arguments.length;
var i__5730__auto___12648 = 0;
while (true) {
if (i__5730__auto___12648 < len__5729__auto___12647) {
args12580.push(arguments[i__5730__auto___12648]);
var G__12649 = i__5730__auto___12648 + 1;
i__5730__auto___12648 = G__12649;
continue;
} else {
}
break;
}
var G__12582 = args12580.length;
switch(G__12582) {
case 1:
return sablono.core.date_field12579.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return sablono.core.date_field12579.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args12580.length)].join(""));;
}
};
sablono.core.date_field12579.cljs$core$IFn$_invoke$arity$1 = function(name__12496__auto__) {
return sablono.core.date_field12579.call(null, name__12496__auto__, null);
};
sablono.core.date_field12579.cljs$core$IFn$_invoke$arity$2 = function(name__12496__auto__, value__12497__auto__) {
return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "date", "date", 177097065, null))].join(""), name__12496__auto__, value__12497__auto__);
};
sablono.core.date_field12579.cljs$lang$maxFixedArity = 2;
sablono.core.date_field = sablono.core.wrap_attrs.call(null, sablono.core.date_field12579);
sablono.core.datetime_field12583 = function sablono$core$datetime_field12583(var_args) {
var args12584 = [];
var len__5729__auto___12651 = arguments.length;
var i__5730__auto___12652 = 0;
while (true) {
if (i__5730__auto___12652 < len__5729__auto___12651) {
args12584.push(arguments[i__5730__auto___12652]);
var G__12653 = i__5730__auto___12652 + 1;
i__5730__auto___12652 = G__12653;
continue;
} else {
}
break;
}
var G__12586 = args12584.length;
switch(G__12586) {
case 1:
return sablono.core.datetime_field12583.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return sablono.core.datetime_field12583.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args12584.length)].join(""));;
}
};
sablono.core.datetime_field12583.cljs$core$IFn$_invoke$arity$1 = function(name__12496__auto__) {
return sablono.core.datetime_field12583.call(null, name__12496__auto__, null);
};
sablono.core.datetime_field12583.cljs$core$IFn$_invoke$arity$2 = function(name__12496__auto__, value__12497__auto__) {
return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "datetime", "datetime", 2135207229, null))].join(""), name__12496__auto__, value__12497__auto__);
};
sablono.core.datetime_field12583.cljs$lang$maxFixedArity = 2;
sablono.core.datetime_field = sablono.core.wrap_attrs.call(null, sablono.core.datetime_field12583);
sablono.core.datetime_local_field12587 = function sablono$core$datetime_local_field12587(var_args) {
var args12588 = [];
var len__5729__auto___12655 = arguments.length;
var i__5730__auto___12656 = 0;
while (true) {
if (i__5730__auto___12656 < len__5729__auto___12655) {
args12588.push(arguments[i__5730__auto___12656]);
var G__12657 = i__5730__auto___12656 + 1;
i__5730__auto___12656 = G__12657;
continue;
} else {
}
break;
}
var G__12590 = args12588.length;
switch(G__12590) {
case 1:
return sablono.core.datetime_local_field12587.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return sablono.core.datetime_local_field12587.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args12588.length)].join(""));;
}
};
sablono.core.datetime_local_field12587.cljs$core$IFn$_invoke$arity$1 = function(name__12496__auto__) {
return sablono.core.datetime_local_field12587.call(null, name__12496__auto__, null);
};
sablono.core.datetime_local_field12587.cljs$core$IFn$_invoke$arity$2 = function(name__12496__auto__, value__12497__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__12496__auto__, value__12497__auto__);
};
sablono.core.datetime_local_field12587.cljs$lang$maxFixedArity = 2;
sablono.core.datetime_local_field = sablono.core.wrap_attrs.call(null, sablono.core.datetime_local_field12587);
sablono.core.email_field12591 = function sablono$core$email_field12591(var_args) {
var args12592 = [];
var len__5729__auto___12659 = arguments.length;
var i__5730__auto___12660 = 0;
while (true) {
if (i__5730__auto___12660 < len__5729__auto___12659) {
args12592.push(arguments[i__5730__auto___12660]);
var G__12661 = i__5730__auto___12660 + 1;
i__5730__auto___12660 = G__12661;
continue;
} else {
}
break;
}
var G__12594 = args12592.length;
switch(G__12594) {
case 1:
return sablono.core.email_field12591.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return sablono.core.email_field12591.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args12592.length)].join(""));;
}
};
sablono.core.email_field12591.cljs$core$IFn$_invoke$arity$1 = function(name__12496__auto__) {
return sablono.core.email_field12591.call(null, name__12496__auto__, null);
};
sablono.core.email_field12591.cljs$core$IFn$_invoke$arity$2 = function(name__12496__auto__, value__12497__auto__) {
return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "email", "email", -1238619063, null))].join(""), name__12496__auto__, value__12497__auto__);
};
sablono.core.email_field12591.cljs$lang$maxFixedArity = 2;
sablono.core.email_field = sablono.core.wrap_attrs.call(null, sablono.core.email_field12591);
sablono.core.file_field12595 = function sablono$core$file_field12595(var_args) {
var args12596 = [];
var len__5729__auto___12663 = arguments.length;
var i__5730__auto___12664 = 0;
while (true) {
if (i__5730__auto___12664 < len__5729__auto___12663) {
args12596.push(arguments[i__5730__auto___12664]);
var G__12665 = i__5730__auto___12664 + 1;
i__5730__auto___12664 = G__12665;
continue;
} else {
}
break;
}
var G__12598 = args12596.length;
switch(G__12598) {
case 1:
return sablono.core.file_field12595.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return sablono.core.file_field12595.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args12596.length)].join(""));;
}
};
sablono.core.file_field12595.cljs$core$IFn$_invoke$arity$1 = function(name__12496__auto__) {
return sablono.core.file_field12595.call(null, name__12496__auto__, null);
};
sablono.core.file_field12595.cljs$core$IFn$_invoke$arity$2 = function(name__12496__auto__, value__12497__auto__) {
return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "file", "file", 370885649, null))].join(""), name__12496__auto__, value__12497__auto__);
};
sablono.core.file_field12595.cljs$lang$maxFixedArity = 2;
sablono.core.file_field = sablono.core.wrap_attrs.call(null, sablono.core.file_field12595);
sablono.core.hidden_field12599 = function sablono$core$hidden_field12599(var_args) {
var args12600 = [];
var len__5729__auto___12667 = arguments.length;
var i__5730__auto___12668 = 0;
while (true) {
if (i__5730__auto___12668 < len__5729__auto___12667) {
args12600.push(arguments[i__5730__auto___12668]);
var G__12669 = i__5730__auto___12668 + 1;
i__5730__auto___12668 = G__12669;
continue;
} else {
}
break;
}
var G__12602 = args12600.length;
switch(G__12602) {
case 1:
return sablono.core.hidden_field12599.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return sablono.core.hidden_field12599.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args12600.length)].join(""));;
}
};
sablono.core.hidden_field12599.cljs$core$IFn$_invoke$arity$1 = function(name__12496__auto__) {
return sablono.core.hidden_field12599.call(null, name__12496__auto__, null);
};
sablono.core.hidden_field12599.cljs$core$IFn$_invoke$arity$2 = function(name__12496__auto__, value__12497__auto__) {
return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "hidden", "hidden", 1328025435, null))].join(""), name__12496__auto__, value__12497__auto__);
};
sablono.core.hidden_field12599.cljs$lang$maxFixedArity = 2;
sablono.core.hidden_field = sablono.core.wrap_attrs.call(null, sablono.core.hidden_field12599);
sablono.core.month_field12603 = function sablono$core$month_field12603(var_args) {
var args12604 = [];
var len__5729__auto___12671 = arguments.length;
var i__5730__auto___12672 = 0;
while (true) {
if (i__5730__auto___12672 < len__5729__auto___12671) {
args12604.push(arguments[i__5730__auto___12672]);
var G__12673 = i__5730__auto___12672 + 1;
i__5730__auto___12672 = G__12673;
continue;
} else {
}
break;
}
var G__12606 = args12604.length;
switch(G__12606) {
case 1:
return sablono.core.month_field12603.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return sablono.core.month_field12603.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args12604.length)].join(""));;
}
};
sablono.core.month_field12603.cljs$core$IFn$_invoke$arity$1 = function(name__12496__auto__) {
return sablono.core.month_field12603.call(null, name__12496__auto__, null);
};
sablono.core.month_field12603.cljs$core$IFn$_invoke$arity$2 = function(name__12496__auto__, value__12497__auto__) {
return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "month", "month", -319717006, null))].join(""), name__12496__auto__, value__12497__auto__);
};
sablono.core.month_field12603.cljs$lang$maxFixedArity = 2;
sablono.core.month_field = sablono.core.wrap_attrs.call(null, sablono.core.month_field12603);
sablono.core.number_field12607 = function sablono$core$number_field12607(var_args) {
var args12608 = [];
var len__5729__auto___12675 = arguments.length;
var i__5730__auto___12676 = 0;
while (true) {
if (i__5730__auto___12676 < len__5729__auto___12675) {
args12608.push(arguments[i__5730__auto___12676]);
var G__12677 = i__5730__auto___12676 + 1;
i__5730__auto___12676 = G__12677;
continue;
} else {
}
break;
}
var G__12610 = args12608.length;
switch(G__12610) {
case 1:
return sablono.core.number_field12607.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return sablono.core.number_field12607.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args12608.length)].join(""));;
}
};
sablono.core.number_field12607.cljs$core$IFn$_invoke$arity$1 = function(name__12496__auto__) {
return sablono.core.number_field12607.call(null, name__12496__auto__, null);
};
sablono.core.number_field12607.cljs$core$IFn$_invoke$arity$2 = function(name__12496__auto__, value__12497__auto__) {
return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "number", "number", -1084057331, null))].join(""), name__12496__auto__, value__12497__auto__);
};
sablono.core.number_field12607.cljs$lang$maxFixedArity = 2;
sablono.core.number_field = sablono.core.wrap_attrs.call(null, sablono.core.number_field12607);
sablono.core.password_field12611 = function sablono$core$password_field12611(var_args) {
var args12612 = [];
var len__5729__auto___12679 = arguments.length;
var i__5730__auto___12680 = 0;
while (true) {
if (i__5730__auto___12680 < len__5729__auto___12679) {
args12612.push(arguments[i__5730__auto___12680]);
var G__12681 = i__5730__auto___12680 + 1;
i__5730__auto___12680 = G__12681;
continue;
} else {
}
break;
}
var G__12614 = args12612.length;
switch(G__12614) {
case 1:
return sablono.core.password_field12611.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return sablono.core.password_field12611.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args12612.length)].join(""));;
}
};
sablono.core.password_field12611.cljs$core$IFn$_invoke$arity$1 = function(name__12496__auto__) {
return sablono.core.password_field12611.call(null, name__12496__auto__, null);
};
sablono.core.password_field12611.cljs$core$IFn$_invoke$arity$2 = function(name__12496__auto__, value__12497__auto__) {
return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "password", "password", 2057553998, null))].join(""), name__12496__auto__, value__12497__auto__);
};
sablono.core.password_field12611.cljs$lang$maxFixedArity = 2;
sablono.core.password_field = sablono.core.wrap_attrs.call(null, sablono.core.password_field12611);
sablono.core.range_field12615 = function sablono$core$range_field12615(var_args) {
var args12616 = [];
var len__5729__auto___12683 = arguments.length;
var i__5730__auto___12684 = 0;
while (true) {
if (i__5730__auto___12684 < len__5729__auto___12683) {
args12616.push(arguments[i__5730__auto___12684]);
var G__12685 = i__5730__auto___12684 + 1;
i__5730__auto___12684 = G__12685;
continue;
} else {
}
break;
}
var G__12618 = args12616.length;
switch(G__12618) {
case 1:
return sablono.core.range_field12615.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return sablono.core.range_field12615.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args12616.length)].join(""));;
}
};
sablono.core.range_field12615.cljs$core$IFn$_invoke$arity$1 = function(name__12496__auto__) {
return sablono.core.range_field12615.call(null, name__12496__auto__, null);
};
sablono.core.range_field12615.cljs$core$IFn$_invoke$arity$2 = function(name__12496__auto__, value__12497__auto__) {
return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "range", "range", -1014743483, null))].join(""), name__12496__auto__, value__12497__auto__);
};
sablono.core.range_field12615.cljs$lang$maxFixedArity = 2;
sablono.core.range_field = sablono.core.wrap_attrs.call(null, sablono.core.range_field12615);
sablono.core.search_field12619 = function sablono$core$search_field12619(var_args) {
var args12620 = [];
var len__5729__auto___12687 = arguments.length;
var i__5730__auto___12688 = 0;
while (true) {
if (i__5730__auto___12688 < len__5729__auto___12687) {
args12620.push(arguments[i__5730__auto___12688]);
var G__12689 = i__5730__auto___12688 + 1;
i__5730__auto___12688 = G__12689;
continue;
} else {
}
break;
}
var G__12622 = args12620.length;
switch(G__12622) {
case 1:
return sablono.core.search_field12619.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return sablono.core.search_field12619.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args12620.length)].join(""));;
}
};
sablono.core.search_field12619.cljs$core$IFn$_invoke$arity$1 = function(name__12496__auto__) {
return sablono.core.search_field12619.call(null, name__12496__auto__, null);
};
sablono.core.search_field12619.cljs$core$IFn$_invoke$arity$2 = function(name__12496__auto__, value__12497__auto__) {
return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "search", "search", -1089495947, null))].join(""), name__12496__auto__, value__12497__auto__);
};
sablono.core.search_field12619.cljs$lang$maxFixedArity = 2;
sablono.core.search_field = sablono.core.wrap_attrs.call(null, sablono.core.search_field12619);
sablono.core.tel_field12623 = function sablono$core$tel_field12623(var_args) {
var args12624 = [];
var len__5729__auto___12691 = arguments.length;
var i__5730__auto___12692 = 0;
while (true) {
if (i__5730__auto___12692 < len__5729__auto___12691) {
args12624.push(arguments[i__5730__auto___12692]);
var G__12693 = i__5730__auto___12692 + 1;
i__5730__auto___12692 = G__12693;
continue;
} else {
}
break;
}
var G__12626 = args12624.length;
switch(G__12626) {
case 1:
return sablono.core.tel_field12623.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return sablono.core.tel_field12623.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args12624.length)].join(""));;
}
};
sablono.core.tel_field12623.cljs$core$IFn$_invoke$arity$1 = function(name__12496__auto__) {
return sablono.core.tel_field12623.call(null, name__12496__auto__, null);
};
sablono.core.tel_field12623.cljs$core$IFn$_invoke$arity$2 = function(name__12496__auto__, value__12497__auto__) {
return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "tel", "tel", 1864669686, null))].join(""), name__12496__auto__, value__12497__auto__);
};
sablono.core.tel_field12623.cljs$lang$maxFixedArity = 2;
sablono.core.tel_field = sablono.core.wrap_attrs.call(null, sablono.core.tel_field12623);
sablono.core.text_field12627 = function sablono$core$text_field12627(var_args) {
var args12628 = [];
var len__5729__auto___12695 = arguments.length;
var i__5730__auto___12696 = 0;
while (true) {
if (i__5730__auto___12696 < len__5729__auto___12695) {
args12628.push(arguments[i__5730__auto___12696]);
var G__12697 = i__5730__auto___12696 + 1;
i__5730__auto___12696 = G__12697;
continue;
} else {
}
break;
}
var G__12630 = args12628.length;
switch(G__12630) {
case 1:
return sablono.core.text_field12627.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return sablono.core.text_field12627.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args12628.length)].join(""));;
}
};
sablono.core.text_field12627.cljs$core$IFn$_invoke$arity$1 = function(name__12496__auto__) {
return sablono.core.text_field12627.call(null, name__12496__auto__, null);
};
sablono.core.text_field12627.cljs$core$IFn$_invoke$arity$2 = function(name__12496__auto__, value__12497__auto__) {
return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "text", "text", -150030170, null))].join(""), name__12496__auto__, value__12497__auto__);
};
sablono.core.text_field12627.cljs$lang$maxFixedArity = 2;
sablono.core.text_field = sablono.core.wrap_attrs.call(null, sablono.core.text_field12627);
sablono.core.time_field12631 = function sablono$core$time_field12631(var_args) {
var args12632 = [];
var len__5729__auto___12699 = arguments.length;
var i__5730__auto___12700 = 0;
while (true) {
if (i__5730__auto___12700 < len__5729__auto___12699) {
args12632.push(arguments[i__5730__auto___12700]);
var G__12701 = i__5730__auto___12700 + 1;
i__5730__auto___12700 = G__12701;
continue;
} else {
}
break;
}
var G__12634 = args12632.length;
switch(G__12634) {
case 1:
return sablono.core.time_field12631.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return sablono.core.time_field12631.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args12632.length)].join(""));;
}
};
sablono.core.time_field12631.cljs$core$IFn$_invoke$arity$1 = function(name__12496__auto__) {
return sablono.core.time_field12631.call(null, name__12496__auto__, null);
};
sablono.core.time_field12631.cljs$core$IFn$_invoke$arity$2 = function(name__12496__auto__, value__12497__auto__) {
return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "time", "time", -1268547887, null))].join(""), name__12496__auto__, value__12497__auto__);
};
sablono.core.time_field12631.cljs$lang$maxFixedArity = 2;
sablono.core.time_field = sablono.core.wrap_attrs.call(null, sablono.core.time_field12631);
sablono.core.url_field12635 = function sablono$core$url_field12635(var_args) {
var args12636 = [];
var len__5729__auto___12703 = arguments.length;
var i__5730__auto___12704 = 0;
while (true) {
if (i__5730__auto___12704 < len__5729__auto___12703) {
args12636.push(arguments[i__5730__auto___12704]);
var G__12705 = i__5730__auto___12704 + 1;
i__5730__auto___12704 = G__12705;
continue;
} else {
}
break;
}
var G__12638 = args12636.length;
switch(G__12638) {
case 1:
return sablono.core.url_field12635.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return sablono.core.url_field12635.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args12636.length)].join(""));;
}
};
sablono.core.url_field12635.cljs$core$IFn$_invoke$arity$1 = function(name__12496__auto__) {
return sablono.core.url_field12635.call(null, name__12496__auto__, null);
};
sablono.core.url_field12635.cljs$core$IFn$_invoke$arity$2 = function(name__12496__auto__, value__12497__auto__) {
return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "url", "url", 1916828573, null))].join(""), name__12496__auto__, value__12497__auto__);
};
sablono.core.url_field12635.cljs$lang$maxFixedArity = 2;
sablono.core.url_field = sablono.core.wrap_attrs.call(null, sablono.core.url_field12635);
sablono.core.week_field12639 = function sablono$core$week_field12639(var_args) {
var args12640 = [];
var len__5729__auto___12707 = arguments.length;
var i__5730__auto___12708 = 0;
while (true) {
if (i__5730__auto___12708 < len__5729__auto___12707) {
args12640.push(arguments[i__5730__auto___12708]);
var G__12709 = i__5730__auto___12708 + 1;
i__5730__auto___12708 = G__12709;
continue;
} else {
}
break;
}
var G__12642 = args12640.length;
switch(G__12642) {
case 1:
return sablono.core.week_field12639.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return sablono.core.week_field12639.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args12640.length)].join(""));;
}
};
sablono.core.week_field12639.cljs$core$IFn$_invoke$arity$1 = function(name__12496__auto__) {
return sablono.core.week_field12639.call(null, name__12496__auto__, null);
};
sablono.core.week_field12639.cljs$core$IFn$_invoke$arity$2 = function(name__12496__auto__, value__12497__auto__) {
return sablono.core.input_field_STAR_.call(null, [cljs.core.str(new cljs.core.Symbol(null, "week", "week", 314058249, null))].join(""), name__12496__auto__, value__12497__auto__);
};
sablono.core.week_field12639.cljs$lang$maxFixedArity = 2;
sablono.core.week_field = sablono.core.wrap_attrs.call(null, sablono.core.week_field12639);
sablono.core.file_upload = sablono.core.file_field;
sablono.core.check_box12711 = function sablono$core$check_box12711(var_args) {
var args12712 = [];
var len__5729__auto___12715 = arguments.length;
var i__5730__auto___12716 = 0;
while (true) {
if (i__5730__auto___12716 < len__5729__auto___12715) {
args12712.push(arguments[i__5730__auto___12716]);
var G__12717 = i__5730__auto___12716 + 1;
i__5730__auto___12716 = G__12717;
continue;
} else {
}
break;
}
var G__12714 = args12712.length;
switch(G__12714) {
case 1:
return sablono.core.check_box12711.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return sablono.core.check_box12711.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
case 3:
return sablono.core.check_box12711.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(args12712.length)].join(""));;
}
};
sablono.core.check_box12711.cljs$core$IFn$_invoke$arity$1 = function(name) {
return sablono.core.check_box12711.call(null, name, null);
};
sablono.core.check_box12711.cljs$core$IFn$_invoke$arity$2 = function(name, checked_QMARK_) {
return sablono.core.check_box12711.call(null, name, checked_QMARK_, "true");
};
sablono.core.check_box12711.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_box12711.cljs$lang$maxFixedArity = 3;
sablono.core.check_box = sablono.core.wrap_attrs.call(null, sablono.core.check_box12711);
sablono.core.radio_button12719 = function sablono$core$radio_button12719(var_args) {
var args12720 = [];
var len__5729__auto___12723 = arguments.length;
var i__5730__auto___12724 = 0;
while (true) {
if (i__5730__auto___12724 < len__5729__auto___12723) {
args12720.push(arguments[i__5730__auto___12724]);
var G__12725 = i__5730__auto___12724 + 1;
i__5730__auto___12724 = G__12725;
continue;
} else {
}
break;
}
var G__12722 = args12720.length;
switch(G__12722) {
case 1:
return sablono.core.radio_button12719.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return sablono.core.radio_button12719.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
case 3:
return sablono.core.radio_button12719.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(args12720.length)].join(""));;
}
};
sablono.core.radio_button12719.cljs$core$IFn$_invoke$arity$1 = function(group) {
return sablono.core.radio_button12719.call(null, group, null);
};
sablono.core.radio_button12719.cljs$core$IFn$_invoke$arity$2 = function(group, checked_QMARK_) {
return sablono.core.radio_button12719.call(null, group, checked_QMARK_, "true");
};
sablono.core.radio_button12719.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_button12719.cljs$lang$maxFixedArity = 3;
sablono.core.radio_button = sablono.core.wrap_attrs.call(null, sablono.core.radio_button12719);
sablono.core.hash_key = function sablono$core$hash_key(x) {
return goog.string.hashCode(cljs.core.pr_str.call(null, x));
};
sablono.core.select_options12727 = function sablono$core$select_options12727(coll) {
var iter__5443__auto__ = function sablono$core$select_options12727_$_iter__12736(s__12737) {
return new cljs.core.LazySeq(null, function() {
var s__12737__$1 = s__12737;
while (true) {
var temp__4425__auto__ = cljs.core.seq.call(null, s__12737__$1);
if (temp__4425__auto__) {
var s__12737__$2 = temp__4425__auto__;
if (cljs.core.chunked_seq_QMARK_.call(null, s__12737__$2)) {
var c__5441__auto__ = cljs.core.chunk_first.call(null, s__12737__$2);
var size__5442__auto__ = cljs.core.count.call(null, c__5441__auto__);
var b__12739 = cljs.core.chunk_buffer.call(null, size__5442__auto__);
if (function() {
var i__12738 = 0;
while (true) {
if (i__12738 < size__5442__auto__) {
var x = cljs.core._nth.call(null, c__5441__auto__, i__12738);
cljs.core.chunk_append.call(null, b__12739, cljs.core.sequential_QMARK_.call(null, x) ? function() {
var vec__12742 = x;
var text = cljs.core.nth.call(null, vec__12742, 0, null);
var val = cljs.core.nth.call(null, vec__12742, 1, null);
var disabled_QMARK_ = cljs.core.nth.call(null, vec__12742, 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, 2, [new cljs.core.Keyword(null, "key", "key", -1516042587), sablono.core.hash_key.call(null, text), new cljs.core.Keyword(null, "label", "label", 1718410804), text], null), sablono$core$select_options12727.call(null, val)], 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, "disabled", "disabled", -1529784218), disabled_QMARK___$1, new cljs.core.Keyword(null, "key", "key", -1516042587), sablono.core.hash_key.call(null, val), new cljs.core.Keyword(null, "value", "value", 305978217), val], 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, 2, [new cljs.core.Keyword(null, "key", "key", -1516042587), sablono.core.hash_key.call(null, x), new cljs.core.Keyword(null, "value", "value", 305978217), x], null), x], null));
var G__12744 = i__12738 + 1;
i__12738 = G__12744;
continue;
} else {
return true;
}
break;
}
}()) {
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__12739), sablono$core$select_options12727_$_iter__12736.call(null, cljs.core.chunk_rest.call(null, s__12737__$2)));
} else {
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__12739), null);
}
} else {
var x = cljs.core.first.call(null, s__12737__$2);
return cljs.core.cons.call(null, cljs.core.sequential_QMARK_.call(null, x) ? function() {
var vec__12743 = x;
var text = cljs.core.nth.call(null, vec__12743, 0, null);
var val = cljs.core.nth.call(null, vec__12743, 1, null);
var disabled_QMARK_ = cljs.core.nth.call(null, vec__12743, 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, 2, [new cljs.core.Keyword(null, "key", "key", -1516042587), sablono.core.hash_key.call(null, text), new cljs.core.Keyword(null, "label", "label", 1718410804), text], null), sablono$core$select_options12727.call(null, val)], 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, "disabled", "disabled", -1529784218), disabled_QMARK___$1, new cljs.core.Keyword(null, "key", "key", -1516042587), sablono.core.hash_key.call(null, val), new cljs.core.Keyword(null, "value", "value", 305978217), val], 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, 2, [new cljs.core.Keyword(null, "key", "key", -1516042587), sablono.core.hash_key.call(null, x), new cljs.core.Keyword(null, "value", "value", 305978217), x], null), x], null), sablono$core$select_options12727_$_iter__12736.call(null, cljs.core.rest.call(null, s__12737__$2)));
}
} else {
return null;
}
break;
}
}, null, null);
};
return iter__5443__auto__.call(null, coll);
};
sablono.core.select_options = sablono.core.wrap_attrs.call(null, sablono.core.select_options12727);
sablono.core.drop_down12745 = function sablono$core$drop_down12745(var_args) {
var args12746 = [];
var len__5729__auto___12749 = arguments.length;
var i__5730__auto___12750 = 0;
while (true) {
if (i__5730__auto___12750 < len__5729__auto___12749) {
args12746.push(arguments[i__5730__auto___12750]);
var G__12751 = i__5730__auto___12750 + 1;
i__5730__auto___12750 = G__12751;
continue;
} else {
}
break;
}
var G__12748 = args12746.length;
switch(G__12748) {
case 2:
return sablono.core.drop_down12745.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
case 3:
return sablono.core.drop_down12745.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(args12746.length)].join(""));;
}
};
sablono.core.drop_down12745.cljs$core$IFn$_invoke$arity$2 = function(name, options) {
return sablono.core.drop_down12745.call(null, name, options, null);
};
sablono.core.drop_down12745.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_down12745.cljs$lang$maxFixedArity = 3;
sablono.core.drop_down = sablono.core.wrap_attrs.call(null, sablono.core.drop_down12745);
sablono.core.text_area12753 = function sablono$core$text_area12753(var_args) {
var args12754 = [];
var len__5729__auto___12757 = arguments.length;
var i__5730__auto___12758 = 0;
while (true) {
if (i__5730__auto___12758 < len__5729__auto___12757) {
args12754.push(arguments[i__5730__auto___12758]);
var G__12759 = i__5730__auto___12758 + 1;
i__5730__auto___12758 = G__12759;
continue;
} else {
}
break;
}
var G__12756 = args12754.length;
switch(G__12756) {
case 1:
return sablono.core.text_area12753.cljs$core$IFn$_invoke$arity$1(arguments[0]);
break;
case 2:
return sablono.core.text_area12753.cljs$core$IFn$_invoke$arity$2(arguments[0], arguments[1]);
break;
default:
throw new Error([cljs.core.str("Invalid arity: "), cljs.core.str(args12754.length)].join(""));;
}
};
sablono.core.text_area12753.cljs$core$IFn$_invoke$arity$1 = function(name) {
return sablono.core.text_area12753.call(null, name, null);
};
sablono.core.text_area12753.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_area12753.cljs$lang$maxFixedArity = 2;
sablono.core.text_area = sablono.core.wrap_attrs.call(null, sablono.core.text_area12753);
sablono.core.label12761 = function sablono$core$label12761(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.label12761);
sablono.core.submit_button12762 = function sablono$core$submit_button12762(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_button12762);
sablono.core.reset_button12763 = function sablono$core$reset_button12763(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_button12763);
sablono.core.form_to12764 = function sablono$core$form_to12764(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___12769 = arguments.length;
var i__5730__auto___12770 = 0;
while (true) {
if (i__5730__auto___12770 < len__5729__auto___12769) {
args__5736__auto__.push(arguments[i__5730__auto___12770]);
var G__12771 = i__5730__auto___12770 + 1;
i__5730__auto___12770 = G__12771;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return sablono.core.form_to12764.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
sablono.core.form_to12764.cljs$core$IFn$_invoke$arity$variadic = function(p__12767, body) {
var vec__12768 = p__12767;
var method = cljs.core.nth.call(null, vec__12768, 0, null);
var action = cljs.core.nth.call(null, vec__12768, 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,
new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "key", "key", -1516042587), 3735928559], null), "_method", method_str)], null), body));
};
sablono.core.form_to12764.cljs$lang$maxFixedArity = 1;
sablono.core.form_to12764.cljs$lang$applyTo = function(seq12765) {
var G__12766 = cljs.core.first.call(null, seq12765);
var seq12765__$1 = cljs.core.next.call(null, seq12765);
return sablono.core.form_to12764.cljs$core$IFn$_invoke$arity$variadic(G__12766, seq12765__$1);
};
sablono.core.form_to = sablono.core.wrap_attrs.call(null, sablono.core.form_to12764);
goog.provide("om.dom");
goog.require("cljs.core");
goog.require("goog.object");
om.dom.a = function om$dom$a(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10570 = arguments.length;
var i__5730__auto___10571 = 0;
while (true) {
if (i__5730__auto___10571 < len__5729__auto___10570) {
args__5736__auto__.push(arguments[i__5730__auto___10571]);
var G__10572 = i__5730__auto___10571 + 1;
i__5730__auto___10571 = G__10572;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.a.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.a.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.a.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.a.cljs$lang$maxFixedArity = 1;
om.dom.a.cljs$lang$applyTo = function(seq10326) {
var G__10327 = cljs.core.first.call(null, seq10326);
var seq10326__$1 = cljs.core.next.call(null, seq10326);
return om.dom.a.cljs$core$IFn$_invoke$arity$variadic(G__10327, seq10326__$1);
};
om.dom.abbr = function om$dom$abbr(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10573 = arguments.length;
var i__5730__auto___10574 = 0;
while (true) {
if (i__5730__auto___10574 < len__5729__auto___10573) {
args__5736__auto__.push(arguments[i__5730__auto___10574]);
var G__10575 = i__5730__auto___10574 + 1;
i__5730__auto___10574 = G__10575;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.abbr.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.abbr.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.abbr.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.abbr.cljs$lang$maxFixedArity = 1;
om.dom.abbr.cljs$lang$applyTo = function(seq10328) {
var G__10329 = cljs.core.first.call(null, seq10328);
var seq10328__$1 = cljs.core.next.call(null, seq10328);
return om.dom.abbr.cljs$core$IFn$_invoke$arity$variadic(G__10329, seq10328__$1);
};
om.dom.address = function om$dom$address(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10576 = arguments.length;
var i__5730__auto___10577 = 0;
while (true) {
if (i__5730__auto___10577 < len__5729__auto___10576) {
args__5736__auto__.push(arguments[i__5730__auto___10577]);
var G__10578 = i__5730__auto___10577 + 1;
i__5730__auto___10577 = G__10578;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.address.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.address.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.address.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.address.cljs$lang$maxFixedArity = 1;
om.dom.address.cljs$lang$applyTo = function(seq10330) {
var G__10331 = cljs.core.first.call(null, seq10330);
var seq10330__$1 = cljs.core.next.call(null, seq10330);
return om.dom.address.cljs$core$IFn$_invoke$arity$variadic(G__10331, seq10330__$1);
};
om.dom.area = function om$dom$area(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10579 = arguments.length;
var i__5730__auto___10580 = 0;
while (true) {
if (i__5730__auto___10580 < len__5729__auto___10579) {
args__5736__auto__.push(arguments[i__5730__auto___10580]);
var G__10581 = i__5730__auto___10580 + 1;
i__5730__auto___10580 = G__10581;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.area.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.area.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.area.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.area.cljs$lang$maxFixedArity = 1;
om.dom.area.cljs$lang$applyTo = function(seq10332) {
var G__10333 = cljs.core.first.call(null, seq10332);
var seq10332__$1 = cljs.core.next.call(null, seq10332);
return om.dom.area.cljs$core$IFn$_invoke$arity$variadic(G__10333, seq10332__$1);
};
om.dom.article = function om$dom$article(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10582 = arguments.length;
var i__5730__auto___10583 = 0;
while (true) {
if (i__5730__auto___10583 < len__5729__auto___10582) {
args__5736__auto__.push(arguments[i__5730__auto___10583]);
var G__10584 = i__5730__auto___10583 + 1;
i__5730__auto___10583 = G__10584;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.article.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.article.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.article.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.article.cljs$lang$maxFixedArity = 1;
om.dom.article.cljs$lang$applyTo = function(seq10334) {
var G__10335 = cljs.core.first.call(null, seq10334);
var seq10334__$1 = cljs.core.next.call(null, seq10334);
return om.dom.article.cljs$core$IFn$_invoke$arity$variadic(G__10335, seq10334__$1);
};
om.dom.aside = function om$dom$aside(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10585 = arguments.length;
var i__5730__auto___10586 = 0;
while (true) {
if (i__5730__auto___10586 < len__5729__auto___10585) {
args__5736__auto__.push(arguments[i__5730__auto___10586]);
var G__10587 = i__5730__auto___10586 + 1;
i__5730__auto___10586 = G__10587;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.aside.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.aside.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.aside.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.aside.cljs$lang$maxFixedArity = 1;
om.dom.aside.cljs$lang$applyTo = function(seq10336) {
var G__10337 = cljs.core.first.call(null, seq10336);
var seq10336__$1 = cljs.core.next.call(null, seq10336);
return om.dom.aside.cljs$core$IFn$_invoke$arity$variadic(G__10337, seq10336__$1);
};
om.dom.audio = function om$dom$audio(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10588 = arguments.length;
var i__5730__auto___10589 = 0;
while (true) {
if (i__5730__auto___10589 < len__5729__auto___10588) {
args__5736__auto__.push(arguments[i__5730__auto___10589]);
var G__10590 = i__5730__auto___10589 + 1;
i__5730__auto___10589 = G__10590;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.audio.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.audio.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.audio.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.audio.cljs$lang$maxFixedArity = 1;
om.dom.audio.cljs$lang$applyTo = function(seq10338) {
var G__10339 = cljs.core.first.call(null, seq10338);
var seq10338__$1 = cljs.core.next.call(null, seq10338);
return om.dom.audio.cljs$core$IFn$_invoke$arity$variadic(G__10339, seq10338__$1);
};
om.dom.b = function om$dom$b(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10591 = arguments.length;
var i__5730__auto___10592 = 0;
while (true) {
if (i__5730__auto___10592 < len__5729__auto___10591) {
args__5736__auto__.push(arguments[i__5730__auto___10592]);
var G__10593 = i__5730__auto___10592 + 1;
i__5730__auto___10592 = G__10593;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.b.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.b.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.b.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.b.cljs$lang$maxFixedArity = 1;
om.dom.b.cljs$lang$applyTo = function(seq10340) {
var G__10341 = cljs.core.first.call(null, seq10340);
var seq10340__$1 = cljs.core.next.call(null, seq10340);
return om.dom.b.cljs$core$IFn$_invoke$arity$variadic(G__10341, seq10340__$1);
};
om.dom.base = function om$dom$base(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10594 = arguments.length;
var i__5730__auto___10595 = 0;
while (true) {
if (i__5730__auto___10595 < len__5729__auto___10594) {
args__5736__auto__.push(arguments[i__5730__auto___10595]);
var G__10596 = i__5730__auto___10595 + 1;
i__5730__auto___10595 = G__10596;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.base.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.base.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.base.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.base.cljs$lang$maxFixedArity = 1;
om.dom.base.cljs$lang$applyTo = function(seq10342) {
var G__10343 = cljs.core.first.call(null, seq10342);
var seq10342__$1 = cljs.core.next.call(null, seq10342);
return om.dom.base.cljs$core$IFn$_invoke$arity$variadic(G__10343, seq10342__$1);
};
om.dom.bdi = function om$dom$bdi(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10597 = arguments.length;
var i__5730__auto___10598 = 0;
while (true) {
if (i__5730__auto___10598 < len__5729__auto___10597) {
args__5736__auto__.push(arguments[i__5730__auto___10598]);
var G__10599 = i__5730__auto___10598 + 1;
i__5730__auto___10598 = G__10599;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.bdi.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.bdi.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.bdi.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.bdi.cljs$lang$maxFixedArity = 1;
om.dom.bdi.cljs$lang$applyTo = function(seq10344) {
var G__10345 = cljs.core.first.call(null, seq10344);
var seq10344__$1 = cljs.core.next.call(null, seq10344);
return om.dom.bdi.cljs$core$IFn$_invoke$arity$variadic(G__10345, seq10344__$1);
};
om.dom.bdo = function om$dom$bdo(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10600 = arguments.length;
var i__5730__auto___10601 = 0;
while (true) {
if (i__5730__auto___10601 < len__5729__auto___10600) {
args__5736__auto__.push(arguments[i__5730__auto___10601]);
var G__10602 = i__5730__auto___10601 + 1;
i__5730__auto___10601 = G__10602;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.bdo.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.bdo.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.bdo.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.bdo.cljs$lang$maxFixedArity = 1;
om.dom.bdo.cljs$lang$applyTo = function(seq10346) {
var G__10347 = cljs.core.first.call(null, seq10346);
var seq10346__$1 = cljs.core.next.call(null, seq10346);
return om.dom.bdo.cljs$core$IFn$_invoke$arity$variadic(G__10347, seq10346__$1);
};
om.dom.big = function om$dom$big(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10603 = arguments.length;
var i__5730__auto___10604 = 0;
while (true) {
if (i__5730__auto___10604 < len__5729__auto___10603) {
args__5736__auto__.push(arguments[i__5730__auto___10604]);
var G__10605 = i__5730__auto___10604 + 1;
i__5730__auto___10604 = G__10605;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.big.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.big.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.big.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.big.cljs$lang$maxFixedArity = 1;
om.dom.big.cljs$lang$applyTo = function(seq10348) {
var G__10349 = cljs.core.first.call(null, seq10348);
var seq10348__$1 = cljs.core.next.call(null, seq10348);
return om.dom.big.cljs$core$IFn$_invoke$arity$variadic(G__10349, seq10348__$1);
};
om.dom.blockquote = function om$dom$blockquote(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10606 = arguments.length;
var i__5730__auto___10607 = 0;
while (true) {
if (i__5730__auto___10607 < len__5729__auto___10606) {
args__5736__auto__.push(arguments[i__5730__auto___10607]);
var G__10608 = i__5730__auto___10607 + 1;
i__5730__auto___10607 = G__10608;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.blockquote.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.blockquote.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.blockquote.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.blockquote.cljs$lang$maxFixedArity = 1;
om.dom.blockquote.cljs$lang$applyTo = function(seq10350) {
var G__10351 = cljs.core.first.call(null, seq10350);
var seq10350__$1 = cljs.core.next.call(null, seq10350);
return om.dom.blockquote.cljs$core$IFn$_invoke$arity$variadic(G__10351, seq10350__$1);
};
om.dom.body = function om$dom$body(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10609 = arguments.length;
var i__5730__auto___10610 = 0;
while (true) {
if (i__5730__auto___10610 < len__5729__auto___10609) {
args__5736__auto__.push(arguments[i__5730__auto___10610]);
var G__10611 = i__5730__auto___10610 + 1;
i__5730__auto___10610 = G__10611;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.body.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.body.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.body.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.body.cljs$lang$maxFixedArity = 1;
om.dom.body.cljs$lang$applyTo = function(seq10352) {
var G__10353 = cljs.core.first.call(null, seq10352);
var seq10352__$1 = cljs.core.next.call(null, seq10352);
return om.dom.body.cljs$core$IFn$_invoke$arity$variadic(G__10353, seq10352__$1);
};
om.dom.br = function om$dom$br(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10612 = arguments.length;
var i__5730__auto___10613 = 0;
while (true) {
if (i__5730__auto___10613 < len__5729__auto___10612) {
args__5736__auto__.push(arguments[i__5730__auto___10613]);
var G__10614 = i__5730__auto___10613 + 1;
i__5730__auto___10613 = G__10614;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.br.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.br.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.br.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.br.cljs$lang$maxFixedArity = 1;
om.dom.br.cljs$lang$applyTo = function(seq10354) {
var G__10355 = cljs.core.first.call(null, seq10354);
var seq10354__$1 = cljs.core.next.call(null, seq10354);
return om.dom.br.cljs$core$IFn$_invoke$arity$variadic(G__10355, seq10354__$1);
};
om.dom.button = function om$dom$button(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10615 = arguments.length;
var i__5730__auto___10616 = 0;
while (true) {
if (i__5730__auto___10616 < len__5729__auto___10615) {
args__5736__auto__.push(arguments[i__5730__auto___10616]);
var G__10617 = i__5730__auto___10616 + 1;
i__5730__auto___10616 = G__10617;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.button.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.button.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.button.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.button.cljs$lang$maxFixedArity = 1;
om.dom.button.cljs$lang$applyTo = function(seq10356) {
var G__10357 = cljs.core.first.call(null, seq10356);
var seq10356__$1 = cljs.core.next.call(null, seq10356);
return om.dom.button.cljs$core$IFn$_invoke$arity$variadic(G__10357, seq10356__$1);
};
om.dom.canvas = function om$dom$canvas(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10618 = arguments.length;
var i__5730__auto___10619 = 0;
while (true) {
if (i__5730__auto___10619 < len__5729__auto___10618) {
args__5736__auto__.push(arguments[i__5730__auto___10619]);
var G__10620 = i__5730__auto___10619 + 1;
i__5730__auto___10619 = G__10620;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.canvas.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.canvas.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.canvas.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.canvas.cljs$lang$maxFixedArity = 1;
om.dom.canvas.cljs$lang$applyTo = function(seq10358) {
var G__10359 = cljs.core.first.call(null, seq10358);
var seq10358__$1 = cljs.core.next.call(null, seq10358);
return om.dom.canvas.cljs$core$IFn$_invoke$arity$variadic(G__10359, seq10358__$1);
};
om.dom.caption = function om$dom$caption(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10621 = arguments.length;
var i__5730__auto___10622 = 0;
while (true) {
if (i__5730__auto___10622 < len__5729__auto___10621) {
args__5736__auto__.push(arguments[i__5730__auto___10622]);
var G__10623 = i__5730__auto___10622 + 1;
i__5730__auto___10622 = G__10623;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.caption.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.caption.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.caption.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.caption.cljs$lang$maxFixedArity = 1;
om.dom.caption.cljs$lang$applyTo = function(seq10360) {
var G__10361 = cljs.core.first.call(null, seq10360);
var seq10360__$1 = cljs.core.next.call(null, seq10360);
return om.dom.caption.cljs$core$IFn$_invoke$arity$variadic(G__10361, seq10360__$1);
};
om.dom.cite = function om$dom$cite(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10624 = arguments.length;
var i__5730__auto___10625 = 0;
while (true) {
if (i__5730__auto___10625 < len__5729__auto___10624) {
args__5736__auto__.push(arguments[i__5730__auto___10625]);
var G__10626 = i__5730__auto___10625 + 1;
i__5730__auto___10625 = G__10626;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.cite.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.cite.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.cite.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.cite.cljs$lang$maxFixedArity = 1;
om.dom.cite.cljs$lang$applyTo = function(seq10362) {
var G__10363 = cljs.core.first.call(null, seq10362);
var seq10362__$1 = cljs.core.next.call(null, seq10362);
return om.dom.cite.cljs$core$IFn$_invoke$arity$variadic(G__10363, seq10362__$1);
};
om.dom.code = function om$dom$code(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10627 = arguments.length;
var i__5730__auto___10628 = 0;
while (true) {
if (i__5730__auto___10628 < len__5729__auto___10627) {
args__5736__auto__.push(arguments[i__5730__auto___10628]);
var G__10629 = i__5730__auto___10628 + 1;
i__5730__auto___10628 = G__10629;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.code.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.code.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.code.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.code.cljs$lang$maxFixedArity = 1;
om.dom.code.cljs$lang$applyTo = function(seq10364) {
var G__10365 = cljs.core.first.call(null, seq10364);
var seq10364__$1 = cljs.core.next.call(null, seq10364);
return om.dom.code.cljs$core$IFn$_invoke$arity$variadic(G__10365, seq10364__$1);
};
om.dom.col = function om$dom$col(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10630 = arguments.length;
var i__5730__auto___10631 = 0;
while (true) {
if (i__5730__auto___10631 < len__5729__auto___10630) {
args__5736__auto__.push(arguments[i__5730__auto___10631]);
var G__10632 = i__5730__auto___10631 + 1;
i__5730__auto___10631 = G__10632;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.col.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.col.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.col.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.col.cljs$lang$maxFixedArity = 1;
om.dom.col.cljs$lang$applyTo = function(seq10366) {
var G__10367 = cljs.core.first.call(null, seq10366);
var seq10366__$1 = cljs.core.next.call(null, seq10366);
return om.dom.col.cljs$core$IFn$_invoke$arity$variadic(G__10367, seq10366__$1);
};
om.dom.colgroup = function om$dom$colgroup(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10633 = arguments.length;
var i__5730__auto___10634 = 0;
while (true) {
if (i__5730__auto___10634 < len__5729__auto___10633) {
args__5736__auto__.push(arguments[i__5730__auto___10634]);
var G__10635 = i__5730__auto___10634 + 1;
i__5730__auto___10634 = G__10635;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.colgroup.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.colgroup.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.colgroup.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.colgroup.cljs$lang$maxFixedArity = 1;
om.dom.colgroup.cljs$lang$applyTo = function(seq10368) {
var G__10369 = cljs.core.first.call(null, seq10368);
var seq10368__$1 = cljs.core.next.call(null, seq10368);
return om.dom.colgroup.cljs$core$IFn$_invoke$arity$variadic(G__10369, seq10368__$1);
};
om.dom.data = function om$dom$data(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10636 = arguments.length;
var i__5730__auto___10637 = 0;
while (true) {
if (i__5730__auto___10637 < len__5729__auto___10636) {
args__5736__auto__.push(arguments[i__5730__auto___10637]);
var G__10638 = i__5730__auto___10637 + 1;
i__5730__auto___10637 = G__10638;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.data.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.data.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.data.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.data.cljs$lang$maxFixedArity = 1;
om.dom.data.cljs$lang$applyTo = function(seq10370) {
var G__10371 = cljs.core.first.call(null, seq10370);
var seq10370__$1 = cljs.core.next.call(null, seq10370);
return om.dom.data.cljs$core$IFn$_invoke$arity$variadic(G__10371, seq10370__$1);
};
om.dom.datalist = function om$dom$datalist(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10639 = arguments.length;
var i__5730__auto___10640 = 0;
while (true) {
if (i__5730__auto___10640 < len__5729__auto___10639) {
args__5736__auto__.push(arguments[i__5730__auto___10640]);
var G__10641 = i__5730__auto___10640 + 1;
i__5730__auto___10640 = G__10641;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.datalist.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.datalist.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.datalist.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.datalist.cljs$lang$maxFixedArity = 1;
om.dom.datalist.cljs$lang$applyTo = function(seq10372) {
var G__10373 = cljs.core.first.call(null, seq10372);
var seq10372__$1 = cljs.core.next.call(null, seq10372);
return om.dom.datalist.cljs$core$IFn$_invoke$arity$variadic(G__10373, seq10372__$1);
};
om.dom.dd = function om$dom$dd(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10642 = arguments.length;
var i__5730__auto___10643 = 0;
while (true) {
if (i__5730__auto___10643 < len__5729__auto___10642) {
args__5736__auto__.push(arguments[i__5730__auto___10643]);
var G__10644 = i__5730__auto___10643 + 1;
i__5730__auto___10643 = G__10644;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.dd.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.dd.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.dd.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.dd.cljs$lang$maxFixedArity = 1;
om.dom.dd.cljs$lang$applyTo = function(seq10374) {
var G__10375 = cljs.core.first.call(null, seq10374);
var seq10374__$1 = cljs.core.next.call(null, seq10374);
return om.dom.dd.cljs$core$IFn$_invoke$arity$variadic(G__10375, seq10374__$1);
};
om.dom.del = function om$dom$del(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10645 = arguments.length;
var i__5730__auto___10646 = 0;
while (true) {
if (i__5730__auto___10646 < len__5729__auto___10645) {
args__5736__auto__.push(arguments[i__5730__auto___10646]);
var G__10647 = i__5730__auto___10646 + 1;
i__5730__auto___10646 = G__10647;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.del.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.del.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.del.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.del.cljs$lang$maxFixedArity = 1;
om.dom.del.cljs$lang$applyTo = function(seq10376) {
var G__10377 = cljs.core.first.call(null, seq10376);
var seq10376__$1 = cljs.core.next.call(null, seq10376);
return om.dom.del.cljs$core$IFn$_invoke$arity$variadic(G__10377, seq10376__$1);
};
om.dom.dfn = function om$dom$dfn(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10648 = arguments.length;
var i__5730__auto___10649 = 0;
while (true) {
if (i__5730__auto___10649 < len__5729__auto___10648) {
args__5736__auto__.push(arguments[i__5730__auto___10649]);
var G__10650 = i__5730__auto___10649 + 1;
i__5730__auto___10649 = G__10650;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.dfn.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.dfn.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.dfn.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.dfn.cljs$lang$maxFixedArity = 1;
om.dom.dfn.cljs$lang$applyTo = function(seq10378) {
var G__10379 = cljs.core.first.call(null, seq10378);
var seq10378__$1 = cljs.core.next.call(null, seq10378);
return om.dom.dfn.cljs$core$IFn$_invoke$arity$variadic(G__10379, seq10378__$1);
};
om.dom.div = function om$dom$div(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10651 = arguments.length;
var i__5730__auto___10652 = 0;
while (true) {
if (i__5730__auto___10652 < len__5729__auto___10651) {
args__5736__auto__.push(arguments[i__5730__auto___10652]);
var G__10653 = i__5730__auto___10652 + 1;
i__5730__auto___10652 = G__10653;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.div.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.div.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.div.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.div.cljs$lang$maxFixedArity = 1;
om.dom.div.cljs$lang$applyTo = function(seq10380) {
var G__10381 = cljs.core.first.call(null, seq10380);
var seq10380__$1 = cljs.core.next.call(null, seq10380);
return om.dom.div.cljs$core$IFn$_invoke$arity$variadic(G__10381, seq10380__$1);
};
om.dom.dl = function om$dom$dl(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10654 = arguments.length;
var i__5730__auto___10655 = 0;
while (true) {
if (i__5730__auto___10655 < len__5729__auto___10654) {
args__5736__auto__.push(arguments[i__5730__auto___10655]);
var G__10656 = i__5730__auto___10655 + 1;
i__5730__auto___10655 = G__10656;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.dl.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.dl.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.dl.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.dl.cljs$lang$maxFixedArity = 1;
om.dom.dl.cljs$lang$applyTo = function(seq10382) {
var G__10383 = cljs.core.first.call(null, seq10382);
var seq10382__$1 = cljs.core.next.call(null, seq10382);
return om.dom.dl.cljs$core$IFn$_invoke$arity$variadic(G__10383, seq10382__$1);
};
om.dom.dt = function om$dom$dt(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10657 = arguments.length;
var i__5730__auto___10658 = 0;
while (true) {
if (i__5730__auto___10658 < len__5729__auto___10657) {
args__5736__auto__.push(arguments[i__5730__auto___10658]);
var G__10659 = i__5730__auto___10658 + 1;
i__5730__auto___10658 = G__10659;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.dt.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.dt.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.dt.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.dt.cljs$lang$maxFixedArity = 1;
om.dom.dt.cljs$lang$applyTo = function(seq10384) {
var G__10385 = cljs.core.first.call(null, seq10384);
var seq10384__$1 = cljs.core.next.call(null, seq10384);
return om.dom.dt.cljs$core$IFn$_invoke$arity$variadic(G__10385, seq10384__$1);
};
om.dom.em = function om$dom$em(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10660 = arguments.length;
var i__5730__auto___10661 = 0;
while (true) {
if (i__5730__auto___10661 < len__5729__auto___10660) {
args__5736__auto__.push(arguments[i__5730__auto___10661]);
var G__10662 = i__5730__auto___10661 + 1;
i__5730__auto___10661 = G__10662;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.em.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.em.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.em.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.em.cljs$lang$maxFixedArity = 1;
om.dom.em.cljs$lang$applyTo = function(seq10386) {
var G__10387 = cljs.core.first.call(null, seq10386);
var seq10386__$1 = cljs.core.next.call(null, seq10386);
return om.dom.em.cljs$core$IFn$_invoke$arity$variadic(G__10387, seq10386__$1);
};
om.dom.embed = function om$dom$embed(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10663 = arguments.length;
var i__5730__auto___10664 = 0;
while (true) {
if (i__5730__auto___10664 < len__5729__auto___10663) {
args__5736__auto__.push(arguments[i__5730__auto___10664]);
var G__10665 = i__5730__auto___10664 + 1;
i__5730__auto___10664 = G__10665;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.embed.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.embed.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.embed.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.embed.cljs$lang$maxFixedArity = 1;
om.dom.embed.cljs$lang$applyTo = function(seq10388) {
var G__10389 = cljs.core.first.call(null, seq10388);
var seq10388__$1 = cljs.core.next.call(null, seq10388);
return om.dom.embed.cljs$core$IFn$_invoke$arity$variadic(G__10389, seq10388__$1);
};
om.dom.fieldset = function om$dom$fieldset(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10666 = arguments.length;
var i__5730__auto___10667 = 0;
while (true) {
if (i__5730__auto___10667 < len__5729__auto___10666) {
args__5736__auto__.push(arguments[i__5730__auto___10667]);
var G__10668 = i__5730__auto___10667 + 1;
i__5730__auto___10667 = G__10668;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.fieldset.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.fieldset.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.fieldset.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.fieldset.cljs$lang$maxFixedArity = 1;
om.dom.fieldset.cljs$lang$applyTo = function(seq10392) {
var G__10393 = cljs.core.first.call(null, seq10392);
var seq10392__$1 = cljs.core.next.call(null, seq10392);
return om.dom.fieldset.cljs$core$IFn$_invoke$arity$variadic(G__10393, seq10392__$1);
};
om.dom.figcaption = function om$dom$figcaption(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10669 = arguments.length;
var i__5730__auto___10670 = 0;
while (true) {
if (i__5730__auto___10670 < len__5729__auto___10669) {
args__5736__auto__.push(arguments[i__5730__auto___10670]);
var G__10671 = i__5730__auto___10670 + 1;
i__5730__auto___10670 = G__10671;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.figcaption.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.figcaption.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.figcaption.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.figcaption.cljs$lang$maxFixedArity = 1;
om.dom.figcaption.cljs$lang$applyTo = function(seq10394) {
var G__10395 = cljs.core.first.call(null, seq10394);
var seq10394__$1 = cljs.core.next.call(null, seq10394);
return om.dom.figcaption.cljs$core$IFn$_invoke$arity$variadic(G__10395, seq10394__$1);
};
om.dom.figure = function om$dom$figure(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10672 = arguments.length;
var i__5730__auto___10673 = 0;
while (true) {
if (i__5730__auto___10673 < len__5729__auto___10672) {
args__5736__auto__.push(arguments[i__5730__auto___10673]);
var G__10674 = i__5730__auto___10673 + 1;
i__5730__auto___10673 = G__10674;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.figure.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.figure.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.figure.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.figure.cljs$lang$maxFixedArity = 1;
om.dom.figure.cljs$lang$applyTo = function(seq10396) {
var G__10397 = cljs.core.first.call(null, seq10396);
var seq10396__$1 = cljs.core.next.call(null, seq10396);
return om.dom.figure.cljs$core$IFn$_invoke$arity$variadic(G__10397, seq10396__$1);
};
om.dom.footer = function om$dom$footer(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10675 = arguments.length;
var i__5730__auto___10676 = 0;
while (true) {
if (i__5730__auto___10676 < len__5729__auto___10675) {
args__5736__auto__.push(arguments[i__5730__auto___10676]);
var G__10677 = i__5730__auto___10676 + 1;
i__5730__auto___10676 = G__10677;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.footer.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.footer.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.footer.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.footer.cljs$lang$maxFixedArity = 1;
om.dom.footer.cljs$lang$applyTo = function(seq10398) {
var G__10399 = cljs.core.first.call(null, seq10398);
var seq10398__$1 = cljs.core.next.call(null, seq10398);
return om.dom.footer.cljs$core$IFn$_invoke$arity$variadic(G__10399, seq10398__$1);
};
om.dom.form = function om$dom$form(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10678 = arguments.length;
var i__5730__auto___10679 = 0;
while (true) {
if (i__5730__auto___10679 < len__5729__auto___10678) {
args__5736__auto__.push(arguments[i__5730__auto___10679]);
var G__10680 = i__5730__auto___10679 + 1;
i__5730__auto___10679 = G__10680;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.form.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.form.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.form.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.form.cljs$lang$maxFixedArity = 1;
om.dom.form.cljs$lang$applyTo = function(seq10400) {
var G__10401 = cljs.core.first.call(null, seq10400);
var seq10400__$1 = cljs.core.next.call(null, seq10400);
return om.dom.form.cljs$core$IFn$_invoke$arity$variadic(G__10401, seq10400__$1);
};
om.dom.h1 = function om$dom$h1(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10681 = arguments.length;
var i__5730__auto___10682 = 0;
while (true) {
if (i__5730__auto___10682 < len__5729__auto___10681) {
args__5736__auto__.push(arguments[i__5730__auto___10682]);
var G__10683 = i__5730__auto___10682 + 1;
i__5730__auto___10682 = G__10683;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.h1.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.h1.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.h1.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.h1.cljs$lang$maxFixedArity = 1;
om.dom.h1.cljs$lang$applyTo = function(seq10402) {
var G__10403 = cljs.core.first.call(null, seq10402);
var seq10402__$1 = cljs.core.next.call(null, seq10402);
return om.dom.h1.cljs$core$IFn$_invoke$arity$variadic(G__10403, seq10402__$1);
};
om.dom.h2 = function om$dom$h2(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10684 = arguments.length;
var i__5730__auto___10685 = 0;
while (true) {
if (i__5730__auto___10685 < len__5729__auto___10684) {
args__5736__auto__.push(arguments[i__5730__auto___10685]);
var G__10686 = i__5730__auto___10685 + 1;
i__5730__auto___10685 = G__10686;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.h2.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.h2.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.h2.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.h2.cljs$lang$maxFixedArity = 1;
om.dom.h2.cljs$lang$applyTo = function(seq10404) {
var G__10405 = cljs.core.first.call(null, seq10404);
var seq10404__$1 = cljs.core.next.call(null, seq10404);
return om.dom.h2.cljs$core$IFn$_invoke$arity$variadic(G__10405, seq10404__$1);
};
om.dom.h3 = function om$dom$h3(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10687 = arguments.length;
var i__5730__auto___10688 = 0;
while (true) {
if (i__5730__auto___10688 < len__5729__auto___10687) {
args__5736__auto__.push(arguments[i__5730__auto___10688]);
var G__10689 = i__5730__auto___10688 + 1;
i__5730__auto___10688 = G__10689;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.h3.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.h3.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.h3.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.h3.cljs$lang$maxFixedArity = 1;
om.dom.h3.cljs$lang$applyTo = function(seq10406) {
var G__10407 = cljs.core.first.call(null, seq10406);
var seq10406__$1 = cljs.core.next.call(null, seq10406);
return om.dom.h3.cljs$core$IFn$_invoke$arity$variadic(G__10407, seq10406__$1);
};
om.dom.h4 = function om$dom$h4(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10690 = arguments.length;
var i__5730__auto___10691 = 0;
while (true) {
if (i__5730__auto___10691 < len__5729__auto___10690) {
args__5736__auto__.push(arguments[i__5730__auto___10691]);
var G__10692 = i__5730__auto___10691 + 1;
i__5730__auto___10691 = G__10692;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.h4.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.h4.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.h4.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.h4.cljs$lang$maxFixedArity = 1;
om.dom.h4.cljs$lang$applyTo = function(seq10408) {
var G__10409 = cljs.core.first.call(null, seq10408);
var seq10408__$1 = cljs.core.next.call(null, seq10408);
return om.dom.h4.cljs$core$IFn$_invoke$arity$variadic(G__10409, seq10408__$1);
};
om.dom.h5 = function om$dom$h5(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10693 = arguments.length;
var i__5730__auto___10694 = 0;
while (true) {
if (i__5730__auto___10694 < len__5729__auto___10693) {
args__5736__auto__.push(arguments[i__5730__auto___10694]);
var G__10695 = i__5730__auto___10694 + 1;
i__5730__auto___10694 = G__10695;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.h5.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.h5.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.h5.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.h5.cljs$lang$maxFixedArity = 1;
om.dom.h5.cljs$lang$applyTo = function(seq10410) {
var G__10411 = cljs.core.first.call(null, seq10410);
var seq10410__$1 = cljs.core.next.call(null, seq10410);
return om.dom.h5.cljs$core$IFn$_invoke$arity$variadic(G__10411, seq10410__$1);
};
om.dom.h6 = function om$dom$h6(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10696 = arguments.length;
var i__5730__auto___10697 = 0;
while (true) {
if (i__5730__auto___10697 < len__5729__auto___10696) {
args__5736__auto__.push(arguments[i__5730__auto___10697]);
var G__10698 = i__5730__auto___10697 + 1;
i__5730__auto___10697 = G__10698;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.h6.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.h6.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.h6.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.h6.cljs$lang$maxFixedArity = 1;
om.dom.h6.cljs$lang$applyTo = function(seq10412) {
var G__10413 = cljs.core.first.call(null, seq10412);
var seq10412__$1 = cljs.core.next.call(null, seq10412);
return om.dom.h6.cljs$core$IFn$_invoke$arity$variadic(G__10413, seq10412__$1);
};
om.dom.head = function om$dom$head(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10699 = arguments.length;
var i__5730__auto___10700 = 0;
while (true) {
if (i__5730__auto___10700 < len__5729__auto___10699) {
args__5736__auto__.push(arguments[i__5730__auto___10700]);
var G__10701 = i__5730__auto___10700 + 1;
i__5730__auto___10700 = G__10701;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.head.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.head.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.head.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.head.cljs$lang$maxFixedArity = 1;
om.dom.head.cljs$lang$applyTo = function(seq10414) {
var G__10415 = cljs.core.first.call(null, seq10414);
var seq10414__$1 = cljs.core.next.call(null, seq10414);
return om.dom.head.cljs$core$IFn$_invoke$arity$variadic(G__10415, seq10414__$1);
};
om.dom.header = function om$dom$header(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10702 = arguments.length;
var i__5730__auto___10703 = 0;
while (true) {
if (i__5730__auto___10703 < len__5729__auto___10702) {
args__5736__auto__.push(arguments[i__5730__auto___10703]);
var G__10704 = i__5730__auto___10703 + 1;
i__5730__auto___10703 = G__10704;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.header.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.header.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.header.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.header.cljs$lang$maxFixedArity = 1;
om.dom.header.cljs$lang$applyTo = function(seq10416) {
var G__10417 = cljs.core.first.call(null, seq10416);
var seq10416__$1 = cljs.core.next.call(null, seq10416);
return om.dom.header.cljs$core$IFn$_invoke$arity$variadic(G__10417, seq10416__$1);
};
om.dom.hr = function om$dom$hr(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10705 = arguments.length;
var i__5730__auto___10706 = 0;
while (true) {
if (i__5730__auto___10706 < len__5729__auto___10705) {
args__5736__auto__.push(arguments[i__5730__auto___10706]);
var G__10707 = i__5730__auto___10706 + 1;
i__5730__auto___10706 = G__10707;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.hr.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.hr.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.hr.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.hr.cljs$lang$maxFixedArity = 1;
om.dom.hr.cljs$lang$applyTo = function(seq10418) {
var G__10419 = cljs.core.first.call(null, seq10418);
var seq10418__$1 = cljs.core.next.call(null, seq10418);
return om.dom.hr.cljs$core$IFn$_invoke$arity$variadic(G__10419, seq10418__$1);
};
om.dom.html = function om$dom$html(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10708 = arguments.length;
var i__5730__auto___10709 = 0;
while (true) {
if (i__5730__auto___10709 < len__5729__auto___10708) {
args__5736__auto__.push(arguments[i__5730__auto___10709]);
var G__10710 = i__5730__auto___10709 + 1;
i__5730__auto___10709 = G__10710;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.html.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.html.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.html.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.html.cljs$lang$maxFixedArity = 1;
om.dom.html.cljs$lang$applyTo = function(seq10420) {
var G__10421 = cljs.core.first.call(null, seq10420);
var seq10420__$1 = cljs.core.next.call(null, seq10420);
return om.dom.html.cljs$core$IFn$_invoke$arity$variadic(G__10421, seq10420__$1);
};
om.dom.i = function om$dom$i(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10711 = arguments.length;
var i__5730__auto___10712 = 0;
while (true) {
if (i__5730__auto___10712 < len__5729__auto___10711) {
args__5736__auto__.push(arguments[i__5730__auto___10712]);
var G__10713 = i__5730__auto___10712 + 1;
i__5730__auto___10712 = G__10713;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.i.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.i.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.i.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.i.cljs$lang$maxFixedArity = 1;
om.dom.i.cljs$lang$applyTo = function(seq10422) {
var G__10423 = cljs.core.first.call(null, seq10422);
var seq10422__$1 = cljs.core.next.call(null, seq10422);
return om.dom.i.cljs$core$IFn$_invoke$arity$variadic(G__10423, seq10422__$1);
};
om.dom.iframe = function om$dom$iframe(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10714 = arguments.length;
var i__5730__auto___10715 = 0;
while (true) {
if (i__5730__auto___10715 < len__5729__auto___10714) {
args__5736__auto__.push(arguments[i__5730__auto___10715]);
var G__10716 = i__5730__auto___10715 + 1;
i__5730__auto___10715 = G__10716;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.iframe.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.iframe.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.iframe.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.iframe.cljs$lang$maxFixedArity = 1;
om.dom.iframe.cljs$lang$applyTo = function(seq10424) {
var G__10425 = cljs.core.first.call(null, seq10424);
var seq10424__$1 = cljs.core.next.call(null, seq10424);
return om.dom.iframe.cljs$core$IFn$_invoke$arity$variadic(G__10425, seq10424__$1);
};
om.dom.img = function om$dom$img(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10717 = arguments.length;
var i__5730__auto___10718 = 0;
while (true) {
if (i__5730__auto___10718 < len__5729__auto___10717) {
args__5736__auto__.push(arguments[i__5730__auto___10718]);
var G__10719 = i__5730__auto___10718 + 1;
i__5730__auto___10718 = G__10719;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.img.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.img.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.img.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.img.cljs$lang$maxFixedArity = 1;
om.dom.img.cljs$lang$applyTo = function(seq10426) {
var G__10427 = cljs.core.first.call(null, seq10426);
var seq10426__$1 = cljs.core.next.call(null, seq10426);
return om.dom.img.cljs$core$IFn$_invoke$arity$variadic(G__10427, seq10426__$1);
};
om.dom.ins = function om$dom$ins(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10720 = arguments.length;
var i__5730__auto___10721 = 0;
while (true) {
if (i__5730__auto___10721 < len__5729__auto___10720) {
args__5736__auto__.push(arguments[i__5730__auto___10721]);
var G__10722 = i__5730__auto___10721 + 1;
i__5730__auto___10721 = G__10722;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.ins.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.ins.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.ins.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.ins.cljs$lang$maxFixedArity = 1;
om.dom.ins.cljs$lang$applyTo = function(seq10428) {
var G__10429 = cljs.core.first.call(null, seq10428);
var seq10428__$1 = cljs.core.next.call(null, seq10428);
return om.dom.ins.cljs$core$IFn$_invoke$arity$variadic(G__10429, seq10428__$1);
};
om.dom.kbd = function om$dom$kbd(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10723 = arguments.length;
var i__5730__auto___10724 = 0;
while (true) {
if (i__5730__auto___10724 < len__5729__auto___10723) {
args__5736__auto__.push(arguments[i__5730__auto___10724]);
var G__10725 = i__5730__auto___10724 + 1;
i__5730__auto___10724 = G__10725;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.kbd.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.kbd.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.kbd.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.kbd.cljs$lang$maxFixedArity = 1;
om.dom.kbd.cljs$lang$applyTo = function(seq10430) {
var G__10431 = cljs.core.first.call(null, seq10430);
var seq10430__$1 = cljs.core.next.call(null, seq10430);
return om.dom.kbd.cljs$core$IFn$_invoke$arity$variadic(G__10431, seq10430__$1);
};
om.dom.keygen = function om$dom$keygen(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10726 = arguments.length;
var i__5730__auto___10727 = 0;
while (true) {
if (i__5730__auto___10727 < len__5729__auto___10726) {
args__5736__auto__.push(arguments[i__5730__auto___10727]);
var G__10728 = i__5730__auto___10727 + 1;
i__5730__auto___10727 = G__10728;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.keygen.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.keygen.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.keygen.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.keygen.cljs$lang$maxFixedArity = 1;
om.dom.keygen.cljs$lang$applyTo = function(seq10432) {
var G__10433 = cljs.core.first.call(null, seq10432);
var seq10432__$1 = cljs.core.next.call(null, seq10432);
return om.dom.keygen.cljs$core$IFn$_invoke$arity$variadic(G__10433, seq10432__$1);
};
om.dom.label = function om$dom$label(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10729 = arguments.length;
var i__5730__auto___10730 = 0;
while (true) {
if (i__5730__auto___10730 < len__5729__auto___10729) {
args__5736__auto__.push(arguments[i__5730__auto___10730]);
var G__10731 = i__5730__auto___10730 + 1;
i__5730__auto___10730 = G__10731;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.label.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.label.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.label.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.label.cljs$lang$maxFixedArity = 1;
om.dom.label.cljs$lang$applyTo = function(seq10434) {
var G__10435 = cljs.core.first.call(null, seq10434);
var seq10434__$1 = cljs.core.next.call(null, seq10434);
return om.dom.label.cljs$core$IFn$_invoke$arity$variadic(G__10435, seq10434__$1);
};
om.dom.legend = function om$dom$legend(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10732 = arguments.length;
var i__5730__auto___10733 = 0;
while (true) {
if (i__5730__auto___10733 < len__5729__auto___10732) {
args__5736__auto__.push(arguments[i__5730__auto___10733]);
var G__10734 = i__5730__auto___10733 + 1;
i__5730__auto___10733 = G__10734;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.legend.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.legend.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.legend.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.legend.cljs$lang$maxFixedArity = 1;
om.dom.legend.cljs$lang$applyTo = function(seq10436) {
var G__10437 = cljs.core.first.call(null, seq10436);
var seq10436__$1 = cljs.core.next.call(null, seq10436);
return om.dom.legend.cljs$core$IFn$_invoke$arity$variadic(G__10437, seq10436__$1);
};
om.dom.li = function om$dom$li(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10735 = arguments.length;
var i__5730__auto___10736 = 0;
while (true) {
if (i__5730__auto___10736 < len__5729__auto___10735) {
args__5736__auto__.push(arguments[i__5730__auto___10736]);
var G__10737 = i__5730__auto___10736 + 1;
i__5730__auto___10736 = G__10737;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.li.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.li.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.li.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.li.cljs$lang$maxFixedArity = 1;
om.dom.li.cljs$lang$applyTo = function(seq10438) {
var G__10439 = cljs.core.first.call(null, seq10438);
var seq10438__$1 = cljs.core.next.call(null, seq10438);
return om.dom.li.cljs$core$IFn$_invoke$arity$variadic(G__10439, seq10438__$1);
};
om.dom.link = function om$dom$link(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10738 = arguments.length;
var i__5730__auto___10739 = 0;
while (true) {
if (i__5730__auto___10739 < len__5729__auto___10738) {
args__5736__auto__.push(arguments[i__5730__auto___10739]);
var G__10740 = i__5730__auto___10739 + 1;
i__5730__auto___10739 = G__10740;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.link.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.link.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.link.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.link.cljs$lang$maxFixedArity = 1;
om.dom.link.cljs$lang$applyTo = function(seq10440) {
var G__10441 = cljs.core.first.call(null, seq10440);
var seq10440__$1 = cljs.core.next.call(null, seq10440);
return om.dom.link.cljs$core$IFn$_invoke$arity$variadic(G__10441, seq10440__$1);
};
om.dom.main = function om$dom$main(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10741 = arguments.length;
var i__5730__auto___10742 = 0;
while (true) {
if (i__5730__auto___10742 < len__5729__auto___10741) {
args__5736__auto__.push(arguments[i__5730__auto___10742]);
var G__10743 = i__5730__auto___10742 + 1;
i__5730__auto___10742 = G__10743;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.main.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.main.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.main.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.main.cljs$lang$maxFixedArity = 1;
om.dom.main.cljs$lang$applyTo = function(seq10442) {
var G__10443 = cljs.core.first.call(null, seq10442);
var seq10442__$1 = cljs.core.next.call(null, seq10442);
return om.dom.main.cljs$core$IFn$_invoke$arity$variadic(G__10443, seq10442__$1);
};
om.dom.map = function om$dom$map(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10744 = arguments.length;
var i__5730__auto___10745 = 0;
while (true) {
if (i__5730__auto___10745 < len__5729__auto___10744) {
args__5736__auto__.push(arguments[i__5730__auto___10745]);
var G__10746 = i__5730__auto___10745 + 1;
i__5730__auto___10745 = G__10746;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.map.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.map.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.map.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.map.cljs$lang$maxFixedArity = 1;
om.dom.map.cljs$lang$applyTo = function(seq10444) {
var G__10445 = cljs.core.first.call(null, seq10444);
var seq10444__$1 = cljs.core.next.call(null, seq10444);
return om.dom.map.cljs$core$IFn$_invoke$arity$variadic(G__10445, seq10444__$1);
};
om.dom.mark = function om$dom$mark(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10747 = arguments.length;
var i__5730__auto___10748 = 0;
while (true) {
if (i__5730__auto___10748 < len__5729__auto___10747) {
args__5736__auto__.push(arguments[i__5730__auto___10748]);
var G__10749 = i__5730__auto___10748 + 1;
i__5730__auto___10748 = G__10749;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.mark.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.mark.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.mark.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.mark.cljs$lang$maxFixedArity = 1;
om.dom.mark.cljs$lang$applyTo = function(seq10446) {
var G__10447 = cljs.core.first.call(null, seq10446);
var seq10446__$1 = cljs.core.next.call(null, seq10446);
return om.dom.mark.cljs$core$IFn$_invoke$arity$variadic(G__10447, seq10446__$1);
};
om.dom.marquee = function om$dom$marquee(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10750 = arguments.length;
var i__5730__auto___10751 = 0;
while (true) {
if (i__5730__auto___10751 < len__5729__auto___10750) {
args__5736__auto__.push(arguments[i__5730__auto___10751]);
var G__10752 = i__5730__auto___10751 + 1;
i__5730__auto___10751 = G__10752;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.marquee.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.marquee.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.marquee.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.marquee.cljs$lang$maxFixedArity = 1;
om.dom.marquee.cljs$lang$applyTo = function(seq10448) {
var G__10449 = cljs.core.first.call(null, seq10448);
var seq10448__$1 = cljs.core.next.call(null, seq10448);
return om.dom.marquee.cljs$core$IFn$_invoke$arity$variadic(G__10449, seq10448__$1);
};
om.dom.menu = function om$dom$menu(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10753 = arguments.length;
var i__5730__auto___10754 = 0;
while (true) {
if (i__5730__auto___10754 < len__5729__auto___10753) {
args__5736__auto__.push(arguments[i__5730__auto___10754]);
var G__10755 = i__5730__auto___10754 + 1;
i__5730__auto___10754 = G__10755;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.menu.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.menu.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.menu.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.menu.cljs$lang$maxFixedArity = 1;
om.dom.menu.cljs$lang$applyTo = function(seq10450) {
var G__10451 = cljs.core.first.call(null, seq10450);
var seq10450__$1 = cljs.core.next.call(null, seq10450);
return om.dom.menu.cljs$core$IFn$_invoke$arity$variadic(G__10451, seq10450__$1);
};
om.dom.menuitem = function om$dom$menuitem(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10756 = arguments.length;
var i__5730__auto___10757 = 0;
while (true) {
if (i__5730__auto___10757 < len__5729__auto___10756) {
args__5736__auto__.push(arguments[i__5730__auto___10757]);
var G__10758 = i__5730__auto___10757 + 1;
i__5730__auto___10757 = G__10758;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.menuitem.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.menuitem.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.menuitem.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.menuitem.cljs$lang$maxFixedArity = 1;
om.dom.menuitem.cljs$lang$applyTo = function(seq10452) {
var G__10453 = cljs.core.first.call(null, seq10452);
var seq10452__$1 = cljs.core.next.call(null, seq10452);
return om.dom.menuitem.cljs$core$IFn$_invoke$arity$variadic(G__10453, seq10452__$1);
};
om.dom.meta = function om$dom$meta(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10759 = arguments.length;
var i__5730__auto___10760 = 0;
while (true) {
if (i__5730__auto___10760 < len__5729__auto___10759) {
args__5736__auto__.push(arguments[i__5730__auto___10760]);
var G__10761 = i__5730__auto___10760 + 1;
i__5730__auto___10760 = G__10761;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.meta.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.meta.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.meta.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.meta.cljs$lang$maxFixedArity = 1;
om.dom.meta.cljs$lang$applyTo = function(seq10454) {
var G__10455 = cljs.core.first.call(null, seq10454);
var seq10454__$1 = cljs.core.next.call(null, seq10454);
return om.dom.meta.cljs$core$IFn$_invoke$arity$variadic(G__10455, seq10454__$1);
};
om.dom.meter = function om$dom$meter(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10762 = arguments.length;
var i__5730__auto___10763 = 0;
while (true) {
if (i__5730__auto___10763 < len__5729__auto___10762) {
args__5736__auto__.push(arguments[i__5730__auto___10763]);
var G__10764 = i__5730__auto___10763 + 1;
i__5730__auto___10763 = G__10764;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.meter.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.meter.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.meter.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.meter.cljs$lang$maxFixedArity = 1;
om.dom.meter.cljs$lang$applyTo = function(seq10456) {
var G__10457 = cljs.core.first.call(null, seq10456);
var seq10456__$1 = cljs.core.next.call(null, seq10456);
return om.dom.meter.cljs$core$IFn$_invoke$arity$variadic(G__10457, seq10456__$1);
};
om.dom.nav = function om$dom$nav(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10765 = arguments.length;
var i__5730__auto___10766 = 0;
while (true) {
if (i__5730__auto___10766 < len__5729__auto___10765) {
args__5736__auto__.push(arguments[i__5730__auto___10766]);
var G__10767 = i__5730__auto___10766 + 1;
i__5730__auto___10766 = G__10767;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.nav.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.nav.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.nav.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.nav.cljs$lang$maxFixedArity = 1;
om.dom.nav.cljs$lang$applyTo = function(seq10458) {
var G__10459 = cljs.core.first.call(null, seq10458);
var seq10458__$1 = cljs.core.next.call(null, seq10458);
return om.dom.nav.cljs$core$IFn$_invoke$arity$variadic(G__10459, seq10458__$1);
};
om.dom.noscript = function om$dom$noscript(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10768 = arguments.length;
var i__5730__auto___10769 = 0;
while (true) {
if (i__5730__auto___10769 < len__5729__auto___10768) {
args__5736__auto__.push(arguments[i__5730__auto___10769]);
var G__10770 = i__5730__auto___10769 + 1;
i__5730__auto___10769 = G__10770;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.noscript.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.noscript.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.noscript.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.noscript.cljs$lang$maxFixedArity = 1;
om.dom.noscript.cljs$lang$applyTo = function(seq10460) {
var G__10461 = cljs.core.first.call(null, seq10460);
var seq10460__$1 = cljs.core.next.call(null, seq10460);
return om.dom.noscript.cljs$core$IFn$_invoke$arity$variadic(G__10461, seq10460__$1);
};
om.dom.object = function om$dom$object(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10771 = arguments.length;
var i__5730__auto___10772 = 0;
while (true) {
if (i__5730__auto___10772 < len__5729__auto___10771) {
args__5736__auto__.push(arguments[i__5730__auto___10772]);
var G__10773 = i__5730__auto___10772 + 1;
i__5730__auto___10772 = G__10773;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.object.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.object.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.object.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.object.cljs$lang$maxFixedArity = 1;
om.dom.object.cljs$lang$applyTo = function(seq10462) {
var G__10463 = cljs.core.first.call(null, seq10462);
var seq10462__$1 = cljs.core.next.call(null, seq10462);
return om.dom.object.cljs$core$IFn$_invoke$arity$variadic(G__10463, seq10462__$1);
};
om.dom.ol = function om$dom$ol(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10774 = arguments.length;
var i__5730__auto___10775 = 0;
while (true) {
if (i__5730__auto___10775 < len__5729__auto___10774) {
args__5736__auto__.push(arguments[i__5730__auto___10775]);
var G__10776 = i__5730__auto___10775 + 1;
i__5730__auto___10775 = G__10776;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.ol.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.ol.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.ol.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.ol.cljs$lang$maxFixedArity = 1;
om.dom.ol.cljs$lang$applyTo = function(seq10464) {
var G__10465 = cljs.core.first.call(null, seq10464);
var seq10464__$1 = cljs.core.next.call(null, seq10464);
return om.dom.ol.cljs$core$IFn$_invoke$arity$variadic(G__10465, seq10464__$1);
};
om.dom.optgroup = function om$dom$optgroup(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10777 = arguments.length;
var i__5730__auto___10778 = 0;
while (true) {
if (i__5730__auto___10778 < len__5729__auto___10777) {
args__5736__auto__.push(arguments[i__5730__auto___10778]);
var G__10779 = i__5730__auto___10778 + 1;
i__5730__auto___10778 = G__10779;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.optgroup.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.optgroup.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.optgroup.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.optgroup.cljs$lang$maxFixedArity = 1;
om.dom.optgroup.cljs$lang$applyTo = function(seq10466) {
var G__10467 = cljs.core.first.call(null, seq10466);
var seq10466__$1 = cljs.core.next.call(null, seq10466);
return om.dom.optgroup.cljs$core$IFn$_invoke$arity$variadic(G__10467, seq10466__$1);
};
om.dom.output = function om$dom$output(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10780 = arguments.length;
var i__5730__auto___10781 = 0;
while (true) {
if (i__5730__auto___10781 < len__5729__auto___10780) {
args__5736__auto__.push(arguments[i__5730__auto___10781]);
var G__10782 = i__5730__auto___10781 + 1;
i__5730__auto___10781 = G__10782;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.output.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.output.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.output.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.output.cljs$lang$maxFixedArity = 1;
om.dom.output.cljs$lang$applyTo = function(seq10468) {
var G__10469 = cljs.core.first.call(null, seq10468);
var seq10468__$1 = cljs.core.next.call(null, seq10468);
return om.dom.output.cljs$core$IFn$_invoke$arity$variadic(G__10469, seq10468__$1);
};
om.dom.p = function om$dom$p(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10783 = arguments.length;
var i__5730__auto___10784 = 0;
while (true) {
if (i__5730__auto___10784 < len__5729__auto___10783) {
args__5736__auto__.push(arguments[i__5730__auto___10784]);
var G__10785 = i__5730__auto___10784 + 1;
i__5730__auto___10784 = G__10785;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.p.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.p.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.p.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.p.cljs$lang$maxFixedArity = 1;
om.dom.p.cljs$lang$applyTo = function(seq10470) {
var G__10471 = cljs.core.first.call(null, seq10470);
var seq10470__$1 = cljs.core.next.call(null, seq10470);
return om.dom.p.cljs$core$IFn$_invoke$arity$variadic(G__10471, seq10470__$1);
};
om.dom.param = function om$dom$param(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10786 = arguments.length;
var i__5730__auto___10787 = 0;
while (true) {
if (i__5730__auto___10787 < len__5729__auto___10786) {
args__5736__auto__.push(arguments[i__5730__auto___10787]);
var G__10788 = i__5730__auto___10787 + 1;
i__5730__auto___10787 = G__10788;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.param.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.param.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.param.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.param.cljs$lang$maxFixedArity = 1;
om.dom.param.cljs$lang$applyTo = function(seq10472) {
var G__10473 = cljs.core.first.call(null, seq10472);
var seq10472__$1 = cljs.core.next.call(null, seq10472);
return om.dom.param.cljs$core$IFn$_invoke$arity$variadic(G__10473, seq10472__$1);
};
om.dom.pre = function om$dom$pre(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10789 = arguments.length;
var i__5730__auto___10790 = 0;
while (true) {
if (i__5730__auto___10790 < len__5729__auto___10789) {
args__5736__auto__.push(arguments[i__5730__auto___10790]);
var G__10791 = i__5730__auto___10790 + 1;
i__5730__auto___10790 = G__10791;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.pre.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.pre.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.pre.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.pre.cljs$lang$maxFixedArity = 1;
om.dom.pre.cljs$lang$applyTo = function(seq10474) {
var G__10475 = cljs.core.first.call(null, seq10474);
var seq10474__$1 = cljs.core.next.call(null, seq10474);
return om.dom.pre.cljs$core$IFn$_invoke$arity$variadic(G__10475, seq10474__$1);
};
om.dom.progress = function om$dom$progress(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10792 = arguments.length;
var i__5730__auto___10793 = 0;
while (true) {
if (i__5730__auto___10793 < len__5729__auto___10792) {
args__5736__auto__.push(arguments[i__5730__auto___10793]);
var G__10794 = i__5730__auto___10793 + 1;
i__5730__auto___10793 = G__10794;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.progress.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.progress.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.progress.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.progress.cljs$lang$maxFixedArity = 1;
om.dom.progress.cljs$lang$applyTo = function(seq10476) {
var G__10477 = cljs.core.first.call(null, seq10476);
var seq10476__$1 = cljs.core.next.call(null, seq10476);
return om.dom.progress.cljs$core$IFn$_invoke$arity$variadic(G__10477, seq10476__$1);
};
om.dom.q = function om$dom$q(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10795 = arguments.length;
var i__5730__auto___10796 = 0;
while (true) {
if (i__5730__auto___10796 < len__5729__auto___10795) {
args__5736__auto__.push(arguments[i__5730__auto___10796]);
var G__10797 = i__5730__auto___10796 + 1;
i__5730__auto___10796 = G__10797;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.q.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.q.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.q.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.q.cljs$lang$maxFixedArity = 1;
om.dom.q.cljs$lang$applyTo = function(seq10478) {
var G__10479 = cljs.core.first.call(null, seq10478);
var seq10478__$1 = cljs.core.next.call(null, seq10478);
return om.dom.q.cljs$core$IFn$_invoke$arity$variadic(G__10479, seq10478__$1);
};
om.dom.rp = function om$dom$rp(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10798 = arguments.length;
var i__5730__auto___10799 = 0;
while (true) {
if (i__5730__auto___10799 < len__5729__auto___10798) {
args__5736__auto__.push(arguments[i__5730__auto___10799]);
var G__10800 = i__5730__auto___10799 + 1;
i__5730__auto___10799 = G__10800;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.rp.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.rp.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.rp.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.rp.cljs$lang$maxFixedArity = 1;
om.dom.rp.cljs$lang$applyTo = function(seq10480) {
var G__10481 = cljs.core.first.call(null, seq10480);
var seq10480__$1 = cljs.core.next.call(null, seq10480);
return om.dom.rp.cljs$core$IFn$_invoke$arity$variadic(G__10481, seq10480__$1);
};
om.dom.rt = function om$dom$rt(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10801 = arguments.length;
var i__5730__auto___10802 = 0;
while (true) {
if (i__5730__auto___10802 < len__5729__auto___10801) {
args__5736__auto__.push(arguments[i__5730__auto___10802]);
var G__10803 = i__5730__auto___10802 + 1;
i__5730__auto___10802 = G__10803;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.rt.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.rt.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.rt.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.rt.cljs$lang$maxFixedArity = 1;
om.dom.rt.cljs$lang$applyTo = function(seq10482) {
var G__10483 = cljs.core.first.call(null, seq10482);
var seq10482__$1 = cljs.core.next.call(null, seq10482);
return om.dom.rt.cljs$core$IFn$_invoke$arity$variadic(G__10483, seq10482__$1);
};
om.dom.ruby = function om$dom$ruby(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10804 = arguments.length;
var i__5730__auto___10805 = 0;
while (true) {
if (i__5730__auto___10805 < len__5729__auto___10804) {
args__5736__auto__.push(arguments[i__5730__auto___10805]);
var G__10806 = i__5730__auto___10805 + 1;
i__5730__auto___10805 = G__10806;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.ruby.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.ruby.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.ruby.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.ruby.cljs$lang$maxFixedArity = 1;
om.dom.ruby.cljs$lang$applyTo = function(seq10484) {
var G__10485 = cljs.core.first.call(null, seq10484);
var seq10484__$1 = cljs.core.next.call(null, seq10484);
return om.dom.ruby.cljs$core$IFn$_invoke$arity$variadic(G__10485, seq10484__$1);
};
om.dom.s = function om$dom$s(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10807 = arguments.length;
var i__5730__auto___10808 = 0;
while (true) {
if (i__5730__auto___10808 < len__5729__auto___10807) {
args__5736__auto__.push(arguments[i__5730__auto___10808]);
var G__10809 = i__5730__auto___10808 + 1;
i__5730__auto___10808 = G__10809;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.s.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.s.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.s.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.s.cljs$lang$maxFixedArity = 1;
om.dom.s.cljs$lang$applyTo = function(seq10486) {
var G__10487 = cljs.core.first.call(null, seq10486);
var seq10486__$1 = cljs.core.next.call(null, seq10486);
return om.dom.s.cljs$core$IFn$_invoke$arity$variadic(G__10487, seq10486__$1);
};
om.dom.samp = function om$dom$samp(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10810 = arguments.length;
var i__5730__auto___10811 = 0;
while (true) {
if (i__5730__auto___10811 < len__5729__auto___10810) {
args__5736__auto__.push(arguments[i__5730__auto___10811]);
var G__10812 = i__5730__auto___10811 + 1;
i__5730__auto___10811 = G__10812;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.samp.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.samp.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.samp.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.samp.cljs$lang$maxFixedArity = 1;
om.dom.samp.cljs$lang$applyTo = function(seq10488) {
var G__10489 = cljs.core.first.call(null, seq10488);
var seq10488__$1 = cljs.core.next.call(null, seq10488);
return om.dom.samp.cljs$core$IFn$_invoke$arity$variadic(G__10489, seq10488__$1);
};
om.dom.script = function om$dom$script(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10813 = arguments.length;
var i__5730__auto___10814 = 0;
while (true) {
if (i__5730__auto___10814 < len__5729__auto___10813) {
args__5736__auto__.push(arguments[i__5730__auto___10814]);
var G__10815 = i__5730__auto___10814 + 1;
i__5730__auto___10814 = G__10815;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.script.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.script.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.script.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.script.cljs$lang$maxFixedArity = 1;
om.dom.script.cljs$lang$applyTo = function(seq10490) {
var G__10491 = cljs.core.first.call(null, seq10490);
var seq10490__$1 = cljs.core.next.call(null, seq10490);
return om.dom.script.cljs$core$IFn$_invoke$arity$variadic(G__10491, seq10490__$1);
};
om.dom.section = function om$dom$section(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10816 = arguments.length;
var i__5730__auto___10817 = 0;
while (true) {
if (i__5730__auto___10817 < len__5729__auto___10816) {
args__5736__auto__.push(arguments[i__5730__auto___10817]);
var G__10818 = i__5730__auto___10817 + 1;
i__5730__auto___10817 = G__10818;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.section.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.section.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.section.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.section.cljs$lang$maxFixedArity = 1;
om.dom.section.cljs$lang$applyTo = function(seq10492) {
var G__10493 = cljs.core.first.call(null, seq10492);
var seq10492__$1 = cljs.core.next.call(null, seq10492);
return om.dom.section.cljs$core$IFn$_invoke$arity$variadic(G__10493, seq10492__$1);
};
om.dom.select = function om$dom$select(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10819 = arguments.length;
var i__5730__auto___10820 = 0;
while (true) {
if (i__5730__auto___10820 < len__5729__auto___10819) {
args__5736__auto__.push(arguments[i__5730__auto___10820]);
var G__10821 = i__5730__auto___10820 + 1;
i__5730__auto___10820 = G__10821;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.select.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.select.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.select.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.select.cljs$lang$maxFixedArity = 1;
om.dom.select.cljs$lang$applyTo = function(seq10494) {
var G__10495 = cljs.core.first.call(null, seq10494);
var seq10494__$1 = cljs.core.next.call(null, seq10494);
return om.dom.select.cljs$core$IFn$_invoke$arity$variadic(G__10495, seq10494__$1);
};
om.dom.small = function om$dom$small(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10822 = arguments.length;
var i__5730__auto___10823 = 0;
while (true) {
if (i__5730__auto___10823 < len__5729__auto___10822) {
args__5736__auto__.push(arguments[i__5730__auto___10823]);
var G__10824 = i__5730__auto___10823 + 1;
i__5730__auto___10823 = G__10824;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.small.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.small.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.small.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.small.cljs$lang$maxFixedArity = 1;
om.dom.small.cljs$lang$applyTo = function(seq10496) {
var G__10497 = cljs.core.first.call(null, seq10496);
var seq10496__$1 = cljs.core.next.call(null, seq10496);
return om.dom.small.cljs$core$IFn$_invoke$arity$variadic(G__10497, seq10496__$1);
};
om.dom.source = function om$dom$source(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10825 = arguments.length;
var i__5730__auto___10826 = 0;
while (true) {
if (i__5730__auto___10826 < len__5729__auto___10825) {
args__5736__auto__.push(arguments[i__5730__auto___10826]);
var G__10827 = i__5730__auto___10826 + 1;
i__5730__auto___10826 = G__10827;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.source.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.source.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.source.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.source.cljs$lang$maxFixedArity = 1;
om.dom.source.cljs$lang$applyTo = function(seq10498) {
var G__10499 = cljs.core.first.call(null, seq10498);
var seq10498__$1 = cljs.core.next.call(null, seq10498);
return om.dom.source.cljs$core$IFn$_invoke$arity$variadic(G__10499, seq10498__$1);
};
om.dom.span = function om$dom$span(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10828 = arguments.length;
var i__5730__auto___10829 = 0;
while (true) {
if (i__5730__auto___10829 < len__5729__auto___10828) {
args__5736__auto__.push(arguments[i__5730__auto___10829]);
var G__10830 = i__5730__auto___10829 + 1;
i__5730__auto___10829 = G__10830;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.span.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.span.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.span.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.span.cljs$lang$maxFixedArity = 1;
om.dom.span.cljs$lang$applyTo = function(seq10500) {
var G__10501 = cljs.core.first.call(null, seq10500);
var seq10500__$1 = cljs.core.next.call(null, seq10500);
return om.dom.span.cljs$core$IFn$_invoke$arity$variadic(G__10501, seq10500__$1);
};
om.dom.strong = function om$dom$strong(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10831 = arguments.length;
var i__5730__auto___10832 = 0;
while (true) {
if (i__5730__auto___10832 < len__5729__auto___10831) {
args__5736__auto__.push(arguments[i__5730__auto___10832]);
var G__10833 = i__5730__auto___10832 + 1;
i__5730__auto___10832 = G__10833;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.strong.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.strong.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.strong.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.strong.cljs$lang$maxFixedArity = 1;
om.dom.strong.cljs$lang$applyTo = function(seq10502) {
var G__10503 = cljs.core.first.call(null, seq10502);
var seq10502__$1 = cljs.core.next.call(null, seq10502);
return om.dom.strong.cljs$core$IFn$_invoke$arity$variadic(G__10503, seq10502__$1);
};
om.dom.style = function om$dom$style(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10834 = arguments.length;
var i__5730__auto___10835 = 0;
while (true) {
if (i__5730__auto___10835 < len__5729__auto___10834) {
args__5736__auto__.push(arguments[i__5730__auto___10835]);
var G__10836 = i__5730__auto___10835 + 1;
i__5730__auto___10835 = G__10836;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.style.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.style.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.style.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.style.cljs$lang$maxFixedArity = 1;
om.dom.style.cljs$lang$applyTo = function(seq10504) {
var G__10505 = cljs.core.first.call(null, seq10504);
var seq10504__$1 = cljs.core.next.call(null, seq10504);
return om.dom.style.cljs$core$IFn$_invoke$arity$variadic(G__10505, seq10504__$1);
};
om.dom.sub = function om$dom$sub(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10837 = arguments.length;
var i__5730__auto___10838 = 0;
while (true) {
if (i__5730__auto___10838 < len__5729__auto___10837) {
args__5736__auto__.push(arguments[i__5730__auto___10838]);
var G__10839 = i__5730__auto___10838 + 1;
i__5730__auto___10838 = G__10839;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.sub.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.sub.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.sub.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.sub.cljs$lang$maxFixedArity = 1;
om.dom.sub.cljs$lang$applyTo = function(seq10506) {
var G__10507 = cljs.core.first.call(null, seq10506);
var seq10506__$1 = cljs.core.next.call(null, seq10506);
return om.dom.sub.cljs$core$IFn$_invoke$arity$variadic(G__10507, seq10506__$1);
};
om.dom.summary = function om$dom$summary(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10840 = arguments.length;
var i__5730__auto___10841 = 0;
while (true) {
if (i__5730__auto___10841 < len__5729__auto___10840) {
args__5736__auto__.push(arguments[i__5730__auto___10841]);
var G__10842 = i__5730__auto___10841 + 1;
i__5730__auto___10841 = G__10842;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.summary.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.summary.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.summary.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.summary.cljs$lang$maxFixedArity = 1;
om.dom.summary.cljs$lang$applyTo = function(seq10508) {
var G__10509 = cljs.core.first.call(null, seq10508);
var seq10508__$1 = cljs.core.next.call(null, seq10508);
return om.dom.summary.cljs$core$IFn$_invoke$arity$variadic(G__10509, seq10508__$1);
};
om.dom.sup = function om$dom$sup(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10843 = arguments.length;
var i__5730__auto___10844 = 0;
while (true) {
if (i__5730__auto___10844 < len__5729__auto___10843) {
args__5736__auto__.push(arguments[i__5730__auto___10844]);
var G__10845 = i__5730__auto___10844 + 1;
i__5730__auto___10844 = G__10845;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.sup.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.sup.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.sup.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.sup.cljs$lang$maxFixedArity = 1;
om.dom.sup.cljs$lang$applyTo = function(seq10510) {
var G__10511 = cljs.core.first.call(null, seq10510);
var seq10510__$1 = cljs.core.next.call(null, seq10510);
return om.dom.sup.cljs$core$IFn$_invoke$arity$variadic(G__10511, seq10510__$1);
};
om.dom.table = function om$dom$table(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10846 = arguments.length;
var i__5730__auto___10847 = 0;
while (true) {
if (i__5730__auto___10847 < len__5729__auto___10846) {
args__5736__auto__.push(arguments[i__5730__auto___10847]);
var G__10848 = i__5730__auto___10847 + 1;
i__5730__auto___10847 = G__10848;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.table.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.table.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.table.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.table.cljs$lang$maxFixedArity = 1;
om.dom.table.cljs$lang$applyTo = function(seq10512) {
var G__10513 = cljs.core.first.call(null, seq10512);
var seq10512__$1 = cljs.core.next.call(null, seq10512);
return om.dom.table.cljs$core$IFn$_invoke$arity$variadic(G__10513, seq10512__$1);
};
om.dom.tbody = function om$dom$tbody(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10849 = arguments.length;
var i__5730__auto___10850 = 0;
while (true) {
if (i__5730__auto___10850 < len__5729__auto___10849) {
args__5736__auto__.push(arguments[i__5730__auto___10850]);
var G__10851 = i__5730__auto___10850 + 1;
i__5730__auto___10850 = G__10851;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.tbody.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.tbody.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.tbody.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.tbody.cljs$lang$maxFixedArity = 1;
om.dom.tbody.cljs$lang$applyTo = function(seq10514) {
var G__10515 = cljs.core.first.call(null, seq10514);
var seq10514__$1 = cljs.core.next.call(null, seq10514);
return om.dom.tbody.cljs$core$IFn$_invoke$arity$variadic(G__10515, seq10514__$1);
};
om.dom.td = function om$dom$td(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10852 = arguments.length;
var i__5730__auto___10853 = 0;
while (true) {
if (i__5730__auto___10853 < len__5729__auto___10852) {
args__5736__auto__.push(arguments[i__5730__auto___10853]);
var G__10854 = i__5730__auto___10853 + 1;
i__5730__auto___10853 = G__10854;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.td.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.td.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.td.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.td.cljs$lang$maxFixedArity = 1;
om.dom.td.cljs$lang$applyTo = function(seq10516) {
var G__10517 = cljs.core.first.call(null, seq10516);
var seq10516__$1 = cljs.core.next.call(null, seq10516);
return om.dom.td.cljs$core$IFn$_invoke$arity$variadic(G__10517, seq10516__$1);
};
om.dom.tfoot = function om$dom$tfoot(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10855 = arguments.length;
var i__5730__auto___10856 = 0;
while (true) {
if (i__5730__auto___10856 < len__5729__auto___10855) {
args__5736__auto__.push(arguments[i__5730__auto___10856]);
var G__10857 = i__5730__auto___10856 + 1;
i__5730__auto___10856 = G__10857;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.tfoot.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.tfoot.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.tfoot.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.tfoot.cljs$lang$maxFixedArity = 1;
om.dom.tfoot.cljs$lang$applyTo = function(seq10518) {
var G__10519 = cljs.core.first.call(null, seq10518);
var seq10518__$1 = cljs.core.next.call(null, seq10518);
return om.dom.tfoot.cljs$core$IFn$_invoke$arity$variadic(G__10519, seq10518__$1);
};
om.dom.th = function om$dom$th(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10858 = arguments.length;
var i__5730__auto___10859 = 0;
while (true) {
if (i__5730__auto___10859 < len__5729__auto___10858) {
args__5736__auto__.push(arguments[i__5730__auto___10859]);
var G__10860 = i__5730__auto___10859 + 1;
i__5730__auto___10859 = G__10860;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.th.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.th.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.th.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.th.cljs$lang$maxFixedArity = 1;
om.dom.th.cljs$lang$applyTo = function(seq10520) {
var G__10521 = cljs.core.first.call(null, seq10520);
var seq10520__$1 = cljs.core.next.call(null, seq10520);
return om.dom.th.cljs$core$IFn$_invoke$arity$variadic(G__10521, seq10520__$1);
};
om.dom.thead = function om$dom$thead(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10861 = arguments.length;
var i__5730__auto___10862 = 0;
while (true) {
if (i__5730__auto___10862 < len__5729__auto___10861) {
args__5736__auto__.push(arguments[i__5730__auto___10862]);
var G__10863 = i__5730__auto___10862 + 1;
i__5730__auto___10862 = G__10863;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.thead.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.thead.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.thead.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.thead.cljs$lang$maxFixedArity = 1;
om.dom.thead.cljs$lang$applyTo = function(seq10522) {
var G__10523 = cljs.core.first.call(null, seq10522);
var seq10522__$1 = cljs.core.next.call(null, seq10522);
return om.dom.thead.cljs$core$IFn$_invoke$arity$variadic(G__10523, seq10522__$1);
};
om.dom.time = function om$dom$time(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10864 = arguments.length;
var i__5730__auto___10865 = 0;
while (true) {
if (i__5730__auto___10865 < len__5729__auto___10864) {
args__5736__auto__.push(arguments[i__5730__auto___10865]);
var G__10866 = i__5730__auto___10865 + 1;
i__5730__auto___10865 = G__10866;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.time.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.time.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.time.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.time.cljs$lang$maxFixedArity = 1;
om.dom.time.cljs$lang$applyTo = function(seq10524) {
var G__10525 = cljs.core.first.call(null, seq10524);
var seq10524__$1 = cljs.core.next.call(null, seq10524);
return om.dom.time.cljs$core$IFn$_invoke$arity$variadic(G__10525, seq10524__$1);
};
om.dom.title = function om$dom$title(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10867 = arguments.length;
var i__5730__auto___10868 = 0;
while (true) {
if (i__5730__auto___10868 < len__5729__auto___10867) {
args__5736__auto__.push(arguments[i__5730__auto___10868]);
var G__10869 = i__5730__auto___10868 + 1;
i__5730__auto___10868 = G__10869;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.title.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.title.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.title.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.title.cljs$lang$maxFixedArity = 1;
om.dom.title.cljs$lang$applyTo = function(seq10526) {
var G__10527 = cljs.core.first.call(null, seq10526);
var seq10526__$1 = cljs.core.next.call(null, seq10526);
return om.dom.title.cljs$core$IFn$_invoke$arity$variadic(G__10527, seq10526__$1);
};
om.dom.tr = function om$dom$tr(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10870 = arguments.length;
var i__5730__auto___10871 = 0;
while (true) {
if (i__5730__auto___10871 < len__5729__auto___10870) {
args__5736__auto__.push(arguments[i__5730__auto___10871]);
var G__10872 = i__5730__auto___10871 + 1;
i__5730__auto___10871 = G__10872;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.tr.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.tr.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.tr.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.tr.cljs$lang$maxFixedArity = 1;
om.dom.tr.cljs$lang$applyTo = function(seq10528) {
var G__10529 = cljs.core.first.call(null, seq10528);
var seq10528__$1 = cljs.core.next.call(null, seq10528);
return om.dom.tr.cljs$core$IFn$_invoke$arity$variadic(G__10529, seq10528__$1);
};
om.dom.track = function om$dom$track(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10873 = arguments.length;
var i__5730__auto___10874 = 0;
while (true) {
if (i__5730__auto___10874 < len__5729__auto___10873) {
args__5736__auto__.push(arguments[i__5730__auto___10874]);
var G__10875 = i__5730__auto___10874 + 1;
i__5730__auto___10874 = G__10875;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.track.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.track.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.track.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.track.cljs$lang$maxFixedArity = 1;
om.dom.track.cljs$lang$applyTo = function(seq10530) {
var G__10531 = cljs.core.first.call(null, seq10530);
var seq10530__$1 = cljs.core.next.call(null, seq10530);
return om.dom.track.cljs$core$IFn$_invoke$arity$variadic(G__10531, seq10530__$1);
};
om.dom.u = function om$dom$u(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10876 = arguments.length;
var i__5730__auto___10877 = 0;
while (true) {
if (i__5730__auto___10877 < len__5729__auto___10876) {
args__5736__auto__.push(arguments[i__5730__auto___10877]);
var G__10878 = i__5730__auto___10877 + 1;
i__5730__auto___10877 = G__10878;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.u.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.u.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.u.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.u.cljs$lang$maxFixedArity = 1;
om.dom.u.cljs$lang$applyTo = function(seq10532) {
var G__10533 = cljs.core.first.call(null, seq10532);
var seq10532__$1 = cljs.core.next.call(null, seq10532);
return om.dom.u.cljs$core$IFn$_invoke$arity$variadic(G__10533, seq10532__$1);
};
om.dom.ul = function om$dom$ul(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10879 = arguments.length;
var i__5730__auto___10880 = 0;
while (true) {
if (i__5730__auto___10880 < len__5729__auto___10879) {
args__5736__auto__.push(arguments[i__5730__auto___10880]);
var G__10881 = i__5730__auto___10880 + 1;
i__5730__auto___10880 = G__10881;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.ul.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.ul.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.ul.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.ul.cljs$lang$maxFixedArity = 1;
om.dom.ul.cljs$lang$applyTo = function(seq10534) {
var G__10535 = cljs.core.first.call(null, seq10534);
var seq10534__$1 = cljs.core.next.call(null, seq10534);
return om.dom.ul.cljs$core$IFn$_invoke$arity$variadic(G__10535, seq10534__$1);
};
om.dom.var$ = function om$dom$var(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10882 = arguments.length;
var i__5730__auto___10883 = 0;
while (true) {
if (i__5730__auto___10883 < len__5729__auto___10882) {
args__5736__auto__.push(arguments[i__5730__auto___10883]);
var G__10884 = i__5730__auto___10883 + 1;
i__5730__auto___10883 = G__10884;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.var$.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.var$.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.var$.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.var$.cljs$lang$maxFixedArity = 1;
om.dom.var$.cljs$lang$applyTo = function(seq10536) {
var G__10537 = cljs.core.first.call(null, seq10536);
var seq10536__$1 = cljs.core.next.call(null, seq10536);
return om.dom.var$.cljs$core$IFn$_invoke$arity$variadic(G__10537, seq10536__$1);
};
om.dom.video = function om$dom$video(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10885 = arguments.length;
var i__5730__auto___10886 = 0;
while (true) {
if (i__5730__auto___10886 < len__5729__auto___10885) {
args__5736__auto__.push(arguments[i__5730__auto___10886]);
var G__10887 = i__5730__auto___10886 + 1;
i__5730__auto___10886 = G__10887;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.video.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.video.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.video.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.video.cljs$lang$maxFixedArity = 1;
om.dom.video.cljs$lang$applyTo = function(seq10538) {
var G__10539 = cljs.core.first.call(null, seq10538);
var seq10538__$1 = cljs.core.next.call(null, seq10538);
return om.dom.video.cljs$core$IFn$_invoke$arity$variadic(G__10539, seq10538__$1);
};
om.dom.wbr = function om$dom$wbr(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10888 = arguments.length;
var i__5730__auto___10889 = 0;
while (true) {
if (i__5730__auto___10889 < len__5729__auto___10888) {
args__5736__auto__.push(arguments[i__5730__auto___10889]);
var G__10890 = i__5730__auto___10889 + 1;
i__5730__auto___10889 = G__10890;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.wbr.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.wbr.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.wbr.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.wbr.cljs$lang$maxFixedArity = 1;
om.dom.wbr.cljs$lang$applyTo = function(seq10540) {
var G__10541 = cljs.core.first.call(null, seq10540);
var seq10540__$1 = cljs.core.next.call(null, seq10540);
return om.dom.wbr.cljs$core$IFn$_invoke$arity$variadic(G__10541, seq10540__$1);
};
om.dom.circle = function om$dom$circle(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10891 = arguments.length;
var i__5730__auto___10892 = 0;
while (true) {
if (i__5730__auto___10892 < len__5729__auto___10891) {
args__5736__auto__.push(arguments[i__5730__auto___10892]);
var G__10893 = i__5730__auto___10892 + 1;
i__5730__auto___10892 = G__10893;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.circle.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.circle.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.circle.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.circle.cljs$lang$maxFixedArity = 1;
om.dom.circle.cljs$lang$applyTo = function(seq10542) {
var G__10543 = cljs.core.first.call(null, seq10542);
var seq10542__$1 = cljs.core.next.call(null, seq10542);
return om.dom.circle.cljs$core$IFn$_invoke$arity$variadic(G__10543, seq10542__$1);
};
om.dom.ellipse = function om$dom$ellipse(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10894 = arguments.length;
var i__5730__auto___10895 = 0;
while (true) {
if (i__5730__auto___10895 < len__5729__auto___10894) {
args__5736__auto__.push(arguments[i__5730__auto___10895]);
var G__10896 = i__5730__auto___10895 + 1;
i__5730__auto___10895 = G__10896;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.ellipse.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.ellipse.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.ellipse.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.ellipse.cljs$lang$maxFixedArity = 1;
om.dom.ellipse.cljs$lang$applyTo = function(seq10544) {
var G__10545 = cljs.core.first.call(null, seq10544);
var seq10544__$1 = cljs.core.next.call(null, seq10544);
return om.dom.ellipse.cljs$core$IFn$_invoke$arity$variadic(G__10545, seq10544__$1);
};
om.dom.g = function om$dom$g(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10897 = arguments.length;
var i__5730__auto___10898 = 0;
while (true) {
if (i__5730__auto___10898 < len__5729__auto___10897) {
args__5736__auto__.push(arguments[i__5730__auto___10898]);
var G__10899 = i__5730__auto___10898 + 1;
i__5730__auto___10898 = G__10899;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.g.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.g.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.g.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.g.cljs$lang$maxFixedArity = 1;
om.dom.g.cljs$lang$applyTo = function(seq10546) {
var G__10547 = cljs.core.first.call(null, seq10546);
var seq10546__$1 = cljs.core.next.call(null, seq10546);
return om.dom.g.cljs$core$IFn$_invoke$arity$variadic(G__10547, seq10546__$1);
};
om.dom.line = function om$dom$line(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10900 = arguments.length;
var i__5730__auto___10901 = 0;
while (true) {
if (i__5730__auto___10901 < len__5729__auto___10900) {
args__5736__auto__.push(arguments[i__5730__auto___10901]);
var G__10902 = i__5730__auto___10901 + 1;
i__5730__auto___10901 = G__10902;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.line.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.line.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.line.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.line.cljs$lang$maxFixedArity = 1;
om.dom.line.cljs$lang$applyTo = function(seq10548) {
var G__10549 = cljs.core.first.call(null, seq10548);
var seq10548__$1 = cljs.core.next.call(null, seq10548);
return om.dom.line.cljs$core$IFn$_invoke$arity$variadic(G__10549, seq10548__$1);
};
om.dom.path = function om$dom$path(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10903 = arguments.length;
var i__5730__auto___10904 = 0;
while (true) {
if (i__5730__auto___10904 < len__5729__auto___10903) {
args__5736__auto__.push(arguments[i__5730__auto___10904]);
var G__10905 = i__5730__auto___10904 + 1;
i__5730__auto___10904 = G__10905;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.path.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.path.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.path.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.path.cljs$lang$maxFixedArity = 1;
om.dom.path.cljs$lang$applyTo = function(seq10550) {
var G__10551 = cljs.core.first.call(null, seq10550);
var seq10550__$1 = cljs.core.next.call(null, seq10550);
return om.dom.path.cljs$core$IFn$_invoke$arity$variadic(G__10551, seq10550__$1);
};
om.dom.polyline = function om$dom$polyline(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10906 = arguments.length;
var i__5730__auto___10907 = 0;
while (true) {
if (i__5730__auto___10907 < len__5729__auto___10906) {
args__5736__auto__.push(arguments[i__5730__auto___10907]);
var G__10908 = i__5730__auto___10907 + 1;
i__5730__auto___10907 = G__10908;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.polyline.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.polyline.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.polyline.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.polyline.cljs$lang$maxFixedArity = 1;
om.dom.polyline.cljs$lang$applyTo = function(seq10552) {
var G__10553 = cljs.core.first.call(null, seq10552);
var seq10552__$1 = cljs.core.next.call(null, seq10552);
return om.dom.polyline.cljs$core$IFn$_invoke$arity$variadic(G__10553, seq10552__$1);
};
om.dom.rect = function om$dom$rect(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10909 = arguments.length;
var i__5730__auto___10910 = 0;
while (true) {
if (i__5730__auto___10910 < len__5729__auto___10909) {
args__5736__auto__.push(arguments[i__5730__auto___10910]);
var G__10911 = i__5730__auto___10910 + 1;
i__5730__auto___10910 = G__10911;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.rect.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.rect.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.rect.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.rect.cljs$lang$maxFixedArity = 1;
om.dom.rect.cljs$lang$applyTo = function(seq10554) {
var G__10555 = cljs.core.first.call(null, seq10554);
var seq10554__$1 = cljs.core.next.call(null, seq10554);
return om.dom.rect.cljs$core$IFn$_invoke$arity$variadic(G__10555, seq10554__$1);
};
om.dom.svg = function om$dom$svg(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10912 = arguments.length;
var i__5730__auto___10913 = 0;
while (true) {
if (i__5730__auto___10913 < len__5729__auto___10912) {
args__5736__auto__.push(arguments[i__5730__auto___10913]);
var G__10914 = i__5730__auto___10913 + 1;
i__5730__auto___10913 = G__10914;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.svg.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.svg.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.svg.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.svg.cljs$lang$maxFixedArity = 1;
om.dom.svg.cljs$lang$applyTo = function(seq10556) {
var G__10557 = cljs.core.first.call(null, seq10556);
var seq10556__$1 = cljs.core.next.call(null, seq10556);
return om.dom.svg.cljs$core$IFn$_invoke$arity$variadic(G__10557, seq10556__$1);
};
om.dom.text = function om$dom$text(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10915 = arguments.length;
var i__5730__auto___10916 = 0;
while (true) {
if (i__5730__auto___10916 < len__5729__auto___10915) {
args__5736__auto__.push(arguments[i__5730__auto___10916]);
var G__10917 = i__5730__auto___10916 + 1;
i__5730__auto___10916 = G__10917;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.text.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.text.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.text.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.text.cljs$lang$maxFixedArity = 1;
om.dom.text.cljs$lang$applyTo = function(seq10558) {
var G__10559 = cljs.core.first.call(null, seq10558);
var seq10558__$1 = cljs.core.next.call(null, seq10558);
return om.dom.text.cljs$core$IFn$_invoke$arity$variadic(G__10559, seq10558__$1);
};
om.dom.defs = function om$dom$defs(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10918 = arguments.length;
var i__5730__auto___10919 = 0;
while (true) {
if (i__5730__auto___10919 < len__5729__auto___10918) {
args__5736__auto__.push(arguments[i__5730__auto___10919]);
var G__10920 = i__5730__auto___10919 + 1;
i__5730__auto___10919 = G__10920;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.defs.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.defs.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.defs.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.defs.cljs$lang$maxFixedArity = 1;
om.dom.defs.cljs$lang$applyTo = function(seq10560) {
var G__10561 = cljs.core.first.call(null, seq10560);
var seq10560__$1 = cljs.core.next.call(null, seq10560);
return om.dom.defs.cljs$core$IFn$_invoke$arity$variadic(G__10561, seq10560__$1);
};
om.dom.linearGradient = function om$dom$linearGradient(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10921 = arguments.length;
var i__5730__auto___10922 = 0;
while (true) {
if (i__5730__auto___10922 < len__5729__auto___10921) {
args__5736__auto__.push(arguments[i__5730__auto___10922]);
var G__10923 = i__5730__auto___10922 + 1;
i__5730__auto___10922 = G__10923;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.linearGradient.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.linearGradient.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.linearGradient.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.linearGradient.cljs$lang$maxFixedArity = 1;
om.dom.linearGradient.cljs$lang$applyTo = function(seq10562) {
var G__10563 = cljs.core.first.call(null, seq10562);
var seq10562__$1 = cljs.core.next.call(null, seq10562);
return om.dom.linearGradient.cljs$core$IFn$_invoke$arity$variadic(G__10563, seq10562__$1);
};
om.dom.polygon = function om$dom$polygon(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10924 = arguments.length;
var i__5730__auto___10925 = 0;
while (true) {
if (i__5730__auto___10925 < len__5729__auto___10924) {
args__5736__auto__.push(arguments[i__5730__auto___10925]);
var G__10926 = i__5730__auto___10925 + 1;
i__5730__auto___10925 = G__10926;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.polygon.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.polygon.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.polygon.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.polygon.cljs$lang$maxFixedArity = 1;
om.dom.polygon.cljs$lang$applyTo = function(seq10564) {
var G__10565 = cljs.core.first.call(null, seq10564);
var seq10564__$1 = cljs.core.next.call(null, seq10564);
return om.dom.polygon.cljs$core$IFn$_invoke$arity$variadic(G__10565, seq10564__$1);
};
om.dom.radialGradient = function om$dom$radialGradient(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10927 = arguments.length;
var i__5730__auto___10928 = 0;
while (true) {
if (i__5730__auto___10928 < len__5729__auto___10927) {
args__5736__auto__.push(arguments[i__5730__auto___10928]);
var G__10929 = i__5730__auto___10928 + 1;
i__5730__auto___10928 = G__10929;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.radialGradient.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.radialGradient.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.radialGradient.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.radialGradient.cljs$lang$maxFixedArity = 1;
om.dom.radialGradient.cljs$lang$applyTo = function(seq10566) {
var G__10567 = cljs.core.first.call(null, seq10566);
var seq10566__$1 = cljs.core.next.call(null, seq10566);
return om.dom.radialGradient.cljs$core$IFn$_invoke$arity$variadic(G__10567, seq10566__$1);
};
om.dom.stop = function om$dom$stop(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10930 = arguments.length;
var i__5730__auto___10931 = 0;
while (true) {
if (i__5730__auto___10931 < len__5729__auto___10930) {
args__5736__auto__.push(arguments[i__5730__auto___10931]);
var G__10932 = i__5730__auto___10931 + 1;
i__5730__auto___10931 = G__10932;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.stop.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.stop.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.stop.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.stop.cljs$lang$maxFixedArity = 1;
om.dom.stop.cljs$lang$applyTo = function(seq10568) {
var G__10569 = cljs.core.first.call(null, seq10568);
var seq10568__$1 = cljs.core.next.call(null, seq10568);
return om.dom.stop.cljs$core$IFn$_invoke$arity$variadic(G__10569, seq10568__$1);
};
om.dom.tspan = function om$dom$tspan(var_args) {
var args__5736__auto__ = [];
var len__5729__auto___10933 = arguments.length;
var i__5730__auto___10934 = 0;
while (true) {
if (i__5730__auto___10934 < len__5729__auto___10933) {
args__5736__auto__.push(arguments[i__5730__auto___10934]);
var G__10935 = i__5730__auto___10934 + 1;
i__5730__auto___10934 = G__10935;
continue;
} else {
}
break;
}
var argseq__5737__auto__ = 1 < args__5736__auto__.length ? new cljs.core.IndexedSeq(args__5736__auto__.slice(1), 0) : null;
return om.dom.tspan.cljs$core$IFn$_invoke$arity$variadic(arguments[0], argseq__5737__auto__);
};
om.dom.tspan.cljs$core$IFn$_invoke$arity$variadic = function(opts__10316__auto__, children__10317__auto__) {
return React.DOM.tspan.apply(null, cljs.core.into_array.call(null, cljs.core.cons.call(null, opts__10316__auto__, children__10317__auto__)));
};
om.dom.tspan.cljs$lang$maxFixedArity = 1;
om.dom.tspan.cljs$lang$applyTo = function(seq10390) {
var G__10391 = cljs.core.first.call(null, seq10390);
var seq10390__$1 = cljs.core.next.call(null, seq10390);
return om.dom.tspan.cljs$core$IFn$_invoke$arity$variadic(G__10391, seq10390__$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.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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core.display_name[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$);
} else {
var m__5327__auto____$1 = om.core.display_name["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core.init_state[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$);
} else {
var m__5327__auto____$1 = om.core.init_state["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core.should_update[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, next_props, next_state);
} else {
var m__5327__auto____$1 = om.core.should_update["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core.will_mount[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$);
} else {
var m__5327__auto____$1 = om.core.will_mount["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core.did_mount[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$);
} else {
var m__5327__auto____$1 = om.core.did_mount["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core.will_unmount[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$);
} else {
var m__5327__auto____$1 = om.core.will_unmount["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core.will_update[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, next_props, next_state);
} else {
var m__5327__auto____$1 = om.core.will_update["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core.did_update[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, prev_props, prev_state);
} else {
var m__5327__auto____$1 = om.core.did_update["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core.will_receive_props[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, next_props);
} else {
var m__5327__auto____$1 = om.core.will_receive_props["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core.render[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$);
} else {
var m__5327__auto____$1 = om.core.render["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core.render_props[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, props, state);
} else {
var m__5327__auto____$1 = om.core.render_props["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core.render_state[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, state);
} else {
var m__5327__auto____$1 = om.core.render_state["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core._om_swap_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, cursor, korks, f, tag);
} else {
var m__5327__auto____$1 = om.core._om_swap_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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 args12790 = [];
var len__5729__auto___12793 = arguments.length;
var i__5730__auto___12794 = 0;
while (true) {
if (i__5730__auto___12794 < len__5729__auto___12793) {
args12790.push(arguments[i__5730__auto___12794]);
var G__12795 = i__5730__auto___12794 + 1;
i__5730__auto___12794 = G__12795;
continue;
} else {
}
break;
}
var G__12792 = args12790.length;
switch(G__12792) {
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(args12790.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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core._get_state[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$);
} else {
var m__5327__auto____$1 = om.core._get_state["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core._get_state[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, ks);
} else {
var m__5327__auto____$1 = om.core._get_state["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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 args12797 = [];
var len__5729__auto___12800 = arguments.length;
var i__5730__auto___12801 = 0;
while (true) {
if (i__5730__auto___12801 < len__5729__auto___12800) {
args12797.push(arguments[i__5730__auto___12801]);
var G__12802 = i__5730__auto___12801 + 1;
i__5730__auto___12801 = G__12802;
continue;
} else {
}
break;
}
var G__12799 = args12797.length;
switch(G__12799) {
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(args12797.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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core._get_render_state[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$);
} else {
var m__5327__auto____$1 = om.core._get_render_state["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core._get_render_state[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, ks);
} else {
var m__5327__auto____$1 = om.core._get_render_state["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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 args12804 = [];
var len__5729__auto___12807 = arguments.length;
var i__5730__auto___12808 = 0;
while (true) {
if (i__5730__auto___12808 < len__5729__auto___12807) {
args12804.push(arguments[i__5730__auto___12808]);
var G__12809 = i__5730__auto___12808 + 1;
i__5730__auto___12808 = G__12809;
continue;
} else {
}
break;
}
var G__12806 = args12804.length;
switch(G__12806) {
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(args12804.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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core._set_state_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, val, render);
} else {
var m__5327__auto____$1 = om.core._set_state_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core._set_state_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, ks, val, render);
} else {
var m__5327__auto____$1 = om.core._set_state_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core._get_queue[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$);
} else {
var m__5327__auto____$1 = om.core._get_queue["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core._queue_render_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, c);
} else {
var m__5327__auto____$1 = om.core._queue_render_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core._empty_queue_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$);
} else {
var m__5327__auto____$1 = om.core._empty_queue_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = x == null ? null : x;
var m__5327__auto__ = om.core._value[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, x);
} else {
var m__5327__auto____$1 = om.core._value["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = cursor == null ? null : cursor;
var m__5327__auto__ = om.core._path[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, cursor);
} else {
var m__5327__auto____$1 = om.core._path["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = cursor == null ? null : cursor;
var m__5327__auto__ = om.core._state[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, cursor);
} else {
var m__5327__auto____$1 = om.core._state["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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 args12811 = [];
var len__5729__auto___12814 = arguments.length;
var i__5730__auto___12815 = 0;
while (true) {
if (i__5730__auto___12815 < len__5729__auto___12814) {
args12811.push(arguments[i__5730__auto___12815]);
var G__12816 = i__5730__auto___12815 + 1;
i__5730__auto___12815 = G__12816;
continue;
} else {
}
break;
}
var G__12813 = args12811.length;
switch(G__12813) {
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(args12811.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__5326__auto__ = value == null ? null : value;
var m__5327__auto__ = om.core._to_cursor[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, value, state);
} else {
var m__5327__auto____$1 = om.core._to_cursor["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = value == null ? null : value;
var m__5327__auto__ = om.core._to_cursor[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, value, state, path);
} else {
var m__5327__auto____$1 = om.core._to_cursor["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = cursor == null ? null : cursor;
var m__5327__auto__ = om.core._derive[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, cursor, derived, state, path);
} else {
var m__5327__auto____$1 = om.core._derive["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.call(null, cursor, derived, state, path);
} else {
throw cljs.core.missing_protocol.call(null, "ICursorDerive.-derive", cursor);
}
}
}
};
om.core.to_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__5326__auto__ = cursor == null ? null : cursor;
var m__5327__auto__ = om.core._transact_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, cursor, korks, f, tag);
} else {
var m__5327__auto____$1 = om.core._transact_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = x == null ? null : x;
var m__5327__auto__ = om.core._listen_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, x, key, tx_listen);
} else {
var m__5327__auto____$1 = om.core._listen_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = x == null ? null : x;
var m__5327__auto__ = om.core._unlisten_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, x, key);
} else {
var m__5327__auto____$1 = om.core._unlisten_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = x == null ? null : x;
var m__5327__auto__ = om.core._notify_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, x, tx_data, root_cursor);
} else {
var m__5327__auto____$1 = om.core._notify_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core._set_property_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, id, p, val);
} else {
var m__5327__auto____$1 = om.core._set_property_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core._remove_property_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, id, p);
} else {
var m__5327__auto____$1 = om.core._remove_property_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core._remove_properties_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, id);
} else {
var m__5327__auto____$1 = om.core._remove_properties_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core._get_property[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, id, p);
} else {
var m__5327__auto____$1 = om.core._get_property["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = cursor == null ? null : cursor;
var m__5327__auto__ = om.core._root_key[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, cursor);
} else {
var m__5327__auto____$1 = om.core._root_key["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core._adapt[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, other);
} else {
var m__5327__auto____$1 = om.core._adapt["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core._add_dep_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, c);
} else {
var m__5327__auto____$1 = om.core._add_dep_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core._remove_dep_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$, c);
} else {
var m__5327__auto____$1 = om.core._remove_dep_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core._refresh_deps_BANG_[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$);
} else {
var m__5327__auto____$1 = om.core._refresh_deps_BANG_["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__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__5326__auto__ = this$ == null ? null : this$;
var m__5327__auto__ = om.core._get_deps[goog.typeOf(x__5326__auto__)];
if (!(m__5327__auto__ == null)) {
return m__5327__auto__.call(null, this$);
} else {
var m__5327__auto____$1 = om.core._get_deps["_"];
if (!(m__5327__auto____$1 == null)) {
return m__5327__auto____$1.call(null, this$);
} else {
throw cljs.core.missing_protocol.call(null, "IOmRef.-get-deps", this$);
}
}
}
};
om.core.notify_STAR_;
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 args12822 = [];
var len__5729__auto___12826 = arguments.length;
var i__5730__auto___12827 = 0;
while (true) {
if (i__5730__auto___12827 < len__5729__auto___12826) {
args12822.push(arguments[i__5730__auto___12827]);
var G__12828 = i__5730__auto___12827 + 1;
i__5730__auto___12827 = G__12828;
continue;
} else {
}
break;
}
var G__12824 = args12822.length;
switch(G__12824) {
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(args12822.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__12825 = x.props["__om_cursor"];
var G__12825__$1 = cljs.core.seq.call(null, korks__$1) ? cljs.core.get_in.call(null, G__12825, korks__$1) : G__12825;
return G__12825__$1;
};
om.core.get_props.cljs$lang$maxFixedArity = 2;
om.core.get_state = function om$core$get_state(var_args) {
var args12830 = [];
var len__5729__auto___12833 = arguments.length;
var i__5730__auto___12834 = 0;
while (true) {
if (i__5730__auto___12834 < len__5729__auto___12833) {
args12830.push(arguments[i__5730__auto___12834]);
var G__12835 = i__5730__auto___12834 + 1;
i__5730__auto___12834 = G__12835;
continue;
} else {
}
break;
}
var G__12832 = args12830.length;
switch(G__12832) {
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(args12830.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 args12837 = [];
var len__5729__auto___12840 = arguments.length;
var i__5730__auto___12841 = 0;
while (true) {
if (i__5730__auto___12841 < len__5729__auto___12840) {
args12837.push(arguments[i__5730__auto___12841]);
var G__12842 = i__5730__auto___12841 + 1;
i__5730__auto___12841 = G__12842;
continue;
} else {
}
break;
}
var G__12839 = args12837.length;
switch(G__12839) {
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(args12837.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__12845 = state;
G__12845["__om_prev_state"] = state["__om_state"];
G__12845["__om_state"] = pending_state;
G__12845["__om_pending_state"] = null;
return G__12845;
} else {
return null;
}
};
om.core.merge_props_state = function om$core$merge_props_state(var_args) {
var args12846 = [];
var len__5729__auto___12849 = arguments.length;
var i__5730__auto___12850 = 0;
while (true) {
if (i__5730__auto___12850 < len__5729__auto___12849) {
args12846.push(arguments[i__5730__auto___12850]);
var G__12851 = i__5730__auto___12850 + 1;
i__5730__auto___12850 = G__12851;
continue;
} else {
}
break;
}
var G__12848 = args12846.length;
switch(G__12848) {
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(args12846.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__4671__auto__ = props;
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__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__4671__auto__ = state["__om_pending_state"];
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__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.unobserve;
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_12875 = this$.state;
om.core.did_update.call(null, c, om.core.get_props.call(null, {"props":prev_props, "isOmComponent":true}), function() {
var or__4671__auto__ = state_12875["__om_prev_state"];
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return state_12875["__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__12856 = cljs.core.seq.call(null, refs);
var chunk__12857 = null;
var count__12858 = 0;
var i__12859 = 0;
while (true) {
if (i__12859 < count__12858) {
var ref = cljs.core._nth.call(null, chunk__12857, i__12859);
om.core.unobserve.call(null, this$, ref);
var G__12876 = seq__12856;
var G__12877 = chunk__12857;
var G__12878 = count__12858;
var G__12879 = i__12859 + 1;
seq__12856 = G__12876;
chunk__12857 = G__12877;
count__12858 = G__12878;
i__12859 = G__12879;
continue;
} else {
var temp__4425__auto____$1 = cljs.core.seq.call(null, seq__12856);
if (temp__4425__auto____$1) {
var seq__12856__$1 = temp__4425__auto____$1;
if (cljs.core.chunked_seq_QMARK_.call(null, seq__12856__$1)) {
var c__5474__auto__ = cljs.core.chunk_first.call(null, seq__12856__$1);
var G__12880 = cljs.core.chunk_rest.call(null, seq__12856__$1);
var G__12881 = c__5474__auto__;
var G__12882 = cljs.core.count.call(null, c__5474__auto__);
var G__12883 = 0;
seq__12856 = G__12880;
chunk__12857 = G__12881;
count__12858 = G__12882;
i__12859 = G__12883;
continue;
} else {
var ref = cljs.core.first.call(null, seq__12856__$1);
om.core.unobserve.call(null, this$, ref);
var G__12884 = cljs.core.next.call(null, seq__12856__$1);
var G__12885 = null;
var G__12886 = 0;
var G__12887 = 0;
seq__12856 = G__12884;
chunk__12857 = G__12885;
count__12858 = G__12886;
i__12859 = G__12887;
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__4659__auto__ = om.core.cursor_QMARK_.call(null, cursor);
if (cljs.core.truth_(and__4659__auto__)) {
var and__4659__auto____$1 = om.core.cursor_QMARK_.call(null, next_cursor);
if (cljs.core.truth_(and__4659__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__4659__auto____$1;
}
} else {
return and__4659__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__4659__auto__ = !(cljs.core.count.call(null, state["__om_refs"]) === 0);
if (and__4659__auto__) {
return cljs.core.some.call(null, function(and__4659__auto__, cursor, next_cursor, props, state, c, this$) {
return function(p1__12853_SHARP_) {
return om.core.ref_changed_QMARK_.call(null, p1__12853_SHARP_);
};
}(and__4659__auto__, cursor, next_cursor, props, state, c, this$), state["__om_refs"]);
} else {
return and__4659__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_12862 = om.core._STAR_parent_STAR_;
var _STAR_state_STAR_12863 = om.core._STAR_state_STAR_;
var _STAR_instrument_STAR_12864 = om.core._STAR_instrument_STAR_;
var _STAR_descriptor_STAR_12865 = om.core._STAR_descriptor_STAR_;
var _STAR_root_key_STAR_12866 = 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_12866;
om.core._STAR_descriptor_STAR_ = _STAR_descriptor_STAR_12865;
om.core._STAR_instrument_STAR_ = _STAR_instrument_STAR_12864;
om.core._STAR_state_STAR_ = _STAR_state_STAR_12863;
om.core._STAR_parent_STAR_ = _STAR_parent_STAR_12862;
}
}, function(next_props, next_state) {
var this$ = this;
var c_12888 = om.core.children.call(null, this$);
if (!(c_12888 == null) ? false || c_12888.om$core$IWillUpdate$ ? true : !c_12888.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IWillUpdate, c_12888) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IWillUpdate, c_12888)) {
var state_12889 = this$.state;
om.core.will_update.call(null, c_12888, 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__4671__auto__ = props["__om_init_state"];
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__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__4671__auto__ = id;
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__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_12890 = om.core.children.call(null, this$);
if (!(c_12890 == null) ? false || c_12890.om$core$IWillMount$ ? true : !c_12890.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IWillMount, c_12890) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IWillMount, c_12890)) {
om.core.will_mount.call(null, c_12890);
} 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 x12892 = obj;
x12892.om$core$ISetState$ = true;
x12892.om$core$ISetState$_set_state_BANG_$arity$3 = function(x12892) {
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__4659__auto__ = !(app_state == null);
if (and__4659__auto__) {
return render;
} else {
return and__4659__auto__;
}
}())) {
return om.core._queue_render_BANG_.call(null, app_state, this$__$1);
} else {
return null;
}
};
}(x12892);
x12892.om$core$ISetState$_set_state_BANG_$arity$4 = function(x12892) {
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__4659__auto__ = !(app_state == null);
if (and__4659__auto__) {
return render;
} else {
return and__4659__auto__;
}
}())) {
return om.core._queue_render_BANG_.call(null, app_state, this$__$1);
} else {
return null;
}
};
}(x12892);
x12892.om$core$IGetRenderState$ = true;
x12892.om$core$IGetRenderState$_get_render_state$arity$1 = function(x12892) {
return function(this$) {
var this$__$1 = this;
return this$__$1.state["__om_state"];
};
}(x12892);
x12892.om$core$IGetRenderState$_get_render_state$arity$2 = function(x12892) {
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);
};
}(x12892);
x12892.om$core$IGetState$ = true;
x12892.om$core$IGetState$_get_state$arity$1 = function(x12892) {
return function(this$) {
var this$__$1 = this;
var state = this$__$1.state;
var or__4671__auto__ = state["__om_pending_state"];
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return state["__om_state"];
}
};
}(x12892);
x12892.om$core$IGetState$_get_state$arity$2 = function(x12892) {
return function(this$, ks) {
var this$__$1 = this;
return cljs.core.get_in.call(null, om.core._get_state.call(null, this$__$1), ks);
};
}(x12892);
return x12892;
};
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.get_node;
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.mounted_QMARK_;
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__4671__auto__ = props["__om_init_state"];
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return cljs.core.PersistentArrayMap.EMPTY;
}
}();
var om_id = function() {
var or__4671__auto__ = (new cljs.core.Keyword("om.core", "id", "om.core/id", 299074693)).cljs$core$IFn$_invoke$arity$1(istate);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__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_12903 = om.core.children.call(null, this$);
if (!(c_12903 == null) ? false || c_12903.om$core$IWillMount$ ? true : !c_12903.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IWillMount, c_12903) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IWillMount, c_12903)) {
om.core.will_mount.call(null, c_12903);
} 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__12897 = cljs.core.seq.call(null, refs);
var chunk__12898 = null;
var count__12899 = 0;
var i__12900 = 0;
while (true) {
if (i__12900 < count__12899) {
var ref = cljs.core._nth.call(null, chunk__12898, i__12900);
om.core.unobserve.call(null, this$, ref);
var G__12904 = seq__12897;
var G__12905 = chunk__12898;
var G__12906 = count__12899;
var G__12907 = i__12900 + 1;
seq__12897 = G__12904;
chunk__12898 = G__12905;
count__12899 = G__12906;
i__12900 = G__12907;
continue;
} else {
var temp__4425__auto____$1 = cljs.core.seq.call(null, seq__12897);
if (temp__4425__auto____$1) {
var seq__12897__$1 = temp__4425__auto____$1;
if (cljs.core.chunked_seq_QMARK_.call(null, seq__12897__$1)) {
var c__5474__auto__ = cljs.core.chunk_first.call(null, seq__12897__$1);
var G__12908 = cljs.core.chunk_rest.call(null, seq__12897__$1);
var G__12909 = c__5474__auto__;
var G__12910 = cljs.core.count.call(null, c__5474__auto__);
var G__12911 = 0;
seq__12897 = G__12908;
chunk__12898 = G__12909;
count__12899 = G__12910;
i__12900 = G__12911;
continue;
} else {
var ref = cljs.core.first.call(null, seq__12897__$1);
om.core.unobserve.call(null, this$, ref);
var G__12912 = cljs.core.next.call(null, seq__12897__$1);
var G__12913 = null;
var G__12914 = 0;
var G__12915 = 0;
seq__12897 = G__12912;
chunk__12898 = G__12913;
count__12899 = G__12914;
i__12900 = G__12915;
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_12916 = this$.props;
var c_12917 = om.core.children.call(null, this$);
if (!(c_12917 == null) ? false || c_12917.om$core$IWillUpdate$ ? true : !c_12917.cljs$lang$protocol_mask$partition$ ? cljs.core.native_satisfies_QMARK_.call(null, om.core.IWillUpdate, c_12917) : false : cljs.core.native_satisfies_QMARK_.call(null, om.core.IWillUpdate, c_12917)) {
var state_12918 = this$.state;
om.core.will_update.call(null, c_12917, 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_12919 = this$.state;
om.core.did_update.call(null, c, om.core.get_props.call(null, {"props":prev_props, "isOmComponent":true}), function() {
var or__4671__auto__ = (new cljs.core.Keyword(null, "previous-state", "previous-state", 1888227923)).cljs$core$IFn$_invoke$arity$1(states);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__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 x12921 = cljs.core.clj__GT_js.call(null, methods$);
x12921.om$core$ISetState$ = true;
x12921.om$core$ISetState$_set_state_BANG_$arity$3 = function(x12921) {
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__4659__auto__ = !(gstate == null);
if (and__4659__auto__) {
return render;
} else {
return and__4659__auto__;
}
}())) {
return om.core._queue_render_BANG_.call(null, gstate, this$__$1);
} else {
return null;
}
};
}(x12921);
x12921.om$core$ISetState$_set_state_BANG_$arity$4 = function(x12921) {
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);
};
}(x12921);
x12921.om$core$IGetRenderState$ = true;
x12921.om$core$IGetRenderState$_get_render_state$arity$1 = function(x12921) {
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);
};
}(x12921);
x12921.om$core$IGetRenderState$_get_render_state$arity$2 = function(x12921) {
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);
};
}(x12921);
x12921.om$core$IGetState$ = true;
x12921.om$core$IGetState$_get_state$arity$1 = function(x12921) {
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__4671__auto__ = (new cljs.core.Keyword(null, "pending-state", "pending-state", 1525896973)).cljs$core$IFn$_invoke$arity$1(states);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__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"];
}
};
}(x12921);
x12921.om$core$IGetState$_get_state$arity$2 = function(x12921) {
return function(this$, ks) {
var this$__$1 = this;
return cljs.core.get_in.call(null, om.core._get_state.call(null, this$__$1), ks);
};
}(x12921);
return x12921;
};
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__12925) {
var vec__12926 = p__12925;
var k = cljs.core.nth.call(null, vec__12926, 0, null);
var v = cljs.core.nth.call(null, vec__12926, 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__12927 = null;
var G__12927__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__12927__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__12927 = function(self__, k, not_found) {
switch(arguments.length) {
case 2:
return G__12927__2.call(this, self__, k);
case 3:
return G__12927__3.call(this, self__, k, not_found);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__12927.cljs$core$IFn$_invoke$arity$2 = G__12927__2;
G__12927.cljs$core$IFn$_invoke$arity$3 = G__12927__3;
return G__12927;
}();
om.core.MapCursor.prototype.apply = function(self__, args12924) {
var self__ = this;
var self____$1 = this;
return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone.call(null, args12924)));
};
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write.call(null, writer__5270__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__12929 = null;
var G__12929__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__12929__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__12929 = function(self__, k, not_found) {
switch(arguments.length) {
case 2:
return G__12929__2.call(this, self__, k);
case 3:
return G__12929__3.call(this, self__, k, not_found);
}
throw new Error("Invalid arity: " + arguments.length);
};
G__12929.cljs$core$IFn$_invoke$arity$2 = G__12929__2;
G__12929.cljs$core$IFn$_invoke$arity$3 = G__12929__3;
return G__12929;
}();
om.core.IndexedCursor.prototype.apply = function(self__, args12928) {
var self__ = this;
var self____$1 = this;
return self____$1.call.apply(self____$1, [self____$1].concat(cljs.core.aclone.call(null, args12928)));
};
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__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write.call(null, writer__5270__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 x12931 = cljs.core.clone.call(null, val);
x12931.cljs$core$IDeref$ = true;
x12931.cljs$core$IDeref$_deref$arity$1 = function(x12931) {
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));
};
}(x12931);
x12931.om$core$ICursor$ = true;
x12931.om$core$ICursor$_path$arity$1 = function(x12931) {
return function(_) {
var ___$1 = this;
return path;
};
}(x12931);
x12931.om$core$ICursor$_state$arity$1 = function(x12931) {
return function(_) {
var ___$1 = this;
return state;
};
}(x12931);
x12931.om$core$ITransact$ = true;
x12931.om$core$ITransact$_transact_BANG_$arity$4 = function(x12931) {
return function(this$, korks, f, tag) {
var this$__$1 = this;
return om.core.transact_STAR_.call(null, state, this$__$1, korks, f, tag);
};
}(x12931);
x12931.cljs$core$IEquiv$ = true;
x12931.cljs$core$IEquiv$_equiv$arity$2 = function(x12931) {
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);
}
};
}(x12931);
return x12931;
};
om.core.to_cursor = function om$core$to_cursor(var_args) {
var args12932 = [];
var len__5729__auto___12937 = arguments.length;
var i__5730__auto___12938 = 0;
while (true) {
if (i__5730__auto___12938 < len__5729__auto___12937) {
args12932.push(arguments[i__5730__auto___12938]);
var G__12939 = i__5730__auto___12938 + 1;
i__5730__auto___12938 = G__12939;
continue;
} else {
}
break;
}
var G__12934 = args12932.length;
switch(G__12934) {
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(args12932.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.commit_BANG_;
om.core.id;
om.core.refresh_props_BANG_;
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 x12944 = cljs.core.clone.call(null, x);
x12944.cljs$core$ICloneable$ = true;
x12944.cljs$core$ICloneable$_clone$arity$1 = function(x12944) {
return function(this$) {
var this$__$1 = this;
return om$core$ref_sub_cursor.call(null, cljs.core.clone.call(null, x), parent);
};
}(x12944);
x12944.om$core$IAdapt$ = true;
x12944.om$core$IAdapt$_adapt$arity$2 = function(x12944) {
return function(this$, other) {
var this$__$1 = this;
return om$core$ref_sub_cursor.call(null, om.core.adapt.call(null, x, other), parent);
};
}(x12944);
x12944.om$core$ICursorDerive$ = true;
x12944.om$core$ICursorDerive$_derive$arity$4 = function(x12944) {
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_;
}
};
}(x12944);
x12944.om$core$ITransact$ = true;
x12944.om$core$ITransact$_transact_BANG_$arity$4 = function(x12944) {
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);
};
}(x12944);
return x12944;
};
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 x12952 = cljs.core.clone.call(null, cursor);
x12952.om$core$ICursorDerive$ = true;
x12952.om$core$ICursorDerive$_derive$arity$4 = function(x12952, 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_;
}
};
}(x12952, path, storage);
x12952.om$core$IOmRef$ = true;
x12952.om$core$IOmRef$_add_dep_BANG_$arity$2 = function(x12952, 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);
};
}(x12952, path, storage);
x12952.om$core$IOmRef$_remove_dep_BANG_$arity$2 = function(x12952, 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;
}
};
}(x12952, path, storage);
x12952.om$core$IOmRef$_refresh_deps_BANG_$arity$1 = function(x12952, path, storage) {
return function(_) {
var ___$1 = this;
var seq__12953 = cljs.core.seq.call(null, cljs.core.vals.call(null, cljs.core.deref.call(null, storage)));
var chunk__12954 = null;
var count__12955 = 0;
var i__12956 = 0;
while (true) {
if (i__12956 < count__12955) {
var c = cljs.core._nth.call(null, chunk__12954, i__12956);
om.core._queue_render_BANG_.call(null, om.core.state.call(null, cursor), c);
var G__12957 = seq__12953;
var G__12958 = chunk__12954;
var G__12959 = count__12955;
var G__12960 = i__12956 + 1;
seq__12953 = G__12957;
chunk__12954 = G__12958;
count__12955 = G__12959;
i__12956 = G__12960;
continue;
} else {
var temp__4425__auto__ = cljs.core.seq.call(null, seq__12953);
if (temp__4425__auto__) {
var seq__12953__$1 = temp__4425__auto__;
if (cljs.core.chunked_seq_QMARK_.call(null, seq__12953__$1)) {
var c__5474__auto__ = cljs.core.chunk_first.call(null, seq__12953__$1);
var G__12961 = cljs.core.chunk_rest.call(null, seq__12953__$1);
var G__12962 = c__5474__auto__;
var G__12963 = cljs.core.count.call(null, c__5474__auto__);
var G__12964 = 0;
seq__12953 = G__12961;
chunk__12954 = G__12962;
count__12955 = G__12963;
i__12956 = G__12964;
continue;
} else {
var c = cljs.core.first.call(null, seq__12953__$1);
om.core._queue_render_BANG_.call(null, om.core.state.call(null, cursor), c);
var G__12965 = cljs.core.next.call(null, seq__12953__$1);
var G__12966 = null;
var G__12967 = 0;
var G__12968 = 0;
seq__12953 = G__12965;
chunk__12954 = G__12966;
count__12955 = G__12967;
i__12956 = G__12968;
continue;
}
} else {
return null;
}
}
break;
}
};
}(x12952, path, storage);
x12952.om$core$IOmRef$_get_deps$arity$1 = function(x12952, path, storage) {
return function(_) {
var ___$1 = this;
return cljs.core.deref.call(null, storage);
};
}(x12952, path, storage);
x12952.om$core$ITransact$ = true;
x12952.om$core$ITransact$_transact_BANG_$arity$4 = function(x12952, 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);
};
}(x12952, path, storage);
return x12952;
}
};
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__4671__auto__ = state["__om_refs"];
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__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__4671__auto__ = state.om$render$T;
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
return 0;
}
};
om.core.render_all = function om$core$render_all(var_args) {
var args12969 = [];
var len__5729__auto___12976 = arguments.length;
var i__5730__auto___12977 = 0;
while (true) {
if (i__5730__auto___12977 < len__5729__auto___12976) {
args12969.push(arguments[i__5730__auto___12977]);
var G__12978 = i__5730__auto___12977 + 1;
i__5730__auto___12977 = G__12978;
continue;
} else {
}
break;
}
var G__12971 = args12969.length;
switch(G__12971) {
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(args12969.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__12972_12980 = cljs.core.seq.call(null, cljs.core.deref.call(null, om.core.refresh_set));
var chunk__12973_12981 = null;
var count__12974_12982 = 0;
var i__12975_12983 = 0;
while (true) {
if (i__12975_12983 < count__12974_12982) {
var f_12984 = cljs.core._nth.call(null, chunk__12973_12981, i__12975_12983);
f_12984.call(null);
var G__12985 = seq__12972_12980;
var G__12986 = chunk__12973_12981;
var G__12987 = count__12974_12982;
var G__12988 = i__12975_12983 + 1;
seq__12972_12980 = G__12985;
chunk__12973_12981 = G__12986;
count__12974_12982 = G__12987;
i__12975_12983 = G__12988;
continue;
} else {
var temp__4425__auto___12989 = cljs.core.seq.call(null, seq__12972_12980);
if (temp__4425__auto___12989) {
var seq__12972_12990__$1 = temp__4425__auto___12989;
if (cljs.core.chunked_seq_QMARK_.call(null, seq__12972_12990__$1)) {
var c__5474__auto___12991 = cljs.core.chunk_first.call(null, seq__12972_12990__$1);
var G__12992 = cljs.core.chunk_rest.call(null, seq__12972_12990__$1);
var G__12993 = c__5474__auto___12991;
var G__12994 = cljs.core.count.call(null, c__5474__auto___12991);
var G__12995 = 0;
seq__12972_12980 = G__12992;
chunk__12973_12981 = G__12993;
count__12974_12982 = G__12994;
i__12975_12983 = G__12995;
continue;
} else {
var f_12996 = cljs.core.first.call(null, seq__12972_12990__$1);
f_12996.call(null);
var G__12997 = cljs.core.next.call(null, seq__12972_12990__$1);
var G__12998 = null;
var G__12999 = 0;
var G__13000 = 0;
seq__12972_12980 = G__12997;
chunk__12973_12981 = G__12998;
count__12974_12982 = G__12999;
i__12975_12983 = G__13000;
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__4671__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__4671__auto__) {
return or__4671__auto__;
} else {
var or__4671__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__4671__auto____$1) {
return or__4671__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 args13011 = [];
var len__5729__auto___13014 = arguments.length;
var i__5730__auto___13015 = 0;
while (true) {
if (i__5730__auto___13015 < len__5729__auto___13014) {
args13011.push(arguments[i__5730__auto___13015]);
var G__13016 = i__5730__auto___13015 + 1;
i__5730__auto___13015 = G__13016;
continue;
} else {
}
break;
}
var G__13013 = args13011.length;
switch(G__13013) {
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(args13011.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_13018 = function() {
var or__4671__auto__ = descriptor;
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__auto__;
} else {
var or__4671__auto____$1 = om.core._STAR_descriptor_STAR_;
if (cljs.core.truth_(or__4671__auto____$1)) {
return or__4671__auto____$1;
} else {
return om.core.pure_descriptor;
}
}
}();
if (goog.object.get(f, "om$descriptor") == null || !(rdesc_13018 === goog.object.get(f, "om$tag"))) {
var factory_13019 = React.createFactory(React.createClass(rdesc_13018));
goog.object.set(f, "om$descriptor", factory_13019);
goog.object.set(f, "om$tag", rdesc_13018);
} 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 args13020 = [];
var len__5729__auto___13023 = arguments.length;
var i__5730__auto___13024 = 0;
while (true) {
if (i__5730__auto___13024 < len__5729__auto___13023) {
args13020.push(arguments[i__5730__auto___13024]);
var G__13025 = i__5730__auto___13024 + 1;
i__5730__auto___13024 = G__13025;
continue;
} else {
}
break;
}
var G__13022 = args13020.length;
switch(G__13022) {
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(args13020.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 args13027 = [];
var len__5729__auto___13032 = arguments.length;
var i__5730__auto___13033 = 0;
while (true) {
if (i__5730__auto___13033 < len__5729__auto___13032) {
args13027.push(arguments[i__5730__auto___13033]);
var G__13034 = i__5730__auto___13033 + 1;
i__5730__auto___13033 = G__13034;
continue;
} else {
}
break;
}
var G__13029 = args13027.length;
switch(G__13029) {
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(args13027.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__13030 = m;
var map__13030__$1 = (!(map__13030 == null) ? map__13030.cljs$lang$protocol_mask$partition0$ & 64 || map__13030.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.call(null, cljs.core.hash_map, map__13030) : map__13030;
var key = cljs.core.get.call(null, map__13030__$1, new cljs.core.Keyword(null, "key", "key", -1516042587));
var key_fn = cljs.core.get.call(null, map__13030__$1, new cljs.core.Keyword(null, "key-fn", "key-fn", -636154479));
var state = cljs.core.get.call(null, map__13030__$1, new cljs.core.Keyword(null, "state", "state", -1988618099));
var init_state = cljs.core.get.call(null, map__13030__$1, new cljs.core.Keyword(null, "init-state", "init-state", 1450863212));
var opts = cljs.core.get.call(null, map__13030__$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__4671__auto__ = (new cljs.core.Keyword(null, "shared", "shared", -384145993)).cljs$core$IFn$_invoke$arity$1(m);
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__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__13030, map__13030__$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__13030, map__13030__$1, key, key_fn, state, init_state, opts, dataf, cursor_SINGLEQUOTE_, rkey, shared, ctor) : function(map__13030, map__13030__$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__13030, map__13030__$1, key, key_fn, state, init_state, opts, dataf, cursor_SINGLEQUOTE_, rkey, shared, ctor), "__om_init_state":init_state, "key":function() {
var or__4671__auto__ = rkey;
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__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 args13036 = [];
var len__5729__auto___13039 = arguments.length;
var i__5730__auto___13040 = 0;
while (true) {
if (i__5730__auto___13040 < len__5729__auto___13039) {
args13036.push(arguments[i__5730__auto___13040]);
var G__13041 = i__5730__auto___13040 + 1;
i__5730__auto___13040 = G__13041;
continue;
} else {
}
break;
}
var G__13038 = args13036.length;
switch(G__13038) {
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(args13036.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 args13043 = [];
var len__5729__auto___13046 = arguments.length;
var i__5730__auto___13047 = 0;
while (true) {
if (i__5730__auto___13047 < len__5729__auto___13046) {
args13043.push(arguments[i__5730__auto___13047]);
var G__13048 = i__5730__auto___13047 + 1;
i__5730__auto___13047 = G__13048;
continue;
} else {
}
break;
}
var G__13045 = args13043.length;
switch(G__13045) {
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(args13043.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_13066 = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
var listeners_13067 = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
var render_queue_13068 = cljs.core.atom.call(null, cljs.core.PersistentHashSet.EMPTY);
var x13059_13069 = state;
x13059_13069.om$core$IRootProperties$ = true;
x13059_13069.om$core$IRootProperties$_set_property_BANG_$arity$4 = function(x13059_13069, properties_13066, listeners_13067, render_queue_13068) {
return function(_, id, k, v) {
var ___$1 = this;
return cljs.core.swap_BANG_.call(null, properties_13066, cljs.core.assoc_in, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [id, k], null), v);
};
}(x13059_13069, properties_13066, listeners_13067, render_queue_13068);
x13059_13069.om$core$IRootProperties$_remove_property_BANG_$arity$3 = function(x13059_13069, properties_13066, listeners_13067, render_queue_13068) {
return function(_, id, k) {
var ___$1 = this;
return cljs.core.swap_BANG_.call(null, properties_13066, cljs.core.dissoc, id, k);
};
}(x13059_13069, properties_13066, listeners_13067, render_queue_13068);
x13059_13069.om$core$IRootProperties$_remove_properties_BANG_$arity$2 = function(x13059_13069, properties_13066, listeners_13067, render_queue_13068) {
return function(_, id) {
var ___$1 = this;
return cljs.core.swap_BANG_.call(null, properties_13066, cljs.core.dissoc, id);
};
}(x13059_13069, properties_13066, listeners_13067, render_queue_13068);
x13059_13069.om$core$IRootProperties$_get_property$arity$3 = function(x13059_13069, properties_13066, listeners_13067, render_queue_13068) {
return function(_, id, k) {
var ___$1 = this;
return cljs.core.get_in.call(null, cljs.core.deref.call(null, properties_13066), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [id, k], null));
};
}(x13059_13069, properties_13066, listeners_13067, render_queue_13068);
x13059_13069.om$core$INotify$ = true;
x13059_13069.om$core$INotify$_listen_BANG_$arity$3 = function(x13059_13069, properties_13066, listeners_13067, render_queue_13068) {
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_13067, cljs.core.assoc, key__$1, tx_listen__$1);
}
return this$__$1;
};
}(x13059_13069, properties_13066, listeners_13067, render_queue_13068);
x13059_13069.om$core$INotify$_unlisten_BANG_$arity$2 = function(x13059_13069, properties_13066, listeners_13067, render_queue_13068) {
return function(this$, key__$1) {
var this$__$1 = this;
cljs.core.swap_BANG_.call(null, listeners_13067, cljs.core.dissoc, key__$1);
return this$__$1;
};
}(x13059_13069, properties_13066, listeners_13067, render_queue_13068);
x13059_13069.om$core$INotify$_notify_BANG_$arity$3 = function(x13059_13069, properties_13066, listeners_13067, render_queue_13068) {
return function(this$, tx_data, root_cursor) {
var this$__$1 = this;
var seq__13060_13070 = cljs.core.seq.call(null, cljs.core.deref.call(null, listeners_13067));
var chunk__13061_13071 = null;
var count__13062_13072 = 0;
var i__13063_13073 = 0;
while (true) {
if (i__13063_13073 < count__13062_13072) {
var vec__13064_13074 = cljs.core._nth.call(null, chunk__13061_13071, i__13063_13073);
var __13075 = cljs.core.nth.call(null, vec__13064_13074, 0, null);
var f_13076 = cljs.core.nth.call(null, vec__13064_13074, 1, null);
f_13076.call(null, tx_data, root_cursor);
var G__13077 = seq__13060_13070;
var G__13078 = chunk__13061_13071;
var G__13079 = count__13062_13072;
var G__13080 = i__13063_13073 + 1;
seq__13060_13070 = G__13077;
chunk__13061_13071 = G__13078;
count__13062_13072 = G__13079;
i__13063_13073 = G__13080;
continue;
} else {
var temp__4425__auto___13081 = cljs.core.seq.call(null, seq__13060_13070);
if (temp__4425__auto___13081) {
var seq__13060_13082__$1 = temp__4425__auto___13081;
if (cljs.core.chunked_seq_QMARK_.call(null, seq__13060_13082__$1)) {
var c__5474__auto___13083 = cljs.core.chunk_first.call(null, seq__13060_13082__$1);
var G__13084 = cljs.core.chunk_rest.call(null, seq__13060_13082__$1);
var G__13085 = c__5474__auto___13083;
var G__13086 = cljs.core.count.call(null, c__5474__auto___13083);
var G__13087 = 0;
seq__13060_13070 = G__13084;
chunk__13061_13071 = G__13085;
count__13062_13072 = G__13086;
i__13063_13073 = G__13087;
continue;
} else {
var vec__13065_13088 = cljs.core.first.call(null, seq__13060_13082__$1);
var __13089 = cljs.core.nth.call(null, vec__13065_13088, 0, null);
var f_13090 = cljs.core.nth.call(null, vec__13065_13088, 1, null);
f_13090.call(null, tx_data, root_cursor);
var G__13091 = cljs.core.next.call(null, seq__13060_13082__$1);
var G__13092 = null;
var G__13093 = 0;
var G__13094 = 0;
seq__13060_13070 = G__13091;
chunk__13061_13071 = G__13092;
count__13062_13072 = G__13093;
i__13063_13073 = G__13094;
continue;
}
} else {
}
}
break;
}
return this$__$1;
};
}(x13059_13069, properties_13066, listeners_13067, render_queue_13068);
x13059_13069.om$core$IRenderQueue$ = true;
x13059_13069.om$core$IRenderQueue$_get_queue$arity$1 = function(x13059_13069, properties_13066, listeners_13067, render_queue_13068) {
return function(this$) {
var this$__$1 = this;
return cljs.core.deref.call(null, render_queue_13068);
};
}(x13059_13069, properties_13066, listeners_13067, render_queue_13068);
x13059_13069.om$core$IRenderQueue$_queue_render_BANG_$arity$2 = function(x13059_13069, properties_13066, listeners_13067, render_queue_13068) {
return function(this$, c) {
var this$__$1 = this;
if (cljs.core.contains_QMARK_.call(null, cljs.core.deref.call(null, render_queue_13068), c)) {
return null;
} else {
cljs.core.swap_BANG_.call(null, render_queue_13068, cljs.core.conj, c);
return cljs.core.swap_BANG_.call(null, this$__$1, cljs.core.identity);
}
};
}(x13059_13069, properties_13066, listeners_13067, render_queue_13068);
x13059_13069.om$core$IRenderQueue$_empty_queue_BANG_$arity$1 = function(x13059_13069, properties_13066, listeners_13067, render_queue_13068) {
return function(this$) {
var this$__$1 = this;
return cljs.core.swap_BANG_.call(null, render_queue_13068, cljs.core.empty);
};
}(x13059_13069, properties_13066, listeners_13067, render_queue_13068);
}
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 x13096 = cljs.core.clone.call(null, cursor);
x13096.cljs$core$ICloneable$ = true;
x13096.cljs$core$ICloneable$_clone$arity$1 = function(x13096) {
return function(this$) {
var this$__$1 = this;
return om$core$tag_root_key.call(null, cljs.core.clone.call(null, cursor), root_key);
};
}(x13096);
x13096.om$core$IAdapt$ = true;
x13096.om$core$IAdapt$_adapt$arity$2 = function(x13096) {
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);
};
}(x13096);
x13096.om$core$IRootKey$ = true;
x13096.om$core$IRootKey$_root_key$arity$1 = function(x13096) {
return function(this$) {
var this$__$1 = this;
return root_key;
};
}(x13096);
return x13096;
} else {
return cursor;
}
};
om.core.root = function om$core$root(f, value, p__13097) {
var map__13161 = p__13097;
var map__13161__$1 = (!(map__13161 == null) ? map__13161.cljs$lang$protocol_mask$partition0$ & 64 || map__13161.cljs$core$ISeq$ ? true : false : false) ? cljs.core.apply.call(null, cljs.core.hash_map, map__13161) : map__13161;
var options = map__13161__$1;
var target = cljs.core.get.call(null, map__13161__$1, new cljs.core.Keyword(null, "target", "target", 253001721));
var tx_listen = cljs.core.get.call(null, map__13161__$1, new cljs.core.Keyword(null, "tx-listen", "tx-listen", 119130367));
var path = cljs.core.get.call(null, map__13161__$1, new cljs.core.Keyword(null, "path", "path", -188191168));
var instrument = cljs.core.get.call(null, map__13161__$1, new cljs.core.Keyword(null, "instrument", "instrument", -960698844));
var descriptor = cljs.core.get.call(null, map__13161__$1, new cljs.core.Keyword(null, "descriptor", "descriptor", 76122018));
var adapt = cljs.core.get.call(null, map__13161__$1, new cljs.core.Keyword(null, "adapt", "adapt", -1817022327));
var raf = cljs.core.get.call(null, map__13161__$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__13224 = cljs.core.deref.call(null, om.core.roots);
if (cljs.core.contains_QMARK_.call(null, roots_SINGLEQUOTE__13224, target)) {
cljs.core.get.call(null, roots_SINGLEQUOTE__13224, 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__4671__auto__ = adapt;
if (cljs.core.truth_(or__4671__auto__)) {
return or__4671__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__13161, map__13161__$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_13225 = om.dom.render.call(null, function() {
var _STAR_descriptor_STAR_13194 = om.core._STAR_descriptor_STAR_;
var _STAR_instrument_STAR_13195 = om.core._STAR_instrument_STAR_;
var _STAR_state_STAR_13196 = om.core._STAR_state_STAR_;
var _STAR_root_key_STAR_13197 = 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_13197;
om.core._STAR_state_STAR_ = _STAR_state_STAR_13196;
om.core._STAR_instrument_STAR_ = _STAR_instrument_STAR_13195;
om.core._STAR_descriptor_STAR_ = _STAR_descriptor_STAR_13194;
}
}(), target);
if (cljs.core.deref.call(null, ret) == null) {
cljs.core.reset_BANG_.call(null, ret, c_13225);
} else {
}
}
var queue_13226 = 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_13226)) {
} else {
var seq__13198_13227 = cljs.core.seq.call(null, queue_13226);
var chunk__13199_13228 = null;
var count__13200_13229 = 0;
var i__13201_13230 = 0;
while (true) {
if (i__13201_13230 < count__13200_13229) {
var c_13231 = cljs.core._nth.call(null, chunk__13199_13228, i__13201_13230);
if (cljs.core.truth_(c_13231.isMounted())) {
var temp__4425__auto___13232 = c_13231.state["__om_next_cursor"];
if (cljs.core.truth_(temp__4425__auto___13232)) {
var next_props_13233 = temp__4425__auto___13232;
c_13231.props["__om_cursor"] = next_props_13233;
c_13231.state["__om_next_cursor"] = null;
} else {
}
if (cljs.core.truth_(function() {
var or__4671__auto__ = !function() {
var G__13203 = om.core.children.call(null, c_13231);
if (!(G__13203 == null)) {
if (false || G__13203.om$core$ICheckState$) {
return true;
} else {
if (!G__13203.cljs$lang$protocol_mask$partition$) {
return cljs.core.native_satisfies_QMARK_.call(null, om.core.ICheckState, G__13203);
} else {
return false;
}
}
} else {
return cljs.core.native_satisfies_QMARK_.call(null, om.core.ICheckState, G__13203);
}
}();
if (or__4671__auto__) {
return or__4671__auto__;
} else {
return c_13231.shouldComponentUpdate(c_13231.props, c_13231.state);
}
}())) {
c_13231.forceUpdate();
} else {
}
} else {
}
var G__13234 = seq__13198_13227;
var G__13235 = chunk__13199_13228;
var G__13236 = count__13200_13229;
var G__13237 = i__13201_13230 + 1;
seq__13198_13227 = G__13234;
chunk__13199_13228 = G__13235;
count__13200_13229 = G__13236;
i__13201_13230 = G__13237;
continue;
} else {
var temp__4425__auto___13238 = cljs.core.seq.call(null, seq__13198_13227);
if (temp__4425__auto___13238) {
var seq__13198_13239__$1 = temp__4425__auto___13238;
if (cljs.core.chunked_seq_QMARK_.call(null, seq__13198_13239__$1)) {
var c__5474__auto___13240 = cljs.core.chunk_first.call(null, seq__13198_13239__$1);
var G__13241 = cljs.core.chunk_rest.call(null, seq__13198_13239__$1);
var G__13242 = c__5474__auto___13240;
var G__13243 = cljs.core.count.call(null, c__5474__auto___13240);
var G__13244 = 0;
seq__13198_13227 = G__13241;
chunk__13199_13228 = G__13242;
count__13200_13229 = G__13243;
i__13201_13230 = G__13244;
continue;
} else {
var c_13245 = cljs.core.first.call(null, seq__13198_13239__$1);
if (cljs.core.truth_(c_13245.isMounted())) {
var temp__4425__auto___13246__$1 = c_13245.state["__om_next_cursor"];
if (cljs.core.truth_(temp__4425__auto___13246__$1)) {
var next_props_13247 = temp__4425__auto___13246__$1;
c_13245.props["__om_cursor"] = next_props_13247;
c_13245.state["__om_next_cursor"] = null;
} else {
}
if (cljs.core.truth_(function() {
var or__4671__auto__ = !function() {
var G__13205 = om.core.children.call(null, c_13245);
if (!(G__13205 == null)) {
if (false || G__13205.om$core$ICheckState$) {
return true;
} else {
if (!G__13205.cljs$lang$protocol_mask$partition$) {
return cljs.core.native_satisfies_QMARK_.call(null, om.core.ICheckState, G__13205);
} else {
return false;
}
}
} else {
return cljs.core.native_satisfies_QMARK_.call(null, om.core.ICheckState, G__13205);
}
}();
if (or__4671__auto__) {
return or__4671__auto__;
} else {
return c_13245.shouldComponentUpdate(c_13245.props, c_13245.state);
}
}())) {
c_13245.forceUpdate();
} else {
}
} else {
}
var G__13248 = cljs.core.next.call(null, seq__13198_13239__$1);
var G__13249 = null;
var G__13250 = 0;
var G__13251 = 0;
seq__13198_13227 = G__13248;
chunk__13199_13228 = G__13249;
count__13200_13229 = G__13250;
i__13201_13230 = G__13251;
continue;
}
} else {
}
}
break;
}
}
var _refs_13252 = cljs.core.deref.call(null, om.core._refs);
if (cljs.core.empty_QMARK_.call(null, _refs_13252)) {
} else {
var seq__13206_13253 = cljs.core.seq.call(null, _refs_13252);
var chunk__13207_13254 = null;
var count__13208_13255 = 0;
var i__13209_13256 = 0;
while (true) {
if (i__13209_13256 < count__13208_13255) {
var vec__13210_13257 = cljs.core._nth.call(null, chunk__13207_13254, i__13209_13256);
var path_13258__$1 = cljs.core.nth.call(null, vec__13210_13257, 0, null);
var cs_13259 = cljs.core.nth.call(null, vec__13210_13257, 1, null);
var cs_13260__$1 = cljs.core.deref.call(null, cs_13259);
var seq__13211_13261 = cljs.core.seq.call(null, cs_13260__$1);
var chunk__13212_13262 = null;
var count__13213_13263 = 0;
var i__13214_13264 = 0;
while (true) {
if (i__13214_13264 < count__13213_13263) {
var vec__13215_13265 = cljs.core._nth.call(null, chunk__13212_13262, i__13214_13264);
var id_13266 = cljs.core.nth.call(null, vec__13215_13265, 0, null);
var c_13267 = cljs.core.nth.call(null, vec__13215_13265, 1, null);
if (cljs.core.truth_(c_13267.shouldComponentUpdate(c_13267.props, c_13267.state))) {
c_13267.forceUpdate();
} else {
}
var G__13268 = seq__13211_13261;
var G__13269 = chunk__13212_13262;
var G__13270 = count__13213_13263;
var G__13271 = i__13214_13264 + 1;
seq__13211_13261 = G__13268;
chunk__13212_13262 = G__13269;
count__13213_13263 = G__13270;
i__13214_13264 = G__13271;
continue;
} else {
var temp__4425__auto___13272 = cljs.core.seq.call(null, seq__13211_13261);
if (temp__4425__auto___13272) {
var seq__13211_13273__$1 = temp__4425__auto___13272;
if (cljs.core.chunked_seq_QMARK_.call(null, seq__13211_13273__$1)) {
var c__5474__auto___13274 = cljs.core.chunk_first.call(null, seq__13211_13273__$1);
var G__13275 = cljs.core.chunk_rest.call(null, seq__13211_13273__$1);
var G__13276 = c__5474__auto___13274;
var G__13277 = cljs.core.count.call(null, c__5474__auto___13274);
var G__13278 = 0;
seq__13211_13261 = G__13275;
chunk__13212_13262 = G__13276;
count__13213_13263 = G__13277;
i__13214_13264 = G__13278;
continue;
} else {
var vec__13216_13279 = cljs.core.first.call(null, seq__13211_13273__$1);
var id_13280 = cljs.core.nth.call(null, vec__13216_13279, 0, null);
var c_13281 = cljs.core.nth.call(null, vec__13216_13279, 1, null);
if (cljs.core.truth_(c_13281.shouldComponentUpdate(c_13281.props, c_13281.state))) {
c_13281.forceUpdate();
} else {
}
var G__13282 = cljs.core.next.call(null, seq__13211_13273__$1);
var G__13283 = null;
var G__13284 = 0;
var G__13285 = 0;
seq__13211_13261 = G__13282;
chunk__13212_13262 = G__13283;
count__13213_13263 = G__13284;
i__13214_13264 = G__13285;
continue;
}
} else {
}
}
break;
}
var G__13286 = seq__13206_13253;
var G__13287 = chunk__13207_13254;
var G__13288 = count__13208_13255;
var G__13289 = i__13209_13256 + 1;
seq__13206_13253 = G__13286;
chunk__13207_13254 = G__13287;
count__13208_13255 = G__13288;
i__13209_13256 = G__13289;
continue;
} else {
var temp__4425__auto___13290 = cljs.core.seq.call(null, seq__13206_13253);
if (temp__4425__auto___13290) {
var seq__13206_13291__$1 = temp__4425__auto___13290;
if (cljs.core.chunked_seq_QMARK_.call(null, seq__13206_13291__$1)) {
var c__5474__auto___13292 = cljs.core.chunk_first.call(null, seq__13206_13291__$1);
var G__13293 = cljs.core.chunk_rest.call(null, seq__13206_13291__$1);
var G__13294 = c__5474__auto___13292;
var G__13295 = cljs.core.count.call(null, c__5474__auto___13292);
var G__13296 = 0;
seq__13206_13253 = G__13293;
chunk__13207_13254 = G__13294;
count__13208_13255 = G__13295;
i__13209_13256 = G__13296;
continue;
} else {
var vec__13217_13297 = cljs.core.first.call(null, seq__13206_13291__$1);
var path_13298__$1 = cljs.core.nth.call(null, vec__13217_13297, 0, null);
var cs_13299 = cljs.core.nth.call(null, vec__13217_13297, 1, null);
var cs_13300__$1 = cljs.core.deref.call(null, cs_13299);
var seq__13218_13301 = cljs.core.seq.call(null, cs_13300__$1);
var chunk__13219_13302 = null;
var count__13220_13303 = 0;
var i__13221_13304 = 0;
while (true) {
if (i__13221_13304 < count__13220_13303) {
var vec__13222_13305 = cljs.core._nth.call(null, chunk__13219_13302, i__13221_13304);
var id_13306 = cljs.core.nth.call(null, vec__13222_13305, 0, null);
var c_13307 = cljs.core.nth.call(null, vec__13222_13305, 1, null);
if (cljs.core.truth_(c_13307.shouldComponentUpdate(c_13307.props, c_13307.state))) {
c_13307.forceUpdate();
} else {
}
var G__13308 = seq__13218_13301;
var G__13309 = chunk__13219_13302;
var G__13310 = count__13220_13303;
var G__13311 = i__13221_13304 + 1;
seq__13218_13301 = G__13308;
chunk__13219_13302 = G__13309;
count__13220_13303 = G__13310;
i__13221_13304 = G__13311;
continue;
} else {
var temp__4425__auto___13312__$1 = cljs.core.seq.call(null, seq__13218_13301);
if (temp__4425__auto___13312__$1) {
var seq__13218_13313__$1 = temp__4425__auto___13312__$1;
if (cljs.core.chunked_seq_QMARK_.call(null, seq__13218_13313__$1)) {
var c__5474__auto___13314 = cljs.core.chunk_first.call(null, seq__13218_13313__$1);
var G__13315 = cljs.core.chunk_rest.call(null, seq__13218_13313__$1);
var G__13316 = c__5474__auto___13314;
var G__13317 = cljs.core.count.call(null, c__5474__auto___13314);
var G__13318 = 0;
seq__13218_13301 = G__13315;
chunk__13219_13302 = G__13316;
count__13220_13303 = G__13317;
i__13221_13304 = G__13318;
continue;
} else {
var vec__13223_13319 = cljs.core.first.call(null, seq__13218_13313__$1);
var id_13320 = cljs.core.nth.call(null, vec__13223_13319, 0, null);
var c_13321 = cljs.core.nth.call(null, vec__13223_13319, 1, null);
if (cljs.core.truth_(c_13321.shouldComponentUpdate(c_13321.props, c_13321.state))) {
c_13321.forceUpdate();
} else {
}
var G__13322 = cljs.core.next.call(null, seq__13218_13313__$1);
var G__13323 = null;
var G__13324 = 0;
var G__13325 = 0;
seq__13218_13301 = G__13322;
chunk__13219_13302 = G__13323;
count__13220_13303 = G__13324;
i__13221_13304 = G__13325;
continue;
}
} else {
}
}
break;
}
var G__13326 = cljs.core.next.call(null, seq__13206_13291__$1);
var G__13327 = null;
var G__13328 = 0;
var G__13329 = 0;
seq__13206_13253 = G__13326;
chunk__13207_13254 = G__13327;
count__13208_13255 = G__13328;
i__13209_13256 = G__13329;
continue;
}
} else {
}
}
break;
}
}
return cljs.core.deref.call(null, ret);
};
}(watch_key, state, state__$1, adapt__$1, m, ret, map__13161, map__13161__$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__13161, map__13161__$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__13161, map__13161__$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__13161, map__13161__$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__13161, map__13161__$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__13161, map__13161__$1, options, target, tx_listen, path, instrument, descriptor, adapt, raf));
}
}
}
};
}(watch_key, state, state__$1, adapt__$1, m, ret, rootf, map__13161, map__13161__$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__13161, map__13161__$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__13161, map__13161__$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 args13332 = [];
var len__5729__auto___13335 = arguments.length;
var i__5730__auto___13336 = 0;
while (true) {
if (i__5730__auto___13336 < len__5729__auto___13335) {
args13332.push(arguments[i__5730__auto___13336]);
var G__13337 = i__5730__auto___13336 + 1;
i__5730__auto___13336 = G__13337;
continue;
} else {
}
break;
}
var G__13334 = args13332.length;
switch(G__13334) {
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(args13332.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 args13339 = [];
var len__5729__auto___13342 = arguments.length;
var i__5730__auto___13343 = 0;
while (true) {
if (i__5730__auto___13343 < len__5729__auto___13342) {
args13339.push(arguments[i__5730__auto___13343]);
var G__13344 = i__5730__auto___13343 + 1;
i__5730__auto___13343 = G__13344;
continue;
} else {
}
break;
}
var G__13341 = args13339.length;
switch(G__13341) {
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(args13339.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 args13348 = [];
var len__5729__auto___13352 = arguments.length;
var i__5730__auto___13353 = 0;
while (true) {
if (i__5730__auto___13353 < len__5729__auto___13352) {
args13348.push(arguments[i__5730__auto___13353]);
var G__13354 = i__5730__auto___13353 + 1;
i__5730__auto___13353 = G__13354;
continue;
} else {
}
break;
}
var G__13350 = args13348.length;
switch(G__13350) {
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(args13348.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__13351 = owner.refs;
var G__13351__$1 = G__13351 == null ? null : G__13351[name];
var G__13351__$2 = G__13351__$1 == null ? null : G__13351__$1.getDOMNode();
return G__13351__$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__13357 = owner.refs;
var G__13357__$1 = G__13357 == null ? null : goog.object.get(G__13357, name);
return G__13357__$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 args13358 = [];
var len__5729__auto___13361 = arguments.length;
var i__5730__auto___13362 = 0;
while (true) {
if (i__5730__auto___13362 < len__5729__auto___13361) {
args13358.push(arguments[i__5730__auto___13362]);
var G__13363 = i__5730__auto___13362 + 1;
i__5730__auto___13362 = G__13363;
continue;
} else {
}
break;
}
var G__13360 = args13358.length;
switch(G__13360) {
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(args13358.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 args13365 = [];
var len__5729__auto___13368 = arguments.length;
var i__5730__auto___13369 = 0;
while (true) {
if (i__5730__auto___13369 < len__5729__auto___13368) {
args13365.push(arguments[i__5730__auto___13369]);
var G__13370 = i__5730__auto___13369 + 1;
i__5730__auto___13369 = G__13370;
continue;
} else {
}
break;
}
var G__13367 = args13365.length;
switch(G__13367) {
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(args13365.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 args13372 = [];
var len__5729__auto___13375 = arguments.length;
var i__5730__auto___13376 = 0;
while (true) {
if (i__5730__auto___13376 < len__5729__auto___13375) {
args13372.push(arguments[i__5730__auto___13376]);
var G__13377 = i__5730__auto___13376 + 1;
i__5730__auto___13376 = G__13377;
continue;
} else {
}
break;
}
var G__13374 = args13372.length;
switch(G__13374) {
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(args13372.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 args13379 = [];
var len__5729__auto___13382 = arguments.length;
var i__5730__auto___13383 = 0;
while (true) {
if (i__5730__auto___13383 < len__5729__auto___13382) {
args13379.push(arguments[i__5730__auto___13383]);
var G__13384 = i__5730__auto___13383 + 1;
i__5730__auto___13383 = G__13384;
continue;
} else {
}
break;
}
var G__13381 = args13379.length;
switch(G__13381) {
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(args13379.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 args13386 = [];
var len__5729__auto___13389 = arguments.length;
var i__5730__auto___13390 = 0;
while (true) {
if (i__5730__auto___13390 < len__5729__auto___13389) {
args13386.push(arguments[i__5730__auto___13390]);
var G__13391 = i__5730__auto___13390 + 1;
i__5730__auto___13390 = G__13391;
continue;
} else {
}
break;
}
var G__13388 = args13386.length;
switch(G__13388) {
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(args13386.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("picture_processor.browser.core");
goog.require("cljs.core");
goog.require("weasel.repl");
goog.require("om.core");
goog.require("sablono.core");
window["startRepl"] = function(port) {
if (cljs.core.truth_(weasel.repl.alive_QMARK_.call(null))) {
return null;
} else {
return weasel.repl.connect.call(null, [cljs.core.str("ws://localhost:"), cljs.core.str(port)].join(""));
}
};
picture_processor.browser.core.meow = cljs.core.atom.call(null, 1);
cljs.core.add_watch.call(null, picture_processor.browser.core.meow, new cljs.core.Keyword(null, "key", "key", -1516042587), function(key, ref, old_val, new_val) {
return console.log(new_val);
});
picture_processor.browser.core.widget = function picture_processor$browser$core$widget(data, owner) {
if (typeof picture_processor.browser.core.t_picture_processor$browser$core13465 !== "undefined") {
} else {
picture_processor.browser.core.t_picture_processor$browser$core13465 = function(widget, data, owner, meta13466) {
this.widget = widget;
this.data = data;
this.owner = owner;
this.meta13466 = meta13466;
this.cljs$lang$protocol_mask$partition0$ = 393216;
this.cljs$lang$protocol_mask$partition1$ = 0;
};
picture_processor.browser.core.t_picture_processor$browser$core13465.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(_13467, meta13466__$1) {
var self__ = this;
var _13467__$1 = this;
return new picture_processor.browser.core.t_picture_processor$browser$core13465(self__.widget, self__.data, self__.owner, meta13466__$1);
};
picture_processor.browser.core.t_picture_processor$browser$core13465.prototype.cljs$core$IMeta$_meta$arity$1 = function(_13467) {
var self__ = this;
var _13467__$1 = this;
return self__.meta13466;
};
picture_processor.browser.core.t_picture_processor$browser$core13465.prototype.om$core$IRender$ = true;
picture_processor.browser.core.t_picture_processor$browser$core13465.prototype.om$core$IRender$render$arity$1 = function(this$) {
var self__ = this;
var this$__$1 = this;
var attrs13468 = self__.data;
return cljs.core.apply.call(null, React.createElement, "div", cljs.core.map_QMARK_.call(null, attrs13468) ? sablono.interpreter.attributes.call(null, attrs13468) : null, cljs.core.remove.call(null, cljs.core.nil_QMARK_, cljs.core.map_QMARK_.call(null, attrs13468) ? cljs.core.PersistentVector.EMPTY : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [sablono.interpreter.interpret.call(null, attrs13468)], null)));
};
picture_processor.browser.core.t_picture_processor$browser$core13465.getBasis = function() {
return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null, "widget", "widget", 786562584, 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, "meta13466", "meta13466", 1755809368, null)], null);
};
picture_processor.browser.core.t_picture_processor$browser$core13465.cljs$lang$type = true;
picture_processor.browser.core.t_picture_processor$browser$core13465.cljs$lang$ctorStr = "picture-processor.browser.core/t_picture_processor$browser$core13465";
picture_processor.browser.core.t_picture_processor$browser$core13465.cljs$lang$ctorPrWriter = function(this__5269__auto__, writer__5270__auto__, opt__5271__auto__) {
return cljs.core._write.call(null, writer__5270__auto__, "picture-processor.browser.core/t_picture_processor$browser$core13465");
};
picture_processor.browser.core.__GT_t_picture_processor$browser$core13465 = function picture_processor$browser$core$widget_$___GT_t_picture_processor$browser$core13465(widget__$1, data__$1, owner__$1, meta13466) {
return new picture_processor.browser.core.t_picture_processor$browser$core13465(widget__$1, data__$1, owner__$1, meta13466);
};
}
return new picture_processor.browser.core.t_picture_processor$browser$core13465(picture_processor$browser$core$widget, data, owner, cljs.core.PersistentArrayMap.EMPTY);
};
console.log("here");
om.core.root.call(null, picture_processor.browser.core.widget, picture_processor.browser.core.meow, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "target", "target", 253001721), document.getElementById("app")], null));